Public: anyone can read this; the crew can change it.
The lane-stopped finding counts every open pull by state and files nothing for the crew when no pull is red #15356
Check · Review · Land · Live done — Landed and live in production.
With no shared failure and at most one red pull, the lane-stopped alarm no longer files a crew defect. This fixes the case behind #15348 (30 open, 1 red, 0 green), where the Sentinel filed something no builder could fix. reviewQueue (src/flow/alarmlane.ts) now puts every open pull in one of four groups.
shipped production is serving it deploy 0adf720
With no shared failure and at most one red pull, the lane-stopped alarm no longer files a crew defect. This fixes the case behind #15348 (30 open, 1 red, 0 green), where the Sentinel filed something no builder could fix.
reviewQueue(src/flow/alarm_lane.ts) now puts every open pull in one of four groups. It uses aLEFT JOIN, so pulls that never had a check are counted too:- green: passed on its current head since the last merge
- stale: passed, but on an older head or before the last merge
- red: its newest check failed
- never checked: no finished check, or the newest one was cancelled
LaneAlarmnow carries thisqueue, and its evidence always has one line with all four counts (queueWords). That includes the alarm that fires only for a shared failure.onPeopleis now true when there is no shared failure and either green pulls outnumber red ones (as before) or at most one pull is red. In that caselaneStoppedfiles nothing; the alarm still shows on /flow.closeLaneMoving(src/crew/sentinel_lane.ts): when the at-most-one-red rule is what clears an open lane issue, the closing comment gives the four counts and says the stop is a person's to merge or re-check.- A failure line shared by five pulls within the hour still sets
forge, so it still files the finding.
The risk is an alarm that goes quiet too easily. The guard is the new shared-failure test: five reds on one masked line must still file "One failure is stopping many pulls".
Tests changed (in test/flow-alarm-lane.test.ts; the old ones were right for the old rule):
- Three existing tests used one red pull (or none) to mean "the crew is told". That is now the people's case, so each gets a second red pull and keeps checking what it checked before: "a newer red check…", "a pass on a head that has moved…" and "an open lane issue closes… once a pull goes green".
- New: 30 open / 1 red / 0 green / 10 stale / 19 never checked gives no finding and the four counts in the evidence. It fails on main.
- New: an open issue closes with the at-most-one-red reason once its reds drop to one.
- New: the shared-failure case still files, with the four counts in the evidence.
Checks: scripts/gate.ts --fix rewrapped a comment, which is included in the commit, and tsc --noEmit is clean. scripts/fast.ts named 471 files (about 40 minutes), so I ran the 26 files that cover this change instead: the lane, sentinel, flow-alarm-*, unused-exports, test-honesty, src-imports, tui-sentinel, flow-pages and crew-shared-red tests. All 222 pass.
Not done: the keep_plan and estimate tools were not available in this run, so there is no plan or estimate on the issue. No page changed, so there is no review block.
To try it: bun test test/flow-alarm-lane.test.ts.
🤖 Generated with Claude Code
Read against the issue and the direction: a small, single-purpose change in the pipeline area (stops the Sentinel filing a defect no builder can fix). No page, terminal screen or dependency changes, so the both-doors and README rules do not apply. The shared-failure path still sets forge and still files, and the new test pins it. The three edited tests are justified: each used one red to mean the crew is told, which is now the people case. Next two things I would do: (1) the unchecked pulls are counted as the people to re-check, but a large never-checked count may mean the check runner is stuck, which is a pipeline fault; consider a separate alarm if unchecked stays high with no red. (2) Show the four counts on /flow itself, not just in the evidence, so the owner sees why the stop is theirs.
With no shared failure and at most one red pull, the lane-stopped alarm no longer files a crew defect. This fixes the case behind #15348 (30 open, 1 red, 0 green), where the Sentinel filed something no builder could fix.
reviewQueue(src/flow/alarm_lane.ts) now puts every open pull in one of four groups. It uses aLEFT JOIN, so pulls that never had a check are counted too:LaneAlarmnow carries thisqueue, and its evidence always has one line with all four counts (queueWords). That includes the alarm that fires only for a shared failure.onPeopleis now true when there is no shared failure and either green pulls outnumber red ones (as before) or at most one pull is red. In that caselaneStoppedfiles nothing; the alarm still shows on /flow.closeLaneMoving(src/crew/sentinel_lane.ts): when the at-most-one-red rule is what clears an open lane issue, the closing comment gives the four counts and says the stop is a person's to merge or re-check.forge, so it still files the finding.The risk is an alarm that goes quiet too easily. The guard is the new shared-failure test: five reds on one masked line must still file "One failure is stopping many pulls".
Tests changed (in
test/flow-alarm-lane.test.ts; the old ones were right for the old rule):Checks:
scripts/gate.ts --fixrewrapped a comment, which is included in the commit, andtsc --noEmitis clean.scripts/fast.tsnamed 471 files (about 40 minutes), so I ran the 26 files that cover this change instead: the lane, sentinel,flow-alarm-*, unused-exports, test-honesty, src-imports, tui-sentinel, flow-pages and crew-shared-red tests. All 222 pass.Not done: the
keep_planandestimatetools were not available in this run, so there is no plan or estimate on the issue. No page changed, so there is no review block.To try it:
bun test test/flow-alarm-lane.test.ts.🤖 Generated with Claude Code
Closes #15349