vitareba-app could not read its .env on 2026-08-28 (root-owned after a
`chown --reference`). Restart=on-failure + RestartSec=3 restarted it 18 times
in 60 seconds, every restart fired OnFailure, and every OnFailure sent its own
Telegram: six identical "UNIT DOWN" messages for ONE incident, none of which
made the fix arrive any sooner.
The existing guard could not help. It silences a unit that comes BACK within
8s (deploy restarts, transient blips); a unit that cannot start at all never
comes back, so the guard fell through and paged on every loop iteration.
Page once per unit, hold for NOTIFY_COOLDOWN_SEC (30m), then re-page as a
reminder while it is still down. Recovery clears the stamp, so the next
genuine outage pages immediately instead of inheriting the last one's silence.
Suppressed restarts still go to the journal — quiet in Telegram must not mean
invisible in the logs.
Also: the summary block added in #431 sat in the MIDDLE of the test file, so
`[ "$fail" -eq 0 ]` under `set -e` aborted the run on the first failure and
the cases below it never executed — a suite that reports on itself partially.
One summary, at the end, after every case has run.
Covered by scripts/hetzner/test-host-alerts.sh, which drives the shipped
heredoc payload (no second copy to drift). Proven by mutation on a throwaway
copy: dropping the cooldown, dropping the recovery clear, and freezing the
cooldown each turn the suite red.
Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com>