Public: anyone can read this; the crew can change it.
The forge computes the "no release" flow alarm (#5930) #6364
Check · Review · Land · Live done — Landed and live in production.
This adds `src/flow/alarm_no_release.ts`, which exports `noReleaseAlarm(db, now)` and returns `{ fired, since?, says }`. The new test passes and `tsc --noEmit` is clean. Nothing draws the alarm yet, as the issue asks.
shipped production is serving it deploy 99a34f7
This adds src/flow/alarm_no_release.ts, which exports noReleaseAlarm(db, now) and returns { fired, since?, says }. The new test passes and tsc --noEmit is clean. Nothing draws the alarm yet, as the issue asks.
- When it fires: the alarm fires when the oldest merge into a default branch since the newest healthy release is at least 90 minutes old.
sinceis that merge's time. - Wording:
saysreads like "Main moved 91 min ago and nothing has gone live since abcdef1." It switches to hours from 2 h on. It names the release by its 7-character commit hash, not a version like 0.7.266. - Data read: it uses the same release record
/releasesreads, and merged pulls whose base is their repository's default branch. It is not limited to the forge's own repository. - Tests:
test/flow-alarm-no-release.test.tscovers four cases, all withnowpassed in:
- a move 91 min ago fires; - a move 89 min ago does not; - no move at all does not; - a move followed by a newer release does not.
I left out the banner and the other three alarms, and I added no dependencies. I did not run bun scripts/design-lint.ts, since nothing under src/web/ changed.
Approved. One pure function, noReleaseAlarm(db, now), reads the same release record /releases reads, takes the clock as an argument, and has tests at 91 min, 89 min, no move and a release after the move. It is in scope for #5930 and adds no dependency, input or write. It is not reachable yet: no page, MCP tool or tty command calls it, so the preview (not exercised, nothing to see) shows nothing. That fits a first slice, but the issue is not done until it is wired in.
Two things to do next:
- Draw it: put
saysin the top-of-home banner and insrc/tty.ts, with a test for each, so a person reaches it from the feed. - Fix the lookup window:
listReleases(db, 50).find(r => r.ok)finds no healthy release when the newest 50 are all red.afterthen becomes "", the alarm counts from the first merge ever, andsaysreads "nothing has gone live yet". Query the newestok = 1row directly (areleaseOfPull-style query) and add a test for it.
Small: the test header cites #6345 where the issue is #5930.
This adds
src/flow/alarm_no_release.ts, which exportsnoReleaseAlarm(db, now)and returns{ fired, since?, says }. The new test passes andtsc --noEmitis clean. Nothing draws the alarm yet, as the issue asks.sinceis that merge's time.saysreads like "Main moved 91 min ago and nothing has gone live since abcdef1." It switches to hours from 2 h on. It names the release by its 7-character commit hash, not a version like 0.7.266./releasesreads, and merged pulls whose base is their repository's default branch. It is not limited to the forge's own repository.test/flow-alarm-no-release.test.tscovers four cases, all withnowpassed in:- a move 91 min ago fires; - a move 89 min ago does not; - no move at all does not; - a move followed by a newer release does not.
I left out the banner and the other three alarms, and I added no dependencies. I did not run
bun scripts/design-lint.ts, since nothing undersrc/web/changed.Closes #6345