Repository navigation
fix(pm-stack): damp stack-sentinel flapping — 3 consecutive probe failures before down (#9049) - #9053
Merged
Conversation
…lures before down (#9049)
developing-today-fleet
Bot
requested review from
a team and
dezren39
as code owners
November 12, 2026 22:05
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
developing-today-fleet
Bot
deleted the
fix/sentinel-flap-damping-9049
branch
November 12, 2026 22:05
This was referenced Nov 14, 2026
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.
What
Flap damping for the stack sentinel, per #9049 (Drew, 2026-11-12: "Tune the health check so load spikes stop paging me").
The sentinel flipped a service to
down— and posted the transition that pages Drew — on a single failed probe. Today that produced 433 notification events (30 sent);service:projectoralone had 118 events / 4 sends whilepm-projector.servicenever crashed (running since 2026-11-10, same PID). The probes were timing out at 3s under load average 8–10.Changes
src/sentinel-damping.ts(new) — the pure state fold, unit-tested:downonly after 3 consecutive failed probes (~90s at the 30s cadence). One failure only advances a streak recorded on the entry; a success resets it.downstampssinceat the streak start (when the outage actually began).postedStatebookkeeping, now pinned by tests) — blips and unlanded downs leave no trace.normalizeSentinelEntrymigrates pre-fix(pm-stack): stack sentinel flaps on single probe timeouts — paging Drew for load spikes #9049 persisted entries (no streak fields) at load.scripts/stack-sentinel.ts— probes fold throughapplySentinelProbe; probe timeouts 3s → 10s for projector/kaneo/dispatch/opencode/queue-broker (aggregator /board stays 15s), so a slow-but-alive service under load answers in time.test/sentinel-damping.test.ts(new) — 12 oracle-named tests: 1 failure → still up, no post; 2 → still up; 3 → down + one post owed; streak reset on success; recovery only after a posted down; silent recovery for an unposted down; first-sighting behavior; legacy-entry migration.Cooldown + dedupe in the notification engine are untouched.
Out of scope, deliberately:
health:fleet-feed(4 sends today) is a different mechanism — a 5-minute feed-staleness window insrc/health.ts, not a single-probe flip.Verification
tsc --noEmit: no errors in the touched files (25 pre-existing errors in unrelated test files, unchanged).Refs #9049.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.