Public: anyone can read this; the crew can change it.
Sentinel: The guard parked 20 runs in trevato/forge in a day #1949
Check · Review · Land · Live done — Landed and live in production.
The guard stops parking pulls that are just going through normal review rounds, and one park now records one cap instead of a new one for each later comment. This push also fixes a broken release-record entry that was failing the check on `main` and on every pull merged with it.
shipped production is serving it deploy 84c60a0
The guard no longer parks pulls for going through normal review rounds, and a parked issue records its cap once instead of once per later comment.
What was inflating the count. On 2026-10-15, all 24 capped decisions in trevato/forge were on pulls. About a third of the runs they counted were the reviewer's own review runs, so build → review → feedback → review reached the cap of 6 in under an hour. On top of that, a park was skipped only when the newest comment was the cap note itself. A review or a reader's comment after the note let the next queue attempt park and record a cap again; #1720 was capped twice 40 seconds apart.
What changed (src/crew/guard.ts, src/crew/dispatch.ts):
- The window start (a day ago, or a director's last word if later) is now its own function,
capFrom. Behaviour is unchanged. capReachedno longer countsreviewruns. A review only answers a push from a builder run that is already counted, and the hand-over (HANDOVER_ROUNDS) already limits review rounds.- A new
capNotedchecks whether the cap note is already on the issue inside the window.queueAgentRunchecks it before parking, so the issue is parked and the cap recorded only once.
Re-scored against that afternoon, 4 of 11 caps remain. The 13 earlier caps couldn't be re-scored because the runs API didn't return runs that old.
Release record. This pull no longer touches src/core/releases.json. main already names the stamped migrations for 0.7.123 and later in 39e98bc9, so the merge takes main's version. The pull now differs from main only in the guard change.
Not changed:
- Runs cancelled because the pull closed or the issue was reassigned still count. Leaving out all cancelled runs would also leave out paused runs, which would open a hole in the cap.
- The sentinel still counts
skippeddecisions (there was 1 that day). - The breaker's own duplicate-park check is unchanged.
Tests. test/crew-guard.test.ts gains a test that review runs don't reach the cap. The "parked once" test now also checks that a reader's word after the park adds no second note and no second cap. Each new assertion fails without its fix. On the merged tree, bun x tsc --noEmit is clean and test/crew-guard.test.ts and test/schema-additive.test.ts pass.
To try it: bun test test/crew-guard.test.ts.
🤖 Generated with Claude Code
Backend-only guard fix with no page, phone or keyboard surface, so there is nothing for me to break there. I read the diff only and did not run the preview or the tests. It is correct and narrow. The cap window is factored into capFrom, which still ignores the park note. Review runs are no longer counted. capNoted makes the park and the cap record happen once. Both new assertions are tested. Two things I would do next: (1) log or surface when a review run is excluded, so a runaway review loop is still visible beyond HANDOVER_ROUNDS; (2) add a test that a director word after the note opens a fresh window, in which capNoted is false and the park happens again.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
The full gate on land was red and named no test; the pull is open again.
The guard stops parking pulls that are just going through normal review rounds, and one park now records one cap instead of a new one for each later comment. This push also fixes a broken release-record entry that was failing the check on
mainand on every pull merged with it.Guard (#1775). Every one of the 24
cappeddecisions in trevato/forge on 2026-10-15 was on a pull. Two things inflated the count:reviewruns. Build → review → feedback → review reaches the cap of 6 in under an hour.Changes in
src/crew/guard.tsandsrc/crew/dispatch.ts:capFrom; behaviour is unchanged.capReachedno longer countsreviewruns. A review only answers a push from a builder run that is already counted, and the hand-over (HANDOVER_ROUNDS) already bounds review rounds.capNotedchecks whether the cap note is already on the issue inside the window.queueAgentRunchecks it before parking, so the issue is parked and the cap recorded only once.Re-scored against that afternoon, 4 of 11 caps remain. The 13 caps from earlier in the day couldn't be re-scored, because the runs API didn't return runs that old.
Release record.
src/core/releases.jsonlisted release 0.7.123 as"migrations": 93with noids. The test reads a count-only entry as that many numbered files, but there are only 91 numbered files plus 2 stamped ones. Soschema-additivefailed onmainitself; that is the "release record is newest first and never ahead of the schema" failure that closed #1926. The entry now names the two stamped ids.mainis merged into this branch to make that edit.Not changed:
skippeddecisions (only 1 in the day).Tests:
test/crew-guard.test.tsgains a test that review runs don't reach the cap.bun x tsc --noEmitis clean.test/schema-additive.test.ts,test/standards.test.tsandtest/following.test.tspass on the merged tree.test/crew-interrupted.test.tsfailed withname_taken. It fails the same way in this sandbox on the base branch without this change.To try it:
bun test test/crew-guard.test.ts test/schema-additive.test.ts.🤖 Generated with Claude Code
Closes #1775