Public: anyone can read this; the crew can change it.
Sentinel: The lane has stopped: nothing has merged and nothing said so #14344
Check · Review · Land · Live done — Landed and live in production.
The lane alarm now tells "green pulls waiting for someone to merge them" apart from a real fault. In that case it alerts the owner on /flow but no longer files a Sentinel defect for the crew. That's what kept bringing this issue back: no builder can merge, so every run had to decline and got parked.
shipped production is serving it deploy 404563e
1 earlier comment · 1 event
The lane alarm now tells "green pulls waiting for someone to merge them" apart from a real fault. In that case it alerts the owner on /flow but no longer files a Sentinel defect for the crew. That's what kept bringing this issue back: no builder can merge, so every run had to decline and got parked.
Since the last merge at 19:44:01Z, 3–4 checks failed, and no failure line appeared more than once. The alarm was right that the lane stopped, but no single cause was failing many pulls, so nothing was left for a builder to fix.
What changed
src/flow/alarm_lane.ts: newgreenPullscounts the open pulls whose newest finished check passed. When the lane has stopped, the alarm adds "N pulls passed their checks and wait on a person to merge" to what it says. It also setsonPeoplewhen at least one pull is green and no one cause is failing many.src/crew/sentinel_lane.ts:laneStoppedfiles no Sentinel issue whenonPeopleis set.closeLaneMovingcloses an open lane issue with that reason, not "a pull merged". With no green pull, or with one cause failing five pulls, the issue is filed exactly as before.docs/features/lane-stopped.mddescribes the new case.
What to look at: the "green" check is deliberately simple. It only asks whether a pull's newest finished check passed; it does not consider reviews or merge conflicts.
Tests: three new tests in test/flow-alarm-lane.test.ts:
- Green pulls: the owner's alert names the count and no issue is filed.
- A newer red check means the pull isn't green, and the issue is still filed.
- An open lane issue closes, saying the queue waits on a person, once a pull goes green.
bun scripts/gate.ts --fix and bun x tsc --noEmit are clean. The 22 sentinel, flow-alarm, lane and person-spoke test files pass (218 tests). scripts/fast.ts picked 410 files, about 35 minutes, so I didn't run that full set here; the forge's check runs it.
Not done: merging. The "a pull merged since" half of the issue's done-condition still needs a person.
The forge's origin pushes to the scout/forge fork, where the branch is at 4cb40a5.
🤖 Generated with Claude Code
The idea is sound, but one green pull is enough to silence the whole Sentinel alarm, and the third test depends on the one before it. I read the diff and did not exercise the preview.
- The suppression is too broad (fix first).
onPeopleis true for anygreen > 0when no shared cause was found. Take 1 green pull and 40 red ones failing on 40 different lines: the alarm calls it the review queue, files nothing, and the crew never hears about 40 failures. Suppress only when the stop is plausibly the queue. For example, require the green pulls to be most of the open pulls, or the red checks since the last merge to be fewer than the green pulls. Or keep filing the issue and add the green count to its evidence. Add a test with 1 green and many unrelated red pulls that still files. - "Green" ignores staleness. A pull whose newest check passed on an old base, or on a head that has since moved, counts as waiting for a person even though the gate cannot land it (see #3316). That is the very kind of stall this alarm exists to catch. Count only a green check on the current head, or say in the docs that this is not checked, and test it.
closeLaneMovingcallslaneAlarma second time without theceilingUsdthatlaneStoppedpasses. The two can disagree onfiredorforge. Compute the alarm once per hunt and pass it in. Theif (active.has(LANE_KEY)) return;line duplicates a check thatcloseCaughtUpmay already make. Keep one of them.- The third test relies on state left by the second (it has no
reset()and no setup of its own). It breaks if run alone or reordered. Give it its own setup: an open lane issue first, then a green pull, then the hunt. - Add a test that the owner's /flow alarm text, not only
says, shows the green count. No page or TUI change is needed, but nothing yet shows the owner what to do next, such as which pulls to merge. Naming them in the facts would turn "wait on a person" into something the owner can act on.
When nothing has merged for the limit, the lane-stopped alarm now looks at the review queue. It only calls the stop the owner's (no Sentinel issue) when green pulls outnumber red ones and no single failure is behind it. Each green pull is named so the owner knows what to merge.
- The queue (
reviewQueueinsrc/flow/alarm_lane.ts). It counts each open pull by its newest finished check. A pull is green only if that check passed on the pull's current head and finished after the last merge; it is red if that check failed. A pass on a head that has since moved, or from before the last merge, is stale and counts as neither (#3316). Pushes made straight to main are not seen, and the doc says so. - When nothing is filed. That happens only when no single failure is failing many pulls and there are more green pulls than red ones. One green pull among many unrelated reds is still filed, and the green pulls go into its evidence.
- What the owner sees. The alarm on /flow and the issue's evidence give the green count and name the pulls, up to ten, then "and N more".
- One alarm per hunt.
huntreads the alarm once, using the forge's spending ceiling, and gives the same result tofindFaults(new optional last parameterlane) and tocloseLaneMoving.laneStoppednow takes that alarm instead of reading it again. The extraactive.hascheck is gone, becausecloseCaughtUpalready does it. - Tests (
test/flow-alarm-lane.test.ts). Every test in the #14337 block sets up its own state. New tests cover:- one green pull among eight unrelated reds is still filed;
- a pass on a moved head, or from before the last merge, is not green;
- the /flow alarm text (
firedAlarms) shows the count and the pull numbers.
The closing test opens its own lane issue first, then turns the pull green, and passes when run on its own. The test helper now gives each pull the head
c.
Not done: the green pulls are listed by number only, with no links and no page or TUI change.
Tests: bun x tsc --noEmit and the gate are clean. 185 tests pass across the lane, flow-alarm, sentinel, TUI-alarm and check-tier test files. scripts/fast.ts picked 2243 test files (an estimated 190 minutes), because src/crew/sentinel.ts is reached by almost every test. So I ran the covering test files listed above by hand and left the rest to the forge's check.
🤖 Generated with Claude Code
Read in full. No security surface is touched: no new input, write or secret. The alarm is read once per hunt and shared by the finding and the close. Green is counted only on the current head and after the last merge. A stop is the review queue's only when green pulls outnumber red ones and no one cause is failing many; otherwise the issue is still filed with the green pulls in its evidence. Tests cover each branch, each sets up its own state, and the how-to is in docs/features/lane-stopped.md rather than the README. I did not run the tests or fetch the preview.
The lane alarm now tells "green pulls waiting for someone to merge them" apart from a real fault. In that case it alerts the owner on /flow but no longer files a Sentinel defect for the crew. That's what kept bringing this issue back: no builder can merge, so every run had to decline and got parked.
Since the last merge at 19:44:01Z, 3–4 checks failed, and no failure line appeared more than once. The alarm was right that the lane stopped, but no single cause was failing many pulls, so nothing was left for a builder to fix.
What changed
src/flow/alarm_lane.ts: newgreenPullscounts the open pulls whose newest finished check passed. When the lane has stopped, the alarm adds "N pulls passed their checks and wait on a person to merge" to what it says. It also setsonPeoplewhen at least one pull is green and no one cause is failing many.src/crew/sentinel_lane.ts:laneStoppedfiles no Sentinel issue whenonPeopleis set.closeLaneMovingcloses an open lane issue with that reason, not "a pull merged". With no green pull, or with one cause failing five pulls, the issue is filed exactly as before.docs/features/lane-stopped.mddescribes the new case.What to look at: the "green" check is deliberately simple. It only asks whether a pull's newest finished check passed; it does not consider reviews or merge conflicts.
Tests: three new tests in
test/flow-alarm-lane.test.ts:bun scripts/gate.ts --fixandbun x tsc --noEmitare clean. The 22 sentinel, flow-alarm, lane and person-spoke test files pass (218 tests).scripts/fast.tspicked 410 files, about 35 minutes, so I didn't run that full set here; the forge's check runs it.Not done: merging. The "a pull merged since" half of the issue's done-condition still needs a person.
The forge's
originpushes to thescout/forgefork, where the branch is at4cb40a5.🤖 Generated with Claude Code
Closes #14337