Skip to content

A test pins rename-lane's in-place stamp: a handoff not called for the old lane is stamped where it is, its note is printed, and the rename still commits (opensoft/openRepoTools#123) - #28

Merged
brettheap merged 1 commit into
mainfrom
fix/123-pin-in-place-handoff-stamp-note
Nov 10, 2026
Merged

brettheap merged 1 commit into
mainfrom
fix/123-pin-in-place-handoff-stamp-note

Conversation

@brettheap

@brettheap brettheap commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

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

One commit, 227043e, on code main ecd1bce. It is the code half of opensoft/openRepoTools#123, which lane 3 offered to lane 5 on opensoft/openRepoTools#165 (6767535266): "document the in-place stamp, plus a test pinning the note. That is Brett's "Document it (Recommended)"". The manual's half is the paired spec-leg PR on opensoft/openRepoTools-spec, branch docs/123-in-place-handoff-stamp.

READY for lane 3's review, with its paired opensoft/openRepoTools-spec#20. CI ran the whole suite on this head, 227043e, and all 14 checks are green. It changes no code.

What it pins

rename-lane leaves a handoff that is not named …-lane-<old>.md where it is. It prints its note, stamps the file, and still commits the rename. That graceful degrade is deliberate (the in-place fixture param). Until now, though, nothing pinned the note or the commit's contents.

test_rename_in_place_handoff_prints_its_note_and_the_rename_still_commits, in tests/test_rename_publication_atomic_158.py, runs a real rename-lane on RenameBox(tmp_path, "in-place") and asserts:

  • exit 0;
  • the note, exactly once, in the script's own words, with the cell the row names;
  • the handoff still at its old path, with the Rule 3 RENAMED from … line under its header block, and nothing else changed in it;
  • the commit's five paths: the handoff, lanes/LANES.md, lanes/aliases.tsv, and the old and new logs;
  • the row's handoff cell still naming the file, and the alias line.

Checked

  • Direct pytest at the fix: 1 passed.
  • Two scratch copies of lanes-edit.sh, neither committed, each make the case fail:
    • one changes the note's words;
    • one turns the note into Copilot's refusal.
  • With the module's in-place read-only and splice cases: 3 passed.
  • The run.sh verify (-k 'rename_in_place_handoff_prints_its_note 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

Pin successful publication when rename-lane encounters a handoff that cannot be renamed.

Enhancements:

  • Pin the graceful in-place handoff behavior of rename-lane, including its note, stamp, committed files, and preserved handoff reference.

Tests:

  • Add an end-to-end regression test covering successful in-place handoff stamping and rename publication.

…the old lane is stamped where it is, its note is printed, and the rename still commits (opensoft/openRepoTools#123)

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 ruling, relayed by lane 3 on #165, is "Document it": 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-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

Tests

Add an end-to-end regression test that pins the in-place handoff note and stamp while verifying the rename still commits the expected files and metadata.

  • tests/test_rename_publication_atomic_158.py L231-277

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 e9d6faf into main Nov 10, 2026
15 checks passed
@brettheap
brettheap deleted the fix/123-pin-in-place-handoff-stamp-note branch November 10, 2026 21:49
brettheap added a commit to opensoft/openRepoTools-spec that referenced this pull request Nov 10, 2026
… is stamped where it is and not moved, and quotes the note `rename-lane` prints (opensoft/openRepoTools#123) (#20)

opensoft/openRepoTools#123 found that `lanes-edit.sh rename-lane` leaves a
handoff the row names that is not called `...-lane-<old>.md` where it is,
prints a note, stamps it, and commits the rename, and that this table's
clause (d) row said nothing about it. Brett Heap's answer, relayed by lane 3
on opensoft/openRepoTools#165, is "Document it (Recommended)": the graceful
degrade stays.

docs/README-lanes.md, the row for clause (d) in "What one command does", gains
one sentence: a handoff not named `...-lane-<old>.md` has no lane in its name
to rename, so it is stamped where it is and not moved; the rename is still
committed; the row's handoff column still names that file; and `rename-lane`
prints "the handoff <cell> is not named `...-lane-<old>.md`, so it has no lane
in its name to rename; it is stamped where it is (Amendment 16(d))", quoted
as lanes-edit.sh prints it at ecd1bce with the cell and the old lane as
placeholders. The table keeps its three columns, and the row has no `|` of
its own.

The code leg's test that pins the note landed as opensoft/openRepoTools-code#28.

Lane openRepoTools-3's independent review read READY at f95b401. It lands by squash right after its code half, 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.

1 participant