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

Review is owed from the check's green, not the preview's: a slow check queue lapsed every pull to a person tonight #1291

Closed opened this in answer to
Closed without merging

Review is now owed from the check's green, so a slow check queue no longer lapses a pull before a reviewer is asked. The previous check on this pull failed on one test (test/check-list.test.ts): the new test/review-from-check.test.ts was in neither of the gate's lists. I added it to GATE in scripts/gate.ts.

Notes

stopped closed without shipping deploy ecc2e86

opened this

Review is now owed from the check's green, so a slow check queue no longer lapses a pull before a reviewer is asked. The previous check on this pull failed on one test (test/check-list.test.ts): the new test/review-from-check.test.ts was in neither of the gate's lists. I added it to GATE in scripts/gate.ts. That test and test/check-list.test.ts now pass here. I couldn't run the HTTP-based test files in this sandbox (the earlier push reported EPERM on sockets) or the type check (tsc isn't installed here), so the forge's check is the first real run of those.

  • Where the clock starts: reviewAttempts in src/crew/review.ts takes greenAt from the earliest ok check run on the head. A deploy counts only when the head has no check run at all, so a repository without a check behaves as before. The lapse and the wait are measured from greenAt.
  • Late send: a head that is past the lapse with no review sent is still sent once, up to one more lapse (60 min) after the lapse point. Its lapse clock then restarts from that send, so the late review gets a full window. The pull isn't flagged for a person while that send is due.
  • Inbox card: if a late review then lapses, the card in src/web/studio/asks.ts reads "review ran late: the check took N min, and the reviewer did not answer, since …". N is the time from the check being queued to its green.
  • Tick log: the sweep logs one line for each pull it skips, such as review: lapsed since 04:13 or review: waiting on juniper.
  • Tests: test/review-from-check.test.ts covers a deploy green at t=0 with a check green at t=70 (review is sent at t=70), a head with no check and a green deploy, and the late card text.

Left out

  • "Late" isn't stored anywhere. It is worked out from the run table by comparing when the first review run was queued with when the check went green, so there is no migration.
  • A head still unsent more than 2 h after green is treated as lapsed rather than retried each tick. This stops an unsent review (for example one blocked by the spend ceiling) from holding a pull forever.

To try it, run bun test test/review-from-check.test.ts.

Closes #1216

🤖 Generated with Claude Code

Closes #1216

2 earlier comments
commented

This pull now merges into main again. The check had failed because main had moved and the merge conflicted in src/crew/review.ts and src/web/studio/asks.ts.

  • src/crew/review.ts: sweepReviews keeps main's once-per-stall dedupe and its cleanup of settled pulls. It still logs the reason a pull is skipped through this pull's skipped() helper, so the log says which reviewer is being waited on or when the review lapsed.
  • src/web/studio/asks.ts: reviewWhy now covers both cases: the "reviewer asked for changes three times" wording from main, and the "review ran late: the check took N min" wording from this pull.

review-from-check and review-gate pass (13 tests, 0 failures). The wider review and asks run had 18 failures. The ones I read were EPERM errors from this sandbox refusing to open the test server's socket, not assertion failures. I did not read every failing test's output or run the type check to completion. The forge's check will be the first full run.

I changed no tests.

commented

Review is now owed from the check's green rather than the preview deploy's, so a slow check queue can no longer lapse a pull before review was ever sent (#1216). This update only fixes the merge conflict that failed the check.

  • What conflicted: main moved again. src/crew/review.ts conflicted, and test/review-from-check.test.ts was added on both sides with different contents.
  • src/crew/review.ts: I kept main's version of the conflicting parts. That means the reviewerId field name on ReviewAttempt, and main's reformatting of the query. I also changed the one other use of my old actorId field, in the "waiting on" log line, to reviewerId.
  • Tests: test/review-from-check.test.ts is main's file again. My tests for review being owed from the green moved to test/review-green-origin.test.ts. Nothing was dropped.
  • Checks run: bun test test/review passes (55 tests), and the new file passes on its own (3 tests). I did not get a type-check result. bunx tsc --noEmit failed here with "Cannot find type definition file for 'bun'", so the forge's check will be the first real type check.

To try it, push a pull whose check takes longer than the review lapse and confirm a review run is still queued once the check goes green.

🤖 Generated with Claude Code

commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs