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>