Description
Problem
Drew is being paged by PM-stack "front-end fails" that are not failures. The stack sentinel (pm-stack/aggregator/scripts/stack-sentinel.ts) flips a service to down on a single failed probe and posts the transition to the alert throat; the aggregator's notification engine then pages on the resulting stack-health candidate whenever the 6h cooldown has lapsed.
Diagnosis (2026-11-12, live laptop state):
~/.local/state/pm-aggregator/notifications.jsonl: 433 notification events today, 30 sent.service:projectoralone: 118 events, 4 sent;service:opencodeflapped the same way.pm-projector.servicenever crashed — active (running) since 2026-11-10, same PID. What fails is the probe:probe failed: The operation timed out(3s probe timeout) while the laptop sits at load average 8–10 under the fleet burn. One slow probe →down; next round answers →recovered; repeat.- The projector itself is fine; the health signal cries wolf under load.
Fix
Flap damping in the sentinel:
- A service flips to
down(for state + notification purposes) only after 3 consecutive failed probes at the 30s cadence (~90s of continuous failure). A single failed probe never flips state and never posts. - Probe timeouts for the 3s probes (projector, kaneo, dispatch, opencode, queue-broker) raised to 10s so a slow-but-alive service under load answers in time (aggregator's /board probe already uses 15s).
- A recovery transition is only ever posted after the corresponding
downwas actually posted (thepostedStatebookkeeping already guarantees this; the damping keeps it true — a blip that never became a posted down produces no recovery). - The first-sighting baseline is amended to match: a failed first probe now starts the failure streak instead of posting an immediate down (a genuinely down service is still declared after 3 probes, ~90s after sentinel start).
- Existing notification cooldown + dedupe stay untouched.
health:fleet-feed also sent 4 pushes today but is a different mechanism — a 5-minute feed-staleness window in src/health.ts, not a single-probe flip — and is deliberately out of scope here.
Ordered by Drew, main chat 2026-11-12: "Tune the health check so load spikes stop paging me." Follow-up to #8568 (Phase 1, closed).
Activity
developing-today commentedon Nov 12, 2026
CODE-2765
Merge pull request #9053 from developing-today/fix/sentinel-flap-damp…
developing-today-fleet commentedon Nov 12, 2026
Fixed and verified live.
ba12d12d— newsrc/sentinel-damping.tsfold (3 consecutive failed probes beforedown; recovery only after a posted down; legacy state entries migrated at load), sentinel probes folded through it, probe timeouts 3s → 10s (aggregator stays 15s).pm-stack-sentinel.servicerestarted 2026-11-12 22:06:09Z (new PID 1978485) on the merged code. Deploy note: the primary checkout is 38+ commits behind main andpm-git-syncis failing on another change's uncommitted.opencode/opencode.jsoncdirt (left untouched); the three merged files were checked out fromorigin/mainbyte-identical into the primary, so the running code is exactly main's.notifications.jsonl1065 → 1065 lines (zero new events, zero sends); all six servicesupat every sample; the aggregator'sstack-health.jsonrecorded no transitions; zero transition posts in the sentinel journal; /board, /api/attention.json, /api/quota.json all 200 before and after.health:fleet-feedwas left as-is per the issue scope (different mechanism: 5-minute feed-staleness window).