Repository navigation
Open
Description
The finding
A lane's control root (<projects>/.lane-state/<lane>, or $LANES_LANE_STATE_ROOT/<lane>) that exists but cannot be searched hides every record under it. In that case the existence tests the two lifecycle reads make are false, and both reads answer 8, no record, where they should fail closed.
lane_trees_list:[ -d "$ltl_root/trees" ] || return 8(lanes-edit.sh:12621on maina74c7fc,:12656on managed-projection reads this checkout's row as the writers do, lane-trees tells an unlistable trees directory from no inventory, and the manual's seven-column row is qualified (#157 items 4a, 4c, 4d, 4e) #213's head). An unsearchable root makes-dfalse, solanes-edit.sh lane-trees <lane>exits 8, "no inventory". managed-projection reads this checkout's row as the writers do, lane-trees tells an unlistable trees directory from no inventory, and the manual's seven-column row is qualified (#157 items 4a, 4c, 4d, 4e) #213 makes atrees/that is there and cannot be listed answer 10 (Findings deferred from #97: fetch-first reads, the live-swap takeover, a hand-written RESUMED, and the five of the 8c5958f round #157 item 4e), but this check runs before that one, one level up.lane_state_read:[ ! -r "$lsr_f" ], then[ -e "$lsr_f" ] || [ -L "$lsr_f" ]for the 10 (:12319-12327on main). Under an unsearchable root,-eand-Lare false as well, solane-state <lane>exits 8, "no snapshot", instead of 10.lane_reconcilemaps the snapshot read's 8 toNONE(:12824). Its verdict is thenno-state(:13077): "nothing to recover", which a launcher answers by going on. That is exactly what Copilot round 6 on Crash-consistent lane worktree recovery: a lane now says WHERE its session stopped — RUNNING → SWAPPING → SWAPPED with a generation/operation fence, a machine-readable worktree inventory taken at every handoff, and a resume reconciliation that reports and resets nothing #97 gave 10 to prevent.
Evidence
On main a74c7fc (lanes-edit.sh there is byte-identical to f87fd5a's) and on #213's head. Here are the shell semantics the two checks rest on, as an unprivileged user (uid 1000), with a root at mode 600 that holds both records:
$ mkdir -p r/trees; : > r/lane-state.yaml; : > r/trees/c1-x.yaml; chmod 600 r
$ [ -d r/trees ] -> false (lane_trees_list returns 8)
$ [ -r r/lane-state.yaml ] / [ -e … ] / [ -L … ] -> all false (lane_state_read returns 8)
What would fix it
Tell an absent root from an unsearchable one before either read looks inside it:
[ -e "$root" ] && { [ ! -x "$root" ] || [ ! -r "$root" ]; }answers 10 inlane_trees_listandlane_state_read;- the
lane-stateandlane-treesarms already carry a 10 branch; lane_reconcilethen needs theindeterminateverdict for a 10 from the inventory read too. That half is Findings deferred from #97: fetch-first reads, the live-swap takeover, a hand-written RESUMED, and the five of the 8c5958f round #157 item 4e's left-over, in the region lane openRepoTools-3'sfeat/triad-lane-toolingis rewriting.
Filed by lane openRepoTools-4 from the #213 review.
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Labels
No labels
Activity