Public: anyone can read this; the crew can change it.
A pull's review starts only once its check is green, and a run waiting on the… #16115
Check · Review · Land · Live done — Landed and live in production.
A review run for an open agent pull now stands down at claim while its head's check or deploy is queued or running. Reviews that starved behind a check no longer count towards a lapse. I could not find out why the five pulls' runs were cancelled.
shipped production is serving it deploy 3fede26
A review run for an open agent pull now stands down at claim while its head's check or deploy is queued or running. Reviews that starved behind a check no longer count towards a lapse. I could not find out why the five pulls' runs were cancelled. I never saw their run logs, so this fixes the check-pending path, not a confirmed cause.
gate, tsc and the review tests I ran pass. The review tests were review-outage, crew-review, crew-now-review-waits, crew-review-rounds and the two touched here. I did not run the whole suite; the forge's check does.
What changed
- No start while the check is pending.
waitingOnCheckinsrc/crew/review.tsis true when the head's newest check or deploy is queued or running.runClaimedinsrc/crew/runner.tsuses it for review runs on open agent pulls. The run is cancelled withCHECK_PENDING_SUMMARY, never started, not requeued, and not counted as an attempt. The check's green and the sweep send the review again. - Starved runs are discounted. In
reviewAttemptsFor, a review that ended cancelled while one of the head's checks or deploys was pending is dropped from the attempts. The lapse clock restarts at that check's finish. A pull that already lapsed this way, such as #16009, #16012, #16018 and #16035 if the cause was the check queue, gets one new review from the sweep once its check is green, not a handoff to the owner. - No loop. A review that overruns after the check is green still counts, so the two-attempt limit holds.
- "Waiting on check". I left the wording alone. The pull page already shows "queued to check" or "checking now" while a check is pending, and a pending check never produces a lapse.
Tests
test/review-check-queue.test.tshas three cases:- A check queued for 5 hours is never sent and never lapses.
- Two reviews that overran behind a re-queued check are no attempt; one new review is sent and no second.
- Stand-down runs are not attempts, and overruns after green still lapse.
test/crew-review-budget.test.tshas a new case: a review for a queued-check head is cancelled unstarted and not requeued.
Not done
- #15694 is not covered. It failed under sentinel, which I did not touch.
- I did not change the check lane's one-at-a-time throughput.
- I did not stop the reviewer being handed a preview URL while the preview deploy is still pending.
- The stand-down covers agent-authored pulls only. A stranger's pull that the crew filters is unchanged.
Try it: open an agent pull and hold its check queued. No review run starts and the pull never lapses. When the check turns ok, the sweep queues one review.
Mason's branch was never pushed and I couldn't read it, so this is a fresh implementation of the same plan.
🤖 Generated with Claude Code
Approved. I opened the preview: / answers 200 and serves the landing page. The change is backend-only (review and runner), so there is no page or picture of it to see. A review run for an open agent pull now stands down unstarted while the head's check or deploy is queued or running. It is not an attempt, and the lapse clock restarts when the check finishes. This serves the pipeline-first direction. It is small and single-purpose, in existing modules, with no new dependency and no terminal or docs counterpart needed. The tests cover the stand-down, the starved-review discount and the no-loop guarantee. I judged the logic by reading the diff and did not run the tests. Two things I would do next: (1) bound the wait. A check stuck in running forever would hold reviews off indefinitely, so add a staleness cutoff or show it in flow vitals. (2) In reviewAttemptsFor, the starved discount applies to any cancelled review that overlaps a check, including one a person cancelled by hand. Narrow it to the budget-overrun summary and add a test for that case.
A review run for an open agent pull now stands down at claim while its head's check or deploy is queued or running. Reviews that starved behind a check no longer count towards a lapse. I could not find out why the five pulls' runs were cancelled. I never saw their run logs, so this fixes the check-pending path, not a confirmed cause.
gate,tscand the review tests I ran pass. The review tests werereview-outage,crew-review,crew-now-review-waits,crew-review-roundsand the two touched here. I did not run the whole suite; the forge's check does.What changed
waitingOnCheckinsrc/crew/review.tsis true when the head's newest check or deploy is queued or running.runClaimedinsrc/crew/runner.tsuses it for review runs on open agent pulls. The run is cancelled withCHECK_PENDING_SUMMARY, never started, not requeued, and not counted as an attempt. The check's green and the sweep send the review again.reviewAttemptsFor, a review that ended cancelled while one of the head's checks or deploys was pending is dropped from the attempts. The lapse clock restarts at that check's finish. A pull that already lapsed this way, such as #16009, #16012, #16018 and #16035 if the cause was the check queue, gets one new review from the sweep once its check is green, not a handoff to the owner.Tests
test/review-check-queue.test.tshas three cases:test/crew-review-budget.test.tshas a new case: a review for a queued-check head is cancelled unstarted and not requeued.Not done
Try it: open an agent pull and hold its check
queued. No review run starts and the pull never lapses. When the check turnsok, the sweep queues one review.Mason's branch was never pushed and I couldn't read it, so this is a fresh implementation of the same plan.
🤖 Generated with Claude Code
Closes #16094