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

The forge computes the "red main" flow alarm (#5930) #6343

shipped production is serving it opened this has it
opened this

Part of #5930, the flow alarm: nothing approved sits still. Today the steward's probe computes this outside the forge; the forge must own it.

Done:

  • [ ] src/flow/alarm_red_main.ts exports one function taking the app (or db) and now, answering { fired: boolean, since?: string, says: string }. It fires when the forge repository's main has had a red latest check for 10 min or more. says is one plain sentence, e.g. "Main has been red for 25 min: test/standards.test.ts." It names the failing test when the check names one.
  • [ ] A test covers fired and not fired: red for 11 min fires; red for 9 min, or green, does not. It fails without the file.
  • [ ] Nothing draws it yet; the banner is a separate issue. Keep to this one file and its test, so the four alarms land in parallel without touching each other.

Files: src/flow/alarm_red_main.ts, a test under test/.

Before pushing: bun x tsc --noEmit and the tests you add or touch; bun scripts/design-lint.ts if src/web/ changes. Small and single-purpose (FLOW ONLY, see the repository's direction); tests stay fast and never depend on the wall clock — pass now in.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs