Skip to content

Wrap up passes that run out of time instead of discarding them - #4

Merged
joahg merged 2 commits into
mainfrom
wrap-up-slow-passes
Oct 10, 2026
Merged

joahg merged 2 commits into
mainfrom
wrap-up-slow-passes

Conversation

@joahg

@joahg joahg commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

Makes reviews finish inside ReviewBench's 15-minute limit without losing a lens to a slow pass.

Problem. A panelist that hit its 7-minute timeout was killed, and all of its work was thrown away. In a 25-pull-request run, 8 reviews lost a panelist this way. Separately, a coordinator reply with no JSON object failed the pull request, and a single pull request that never succeeds fails a whole ReviewBench run.

Change. GooseRunner now holds back the last two minutes of each pass (GooseConfig.WrapUp):

  • If the pass is still working at that point, it is stopped and its Goose session is resumed for one turn: "Time is up. Do not call any more tools. Reply now with only the final JSON object…, covering what you have verified so far."
  • If the pass completes without a JSON object, it gets one turn asking for only that object.

To make this possible, passes record a named session in their private Goose home instead of using --no-session. With SharedHome, sessions go to the caller's home as before. A pass whose timeout is shorter than twice WrapUp gets no wrap-up.

The window is two minutes because a panelist's final answer runs about 20,000 characters and took around 85 seconds to write at both medium and low effort. A 90-second window ran out on 7 of 11 wrap-ups under load.

The ReviewBench adapter's judge reserve drops from 2.5 to 1.5 minutes, since the judge never needed more than a minute. The coordinator gets that minute instead. In the worst case the stages still add up to 14 minutes: 7 for the panel, 5.5 for the coordinator, and 1.5 for the judge.

Verification

  • A new test runs Run against a fake goose for a pass that outlives its soft deadline and for a pass that answers without JSON. It checks that the wrap-up resumes the same session with the right instruction and finishes within the timeout. The test fails when the wrap-up is disabled.
  • I ran ReviewBench's try-agent.sh natively, with real Goose 1.43 and Databricks models, on the 8 test-set pull requests that lost a panelist in the earlier evaluation. All 8 ran at once.
Lenses lost (of 24) Slowest review Pull requests passed
Before (earlier evaluation) 8 11.1 min 8 of 8
90-second wrap-up 8 10.1 min 8 of 8
Two-minute wrap-up (this PR) 2 10.4 min 8 of 8

joahg added 2 commits October 9, 2026 19:09
A Goose pass still working 90 seconds before its timeout is stopped and its
session resumed for one turn that asks for the findings it has so far. A
pass that ends without a JSON answer gets the same one extra turn. Before,
a panelist that hit its timeout lost all of its work, and a coordinator
reply without JSON failed the whole pull request.

Passes now record a named session in their private Goose home so they can
be resumed. The ReviewBench judge reserve drops from 2.5 to 1.5 minutes,
which gives the coordinator the extra minute.
A panelist's final JSON is around 20,000 characters and took 85 seconds to
write at medium or low effort alike, so a 90-second wrap-up often ran out.
@joahg
joahg marked this pull request as ready for review October 10, 2026 00:36
@joahg
joahg merged commit 5ecce8b into main Oct 10, 2026
5 checks passed
@joahg
joahg deleted the wrap-up-slow-passes branch October 10, 2026 00:36
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.

1 participant