Skip to content

The takeover's GitHub comment opens with TAKEOVER, a dash and the taker's lane, where it ran the lane taken over from into the verb (opensoft/openRepoTools#346) - #2

Merged
brettheap merged 2 commits into
mainfrom
fix/346-takeover-comment
Nov 10, 2026
Merged

brettheap merged 2 commits into
mainfrom
fix/346-takeover-comment

Conversation

@brettheap

@brettheap brettheap commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Lane: openRepoTools-3
Claim: opensoft/openRepoTools#346 (comment)

lanes-edit.sh claim --force posted a takeover's GitHub comment whose first word ran TAKEOVER straight into the name of the lane taken over from, as in TAKEOVERrepoTc-1 — lane repoTc-2, …. With this change it opens as Rule 1 spells it, TAKEOVER — lane <taker>, session <id>, <UTC time>., which is also the line gh_reads greps for.

The cause. claim built the comment's first word from ${takeover_from:+TAKEOVER}${takeover_from:-CLAIMED}. When takeover_from is set, the second expansion gives its value, not nothing. The word is now chosen before the printf: TAKEOVER for a takeover, and CLAIMED for a claim.

How this reads the issue. The issue asks that the first line name "the kind and the lane taken over from, in the form the manual gives".

  • The manual's form is Rule 1's, in lane-collision-protocol, and in that form the first line names the kind and the taker.
  • So the lane taken over from stays where the comment already names it, on its Logged in … line, and is not added to the first line.
  • The log line is untouched.

Tests. A new case in tests/test_lane_helpers.sh runs a plain claim and a takeover with LANES_NO_GITHUB=0 against the suite's fake gh, and asserts the first line of each posted body. Before the fix, the takeover's two assertions fail.

  • An independent review found the change READY for a draft, with no MUST.
  • Merged up to code main in place as 1c0fae3, from 86d635b (Amendment 23's act 2, code#16 to code#21). One conflict, in the comment's printf, keeps main's $reads_posted with this PR's $comment_verb. Its diff against main is this PR's own lines, in two files.
  • A second independent review, of 1c0fae3, found the code READY. It checked both takeover paths, the dead lane's and the stale claim's: each now opens TAKEOVER — lane <taker>. It also checked the one reader of that word, gh_reads, which looks for TAKEOVER — and so now finds a takeover comment where it never could before.
  • Only a slice of the shell suite has been run locally, so this draft's CI run is the full suite of record.

Where it reaches. This changes the code leg only. Installs keep the code commit the root pins, 2a057a6d (v1.1.0), until a root pin bump carries it.

Not in this PR. The review found two related defects, left for follow-up:

This PR carries no closing keyword. The issue is in the root repository, so it is closed by hand once this lands.

🤖 Generated with Claude Code

Summary by Sourcery

Correct takeover comment headers to follow the lane-collision protocol and identify the taking lane.

Bug Fixes:

  • Fix takeover GitHub comments so their first line begins with TAKEOVER — lane <taker> instead of concatenating the source lane name to TAKEOVER.

Tests:

  • Add coverage for claim and takeover comment headers when GitHub posting is enabled.

…er's lane, where it ran the lane taken over from into the verb (opensoft/openRepoTools#346)

`claim` took the comment's first word from
`${takeover_from:+TAKEOVER}${takeover_from:-CLAIMED}`. The second expansion is
the value of `takeover_from` when it is set, so a takeover's comment began
`TAKEOVERrepoTc-1 — lane repoTc-2, …`. The word is now chosen before the
`printf`, as `TAKEOVER` for a takeover and `CLAIMED` for a claim, which is the
form Rule 1 gives (`TAKEOVER — lane <name>, session <id>, <UTC time>.`) and
the one `gh_reads` greps for. The lane taken over from stays on the comment's
`Logged in` line, and the log line is untouched.

The new case in tests/test_lane_helpers.sh runs a plain claim and a takeover
with LANES_NO_GITHUB=0 against the suite's fake `gh` and asserts each posted
body's first line. Run before the fix, the takeover's two assertions fail.

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

sourcery-ai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Implementation

Choose the takeover or claim verb before formatting the comment so takeover headings begin TAKEOVER — lane <taker>.

  • lanes-edit.sh L19490-19497

Tests

Exercise GitHub-enabled claim and takeover comments and check their headings and source-lane placement.

  • tests/test_lane_helpers.sh L2601-2651

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

Brings the PR for opensoft/openRepoTools#346 (the takeover comment's first word
ran the lane taken over from into the verb) up to date with code main after
Amendment 23's act 2 (code#16 to code#21). A merge in place: no rebase, no
force.

One conflict, in lanes-edit.sh, in the `claim` verb's comment `printf`
arguments (6. the comment, AFTER the push):

- The PR changed the first argument from
  `${takeover_from:+TAKEOVER}${takeover_from:-CLAIMED}` to `$comment_verb`.
- main changed the last argument from `$reads` to `$reads_posted` (the three
  reads the comment cites whole, carried across the replay's exec).
- Resolved by keeping main's `$reads_posted` and the PR's `$comment_verb`, so
  the hunk is main's text plus the PR's own change and nothing else. main's
  takeover paths (the dead-lane hold and the stale claim) both set
  `takeover_from`, which `comment_verb` tests, so both open `TAKEOVER`.

tests/test_lane_helpers.sh merged without a conflict: the PR's new case (the
opensoft/openRepoTools#346 block after the repoU claim cases) sits in main's
file unchanged, and `git diff origin/main HEAD` is the PR's two files and
nothing else (lanes-edit.sh +7 -1, tests/test_lane_helpers.sh +51).

Lane: openRepoTools-3
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@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 4 days and 6 hours by commenting @sourcery-ai review. Upgrade to get a review now.

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