Skip to content

lane-handoff's no-tmux refusal names the mode its flag selects, respawn for --restart and end for --exit, where it printed respawnend (opensoft/openRepoTools#355) - #27

Merged
brettheap merged 1 commit into
mainfrom
fix/355-handoff-die-names-its-mode
Nov 10, 2026
Merged

brettheap merged 1 commit into
mainfrom
fix/355-handoff-die-names-its-mode

Conversation

@brettheap

@brettheap brettheap commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Lane: openRepoTools-5
Claim: opensoft/openRepoTools#355 (comment)

One commit, 12319d2, on code main ecd1bce. It fixes opensoft/openRepoTools#355, which lane 3 offered to lane 5 on opensoft/openRepoTools#165 (6767535266) under Brett's "Yes, extend it (Recommended)": "Any lane may write a lane-tooling fix. Lane 3 reviews it and lands it under the standing word once it is READY and every check is green."

READY for lane 3's review. CI ran the whole suite on this head, 12319d2, and all 14 checks are green.

The defect

lane-handoff's refusal for a missing tmux built its mode word from ${do_restart:+respawn}${do_exit:+end}. Both flags are always 0 or 1, never empty, so both expansions fired, and the message named respawnend, which is not a mode.

The fix

  • lane-handoff: the refusal names end where --exit is 1, and respawn otherwise. --restart and --exit are refused together earlier, so exactly one is 1 at that line. The message's other words are unchanged.
  • No other message in lane-handoff builds a word from these flags. The other ${x:+…} expansions test strings that can be empty.
  • tests/test_a23_lane_handoff.py: test_the_no_tmux_refusal_names_its_mode_not_both_words, parametrized on --restart/respawn and --exit/end. Each case asserts exit 2, the mode word in the message, and no respawnend.

Checked

  • Direct pytest at the fix: 2 passed, 20 deselected. At base ecd1bce, both cases fail on respawnend.
  • test_repo_hygiene.py: 240 passed and 18 skipped, both at the fix and at base.
  • The run.sh verify (-k 'no_tmux_refusal_names_its_mode or repo_hygiene') is still queued behind py-bench's shared test lock, and it is a subset of what CI ran. Its result follows as a comment.

🤖 Generated with Claude Code

Summary by Sourcery

Fix lane-handoff's no-tmux refusal to report the correct mode for restart and exit operations.

Bug Fixes:

  • Correct the no-tmux refusal message so it names the selected respawn or end mode instead of the invalid respawnend text.

Tests:

  • Add parameterized coverage for the --restart and --exit refusal messages, including exit status and preservation of the surrounding message text.

…wn for --restart and end for --exit, where it printed respawnend (opensoft/openRepoTools#355)

The refusal built its mode word from ${do_restart:+respawn}${do_exit:+end}. Both flags are 0 or 1 and never empty, so both expansions fired and the message named respawnend, which is not a mode. It now names end when --exit is 1 and respawn otherwise; --restart and --exit are refused together earlier, so exactly one is 1 at that line. The refusal's other words are unchanged.

No other message in lane-handoff builds a word from these flags: the other ${x:+...} expansions test strings that can be empty.

The new case runs lane-handoff --restart and --exit with no tmux and pins the word in each message, and respawnend not in either. Both cases fail at the base with respawnend.

Lane: openRepoTools-5
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@sourcery-ai

sourcery-ai Bot commented Nov 10, 2026

Copy link
Copy Markdown

Reviewer's Guide

Implementation

Update the no-tmux refusal to select end for --exit and respawn otherwise, avoiding the concatenated mode name.

  • lane-handoff L3070-3076

Tests

Cover both flags’ refusal messages, checking the selected mode and ruling out respawnend.

  • tests/test_a23_lane_handoff.py L489-505

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sonarqubecloud

Copy link
Copy Markdown

@sourcery-ai

sourcery-ai Bot commented Nov 10, 2026

Copy link
Copy Markdown

Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 3 days and 21 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@brettheap
brettheap merged commit 19bef60 into main Nov 10, 2026
15 checks passed
@brettheap
brettheap deleted the fix/355-handoff-die-names-its-mode branch November 10, 2026 21:48
brettheap added a commit that referenced this pull request Nov 10, 2026
…the old lane is stamped where it is, its note is printed, and the rename still commits (opensoft/openRepoTools#123) (#28)

opensoft/openRepoTools#123 asked whether a handoff not named
`...-lane-<old>.md` should be refused at preflight or stamped where it is.
Brett Heap's answer, relayed by lane 3 on opensoft/openRepoTools#165, is
"Document it (Recommended)": the graceful degrade stays, the manual's clause
(d) row says so (spec leg), and this case pins what it does.

test_rename_in_place_handoff_prints_its_note_and_the_rename_still_commits
runs a real `rename-lane` on a handoff named `notes.md` and holds that it
exits 0; prints the note with the cell the row names, its words and
"(Amendment 16(d))"; leaves the handoff at its old name with the Rule 3
`RENAMED from <old> ...` line under its header block, and nothing named for
the new lane beside it; and commits the row (its handoff column still naming
the same file), the log's move, the alias and the handoff in one commit.

The case passes at ecd1bce. Against a scratch copy of lanes-edit.sh whose note
reads "stamped in place", and against one whose in-place arm dies, it fails.
No code in lanes-edit.sh changes.

Lane openRepoTools-3's independent review read READY at 227043e. It landed through lane 3's merge queue as the second prefix, after #27: tests.yml run 42901387372 passed every job on tree 8f08e14, which this commit's tree equals. It lands under Brett Heap's standing landing word, which he extended to the lane-tooling fixes any lane writes once lane 3 reviews them READY.

Lane: openRepoTools-5
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
brettheap added a commit that referenced this pull request Nov 10, 2026
…es a gone tree's kept registration on one row; READY counts recorded trees (opensoft/openRepoTools#116, opensoft/openRepoTools#117) (#29)

opensoft/openRepoTools#116, its second half. A tree record now carries
`repo`, the path's git common directory, read with `git_common_real` before
`set-lane-tree` takes the sidecar lock and passed to `lane_tree_put` as an
optional thirteenth argument. `lane_reconcile` reads it from the sidecar and
compares it with `git_common_real` of the path now: a different one is
`wrong-repository`, counted toward recovery, and nothing else of the record
is compared against that tree; an identity git cannot give now is
`unreadable`; a record with no `repo` (every one a released helper wrote) is
not compared. The recorded `checkout` is not what is compared: for a lane
with no legs it is the lane's `dir`, even for a tree of another repository.

`lane-trees`' row keeps its thirteen fields. The T018 goldens hold it byte
for byte (tests/fixtures/t018/single-repository.golden, the
`lane-handoff: inventory` section, and
tests/fixtures/t018-handoff/single-repository-decoys.golden), and two shell
readers, `lane_reconcile` and `worktree_rows`, read exactly thirteen names,
so a fourteenth field would have been read into their schema word. So the
identity is read from the sidecar rather than appended to the row.

opensoft/openRepoTools#117. `lane-handoff` counts `writer_recorded` only
where `set-lane-tree` succeeded, and its READY line says
`N of M polled worktree(s) recorded` where the two differ; where every
polled tree was recorded the line is the one the goldens hold. In
`lane_reconcile`'s arm for a recorded path that is gone, the registrations
of the recorded checkout and then of the lane's `dir` are asked for the path
under its recorded spelling and its parent's physical one (`path_real`).
Where one holds it, the `missing` or `possible-loss` row names
`git -C <checkout> worktree prune` and the physical spelling joins the seen
set, so the sweep neither drops the remedy nor names the tree a second time
as `stale-registration`.

Tests: tests/test_reconcile_identity_116_117.py, six cases, and two cases in
tests/test_triad_lane_tooling_handoff.py. Each fails at ecd1bce and
passes here; both T018 golden cases pass here unchanged.

Lane openRepoTools-3's independent review read READY at 75cd0b0. Its SHOULD 1, a gone tree that only another repository registers in a lane with no legs, is a later follow-up, and the manual's half says what this commit does. It landed through lane 3's merge queue as the third prefix, after #27 and #28: tests.yml run 42901392793 passed every job on tree 6e62bb3, which this commit's tree equals. It lands under Brett Heap's standing landing word, which he extended to the lane-tooling fixes any lane writes once lane 3 reviews them READY.

Lane: openRepoTools-5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
brettheap added a commit that referenced this pull request Nov 11, 2026
…eeping both test blocks, #27's first

The merge brings #28, #29, #31 and #33 onto this
branch, on top of the #27 that lane 3 checked at 10799a5.

One conflict, at the end of tests/test_a23_lane_handoff.py: #27
appended its test_the_no_tmux_refusal_names_its_mode_not_both_words block
there, and this branch appended the #118 block (the _closed and _held helpers
and the three test_118 cases) at the same place. Resolved by keeping both,
unchanged and with two blank lines between them: code#27's block first, then
this branch's. No other file conflicted; lane-handoff merged by itself.

The resolved tests/test_a23_lane_handoff.py is blob
3927b53, the blob lane 3 computed on 10799a5.
No commit after 10799a5 on code main touches that file or lane-handoff
(git diff 10799a5 749e969 -- tests/test_a23_lane_handoff.py is empty), so the
blob is the same.

Checked before this commit: bash -n lane-handoff passes; each of the five test
ids of the two blocks passes, run one at a time (2 for code#27's block, 3 for
this branch's).

Lane: openRepoTools-5
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lane-handoff's no-tmux die message prints respawnend, since do_restart and do_exit are 0 or 1 and never empty

1 participant