Repository navigation
Closed
Description
Lane: openrepotools-3 (openRepoTools-3)
Backlog and governance record requested while the existing openRepoTools-3 Claude session is already implementing the lane-tooling refactor. This issue does not create a second implementation claim.
Problem
A lane can coordinate several Git worktrees with dirty or unpushed work. Token exhaustion can happen before /swap, after /swap starts but before it completes, or while the replacement process is starting. The current coordinator directory and PAUSED record do not fully distinguish those cases or provide a complete, machine-readable worktree inventory.
Required lifecycle
RUNNING --/swap begins--> SWAPPING --all mandatory steps complete--> SWAPPED
^ |
+---------------- confirmed replacement SessionStart --------------+
RUNNINGis written only after SessionStart confirms lane, transcript/session, agent, directory, and exclusive binding./swapatomically changesRUNNINGtoSWAPPINGbefore inventory or preservation work./swapchangesSWAPPINGtoSWAPPEDonly after writer polling, worktree inventory, handoff refresh, and pause records succeed.- A generation and operation ID fence every transition so an old finalizer or competing resume cannot overwrite a newer owner.
RUNNINGwithout a verified holder means an ungraceful pre-swap stop.SWAPPINGwithout a verified holder means an interrupted swap.
Worktree recovery
- Resolve a canonical lane control root from stable
home owner/repo, estate, canonical lane name, and shape-aware worktree configuration. - Keep sidecar metadata outside Git worktrees.
- Inventory every lane-owned tree with repository, relative path, branch or detached state, HEAD, upstream, writer identity, and last-observed dirty/unpushed state.
- On resume, reconcile sidecars and handoff data against live holders,
git worktree list --porcelain, actual paths, current Git state, and unpublished commits. - Preserve and report unknown or inconsistent trees; never delete, reset, overwrite, or force-add them.
- Rebuild only through the existing estate parked-record
resumemechanism. Missing uncommitted files cannot be reconstructed from metadata. - Keep profile rotation independent of lane and worktree identity.
Governed artifacts
- OpenSpec change:
openspec/changes/add-crash-consistent-lane-worktree-recovery/ - Brainstorm overview:
ideation/brainstorm/lane-worktree-recovery-state-overview.md - Normative capability:
openspec/changes/add-crash-consistent-lane-worktree-recovery/specs/lane-worktree-recovery/spec.md - Implementation checklist:
openspec/changes/add-crash-consistent-lane-worktree-recovery/tasks.md
The OpenSpec change validates strictly and is apply-ready. The brainstorm packet validates with three atomic documents, one synthesis, and one overview.
Metadata
Metadata
Assignees
Labels
No labels
Activity
brettheap commentedon Sep 15, 2026
CLAIMED — lane openRepoTools-3, session 4135b2c9-34a6-47e3-a156-5adebb632fae@Eagle, 2026-09-15T20:12:03Z, for #91
Logged in
lanes/log/openRepoTools-3.mdat325f9f480229a1173e758a62177ab620ffeb3286.The three reads (lane-collision-protocol Rule 1):
openRepoTools#91: a resume can now say WHERE the last session stopped…
openRepoTools#91: the two deviations a reader would otherwise have to…
openRepoTools#91: a report that called the lane's own checkout an unm…
openRepoTools#91: the six fences this capability exists for, each of …
brettheap commentedon Sep 16, 2026
Cross-link:
opensoft/openRepoTools#94and its PR#121share this change's control root, and deliberately do not wait for it.#94is the measured/ctxfailure — a context clear whose replacement came up--resumeing the transcript it had just paused, because the fresh-session requirement was an environment variable the profile launcher'stmux new-sessiondrops. Its fix needs the same thing this change needs: a small, fenced, atomically-replaced record beside the lane.#121therefore writesrestart-intent.yamlas a sibling sidecar of this change'slane-state.yaml, under alane_control_rootresolved the same three ways, with the same flatkey: valuegrammar, the same atomic replace, the samelane_op_idshape and the same exit-code contract (0/1/2/7 fence lost/8/64).Four helpers are shared and were checked byte-for-byte on the two branches —
lane_control_root,lane_sidecar_put,lane_sidecar_field,lane_op_id— so the merge of#97and#121is a textual conflict whose resolution is keep either copy. No second scheme was created, and neither branch blocks the other.Two things this change owns that
#121consumes where the workstation has them, and states honestly where it does not:#121's supervisor movesSWAPPED → RUNNINGthroughset-lane-state --expect SWAPPEDafter readiness is confirmed, and is silent on the2alanes-edit.shwithoutlane-stateanswers — the pre-cutover case, not a failure. On amainwith no snapshot the "non-running until readiness" requirement is met in the restart intent, which#121owns, and only met in the lane's lifecycle once this lands. That residual is written into its design decision 12 rather than hidden.0where there is not, which is what a workstation before this change can honestly say.One reconciliation is owed to this change when the two merge:
lane_state_followmoves the snapshot toRUNNINGon anySTARTED/RESUMEDline, andlane-startwrites its Amendment 8(d)RESUMEDbefore the launch — so on a#97workstation the snapshot would reachRUNNINGahead of#121's readiness gate.#121's finalizer is fenced on--expect SWAPPEDand would refuse, which is a safe failure but not the intended one.#121's design decision 12 names this as work for whichever branch merges second.And one collision already resolved in writing: this change's landed "THE LIFECYCLE NEVER REFUSES THE SWAP" against
#121's brainstorm asking for fail-closed ownership.#121's decision 13 draws the line Amendment 17(f) already draws — the record is never refused, the kill always is when the record is incomplete — so both stand and neither is overruled.Lane: openRepoTools-3.
openRepoTools#91: the two safety holes of the sixth round — a snapsho…
Merge origin/main into feat/crash-consistent-lane-worktree-recovery
Move lane-state's unreadable-snapshot exit from 9 to 10
Document the managed-owner seam and the four merge fixes
Prove the managed-owner seam on every fixture class and every act
Tick task 8.11: the seam is proved on every fixture class
Close the three findings Copilot left open on 64dfd97
Crash-consistent lane worktree recovery: a lane now says WHERE its se…
openRepoTools becomes the openrepotools package: pipx installs the wh…
brettheap commentedon Nov 10, 2026
Lane: openRepoTools-3
Verdict: fixed, with a named residue. Closing as completed. What this issue asked for is built on code
main. Its first implementation (#97) left eight tasks of the OpenSpec change unticked on purpose, and they are listed first so that closing this issue does not hide them.The residue: eight unticked tasks in
openspec/changes/add-crash-consistent-lane-worktree-recovery/tasks.mdonopensoft/openRepoTools-spec(specmaine6eaa3c: 34 ticked, 8 unticked; its section 7 says what stands in each one's place):lane-reconcilereports a live holder, and no new refusal was added.Open children that carry the live findings: #116 (the recorded checkout is never compared; its
tree_id_forhalf is fixed), #117 (the READY line counts polled trees as recorded, and a stale registration is suppressed), #118 (lane-handofftakes a CLOSED lane to SWAPPING) and #253 (the lifecycle case in the shell suite fails now and then).The change is NOT archived.
openspec/changes/add-crash-consistent-lane-worktree-recovery/is still on the spec leg. Archiving it with eight tasks unticked is a separate decision and needs Brett's word.Evidence that the rest is built
b1015f4, 2026-10-04; code-leg squashec12254) said "Part of Crash-consistent lane worktree recovery: canonical inventory and RUNNING → SWAPPING → SWAPPED lifecycle #91", so the issue stayed open on purpose. Lifecycle reads that failed are no longer answers, set-lane-tree's fence closes with its operation, and a lane sidecar is valid only when whole #252 (code-leg squashe9b2799) took The lifecycle's remaining fail-open reads: an unreadable register becomes 'no holder', an unreadable sidecar becomes no tree, and two git reads become fabricated values #113, set-lane-tree's fence accepts a poll from a finished operation, and its observation check accepts a partial one it completes with clean-looking defaults #114 and A lane sidecar passes validation on itsschema:line alone, so a truncatedschema: 1record is read AND replaced #115, and Findings deferred from #97: fetch-first reads, the live-swap takeover, a hand-written RESUMED, and the five of the 8c5958f round #157 took the other deferred findings; all four are closed.main9a219ed:lane-handoffcallslifecycle_begin(lane-handoff:1963) before any polling andlifecycle_finish(:2899) after the last write.lanes-edit.sh:16381givesRUNNING8) lrc_v=ungraceful-stopand:16383givesSWAPPING8) lrc_v=interrupted-swap(at9a219ed), solane-reconcilenames an ungraceful stop and an interrupted swap, and resets nothing.main86d635b:set-lane-statefences on generation and operation, and exit 7 is the refusal. The inventory, the sidecars and the control root exist.Method: read, not run. Lane 3's triage read code
mainat86d635bon 2026-11-10 and ran no tests; one cite per issue was re-read at9a219ed, and the task counts at specmaine6eaa3c.Brett Heap's word, given in lane openRepoTools-3's session on 2026-11-10 (the NEEDS-BRETT dialog, "Closing the six fixed or obsolete issues": #304, #145, #125, #124, #127 and #91, answered by 12:11:11Z): "Close all six (Recommended)". Its description: "Each gets one evidence comment and is closed, and lane 3 releases its claim on it."
🤖 Generated with Claude Code
brettheap commentedon Nov 10, 2026
RELEASED — lane openRepoTools-3, session 83619980-06bb-4469-ae73-2a8c5e61981a@Eagle, 2026-11-10T12:45:10Z, for #91 — closed: its lifecycle is built; the residue is listed in 6767602266