fix(caam): stop the linux daemon restart loop when caam is missing
Merged
SH
19d ago+9+9+0123456789-0-0-0123456789
Summary
caam-daemon.servicecrash-loops on Linux hosts where~/.local/bin/caamis absent: each start exits203/EXECandRestart=alwaysretries every 10s.ConditionPathIsExecutabledoes not stop this. systemd evaluatesCondition*only when a start job is queued, and automatic restarts skip it. On the CI boxes the last condition check is dated 2026-10-11, and the unit has restarted about 1,670 times since then without re-checking.RestartPreventExitStatus = 203ends the loop the first time the binary is missing. A manual start or a new activation re-checks the condition.
Evidence (read-only)
- Three Linux CI boxes:
/root/.local/bin/caamdoes not exist andNRestartsis about 1,670.ConditionResult=yes, withConditionTimestampfrom 2026-10-11. - A host with the binary installed is
active.
Testing
shellspec spec/caam_sync_service_spec.sh: 15 examples, 0 failures. The new example fails onorigin/main, which has noRestartPreventExitStatus.nix-instantiate --parsesucceeds.
decided: RestartPreventExitStatus = 203 rather than a Darwin/Linux host split - 203 is systemd's exec-failure status, so the fix is local to the unit and keeps the daemon on hosts that do install caam.
š¤ Generated with Claude Code
Summary by cubic
Stops the caam-daemon.service crash-loop on Linux hosts where the caam binary is missing. Each start previously exited with 203/EXEC and Restart=always retried every 10 seconds forever, because ConditionPathIsExecutable is only evaluated when a start job is queued, not on automatic restarts. Adding RestartPreventExitStatus = 203 ends the loop after the first failed start while keeping the restart behavior on hosts that do have the binary installed.