Public: anyone can read this; the crew can change it.
One test proves #477 end to end: a degraded forge says 'needs you: forge …' on the board, pages the phone once, and once more when it clears #2528
Check · Review · Land · Live done — Landed and live in production.
I added `test/forge-degraded.test.ts`, and it passes. It does not check the literal text "needs you: forge …" for `errors`, because the board doesn't print that for an `errors` cause. I made no code change.
shipped production is serving it deploy fbaec5d
I added test/forge-degraded.test.ts, and it passes. It does not check the literal text "needs you: forge …" for errors, because the board doesn't print that for an errors cause. I made no code change.
The test boots a real forge with the board served and a fake notify endpoint. It reads the real vitals and the real /board. Only the pager's clock is faked. It does three things:
- While degraded: it records
ERROR_BURST(20) errors. The board's forge strip flips from "All fine" todata-ok="no"with theerrorsneed line linking to/settings/capacity#errors. Nothing is paged at 4 minutes. One page goes out after 6 minutes, and further ticks over 40 more minutes send nothing. - After it clears: it empties the error ledger. Nothing is sent after 4 minutes clear. After 6 minutes exactly one Recovered page goes out, and no more follow.
- Back to fine: the strip says "All fine" with
data-ok="yes"and no need line.
Gap in #477: the strip's "needs you: forge …" line comes only from the guard verdict, which covers held, stuck, oom:, stale view and draining (src/kernel/guard_verdict.ts). The errors, internal, queue: and disk causes show on the strip as their own sentence plus "Since …", with no "needs you" prefix.
Draining is also in the verdict and the pager, but the board builds its verdict from a view that never carries drainingSince. So a drain past five minutes pages the phone but never appears on the board. If you want the literal wording for the owned causes, or the drain on the board, that is a separate change to src/web/pages/board.ts.
I ran only the new test and did not get a clean tsc here: bun x tsc --noEmit failed on missing bun type definitions in this sandbox. The forge's check runs the whole suite.
To try it: bun test test/forge-degraded.test.ts.
Test-only change; no UI, so nothing for a phone, keyboard or no-JS reader to regress. The test drives the real vitals, the real /board (signed in as the admin) and the real notifier with only the clock and the send faked. It asserts the strip flips to data-ok=no with the errors need line, one page at 5+ minutes, silence while it lasts, one Recovered after 5 clear minutes, and All fine again. Each assertion would fail if the paging or the strip broke.
The scout was honest that the board does not print the literal "needs you: forge …" for the errors cause, and the test asserts what the board really says. I accept that. Two things I would do next:
- Open a separate pillar-0 issue so the errors, internal, queue and disk causes, and a drain past five minutes, reach the board strip with the same plain wording the pager uses. Today a drain pages the phone but the board never shows it.
- Tidy the header comment in the test, which wraps mid-sentence.
I added
test/forge-degraded.test.ts, and it passes. It does not check the literal text "needs you: forge …" forerrors, because the board doesn't print that for anerrorscause. I made no code change.The test boots a real forge with the board served and a fake notify endpoint. It reads the real vitals and the real
/board. Only the pager's clock is faked. It does three things:ERROR_BURST(20) errors. The board's forge strip flips from "All fine" todata-ok="no"with theerrorsneed line linking to/settings/capacity#errors. Nothing is paged at 4 minutes. One page goes out after 6 minutes, and further ticks over 40 more minutes send nothing.data-ok="yes"and no need line.Gap in #477: the strip's "needs you: forge …" line comes only from the guard verdict, which covers
held,stuck,oom:, stale view and draining (src/kernel/guard_verdict.ts). Theerrors,internal,queue:anddiskcauses show on the strip as their own sentence plus "Since …", with no "needs you" prefix.Draining is also in the verdict and the pager, but the board builds its verdict from a view that never carries
drainingSince. So a drain past five minutes pages the phone but never appears on the board. If you want the literal wording for the owned causes, or the drain on the board, that is a separate change tosrc/web/pages/board.ts.I ran only the new test and did not get a clean
tschere:bun x tsc --noEmitfailed on missingbuntype definitions in this sandbox. The forge's check runs the whole suite.To try it:
bun test test/forge-degraded.test.ts.Closes #2526