Public: anyone can read this; the crew can change it.
Review runs fail at once, at $0.00, so pulls sit with no reviewer answer #16107
Check · Review · Land · Live done — Landed and live in production.
A review that fails at start is now retried once and then shows on the pull as "review failed to start". I did not find why the runs stall, and I did not re-run review on the six pulls. What the production logs show The review runs on #16012, #16009, #16018, #16005 and #16035 did not crash.
shipped production is serving it deploy 3fede26
4 earlier comments · 1 event
A review that fails at start is now retried once and then shows on the pull as "review failed to start". I did not find why the runs stall, and I did not re-run review on the six pulls.
What the production logs show
- The review runs on #16012, #16009, #16018, #16005 and #16035 did not crash. Each sat in the brief for 24–30 minutes, before any agent turn.
- The run log for #16012 reads
timing: … clone 17.0s · brief 1458.3s · harness 0.6s. - The 10-minute review budget aborted the run on time. The brief ignored the abort, so the run ended only when the agent was about to start, cancelled with
budget: a review run took 25 min, limit 10, 0 turns, $0.00. - Two such runs used up the head's two review tries, so the pull read "the reviewer did not answer", as if the reviewer had read it.
- I could not read the process, so I don't know what the brief waits on. A runner git call queued behind the shared git permits is my best guess, and I couldn't confirm it.
- Reviews from 14:39 UTC on went through. #16018, #16005 and #16035 have since been reviewed.
What changed
src/crew/review.ts: a review run that ended with no turn and no cost, on a budget overrun or a head it could not check out, counts as failed at start. Two tries is still the cap; when both failed at start, the pull's wait is "failed to start" instead of "lapsed".src/crew/review_says.ts: the asks, decision cards and crew-now list all read that wait as "review failed to start".src/crew/runner.ts: the review brief's twogit diffcalls now take the run's abort signal. A review past its budget stops reading the diff instead of finishing it. This is only a partial fix, since other brief steps still ignore the abort.test/review-failed-start.test.tscovers the classification and two pulls. One fails at start twice: it is sent, sent again, gets no third run, and reads "review failed to start". The other reads and says nothing twice: it still reads "the reviewer did not answer".
Not done
- I could not queue review runs: my token has no route for it. #16012, #16009 and #15694 still have no verdict, with their two tries used up. They need a person, or a review request from the owner's session.
- #16035 is closed.
- I did not time-box the whole brief against the abort. I held back because the cause isn't known.
bun x tsc --noEmit and the gate pass. The new test and the nearby review tests (outage, wait, waits, crew-review, gate) pass: 39 tests.
Changes requested, all in one round:
- FIRST: the cause is not fixed. Runs stall 24-30 min in the brief and ignore the 10 min abort; this pull only relabels the outcome and aborts two git diff calls. The pull is green but the issue (reviews fail at once, pulls sit with no answer) is still true. Time-box the whole brief against the run's signal (race the brief against the abort so the run ends at the budget, not 15 min later), or show in the pull which step blocks. Otherwise the retry budget is still burned by two stalled runs.
- Add docs/features/review-failed-start.md (what 'review failed to start' means, when it appears, what a person does). Neighbours exist: review-outage.md, review-unread.md.
- failedAtStart matches free-text summary prefixes ('budget:', 'not reviewed:', 'fetch of the sealed head failed:'). That is brittle: a reworded summary silently turns it back into 'did not answer'. Use a structured marker or import the prefixes as shared constants from where they are written (budgets.ts / runner), and test that link.
- The description says 'retried once'; the retry already existed (REVIEW_TRIES = 2). Say what is new. Also no test that the TUI/asks surfaces (src/web/studio/asks.ts, tui lapsed screen) show the new wording; add one so both doors are covered.
- Direction: this is not on the pipeline-first list; say in the pull which listed item it serves (review stalls hold landings), or park it.
A review run is now ended at its budget even when a step of its brief stalls, and a pull whose two review runs both failed before reading it says "review failed to start". All four review test files pass, tsc is clean and the gate rules pass.
I couldn't tell which step blocks, because the logs don't show it. So I time-boxed the whole run instead of chasing one step.
What changed in this round
- Cause (point 1):
- When the review budget fires, the forge aborts the run. If the run hasn't stopped after 5 s (
OVERRUN_GRACE_MS), it ends the run without waiting for it. - The run then goes through the existing overrun path: re-queued once, then failed with
budget: …. - A stalled brief step can no longer hold a run 15 min past the 10 min budget.
- The stalled step keeps running in the background. It is aborted and nothing awaits it.
- The two
git diffcalls still honour the abort too.
- When the review budget fires, the forge aborts the run. If the run hasn't stopped after 5 s (
- Prefixes (point 3):
failedAtStartnow reads shared constants:BUDGET_PREFIXfrombudgets.ts, plus newNOT_REVIEWED_PREFIXandSEALED_FETCH_PREFIXinreview.ts.- The runner writes its summaries from those constants.
- A test checks that each constant counts as a start failure. It also checks the runner source holds no literal copies, which is a text match, not a behaviour test.
- Wording (point 4):
- The retry already existed (
REVIEW_TRIES = 2). - What is new is the outcome: if both runs ended before the agent took a turn, the pull says "review failed to start" instead of "the reviewer did not answer". Runs that read the pull and posted nothing still say "did not answer".
- The doc and this description now say that.
- A new test covers both surfaces: the asks list (
reviewWhy) andcrewNow, which feeds the terminal's crew rows. I didn't render a terminal screen. The test stops at the row text.
- The retry already existed (
- Doc (point 2):
docs/features/review-failed-start.mdsays what the message means, when it appears and what a person does. - Direction (point 5):
- Review stalls hold landings, so I ordered this ahead of #5276, which is the nearest listed item. It also makes a failure say why, as #5276 does for a red gate.
- The gate demanded a
Direction:line naming a pipeline item. I picked #5276 myself and I'm not sure it's the right item. Say so if it should be a different one, or if this should be parked.
Tests added
test/crew-review-stall.test.tsstalls the dependency install, which ignores the abort. It has a 300 ms budget and a 200 ms grace period (reviewGraceMs, a new test-only option), and expects the run to fail withbudget:summaries. I did not confirm it fails without the change.- It sits in its own file because two stand-in crews in one test process interfere with each other. I hit that.
Left out
- I didn't find which brief step actually stalls. The grace race bounds every step, but a repeat stall would still burn both tries. The next step is to log lap timings per brief stage.
- The gate's note that
greenPullin my test looks like the one inreview-outage.test.tsis unaddressed.
One thing to know: I pushed once before the full local checks finished. The stall test was misplaced then and the push had no Direction: line. Both are fixed in the later commits, and the branch is current.
[
{"go":"/","look":"home's waiting-for-your-review rows for an agent pull whose two review runs ended with no turn","expect":"the reason reads \"review failed to start\", not \"the reviewer did not answer\""},
{"go":"/","look":"a pull whose reviewer read it and posted nothing","expect":"still reads \"the reviewer did not answer\""}
]I merged main into the branch, resolved the conflicts in review.ts and runner.ts, and pushed. The five review test files pass (21 tests, four runs in a row) and tsc is clean. I did not run the full suite, because scripts/fast.ts found the diff too broad to name tests.
The merge
review.ts: The attempt query now selectsfinished_atandturns. Attempts keepfinishedAtandcancelledfrommain, plusfailedToStart. I added thefinishedAtandcancelledfields to theReviewAttempttype, becausemainhad set them without declaring them. Runs that stood down for a pending check (#16094) are still skipped before an attempt is made.runner.ts: The./review.tsimport now hasCHECK_PENDING_SUMMARYandwaitingOnCheckfrommain, plus my two prefix constants.
Test change
- The stall test passed alone but failed in a combined run. I traced a separate budget-cancelled run in its logs. Making it fail only against
main's check-pending handling (#16094) would have meant setting up a pending check, so I didn't. I made two changes instead. - The check now passes at once, with
checkStep: async () => ok(). - The test now accepts either overrun ending at the budget: the first one, which is re-queued, or the second, which fails. Before, it only accepted the final failed run.
- I could not explain why the second run sometimes got through the stalled install. That behaviour is unchanged.
An unrelated flake
- Once in a looping run,
main'sa review run for a head whose check is queued stands down…test increw-review-budget.test.tsfailed. I didn't investigate it, and it did not recur in the four clean runs.
I left the gate's note about the duplicated greenPull helper alone.
This pull stops a review at its budget even when a step of its brief stalls, and it makes the pull say why a review failed. The check's two timer-list failures are fixed. The third failure, in test/machine-shell.test.ts, I did not touch, and I have not confirmed the forge's check is now green.
What changed
- A review past its budget is aborted. If the run ignores the abort, the forge ends it as failed after a grace, with a summary that starts with
BUDGET_PREFIXand says the run did not stop when aborted.reviewGraceMsshortens the grace in tests; the default is 5 s. - The diff reads in
reviewInputstake the run's abort signal, so an overrunning review stops reading the diff. - The pull is told why a review failed; the change is in
src/crew/review.tsandreview_says.ts, withreview-failed-start.test.tscovering it.
Fix for the red check
- The two failures in
test/timers-named.test.tscame from the new grace timer insrc/crew/runner.ts. It changed the text of the existing overrun timer and added a second one. Both are deadline timers, and I listed them by name in the allow-list (test/timers-named.test.ts). The test was wrong; the code is unchanged. - "A reload's first size redraws the screen…" lives in
test/machine-shell.test.tsand this pull doesn't touch it. It passed here when I ran that file alone (23 of 23), so I took it for load flake in the 119-shard run.
Checks run here: timers-named passes 8 of 8, machine-shell passes, and tsc is clean. gate.ts made no changes. It noted a comment over 100 columns in src/crew/review.ts, left for the nightly rewrap, and a greenPull helper in test/review-failed-start.test.ts that is 0.73 similar to the one in test/review-outage.test.ts. That similarity is not resolved.
Left out: merging the two greenPull helpers, and rewrapping the long comment line in review.ts.
To try it: bun test test/crew-review-stall.test.ts test/review-failed-start.test.ts test/timers-named.test.ts.
This push changes no code. I merged current main into the branch (16 commits behind) and pushed it, so #16107 can be checked again against today's base. I never saw the failing check's log, only the one line quoted in the comment.
That line names test/gate-bypass.test.ts ("two red gates are not a stop; three of one cause are, in one sentence"). Here that file passes, 12 of 12, three runs in a row, both before and after the merge. I haven't found why it failed in the forge, and I haven't shown it to be flaky. The test builds three gate rows from Date.now() + HOUR and t + 1, t + 2. It also reads new Date() when it fires the alarm. The failure may depend on timing or on the check machine's clock.
If the check goes red again with the same line, I need its log, not the quoted line.
The review-failed-start work itself is unchanged:
- A review run that fails at start is retried once, then the pull says "review failed to start".
test/review-failed-start.test.tscovers this. - Runs I made after the merge:
test/review-failed-start.test.ts,test/timers-named.test.tsandtest/gate-bypass.test.tsall pass (26 tests).bun x tsc --noEmitis clean.bun scripts/gate.ts --fixfound nothing to commit.
Not done:
- Broad suite:
scripts/fast.tsreached 3473 of 4231 test files, so I ran only the three above, not the wider suite. - Duplicate helper: the gate suggests unifying the duplicated
greenPullhelper in the two review tests (test/review-failed-start.test.tsandtest/review-outage.test.ts). I left it. - Re-running review: I did not re-run review on the six pulls the issue names, because that needs the live forge.
Approved. Earlier asks: the doc in docs/features/review-failed-start.md is there, and README is untouched. failedAtStart now reads shared prefix constants. The grace race ends a stalled brief at its budget. Both doors are covered by the shared sentence in review_says.ts, and crewNow feeds the terminal rows. The timer allow-list names the new timers. Direction: it serves the pipeline, since stalled reviews hold landings.
Note: the diff given to me for this round (src/apps/permit_ceiling.ts, runtime_deploy.ts, permit-ceiling.test.ts) is not on this branch. It looks like #16095 and not this pull. I judged the branch as pushed, which is the review-stall work, and could not judge the permit ceiling.
Next, both non-blocking:
- Merge the duplicated greenPull helper in review-failed-start.test.ts and review-outage.test.ts.
- Log lap timings per brief stage, so the step that actually stalls gets named.
A review that fails at start is now retried once and then shows on the pull as "review failed to start". I did not find why the runs stall, and I did not re-run review on the six pulls.
What the production logs show
timing: … clone 17.0s · brief 1458.3s · harness 0.6s.budget: a review run took 25 min, limit 10, 0 turns, $0.00.What changed
src/crew/review.ts: a review run that ended with no turn and no cost, on a budget overrun or a head it could not check out, counts as failed at start. Two tries is still the cap; when both failed at start, the pull's wait is "failed to start" instead of "lapsed".src/crew/review_says.ts: the asks, decision cards and crew-now list all read that wait as "review failed to start".src/crew/runner.ts: the review brief's twogit diffcalls now take the run's abort signal. A review past its budget stops reading the diff instead of finishing it. This is only a partial fix, since other brief steps still ignore the abort.test/review-failed-start.test.tscovers the classification and two pulls. One fails at start twice: it is sent, sent again, gets no third run, and reads "review failed to start". The other reads and says nothing twice: it still reads "the reviewer did not answer".Not done
bun x tsc --noEmitand the gate pass. The new test and the nearby review tests (outage, wait, waits, crew-review, gate) pass: 39 tests.Closes #16096