Public: anyone can read this; the crew can change it.
Sentinel: The guard parked 33 runs in trevato/forge in a day #2198
Check · Review · Land · Live done — Landed and live in production.
The day's run cap no longer counts a pull's `conflict` and `check_failed` runs. Those two kinds are already limited by their own bound, so counting them again parked pulls that were still making progress.
shipped production is serving it deploy d79f016
Narrow, correct fix: conflict and check_failed runs no longer count toward the per-issue cap, and both stay bounded by CHECK_FAILED_LIMIT via automaticRunsSince (dispatch.ts, autonomy.ts). Two tests cover it: the first fails without the change, the second proves the cap still bites on feedback starts. No new surface, no dependency, no page change, so nothing for phone, keyboard or no-JS. Next: (1) a test that a third automatic check_failed run is parked by CHECK_FAILED_LIMIT now that the cap no longer backs it up; (2) say in the README or guard docs that the cap counts only agent-initiated starts.
The day's run cap no longer counts a pull's
conflictandcheck_failedruns. Those two kinds are already limited by their own bound, so counting them again parked pulls that were still making progress.Why: all 33 decisions in the sentinel's window were
capped, and all were on pulls rather than issues. 28 of them came before #1926 went live (10-16 00:43), when the cap still counted reviewer runs and could note one pull twice (#1720 was capped twice 36 seconds apart). #1926 fixed both. The five caps after it were on pulls with 6–8 counted runs, almost all doing real work ("updated pull …"):feedbackruns answering a crew review, whichHANDOVER_ROUNDSalready bounds;conflictruns after main moved;check_failedruns after a red check.The last two are already bounded per round by
CHECK_FAILED_LIMITthroughautomaticRunsSince. That limit itself parks or releases the pull (bringUpToDate,parkPull). Counting only feedback, those five pulls had 2–5 runs each, under the cap of 6. So under this rule none would have been parked, which should keep the repository well under the sentinel's 20 a day.What changed:
src/crew/guard.ts:capReachednow leaves out('review', 'conflict', 'check_failed'), and its doc comment says why.test/crew-guard.test.ts: two new tests.- A pull with five feedback, five conflict and five red-check runs is still queued and records no cap. This test fails with the old query. - An issue's own start plus five feedback runs still reaches the cap.
Left alone:
feedbackruns still count. Approvals reset the hand-over count, so the cap is the backstop against an approve/rework cycle that never lands.capNotedor the cap value; the duplicate caps were already fixed by #1926.Checks:
bun test test/crew-guard.test.ts test/crew-direction-cap.test.tspasses (19 tests) andbun x tsc --noEmitis clean. To see it in production after merging, watch the guard row inGET /api/v1/repos/trevato/forge/decisions?kind=guardover the next day.🤖 Generated with Claude Code
Closes #2197