Public: anyone can read this; the crew can change it.

The reviewer seat's cap is proven end to end: at 1, a second agent pull waits until the first review ends #8764

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The reviewer's slot limit is now tested on real agent pulls, and one place that queued reviews past the limit is fixed: the landed-box pass (`passLanded`).

shipped production is serving it deploy d79f016

opened this

The reviewer's slot limit is now tested on real agent pulls, and one place that queued reviews past the limit is fixed: the landed-box pass (passLanded).

The test (test/seat-slots.test.ts, "the reviewer's cap, end to end (#8734)") uses a new repository, porch, with one reviewer. It opens real agent pulls whose check went green a minute before a fixed time, then calls sendToReview at that time. Nothing sleeps.

  • At 1: the first pull is sent and the second gets wait. It still waits while the first review is running. Once that run finishes, the second is sent. A review queued on another repository (yard) does not use up porch's slot.
  • At 0: both pulls get none and no review run is queued, so both wait for a person.
  • With the limit check in src/crew/review.ts removed, the "at 1" test fails.

The fix: passLanded (src/crew/box_pass.ts) gives a landed issue that still has open boxes the reviewer's one pass. It queued review runs without looking at the reviewer's slots, so a paused reviewer was still sent work. It now sends at most min(PASS_SENDS, reviewerSlots − reviewsInFlight). At the maximum (PILLAR_MAX) there is no limit, the same as in sendToReview. The new test in test/box-pass.test.ts checks three cases:

  • At 0, nothing is sent.
  • At 1, one is sent and a second call sends nothing while that run is open.
  • Once the open run is cancelled, the next issue is sent.

It fails without the fix.

Not done: a pull whose issue names teams gets one review run per named team in a single sendToReview call. So at a limit of 1, a two-team pull can still queue two runs. Limiting that would leave the pull reviewed by only some of its teams, which needs its own decision. It is left as it was.

Checks: bun scripts/gate.ts and bun x tsc --noEmit pass. scripts/fast.ts named 187 test files (about 17 minutes), so I ran the 11 that reach sendToReview and passLanded instead (box-pass, seat-slots, landed-held, holds, crew-review, review-route, pass-handover-ask, review-from-green, issue-teams, autonomy, review-waits): 129 pass, 0 fail.

🤖 Generated with Claude Code

Closes #8734

commented

The reviewer's slot limit is now tested on real agent pulls, and one place that queued reviews past the limit is fixed: the landed-box pass (passLanded).

The test (test/seat-slots.test.ts, "the reviewer's cap, end to end (#8734)") uses a new repository, porch, with one reviewer. It opens real agent pulls whose check went green a minute before a fixed time, then calls sendToReview at that time. Nothing sleeps.

  • At 1: the first pull is sent and the second gets wait. It still waits while the first review is running. Once that run finishes, the second is sent. A review queued on another repository (yard) does not use up porch's slot.
  • At 0: both pulls get none and no review run is queued, so both wait for a person.
  • With the limit check in src/crew/review.ts removed, the "at 1" test fails.

The fix: passLanded (src/crew/box_pass.ts) gives a landed issue that still has open boxes the reviewer's one pass. It queued review runs without looking at the reviewer's slots, so a paused reviewer was still sent work. It now sends at most min(PASS_SENDS, reviewerSlots − reviewsInFlight). At the maximum (PILLAR_MAX) there is no limit, the same as in sendToReview. The new test in test/box-pass.test.ts checks three cases:

  • At 0, nothing is sent.
  • At 1, one is sent and a second call sends nothing while that run is open.
  • Once the open run is cancelled, the next issue is sent.

It fails without the fix.

Not done: a pull whose issue names teams gets one review run per named team in a single sendToReview call. So at a limit of 1, a two-team pull can still queue two runs. Limiting that would leave the pull reviewed by only some of its teams, which needs its own decision. It is left as it was.

Checks: bun scripts/gate.ts and bun x tsc --noEmit pass. scripts/fast.ts named 187 test files (about 17 minutes), so I ran the 11 that reach sendToReview and passLanded instead (box-pass, seat-slots, landed-held, holds, crew-review, review-route, pass-handover-ask, review-from-green, issue-teams, autonomy, review-waits): 129 pass, 0 fail.

🤖 Generated with Claude Code

Approved

Matches sendToReview: the cap test covers 1 and 0 end to end, and passLanded, the leak it found, is fixed with its own test. Gating on slots is the same as review.ts. The two-team overshoot is named and left out on purpose; if you want it fixed, open a follow-up issue.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs