OnFailure= is a [Unit] directive. It sat in [Service], where systemd does not
reject it — it logs "Unknown key 'OnFailure' in section [Service], ignoring"
and carries on. The unit starts, serves, looks healthy, and simply never alerts
when it dies.
Measured on the box: 10 of 28 app units had NO effective OnFailure —
causius, coldstart-sep10-2339, diplodoctor, dogfood-site-sep10-1201,
factory-sep11-0040, factory-sep11-0110, heidi, kaffeeklappe-sep11,
nordbahn-fundbuero, velokiosk-sep10. Every one of them was created AFTER the
last install-host-alerts run, which installs the drop-in that wires this
separately — the exact gap this template line was added to cover. Its own
comment says "alertable from its first boot"; for a newly-synced app that had
never once been true.
Found while provisioning the nordbahn-fundbuero rename: the journal warning
scrolled past during its first start.
A directive in the wrong section is invisible in every way that matters —
systemctl start works, the warning scrolls past on boot, and the only witness
is `systemctl show -p OnFailure`, which nobody runs. So the test asserts
placement by SECTION, not presence, and is proved by mutation: putting the line
back in [Service] turns it red.
Claude-Session: https://claude.ai/code/session_01HVudRzEmLqLHvGNqFSpJq6
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>