Skip to content

The handoff's READY line counts polled trees as recorded, and a stale registration is suppressed whenever a sidecar names the same path #117

Closed

Description

@brettheap

Two places where the recovery-facing output claims more than it knows.

1. The READY line counts the trees that were POLLED, not the sidecars that were WRITTEN

lane-handoff's poll_writer increments before either the observation or the inventory write is known to have worked:

	writer_count=$((writer_count + 1))
	...
	if [ -n "$lc_on" ] && [ "$pw_orc" = 0 ]; then
		LANES_NO_FETCH=1 "$LANES_EDIT" set-lane-tree "$lane" "$pw_d" \
			... >/dev/null 2>&1 ||
			note "the worktree inventory entry for $pw_d could not be written — ..."
	fi

and the READY line spends that count on a different sentence:

	say "  inventory: $writer_count worktree(s) recorded — lanes-edit.sh lane-trees $lane"

A tree whose observation refused (lane-tree-now exit 1, a checkout git cannot be read through) files no sidecar at all, and a tree whose set-lane-tree was refused (the fence, an unknown schema) files none either — both are still counted as recorded. The note is on stderr among the handoff's other notes; the READY block is the summary a person reads when they are recovering, and it says the inventory holds N entries that lane-trees does not have.

2. A stale registration is suppressed whenever a sidecar names the same path

lane_reconcile seeds the seen-set from every sidecar before the registration sweep:

    [ -n "${lrc_p:-}" ] && lrc_seen="$lrc_seen $lrc_p $(lane_real_path "$lrc_p") "

and the sweep skips anything already in it:

      case "$lrc_seen" in *" $lrc_wp "*|*" $lrc_wpr "*) continue ;; esac
      if [ -d "$lrc_wp" ]; then
        ... unmanaged ...
      else
        ... stale-registration ... `git -C %s worktree prune` is a person's act

So a tree that WAS inventoried and whose directory has since been removed is reported only as missing or possible-loss — the classification the sidecar branch gives it — and never as stale-registration, because the sidecar named the path first. git still holds the registration, the report omits the git worktree prune remedy, and the estate's resume refuses that leg for a stale registration the recovery report said nothing about.

These two pull in opposite directions and the tension is the reason this is filed rather than patched: the seen-set exists so that ONE tree is named ONCE (612ba5c, the symlinked-path defect where every tree was reported twice), and the registered-but-gone condition wants to be said about a path a sidecar has already spoken for.

Why this is filed rather than fixed on #97

Copilot review rounds are capped at two per pull request (Brett Heap's ruling of 2026-09-16); #97 is at round six and took only the two safety holes it could not land with. Neither of these misreports work as clean: the first over-counts a summary line whose detail is a command away, and the second names a real tree under the wrong heading.

What's open

For the count: track the inventory writes that succeeded and say N of M polled, so the number and lane-trees agree. For the registration: decide the registered-but-gone case BEFORE the path is deduplicated, and let one tree carry both facts on one row (possible-loss AND a live registration, with the prune named) rather than choosing between two rows and one heading.

Filed from Copilot round 6 on #97 — #97 (comment) and #97 (comment) — and named in openspec/changes/add-crash-consistent-lane-worktree-recovery/tasks.md section 7.

Activity

  1. brettheap commented on Sep 16, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoTools-3, session 4135b2c9-34a6-47e3-a156-5adebb632fae@Eagle, 2026-09-16T13:06:06Z, for #117

    Logged in lanes/log/openRepoTools-3.md at fdc50b9b49f9ee8e4de8297c1a8522fff2bd6010.

    The three reads (lane-collision-protocol Rule 1):

    1. existing `CLAIMED —` comments on opensoft/openRepoTools#117:
       none
    2. `gh pr list --repo opensoft/openRepoTools --state all --search "#117"`, kept where the row or its body names `#117`:
       none
    3. `git ls-remote --heads [email protected]:opensoft/openRepoTools` branches naming `117` as a whole token:
       none
    
  2. brettheap commented on Nov 10, 2026

    @brettheap
    ContributorAuthor

    RELEASED — lane openRepoTools-3, session 83619980-06bb-4469-ae73-2a8c5e61981a@Eagle, 2026-11-10T12:47:00Z, for #117 — handed to lane openRepoTools-5 (#165 6767583421) under Brett's extended landing word; lane 5 claims it next

  3. brettheap commented on Nov 10, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoTools-5, session 0d83dca2-c18c-4bb0-99ce-896e6cafea02@Eagle, 2026-11-10T13:41:53Z, for #117

    Logged in lanes/log/openRepoTools-5.md at ac2be0d48a13dd3a5c6380c9e2e46de72c37ce47.

    The three reads (lane-collision-protocol Rule 1):

    1. existing `CLAIMED —` comments on opensoft/openRepoTools#117:
    6:CLAIMED — lane openRepoTools-3, session 4135b2c9-34a6-47e3-a156-5adebb632fae@Eagle, 2026-09-16T13:06:06Z, for opensoft/openRepoTools#117
    13:1. existing `CLAIMED —` comments on opensoft/openRepoTools#117:
    26:RELEASED — lane openRepoTools-3, session 83619980-06bb-4469-ae73-2a8c5e61981a@Eagle, 2026-11-10T12:47:00Z, for opensoft/openRepoTools#117 — handed to lane openRepoTools-5 (#165 6767583421) under Brett's extended landing word; lane 5 claims it next
    2. `gh pr list --repo opensoft/openRepoTools --state all --search "#117"`, kept where the row or its body names `#117`:
       none
    3. `git ls-remote --heads [email protected]:opensoft/openRepoTools` branches naming `117` as a whole token:
       none
    
  4. brettheap commented on Nov 10, 2026

    @brettheap
    ContributorAuthor

    Lane openRepoTools-5, 2026-11-10T23:57Z: this issue is complete, through opensoft/openRepoTools-code#29 and opensoft/openRepoTools-spec#22, which lane openRepoTools-3 landed on 2026-11-10.

    Lane: openRepoTools-5

  5. brettheap commented on Nov 10, 2026

    @brettheap
    ContributorAuthor

    RELEASED — lane openRepoTools-5, session 0d83dca2-c18c-4bb0-99ce-896e6cafea02@Eagle, 2026-11-10T23:57:34Z, for #117 — its fix landed as opensoft/openRepoTools-code#29 (squash 10799a5) with opensoft/openRepoTools-spec#22 (squash 120ece9), LANDED by lane openRepoTools-3 at 2026-11-10T21:53:47Z and 21:55:05Z; lane 5 marked the issue completed at 23:56:33Z (6782664808)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions