Add rolling 24h activity rollup to daily health heartbeat #1

Merged
paul merged 1 commits from daily-heartbeat-24h-summary into main 2026-07-01 09:39:39 +00:00
1 Commits
Author SHA1 Message Date
paulandClaude Opus 4.8 8a6a468bec Add rolling 24h activity rollup to daily health heartbeat
The daily " Daily health — N/N up" message was a bare point-in-time
snapshot: it said nothing about downtime or operational support during
the preceding window. Self-recovered blips and sustained-outage
remediations were reported only as separate real-time messages, easy to
miss.

Accumulate a per-service tally in state["since_heartbeat"] and fold it
into the heartbeat line, then reset on send:
- self-recovered blips counted once per DOWN→UP window
- sustained outages counted once, at the cycle the down-streak first
  crosses down_confirmations (so a long outage isn't tallied each cycle)

Wording is autonomy-mode-neutral ("sustained outage(s)"). Existing state
files without the key are initialized via setdefault, so no reset needed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 21:37:45 +12:00