fix: raise the PR review turn cap from 60 to 120 - #625
Merged
Conversation
The Stage 4 reviewer ran out of turns instead of reviewing. On PR #623 the run ended with `Execution failed: Reached maximum number of turns (60)` after posting only an early scratch comment, so the PR carried a stray review and no verdict while the run was already dead. Waiting 16 minutes looked like a slow review and was a failed one -- and scripts/request-pr-review.sh cannot tell those apart, because a dead run and a thinking one are both silence. The cap is hit because this reviewer does real verification: it checks the branch out, runs the suite, REVERTS the fix to confirm the tests go red without it, then runs black/ruff/mypy/shellcheck. That is the behaviour worth paying for, and its cost scales with the diff. 120 leaves headroom for a multi-file PR while still bounding a runaway. Deliberately a one-line PR so it can be merged on its own: workflows triggered by `issue_comment` run from the DEFAULT branch, so this has no effect on any review until it is on main. Every other open PR is waiting behind it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The reviewer was not slow — it was dead
On PR #623 the Stage 4 run ended:
It had posted only an early scratch comment (
test-permission-check (will be replaced)) and never got back to replacing it. So the PR sat for 16 minutes showing a stray review and no verdict, while the run had already failed. A caller waiting on a verdict cannot distinguish a dead run from a thinking one — both are silence — soscripts/request-pr-review.shwaits out its full timeout for nothing.This is not the first time it looked like flakiness. #619's two "silent" rounds and #623's stub round were all read as bot noise; at least this one was a hard failure with a clear cause in the log.
Why the cap is reached
Because the reviewer earns its keep. On the previous #623 round it:
pytest(27 passed),docs/agents/testing.md,black --check,ruff,mypyandshellcheck,That is exactly the behaviour worth paying for, and its turn cost scales with the diff. 60 is fine for a one-file fix and not for a multi-file one.
120 leaves headroom while still bounding a runaway.
Why this is a one-line PR
Workflows triggered by
issue_commentrun from the default branch, so this has no effect on any review until it is onmain. Every other open PR is queued behind it — including the two that carry the rest of the Product Owner loop.Worth noting while merging: branch protection on
mainrequires only theMerge gatestatus check (required_pull_request_reviews: null), so this does not need a bot approval to land.🤖 Generated with Claude Code