Repository navigation
fix(caam): stop the linux daemon restart loop when caam is missing - #3089
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning This organization's free trial has ended, so Indent couldn't start this review. Manage billing to resume reviews on this repository.
Select any unchecked box below to run or rerun that agent. Full resultsIndent Review Agent
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Summary
Merge Risk: ⚪ Minimal · up to
|
There was a problem hiding this comment.
1 issue found across 2 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="spec/caam_sync_service_spec.sh">
<violation number="1" location="spec/caam_sync_service_spec.sh:63">
P3: This regression example only checks that the text exists in the Nix source, so it does not verify that systemd receives the setting or suppresses a 203/EXEC restart. Assert the rendered user unit, or exercise the service restart behavior in an environment with systemd.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
| End | ||
|
|
||
| It 'stops restarting the linux daemon after the caam binary disappears' | ||
| When run bash -c "grep -F 'RestartPreventExitStatus = 203' '$NIX'" |
There was a problem hiding this comment.
P3: This regression example only checks that the text exists in the Nix source, so it does not verify that systemd receives the setting or suppresses a 203/EXEC restart. Assert the rendered user unit, or exercise the service restart behavior in an environment with systemd.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At spec/caam_sync_service_spec.sh, line 63:
<comment>This regression example only checks that the text exists in the Nix source, so it does not verify that systemd receives the setting or suppresses a 203/EXEC restart. Assert the rendered user unit, or exercise the service restart behavior in an environment with systemd.</comment>
<file context>
@@ -59,6 +59,12 @@ The output should include 'ConditionPathIsExecutable'
End
+It 'stops restarting the linux daemon after the caam binary disappears'
+When run bash -c "grep -F 'RestartPreventExitStatus = 203' '$NIX'"
+The output should include 'RestartPreventExitStatus'
+The status should be success
</file context>
There was a problem hiding this comment.
Reviewed changes
- home-manager/services/caam/default.nix: Added
RestartPreventExitStatus = 203;with explanatory comments to prevent restart loops when caam binary is missing - spec/caam_sync_service_spec.sh: Added a test verifying RestartPreventExitStatus = 203 is present
✅ No new issues found.
free | 𝕏

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)
/root/.local/bin/caamdoes not exist andNRestartsis about 1,670.ConditionResult=yes, withConditionTimestampfrom 2026-10-11.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 = 203rather 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.servicecrash-loop on Linux hosts where thecaambinary is missing. Each start previously exited with203/EXECandRestart=alwaysretried every 10 seconds forever, becauseConditionPathIsExecutableis only evaluated when a start job is queued, not on automatic restarts. AddingRestartPreventExitStatus = 203ends the loop after the first failed start while keeping the restart behavior on hosts that do have the binary installed.Written for commit 06aaa3a. Summary will update on new commits.