Skip to content

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

Closed

Description

@kyle-sexton

Steps to reproduce

  1. With CLAUDE_LANES_REPO_DISABLED on, push a PR head so both hosted review lanes (pr-review-hosted.yml, pr-review-security-hosted.yml) start. Each run's Check Kill Switch job reports the stop and the run concludes success at attempt 1; ci-status fails with "a kill switch was on when it started".
  2. Set CLAUDE_LANES_REPO_DISABLED back to false.
  3. Watch the lost-run reconciler's passes (maintenance-reconcile-lost-runs.yml).

Seen on 2026-11-18: the switch went off at 19:47:29Z. The post-clear pass (run 44384109700, 19:48:10Z) logged #17225: re-ran review run 44382598651 (.github/workflows/pr-review-hosted.yml), which a kill switch stopped and nothing for the other three runs:

PR Run Lane Re-run by
#17225 44382598651 PR Review Hosted reconciler, 19:49:31Z
#17225 44382598493 PR Review Security Hosted a person, 19:52:37Z
#17228 44383832798 PR Review Security Hosted a person, 19:55:46Z
#17228 44383832780 PR Review Hosted a person, 19:55:48Z

The next pass was the scheduled one at 20:13:40Z.

Expected behavior

Every review lane run a kill switch stopped on an open head is re-run by the reconciler once the switch is off, in the first pass that can see it, with no person re-running it.

Actual behavior

The reconciler re-runs one stopped lane per head per pass, and only on a head whose newest pr-require-checks run has already failed. The other lanes wait for a later pass, 30 minutes apart, so a person re-ran three of the four runs.

Cause, read in reconcile.mjs at origin/main today:

Refuted: the reconciler does not skip these runs for concluding success. isUnreviewed selects hosted review runs that concluded success at attempt 1, and reviewStopped recognises the stop from the Check Kill Switch job's "Report the kill switch" step.

Severity

medium

Severity justification

Every PR whose review lanes start while a kill switch is on waits 30 to 60 minutes after the switch clears, or a person re-runs the lanes by hand; nothing is lost, and the manual re-run is the workaround.

Suggested fix location

.github/scripts/maintenance-reconcile-lost-runs/reconcile.mjs stoppedReview and the Review-kind selection under isRedChecks; .github/workflows/maintenance-reconcile-lost-runs.yml record outputs.

Notes

Root cause

known: one stopped review lane per head per pass, and no pass for a head whose checks run finishes after the post-clear pass until the next 30-minute tick.

Acceptance criteria

  • A pass that finds both hosted review lanes stopped by a kill switch on one head, with both lane switches off and places free, re-runs both in that pass, each with its own attempt-2 record and each taking its own place under MAX_IN_FLIGHT.
  • When places run out, the left-over lane is deferred like other recovery work ("deferred, all 3 re-run places taken"), not silently skipped.
  • A pass that finds a stopped review lane run on a head whose newest pr-require-checks run is still in progress logs that it waits for that run and writes no clean.
  • The merge gate's binding of a kill-switch-stopped review's attempt 2 (babysit_review_evidence _kill_switch_stopped) holds for both lanes re-run in one pass.
  • The reconcile-lost-runs tests cover each item above and pass.

Out of scope

Related: #16642 (the floor trip that led to the switch being set).

Activity

  1. added theissue type on Nov 18, 2026
  2. added
    needs-triage
    on Nov 18, 2026
  3. github-actions commented on Nov 18, 2026

    @github-actions
    Contributor

    Size: Medium
    Complexity: Medium
    Uncertainty: Known
    Flags: none
    Blocked by: none
    Blast radius: the lost-run reconciler script, its workflow record outputs and tests; read by the maintenance workflow and the merge gate's review evidence check.
    Reversible: yes; revert the change and the reconciler goes back to one lane per head per pass.
    Open questions: none
    Understood: after a kill switch clears, the reconciler should re-run every stopped hosted review lane on a head in the same pass. Today it re-runs one lane per head and only when the head's checks run has already failed. The acceptance criteria are exact and the cause is already located. I found no open duplicate and no merged PR that already fixes this.

    Automated triage. A maintainer reviews it.

  4. removed
    needs-triage
    on Nov 18, 2026
  5. melodic-automation-lanes commented on Nov 18, 2026

    @melodic-automation-lanes
    Contributor

    {"v":1,"actor_id":337595936,"title_sha256":"f61fe2b5793bc31fb444d3de6447610ff0faee04b54975c5397cabccc2c8892e","body_sha256":"217944c72b2b5f6325a7303eb4a1e2d746d328719d6b9b2873a307e22cdbd034"}

  6. melodic-automation-lanes commented on Nov 19, 2026

    @melodic-automation-lanes
    Contributor

    This records a re-fire of an earlier stop, not a new one. The start gate stopped run 44406269499, the work-resolve-issue run that agent-ready started, before any model turn, because the GITHUB_TOKEN budget was under its start-gate share, or the window was projected to have under its start-project share of the header's limit left by the run's expected end (github-token start-gate, start-project and start-run-minutes in rate-limits.json; the run's start-gate notice names which); that run ended at 2026-11-18T22:40:12Z. work-unblock has now removed and added agent-ready back to start a fresh run. A budget stop is the lanes' load, not a fault in this issue: it never counts toward limits.limit-stops-per-issue or the kill-switch wait.

  7. github-actions commented on Nov 19, 2026

    @github-actions
    Contributor
    No description provided.
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

    Fields

    Work status

    needs-triage

    Priority

    medium

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions