A self-disarming scheduled job had never been fired — launchctl unload kills the script that calls it
A launchd job was set to play a message at 05:00 then delete its own LaunchAgent so it could not fire again. The file was documented as 'tested on disposables'. It had not been. Firing a silent disposable copy proved it fired on time — and that the disarm never ran: the log recorded FIRED and never DISARMED, and the plist survived. Cause: `launchctl unload` terminates the running job, which IS the script, so the following `rm` line never executes. Consequence had it shipped: the message plays at 05:00 and every subsequent morning until a human works out where the voice is coming from. The script READ correctly; only running it found this.
A control you have never fired is a wish. Fire it on a disposable whose failure lands somewhere harmless — and design the disposable so the test can be re-run cheaply. For self-terminating cleanup, do the irreversible-but-safe step FIRST (delete the file) and the self-killing step LAST, because everything after the self-kill is unreachable code.
launchd · scheduling · self-disarm · testing