Repository navigation
lanes-index inventory follow-ups from Copilot rounds 3 and 4 on #171: unread-lane answers, partial listings, foreign-source marks, SQLite read errors, footer remedy #173
Copy link
Copy link
Open
Description
Activity
Copilot's fourth review of #171 (merge head 9b2ec40): four more findings
Copilot reviewed the PR again after the #121 merge was pushed. That is past the two-round cap, so its findings go here and this stays the single follow-up issue for #171. None of the four touches the merge itself. Each one is in code that #171 adds.
- A partial lane listing can delete indexed rows. Thread: Derived index: a worktrees table mirroring every lane's #97 inventory under inventory:<Workstation>, nudged by every inventory write, and lanes --worktrees to read it with or without --index #171 (comment) (
lanes-edit.shworktree_rows, near line 13069 at 9b2ec40).lanes_rowsis best-effort by design. When the archive can't be read, it notes that and returns 0 with the RETIRED rows missing (aroundlanes-edit.sh:7225).worktree_rowstreats that partial set as complete. An archived lane that still has sidecars is left out, andlanes-index sync --source inventorythen removes its indexed rows. The fix is a strict completeness signal for this read, for example anUNREADmarker per source when the archive could not be read, so that the indexer holds and does not delete. - An inventory source is validated only after the lock is taken. Thread: Derived index: a worktrees table mirroring every lane's #97 inventory under inventory:<Workstation>, nudged by every inventory write, and lanes --worktrees to read it with or without --index #171 (comment) (
lanes-indexcmd_sync, near line 2049). While another sync holds the lock,sync --source inventory:Ravenon Eagle (or--source inventoryin an unnamed container) writes a generic inventory mark and exits 0 without refusing. The holder then syncs the local inventory. The fix is to runinventory_source(requested)beforemark_rerun. - SQLite read errors escape as a traceback. Thread: Derived index: a worktrees table mirroring every lane's #97 inventory under inventory:<Workstation>, nudged by every inventory write, and lanes --worktrees to read it with or without --index #171 (comment) (
lanes-indexnear line 2202 incmd_status, and near line 2328 in_export_worktrees).SqliteStore.rows()letssqlite3.Errorthrough. If the provenance is valid but theworktreestable is missing or damaged,statusprints a traceback and never reaches itsrows: unreadline. The export also fails with a traceback, thoughlanes --index --worktreesstill falls back to reading the sources. The fix is to translatesqlite3.ErrortoStoreUnusableinSqliteStore.rows. - The footer's remedy names a command that reads only this workstation. Thread: Derived index: a worktrees table mirroring every lane's #97 inventory under inventory:<Workstation>, nudged by every inventory write, and lanes --worktrees to read it with or without --index #171 (comment) (
lanes, near line 368). An index listing can show Eagle's rows when run on Raven, butlane-reconcilereads only the local sidecars and disk. The footer should say to run it on the row's workstation.
Tests to add
- An unreadable archive holding a lane with sidecars: a sync keeps that lane's rows.
- A held lock with a foreign source:
sync --source inventory:<other>refuses with exit 2. - A
worktreestable dropped under valid provenance:statusprintsrows: unread, andexport --worktreesexits through the unusable path. - The
lanes --index --worktreesfooter names the workstation.
Lane: openRepoTools-3
🤖 Generated with Claude Code
- A partial lane listing can delete indexed rows. Thread: Derived index: a worktrees table mirroring every lane's #97 inventory under inventory:<Workstation>, nudged by every inventory write, and lanes --worktrees to read it with or without --index #171 (comment) (
- changed the title
[-]lanes-index inventory: a first sync that cannot read one lane publishes an empty, valid-looking indexed answer (Copilot round 3 on #171)[/-][+]lanes-index inventory follow-ups from Copilot rounds 3 and 4 on #171: unread-lane answers, partial listings, foreign-source marks, SQLite read errors, footer remedy[/+]on Oct 6, 2026 CLAIMED — lane openRepoTools-3, session 83619980-06bb-4469-ae73-2a8c5e61981a@Eagle, 2026-10-06T20:42:04Z, for #173
Logged in
lanes/log/openRepoTools-3.mdatb983d9ccf850553ee8eb43fc9e227d5e032d107a.The three reads (lane-collision-protocol Rule 1):
1. existing `CLAIMED —` comments on opensoft/openRepoTools#173: none 2. `gh pr list --repo opensoft/openRepoTools --state all --search "#173"`, kept where the row or its body names `#173`: none 3. `git ls-remote --heads git@github.com:opensoft/openRepoTools` branches naming `173` as a whole token: none
Metadata
Metadata
Assignees
Labels
No labels
Follow-up from Copilot's third review of #171 (PR for #161). The landing rule caps Copilot at two rounds, so a round-three finding goes into one issue here instead of into #171. This is that issue. It has one finding.
The finding: a first sync where one lane's inventory can't be read publishes an empty answer that looks valid
Copilot thread: #171 (comment) (commit f1e96c1,
lanes-indexaround line 1916,run_inventory).How it goes wrong.
lanes-edit.sh worktrees --allreports a lane whosetrees/directory exists but can't be read as anUNREADline.run_inventorythen puts that lane inheld. A held lane keeps its stored rows, and that part is correct: a failed read is not an answer. On the first sync the lane has no stored rows. Soafterholds nothing for it, the fingerprint covers only the lanes that were read, and the sync commits usable provenance for the source. After that:lanes-index export --worktreessucceeds. It writes no line for the unread lane.lanes --index --worktrees <lane>says "no worktree is inventoried" (exit 8).lanes --worktrees <lane>, which reads the source and not the index, says the inventory was NOT READ.The result is that a source read that failed shows up in the index as an empty answer.
A related gap with the same cause. A held lane that does have earlier rows keeps them. But the index doesn't record that the lane was held at the last sync, so an index read can't tell those rows apart from fresh ones. The
synced <UTC>stamp in theread:line covers the whole source, not each lane.Why it's low severity. Amendment 14(b) says no act reads the index, so nothing gates on this answer. Reading the source (
lanes --worktrees,lanes-edit.sh worktrees,lane-reconcile) reports the lane correctly. The wrong answer shows up only on an--indexread.Two possible fixes
worktreesrow (for example a row with an empty path andbranch = unreadable inventory (<why>)) or as a provenance note. Export emits it, and the--index --worktreesrender shows the same NOT READ line as the source read. This also fixes the related gap above.read: sources, which is the documented fallback) until a sync reads every lane.Option 1 keeps
--indexuseful on a workstation with one broken lane. Option 2 is smaller.Tests to add
trees/exists but is mode 000. Assert that the--indexread does not answer "no worktree is inventoried" for that lane.--indexread says the rows are held.Refs #161 #171 #97
Lane: openRepoTools-3
🤖 Generated with Claude Code