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

Sentinel: The lane has stopped: nothing has merged and nothing said so #16577

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

When the lane stops, the sentinel now treats it as waiting on a person rather than as a crew defect if three things hold: no one failure is shared across pulls, the lane has stopped, and at most one check has failed since the last merge.

Notes

shipped production is serving it deploy 3256dd5

opened this

When the lane stops, the sentinel now treats it as waiting on a person rather than as a crew defect if three things hold: no one failure is shared across pulls, the lane has stopped, and at most one check has failed since the last merge. Until now the rule only covered the case where no check had failed (#15575) or at most one pull was red (#15349).

This matches what the sentinel reported at 01:22. No failure was shared, one check had failed since the 23:31 merge, and two green pulls (#16574, #16575) were waiting on a person. The 38 red pulls had all failed before the last merge. A single new failure goes back to its own pull through its check, so it isn't "one failure stopping many." The other reds need a re-check or a merge, and only a person can do either. Before this change onPeople came out false, so the issue stayed open as a defect for the crew that no builder could fix.

What to look at:

  • src/flow/alarm_lane.ts: the onPeople condition now reads failedSince >= 0 && failedSince <= 1, where it used to be failedSince === 0. The comment above it says why.
  • The alarm still fires and still shows on /flow. This only changes whether the sentinel files the issue or keeps it open. When it closes one, it gives the reason "waits on a person to merge" or "at most one is red."
  • Two failures since the last merge with no shared cause still file the issue. The existing test for that case passes unchanged.
  • test/flow-alarm-lane.test.ts has a new test built from the issue's numbers: 38 red with 37 of them old, 1 new failure, and 2 green. It expects onPeople to be true, no finding to be filed, and the alarm to stay on /flow. It fails without the change.

Checks: bun scripts/gate.ts --fix rewrapped one comment, which is in the commit, and bun x tsc --noEmit is clean. scripts/fast.ts picked 504 test files (about 42 minutes), far too many for here. I ran the 31 files that cover the lane alarm, the sentinel and the flow alarms instead: 253 pass, 0 fail. I added no new function, so I didn't run scripts/similar.ts.

Not done: merging #16574 and #16575, which is what actually restarts the lane, is for a person to do.

🤖 Generated with Claude Code

Closes #16569

commented

When the lane stops, the sentinel now treats it as waiting on a person rather than as a crew defect if three things hold: no one failure is shared across pulls, the lane has stopped, and at most one check has failed since the last merge. Until now the rule only covered the case where no check had failed (#15575) or at most one pull was red (#15349).

This matches what the sentinel reported at 01:22. No failure was shared, one check had failed since the 23:31 merge, and two green pulls (#16574, #16575) were waiting on a person. The 38 red pulls had all failed before the last merge. A single new failure goes back to its own pull through its check, so it isn't "one failure stopping many." The other reds need a re-check or a merge, and only a person can do either. Before this change onPeople came out false, so the issue stayed open as a defect for the crew that no builder could fix.

What to look at:

  • src/flow/alarm_lane.ts: the onPeople condition now reads failedSince >= 0 && failedSince <= 1, where it used to be failedSince === 0. The comment above it says why.
  • The alarm still fires and still shows on /flow. This only changes whether the sentinel files the issue or keeps it open. When it closes one, it gives the reason "waits on a person to merge" or "at most one is red."
  • Two failures since the last merge with no shared cause still file the issue. The existing test for that case passes unchanged.
  • test/flow-alarm-lane.test.ts has a new test built from the issue's numbers: 38 red with 37 of them old, 1 new failure, and 2 green. It expects onPeople to be true, no finding to be filed, and the alarm to stay on /flow. It fails without the change.

Checks: bun scripts/gate.ts --fix rewrapped one comment, which is in the commit, and bun x tsc --noEmit is clean. scripts/fast.ts picked 504 test files (about 42 minutes), far too many for here. I ran the 31 files that cover the lane alarm, the sentinel and the flow alarms instead: 253 pass, 0 fail. I added no new function, so I didn't run scripts/similar.ts.

Not done: merging #16574 and #16575, which is what actually restarts the lane, is for a person to do.

🤖 Generated with Claude Code

Approved

Approved. The change is small and the intent is clear: one new failure since the last merge, with no shared cause, now counts as waiting on people. The failedSince >= 0 guard keeps the unknown case (-1, lane not stopped) from qualifying. The new test uses the issue's numbers and asserts the alarm stays on /flow, no finding is filed, and laneStopped is empty. This touches no page, so there is no preview behaviour to check, and the README and the two doors are unaffected.

Two things I would do next:

  1. Make the sentinel's close reason say 'one failure since the last merge' for this case, so a closed issue states why. It currently falls under 'waits on a person to merge' or 'at most one is red'.
  2. Add a boundary test with two failures since the merge and no shared cause, asserting onPeople is false. Put it in the same describe block as the new test, so the threshold of 1 can't drift.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs