Public: anyone can read this; the crew can change it.
Every way the release tick declines to cut records a heartbeat with a named reason, proven by one test per path #15470
Check · Review · Land · Live done — Landed and live in production.
The release tick now leaves a non-empty named reason in its heartbeat on every path, and one test per path proves it. Most of this was already in place: main.ts already runs each tick through stepWithBeat, which records the step's line or a failed beat when the tick throws.
shipped production is serving it deploy 3fede26
The release tick now leaves a non-empty named reason in its heartbeat on every path, and one test per path proves it. Most of this was already in place: main.ts already runs each tick through stepWithBeat, which records the step's line or a failed beat when the tick throws. What was missing was the tests, plus three gaps:
- The rolling-release path dropped what it did. When a release is rolling but not yet live, the tick re-sends the image if the deployment doesn't have it, but the beat only said "0.7.284 is rolling". It now adds the result: "…; promoted to <image>" or "…; promote to <image> refused (<error>); sent again next tick" (
src/keeper/keeper.ts). - An empty reason is no longer possible. A blank line from a step is recorded as "the release tick <outcome> without naming why" (
beatReasoninsrc/keeper/beat.ts). A thrown error with no message is recorded by its type, e.g. "step failed: Error". - Each path has a test.
test/keeper-heartbeat.test.tsdrives every path throughstepWithBeat(tickStep)and reads the beat back. It checks the time, the outcome, the exact cause, a single line and the length limit. A path that left no beat would read null and fail. The paths:- not cutting because main hasn't moved
- main unreadable
- the deployer refusing the tree
- the tag refused
- an owner's hold
- the disk 93% full
- a release rolling
- a re-promote refused while rolling
- a verify already running
- a throw inside the tick, which replaces the older beat
- an empty reason
When a release is cut is unchanged, and the release workflow and chart are untouched.
I changed one existing test: test/release-keeper-cadence.test.ts:145 expected the old line "0.7.284 is rolling". On that tick the keeper really does re-promote, so it now expects the longer line. The test was pinning the old wording, not a behaviour.
Checks: bun x tsc --noEmit and bun scripts/gate.ts --fix are clean. scripts/fast.ts named 713 test files (about 60 minutes), so I ran the 31 that cover this instead: all keeper- and release-keeper- tests, flow-alarm-main-ahead, release-now, beat, flow-keeper, tui-release-keeper, unused-exports and test-honesty. All pass.
To try it: bun test test/keeper-heartbeat.test.ts.
🤖 Generated with Claude Code
Approved. No page or UI is touched (beat.ts, keeper.ts and tests only), so there is no door or preview surface to judge. The change does what #15468 asked: each tick path goes through stepWithBeat and is read back by a test. A blank reason can no longer be recorded, a message-less error is named by its type, and the rolling path now says what the promote did. No new dependency, no dead code, and the one changed existing test pinned wording, not behaviour. I read the diff and did not run the tests here. Two things I would do next: (1) the verify-already-running test starts a bare tickStep and then races a second one. Make the first tick hold on an explicit gate so it cannot depend on scheduling, since fast tests must never flake. (2) Move the keeperForge import below the src imports so the import block stays ordered.
The release tick now leaves a non-empty named reason in its heartbeat on every path, and one test per path proves it. Most of this was already in place: main.ts already runs each tick through
stepWithBeat, which records the step's line or a failed beat when the tick throws. What was missing was the tests, plus three gaps:src/keeper/keeper.ts).beatReasoninsrc/keeper/beat.ts). A thrown error with no message is recorded by its type, e.g. "step failed: Error".test/keeper-heartbeat.test.tsdrives every path throughstepWithBeat(tickStep)and reads the beat back. It checks the time, the outcome, the exact cause, a single line and the length limit. A path that left no beat would read null and fail. The paths:When a release is cut is unchanged, and the release workflow and chart are untouched.
I changed one existing test:
test/release-keeper-cadence.test.ts:145expected the old line "0.7.284 is rolling". On that tick the keeper really does re-promote, so it now expects the longer line. The test was pinning the old wording, not a behaviour.Checks:
bun x tsc --noEmitandbun scripts/gate.ts --fixare clean.scripts/fast.tsnamed 713 test files (about 60 minutes), so I ran the 31 that cover this instead: allkeeper-andrelease-keeper-tests,flow-alarm-main-ahead,release-now,beat,flow-keeper,tui-release-keeper,unused-exportsandtest-honesty. All pass.To try it:
bun test test/keeper-heartbeat.test.ts.🤖 Generated with Claude Code
Closes #15468