cli.sgit.ai / Guides / sgit-ai 0.26.0 release notes: pack indexes, selective working copies, the pack store

sgit-ai 0.26.0: pack indexes

The release notes for 0.26.0, written to be read by a person or handed to an agent.

The design is the dev pack Pack indexes for sgit. The story and the numbers are in Pack indexes, shipped.

1. Update and check

$ sgit update          # wraps: pip install --upgrade sgit-ai
$ sgit version
sgit-ai v0.26.0

If sgit version prints a note that another sgit comes first on your PATH, you have two installs. Upgrade that one too, or put this one first. Existing clones need nothing.

2. What is new

Index packs: on by default, nothing to do

For older pack vaults: run this once, with the write key, to give them indexes:

$ sgit pack index build     # writes the index packs the vault lacks, adds the 'pack-indexes' feature
$ sgit pack index verify    # checks every index against its trees (read-only)
$ sgit pack index stats

A selective working copy: the loop for agents that do not need every file

$ sgit clone --no-checkout <vault key> work      # the vault's objects and index, no files written
$ cd work
$ sgit checkout sources/uk                       # write a folder (or files) you need
$ ... read, write, add files ...
$ sgit commit -m "..." && sgit push
$ sgit pull --no-checkout                        # move the head; list what changed; write nothing
$ sgit checkout --since-pull                     # write what that pull added or changed

The pack store: clone --pack-store

$ sgit clone --pack-store <vault key> work

One folder of a pack vault by byte ranges: clone --path

$ sgit clone --path sources/uk <vault key> work

Also in this release

3. What it measured

The CLI team's release measurement: a synthetic vault of 76,000 files in 58,553 folders, built by each build under test, on an in-memory host, 4 cores. Network time is excluded.

Flow0.25.00.26.0
full clone117 s61 s
clone --no-checkoutn/a28 s
clone --pack-storen/a26 s
clone --path of one folder (1,520 files)36 s, the whole 88 MB pack2.8 s, 12.5 MB by ranges
pull of a pass, full clone81 s6.6 s
push of a 5-file commit6.2 s4.5 to 5.2 s
push of a 300-file pass12.5 s11.6 to 11.8 s
history log, 4 commits3.2 s0.45 s
history log on a fresh clone after compaction6.1 s1.1 s
first push of a new vault (snapshot)47 s82 to 84 s
compaction58 s95 to 109 s

cli.sgit.ai measured the released code (09172b0f) independently on its own 76,000-file vault: full clone 49.8 s, --no-checkout 33.6 s, --pack-store 27.7 s, clone --path 3.1 s, a 5-file push 5.2 s, pull --no-checkout 1.1 s, history log 0.19 s, and 0.84 s on a fresh clone after compaction; the table. Both sets agree: everything an agent does daily is as fast or faster. The first push of a vault and each compaction now also write the snapshot index, which is the price of the rest.

4. Compatibility

SituationWhat happens
an existing pack vault, agents on 0.25.0 and 0.26.0 togetherworks. 0.25.0 never reads bare/packs/indexes/; 0.26.0 fills the gaps 0.25.0's pushes leave. The vault's min_client does not change
a pack vault created with 0.26.0needs 0.26.0. As since 0.24.0, a new pack vault is gated at the release that created it. Update every agent that will use it before you create it. R3-2
a --pack-store cloneonly 0.26.0 opens it; sgit pack store extract makes it an ordinary clone
sgit pack index verify after a compaction of an older vaultmay report wrong offsets (at) in the index of an archived 0.24.0 or 0.25.0 pack; no data is affected and no reader in 0.26.0 uses those offsets. R3-1
normal (loose) vaultsunchanged

5. What is on disk now

Everything below lives under .sg_vault/local/ in each clone, readable by you alone, as in 0.25.0:

FileHoldsDelete it?
index/packs/<folder>/<name>.zipthe index packs this clone downloaded, still encryptedsafe; fetched again when needed
index/cd/<folder>/<name>.jsonthe central directories a scoped clone read (object ids and offsets)safe
checkout.json, last-pull.json, stale.jsona selective clone's record: the paths checked out, what the last pull changed, bytes a pull left behindsafe; rebuilt from the files on disk
pack-store.sqlitea --pack-store clone's table of where each object sits in which packsafe; sgit pack store rebuild
generations.json, gaps.jsoncommit generations this clone computed; data packs it pushed without an indexsafe

The flat cache and scan cache of 0.25.0 are unchanged (threat model TM-R41). The index packs add nothing in clear: they stay encrypted on disk and are opened in memory.

6. Still slow, or not covered

Sources: the CLI's CHANGELOG [Unreleased] section and the CLI team's documents of 26 and 27 October, published here as research: the dev-pack review, steps 1 to 5 shipped, their own review, the fixes and release readiness; cli.sgit.ai's reviews, rounds 1, 2 and 3, run against SGit-AI__CLI at a9f24d86, 58f52a42 and the dev merge 09172b0f.

This page as markdown · its source, admin/content/docs/update-to-0-26-0.md