Skip to content

fix(ci): give each kill-switch-stopped review its own re-run place and wait out a running checks run - #17477

Merged
melodic-automation-lanes[bot] merged 6 commits into
mainfrom
work-resolve-issue/issue-17285-44572843965-1
Nov 20, 2026
Merged

melodic-automation-lanes[bot] merged 6 commits into
mainfrom
work-resolve-issue/issue-17285-44572843965-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #17285

Summary

Opened by the work-resolve-issue lane. The run's own summary:

The reconciler already gathers both kill-switch-stopped review lanes of a head in one pass (stoppedReviews), but it packed them into the head's one place, and it said nothing about a stopped lane whose head's newest pr-require-checks run was still going. Now each review re-run whole takes its own place under MAX_IN_FLIGHT. A head whose lanes do not fit is deferred and logged ("deferred, all 3 re-run places taken" or "only N of 3 re-run places left"), and the pass writes no clean. A stopped lane on a head whose checks run is in progress, at any attempt, logs that it waits for that run and counts as a wait, so the pass writes no clean. Design choice, from the existing header's stated reason (both lanes in one pass so their completions cost ci-status one attempt) and a review finding: a head's two lanes are placed together or deferred together, and a set short of places waits whole instead of sending its floor or switch checks re-run without its reviews. That avoids pushing ci-status toward RECONCILER_ATTEMPT_CAP. Splitting the reviews off still happens when only record uploads run short, as before. Merge gate: babysit_review_evidence judges each lane's run by its own run id and attempt (_kill_switch_stopped on attempt 1). Each lane is still a whole-run /rerun with its own attempt-2 record, so the gate's binding holds for both lanes re-run in one pass. No workflow change was needed: record-1 to record-3 already carry up to three records.

Not verified

  • node --test of reconcile.test.mjs and the other reconcile-lost-runs tests: this lane cannot run node, so the suite is left to the PR's CI; the tests were traced by hand and by the review subagent
  • check-affected's comment-hygiene and size-check could not run here (comment-hygiene could not fetch its action from ci-workflows on a denied network host; size-check's script is missing from the lane checkout); both are left to the PR's CI
  • tidy: not run, because the change is under .github/, a listed shared path
  • In-flight review re-runs still count toward no place in later passes (classify gives a hosted review re-run no CI slot); the per-lane place applies within the pass that plans the re-runs

Fix

  • .github/scripts/maintenance-reconcile-lost-runs/reconcile.mjs: place() charges one place per kill-switch or rate-held review re-run plus one for the rest of the set, names why a set does not fit (places taken, places left, or uploads), splits reviews off only when uploads run short; a new…
  • .github/scripts/maintenance-reconcile-lost-runs/reconcile.test.mjs: new tests for both lanes re-run in one pass with their own records and places, a lane deferred when places run out (all taken, and only one left), a stopped lane waiting on a checks run in progress at attempt 1 and attempt 2 with…

Verification

The runner ran each check from the base copy against 36544e7:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • check-changelog-fragments: all 8 fragments valid (no plugin changed, so no fragment owed)
  • check-changed-skills: no changed skills, nothing to gate
  • check-affected: 10 passed, 10 skipped over 2 changed files
  • cant-fail-scan --check on reconcile.test.mjs: PASS, no gating findings (one report-only source-text-read finding on an existing test at line 3473)
  • fresh-context review subagent: traced each existing placement/deferral test and the new tests by hand, found none failing; its findings (a floor+reviews set short of places sent its floor alone, busy heads uncovered, comment overstated which reviews take a place) were fixed and covered by tests
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/44572843965

Left out: the items under Not verified.

Related

#17285

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review needs no new review of b6a24a3771a1264f75fa45e20a7211d889f00183: no file of this pull request changed since the review of bca0ba7.

Security review: PR #17477

I found no security issues in this head. The lane already reviewed an earlier head, so this review was blocking only: it reports CRITICAL and IMPORTANT findings and drops SUGGESTION ones.

What changed. Both changed files are under .github/scripts/maintenance-reconcile-lost-runs/ and neither is on the trusted-path list. I read every hunk of both.

  • reconcile.mjs
    • The isRunningChecks predicate is new. A review lane stopped by a kill switch now waits, and counts as a wait, while the head's newest checks run is still going. That wait is checked before the busy skip, so a busy head can also log a wait and hold off clean.
    • place() now charges one place for each review re-run, plus one place for the rest of the set. It splits the reviews off only when record uploads run short and the places still fit.
  • reconcile.test.mjs has new and updated tests for that behavior.

Kill switch. Nothing here weakens the kill switch. The new wait loop only adds waits. It only reads env[name]?.toLowerCase() !== "true" to decide whether a stopped lane is waiting rather than switched off. It doesn't send any re-run. The code that decides whether a stopped review re-runs while a switch is on is unchanged.

Other trust controls. The change doesn't touch token scope, trusted actors, merge holds or what untrusted text reaches a lane. The place accounting is stricter than before: sets take more places and wait whole more often, so fewer re-runs go out in a pass.

Settled thread. The earlier thread about a floor set being split when short of both places and uploads was fixed at reconcile.mjs L1950. The split check now also requires places(set) <= room, and the updated 21:50 test covers it. That thread raised a correctness point, not a security one, and I'm not raising it again.

PR context. The description and closing-issue text contain no embedded instructions aimed at this lane.

Spend. Within a pass, the reconciler may now hold back re-runs it would have sent before. That spends no new money.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on 36544e7c2c266b626ed1ee2e3f26153ec1ba7f8b; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

claude-review needs no new review of b6a24a3771a1264f75fa45e20a7211d889f00183: no file of this pull request changed since the review of bca0ba7.

Code review (blocking only): #17477

I found no blocking problems at head bca0ba7e.

Scope. I read every hunk of both changed files:

  • .github/scripts/maintenance-reconcile-lost-runs/reconcile.mjs
  • .github/scripts/maintenance-reconcile-lost-runs/reconcile.test.mjs

I also read the unchanged code that the changed lines call in plan(): classify/busy, readJobs, stoppedReviews, the isRedChecks(checks) branch, waits and its return, and isUnreviewed/recorded.

The earlier finding is fixed. The earlier thread said a floor+reviews set that is short of both places and uploads sent its floor alone. split now also requires places(set) <= room (reconcile.mjs#L1950). The 21:50 test now expects the switched set to wait whole. A new test still covers the split path: uploads short, places fit. The code, the header (L141-L146) and the PR body now state the same rule. That thread stays settled.

Logic I checked at head:

  • Wait for a running checks run (L1396-L1410):
    • checks is now declared before busy, and nothing earlier uses it.
    • isRunningChecks handles a missing run.
    • Each stopped lane adds one to waits, which goes into deferred at the return. So the pass writes no clean, at attempt 1 and at attempt 2 (when busy is set).
    • A re-run review is at attempt 2, so isUnreviewed no longer matches it and it is not counted again.
    • The red-checks branch cannot fire while checks are running, so a head is never both waited on and re-run in one pass.
  • places() and short() (L1937-L1965): each review takes one place, the rest of the set takes one, and a lane item takes one. room and uploads each go down only after a set is placed. The deferral messages match the wording in the issue.

Closing issue #17285. Against each acceptance criterion:

  • Both lanes re-run in one pass, each with its own attempt-2 record and its own place: met, and the new test at reconcile.test.mjs:2742 covers it.
  • A left-over lane is deferred with "all 3 re-run places taken" or "only N of 3": met and tested.
  • A stopped lane on a head whose checks run is still going logs a wait and writes no clean: met and tested at attempt 1 and attempt 2.
  • The merge gate's binding holds for both lanes: these tests show it only indirectly. They assert whole-run /rerun calls, so attempt 1 stays the stopped one, and each lane gets its own reconcile-rerun-<id>-2-<sha> record. No babysit_review_evidence test here could fail if that binding broke.
  • The tests pass: that is the author's claim, and I have not verified it. I ran nothing.

Loosened checks. One existing test changed its expected values: the 21:50 placement test now expects the floor not to re-run alone. That change follows the stricter rule the code now enforces, and it adds assertions rather than accepting more. So it is not a loosening. The other changed test only had its name changed.

Loosened-check verdict: fail (default; the prompt had no loosened_check_verdict: or loosened_check_patterns: lines); patterns: 0. I did not check the citation requirement because there was no loosened_check_decision_record: line.

Embedded text. I found no embedded instructions in the PR context, settled-thread or prior-findings files.

This review was blocking only, because the lane already reviewed an earlier head, so advisory findings were left out.

Spend: none beyond this review run. The change adds at most one jobs read per stopped review lane on a head whose checks run is still going, against the GitHub API, and reads already cached across passes are reused. No billing change.

Verifier dropped 0 of 0 candidates.

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/publish-feedback
Model rung 0
Leg base
Run job success
Activity step skipped
Commits pushed none recorded
Run 44578994466

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/fix-ci
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none (read lane)
Run 44582782542

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/apply-patch
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed 3a31736
Run 44582782542

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@melodic-automation-lanes melodic-automation-lanes Bot added the needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. label Nov 19, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The pr-unblock lane stopped address-feedback on this pull request: the pull request has an unresolved review thread the lane does not take (a reviewer it does not act on, a review of an older head, or a thread it already answered), so no lane resolves it and a session builder takes it. The lane labels it needs-session for a session builder, who makes the change this lane cannot, and the run ends in a failing pr-unblock/address-feedback status on the head the lane gated.

When a retry on this head can change the outcome, the lane runs one on its own, up to its per-head cap, and edits this comment if it stops again; a run that does not stop clears the status. When no retry can (a review thread the lane does not take or settle, or a failing check after the retries are spent), a person resolves the threads or gets the checks green, then dispatches the workflow below: that run finds the cause gone and clears the status. On a pull request the lanes App opened, the dispatchers start that run once per stop; on any other, a person does. A new commit to the branch starts clean.

To run it again on this head now, dispatch the pr-unblock workflow:

gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=17477 -f activity=address-feedback

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/report-escalation
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 44585082434

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 3a31736300d1faf75cf9520071c6376374456306. No person needs to act: a lane clears this reason, and the next scheduled run judges it again.

a pr-unblock lane stopped its head (pr-unblock/address-feedback is failure), which clears when the
  lane runs again

kyle-sexton and others added 2 commits November 19, 2026 16:34
A set short of both record uploads and places split off its reviews and
re-ran its floor alone, because short() reports uploads before places.
That happened when an earlier set in the same pass took the place, so
the floor's re-run finished red on the still-stopped reviews and cost
ci-status an extra attempt. Split now only when the set fits the places
left, matching the header rule that both lanes go in one pass or both
wait.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton kyle-sexton removed the needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. label Nov 19, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path is about to arm native auto-merge at head b6a24a3771a1264f75fa45e20a7211d889f00183, the head its arming checks judged. The arm fails if the head moves first.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Merge-Risk: max=MEDIUM demote=false head=b6a24a3771a1264f75fa45e20a7211d889f00183 rubric=10.4.1 rater=claude-opus-5-5 checker=claude-opus-5-5

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 20, 2026
Merged via the queue into main with commit 3b72b34 Nov 20, 2026
45 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-17285-44572843965-1 branch November 20, 2026 00:46
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 3b72b347a06cd28dac9c47467daee627ffebac84; later checks count it verified from this comment.

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.

Re-run every review lane a kill switch stopped once the switch is off, not one lane per head per pass

1 participant