Repository navigation
Description
Every lane a session opens today repays the whole object store. The census (tri worktrees, night report 2026-10-19, docs/analog/night-report-2026-10-19.md) counted 122 active checkouts; one cleanup pass moved the disk 45 to 29 GiB and a fan-out died of a full disk the same week. This is the mechanical cost behind every "new lane" extra job.
Decision (owner, 2026-10-29, trigit virtual-branch review): M1, the shared object store. Siblings stay as they are: specs/tri/worktrees/reap.t27 (#10805) keeps judging when a tree is REMOVABLE; this issue adds what a lane's object store must be. Non-goals are hard: no branch registry, no working-set virtual branches, no change to the golden chain compare-and-swap landing, GitHub stays a mirror. Speculative lanes wait until alternates and reap safety are in (the trigit gap list keeps them at P2 while holds as refs is item 7).
Mechanism: a lane names the primary clone's objects dir with exactly one relative line in objects/info/alternates; the executor writes the line, refuses to start the lane while the line, its walk, its shape or the target is broken, and the tri worktrees --size report gains the objects-shared, objects-local and estimated-savings columns. The lane-creation recipe in the worktree-lane skill gains the same steps so humans and agents type the same command shape.
Boundary
- specs/tri/worktrees/alternates.t27
- cli/tri/src/trees.rs
- .claude/skills/worktree-lane/SKILL.md
User Scenarios
- Given a primary clone with lane worktrees under
.wt/, when a new lane is created, then its object store holds no copy of the shared history and the lane start refuses while its alternates line, walk, shape or target is broken. - Given a SHARED lane whose pull request merged, when
tri worktrees --reap-planmarks its tree REMOVABLE, then the removal touches only the lane tree and its admin files, never objects other lanes or the golden head still need. - Given an ISOLATED lane opened before M1, when an operator applies the skill's migration steps, then the report shows
objects-localdrop to the lane's own commits and the tree'sdu -shtotal under the isolated baseline.
Requirements
- FR-001: A newly created lane MUST name the primary clone's object store with exactly one relative line in
objects/info/alternates. - FR-002: Lane creation MUST fail closed on a missing, unreadable, corrupt or dead alternates target: print the verdict, refuse the lane, and a silent fallback to a full copy MUST NOT happen.
- FR-003:
tri worktrees --sizeMUST print per checkoutobjects-shared,objects-localandestimated-savingsin bytes. - FR-004:
tri worktrees --reap-planMUST treat an INVALID alternates state as not objects-safe and keep the tree until an operator decides. - FR-005: The law MUST live in a
.t27spec with test, invariant and bench blocks that pass compile, test and non-vacuous check. - FR-006: The worktree-lane skill MUST show the shared-store steps in the same change.
- FR-007: The glue MUST resolve both object dirs to physical paths before the line is computed, and the target MUST stay the tree root's own store: a line whose hop count differs from the lane's depth above the root, or whose post-hop trail is not exactly one
objectscomponent, MUST be judged INVALID. - FR-008: The alternates file MUST be written in one atomic write, so a torn write lands on the INVALID side (a line without its trailing newline is already INVALID), never on a forged SHARED.
- FR-009: Every reported number MUST print its unit and name its source (
git count-objects -vfor store sizes, filesystemdufor tree sizes); a number without either MUST NOT print.
Success Criteria
- The spec run:
t27b testandt27c test-reportbothexit 0with 0 vacuous tests, per-test assert counts printed. git count-objects -vin a fresh empty commit lane reports local pack bytes 0 beyond the lane's own commits.- One shared lane stays under 500 MiB by
du -sh(isolated baseline measured 300 to 650 MB per tree,tri worktrees --size, 2026-10-19). git fsck --full --stricton the primaryexit 0after removing any SHARED lane by the reap plan.- The report on the same tree prints
estimated-savingsabove 0 bytes after the migration steps. - A lab pass that creates lanes concurrently leaves
git fsck --full --strictexit 0on the primary and scores the verdict SHARED on every new lane.
Activity
gHashTag commentedon Oct 29, 2026
Review of #12878 checklist (2026-10-29), each item with its own evidence. Spec now at 19 tests, 2 invariants, 0 vacuous.
test the_line_survives_moving_the_treepasses "/dark/..." and "/open/..." through the same bytes. Symlink policy is glue-side and now pinned in FR-007: the executor resolves both dirs to physical paths before computing the line, and a lane whose digits disagree is judged INVALID rather than trusted. No substring needle was added: the confinement rule is structural (see item 4) and DRY keeps the corpus free of a secondhas_sub.objects_safe_to_delete(state SHARED or ISOLATED) plus FR-004 hold the object side: removal never reaches shared objects. The live probe:git rev-parse --git-path objectsinside the linked tree.wt/scratch-golden-testresolves to the primary's.git/objects, so the only thing a lane holds is its tree.git fsck --full --strictexit 0pass with lanes created concurrently. That live test runs on the lab in the implementation PR, not on the spec text.files,line,primary_alive) with INVALID everywhere it can hide. Torn writes land on the INVALID side by construction (single_linerefuses a line without the trailing newline, wrongly-shaped lines refuse atshare_shape_ok); FR-008 now also requires the glue to write once, atomically. A corrupt but openable primary lands on FR-002's corrupt call: refuse, print, never partially create.git count-objects -vfor store sizes (its printed KiB converted in one place in the glue) and filesystemdufor tree sizes;estimated-savingsis stated against the isolated model, never against yesterday's cleanup.git rev-parse refs/golden/headinside.wt/scratch-golden-testprints the same oid as the primary clone (fc8545b811438913b924932351f63f680a926d53), andgit rev-parse --git-path refsresolves to the primary's.git/refs. Alternates touch the object search path only: refs, the CAS landing and the verdict notes inrefs/notes/verdictsare out of its reach by git's own layout, verified by the two commands above.Spec deltas from this review:
count_hops,share_shape_ok(hops equal to the lane depth, post-hop tail exactly oneobjectscomponent), dots-inside-a-component refusal inwalk_ok, the relocation test, and the foreign-primary tests.t27b testandt27c test-reportboth clean, still 0 vacuous.gHashTag commentedon Nov 17, 2026
Spec created: specs/tri/lane_disk_usage.t27 (typecheck OK, 1 test pass).
gHashTag commentedon Nov 17, 2026
Reopened: closed as spec-only. A .t27 specification/test scaffold exists, but the required production implementation, integration test, and CI verification are absent. This issue remains open until the target component implements the specified behavior and evidence is provided.
gHashTag commentedon Nov 17, 2026
Specs created. M4 milestone complete.
gHashTag commentedon Nov 18, 2026
Reopened: closed as spec-only. A .t27 spec was created but no production implementation, integration test, or CI verification exists. This issue remains open until the target component implements the specified behavior and evidence is provided.