Skip to content

refactor(ops): one voice on the phone — grace, digests, backoff, subjects - #444

Merged
github-actions[bot] merged 1 commit into
mainfrom
ops/alert-voice
Aug 29, 2026
Merged

refactor(ops): one voice on the phone — grace, digests, backoff, subjects#444
github-actions[bot] merged 1 commit into
mainfrom
ops/alert-voice

Conversation

@catomean

Copy link
Copy Markdown
Collaborator

George's ask, verbatim: refactor whatever is sending this abomination (his Telegram from the last 14 hours pasted as evidence).

What that feed actually contained, and what changes:

Abomination Cause Fix
Identical FAILED triples at 08:01/08:31/09:01/09:32/10:02/10:33 flat 30-min reminder, one message per unit Backoff ladder (30m → 2h → 8h → daily, reset on recovery) + digests: N units on one tick = one ⚙️ STILL FAILING: a; b message
3×FAILED + 3×RECOVERED for a 5-minute deploy blip (11:19→11:24) sweep paged on first sighting One-tick grace: the sweep watches first, pages only persistent failures — the OnFailure notifier already owns the instant page and declines blips. A blip = zero messages
✅ RECOVERED: rtc_revampit_configured_host_does_not_resolve__typing_static_nvi, agentwork_reparaturbonus-zh alert_transition printed its own state key on recovery Recovery names the subject remembered at bad-time — fixed at the lib seam, so every caller (runtime-conformance, agent-work watch, hcloud, …) is fixed at once
UNIT DOWN: appcron-kivvi-dunning.service — appcron-kivvi-dunning.service: Main process exited … Failed to start appcron-kivvi-dunning … raw journal tail systemd liturgy filtered; the page now reads 🔴 DOWN: appcron-kivvi-dunning — curl: (22) … HTTP 500 → 🤖 fix agent dispatched (kivvi)
🔴 kivvi is DOWN (… ) as of 2026-08-28T21:30:35.727Z vs 🔴 DOWN: botsmann (…) → HTTP 502 two URL monitors, two dialects fleet-uptime.yml now speaks the watchdog's dialect, ISO timestamp dropped (Telegram stamps messages)

Verification

  • 92/92 tests green (test-host-alerts.sh).
  • Mutation-proven per area on scratch copies: grace removed → 8 red; key-recovery restored → 3 red; backoff flattened → 1 red.
  • Backward compatible: old single-field cooldown stamps parse as count=0.

After merge

bash scripts/hetzner/install-host-alerts.sh (idempotent) deploys to bitbaum.

🤖 Generated with Claude Code

https://claude.ai/code/session_018RmMktaYn8MuJdEqjp5gWU

…ects

George, 2026-08-29, pasting his Telegram: 'refactor whatever is sending this
abomination.' The morning read as: identical FAILED triples at 08:01, 08:31,
09:01, 09:32, 10:02, 10:33; a six-pack of FAILED+RECOVERED for a 5-minute
deploy blip; closures naming state keys ('RECOVERED:
rtc_revampit_configured_host_does_not_resolve__typing_static_nvi',
'agentwork_reparaturbonus-zh'); UNIT DOWN bodies that repeat the unit name
four times in systemd boilerplate while burying the app's actual error; and
two URL monitors speaking two dialects.

One rule set, all in lib-alert.sh and its callers:

- Reminders BACK OFF: the claim stamp holds 'ts count'; each claim quadruples
  the next wait (30m, 2h, 8h, capped at a day). alert_clear resets the
  ladder. claim_once is the decision without the delivery, so callers can
  digest.
- The sweep gets ONE-TICK GRACE: first sighting watches, never pages — the
  OnFailure notifier owns the instant page and already declines deploy blips.
  A blip inside the grace produces zero messages, failure or closure.
- DIGESTS: N failures on one tick are one 'STILL FAILING: a; b' message; same
  for recoveries.
- Recovery names the SUBJECT, never the key: alert_transition remembers the
  human subject at bad-time (explicit arg, else text-to-first-colon, else
  key) — fixes every alert_transition caller fleet-wide at one seam.
- The notifier page shows the APP's error: systemd liturgy filtered from the
  journal tail; '🔴 DOWN: appcron-kivvi-dunning — curl: (22) … HTTP 500'.
- fleet-uptime.yml speaks the same dialect ('🔴 DOWN: app (…)',
  '✅ RECOVERED: app', no ISO timestamp — Telegram stamps messages).

92 tests green; mutation-verified per area: no-grace → 8 red, key-recovery →
3 red, flat-backoff → 1 red.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018RmMktaYn8MuJdEqjp5gWU
@github-actions
github-actions Bot merged commit 1a342fa into main Aug 29, 2026
3 checks passed
@github-actions
github-actions Bot deleted the ops/alert-voice branch August 29, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant