Repository navigation
fix(scheduler): the boot banner described heartbeats as if they all run - #986
Merged
Merged
Conversation
`- Agent heartbeats run every 10 minutes with per-agent intervals` is true about the dispatcher and silent about the gate. Since #800 the gate is the dominant fact: `heartbeatEnabled !== true` returns before anything else, so an install that never opted in has no interval, no tick, and no cost. 166 of 245 active installs were found ticking on the old default. Every other line in that banner describes a job that simply runs. This one described a job that mostly does not, in the same voice. It cost something today. @sprint-review read the line, went to `resolveHeartbeatIntervalMinutes` (default 60), and computed a fleet wake range of ~88-530 over 22h — off a field never reached for these seats. They retracted it on #974 within the hour. The retraction is durable; the sentence that produced it would have gone on producing it. The banner now names the gate, the per-install interval, and its default. Test asserts the gate's field name is present, on the source text rather than by invoking start() (which schedules real cron). Matching the name rather than the wording keeps a rephrase green and a re-simplification red, and it carries a control so an empty slice cannot pass as a match. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The line
True about the dispatcher, silent about the gate. Since #800 the gate is the dominant fact about heartbeats:
heartbeatEnabled !== truereturns atschedulerService.ts:1023, before the interval is ever resolved — so an install that never opted in has no interval, no tick, and no cost. 166 of 245 active installs across 48 owners were found ticking hourly on the old default, each spending its owner's own model quota.Every other line in that banner describes a job that simply runs. This one described a job that mostly does not, in the same voice.
Why now
It cost something today, in this repo, inside an hour.
@sprint-review read the line, went to
resolveHeartbeatIntervalMinutes(default 60, not the 10 the banner implies), and computed a fleet heartbeat range of ~88–530 wakes over 22h across 4 seats — a number wide enough to change what a separate ADR claim was asserting. It was wrong for a reason the arithmetic could not reveal:resolveHeartbeatIntervalMinutesis not called until:1042, downstream of a gate none of those seats pass. They verified it and retracted on #974 (issuecomment-5325966029).The retraction is durable. The sentence that produced it would have gone on producing it — which is the failure this repo has already logged as "a fix to a false model must land where the model is produced, not where it was diagnosed" (AX audit entry 13).
The change
Names the cadence, the gate, the per-install interval, and its default — the four things the old line invited a reader to go and guess at.
Test
Added to
schedulerService.heartbeatOptIn.test.js, which already defends theundefinedvstruedistinction — the banner is the operator-facing half of the same invariant.It asserts on the source text rather than by invoking
start(), which schedules real cron jobs. It matches the gate's field name rather than the wording, so a rephrase stays green and a re-simplification back to "heartbeats run" goes red. It carries a control assertion (10 minutes) so a slice that captured nothing cannot pass as a match — an empty string satisfies notoContainand looks identical to a correct one otherwise.Confirmed red against the old banner line before being kept. 5/5 in the file, no new tsc errors.
🤖 Generated with Claude Code