Repository navigation
[AI-3419] Run the macOS daemon as a Standard launchd process - #1269
Conversation
launchd reads ProcessType only when a job loads, so an installed daemon is reloaded after an update, and only once it accepts an idle-only restart: the reload kills whatever it hosts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR Summary by QodoRun macOS daemons at standard priority with idle-only migration
AI Description
Diagram
High-Level Assessment
Files changed (9)
|
Code Review by Qodo
1.
|
The refresh runs under the npm wrapper's 60s kill, so each launchctl call is bounded, and a job left unloaded says so instead of claiming a restore. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
/agentic_review |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Code review by qodo was updated up to the latest commit 3b636ee |
The npm refresh wrapper SIGKILLs at 60s, and a kill between bootout and bootstrap leaves the job unloaded with no rollback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tstrap Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
/agentic_review |
|
Code review by qodo was updated up to the latest commit 6c8d80b |
…dard Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
/agentic_review |
|
Code review by qodo was updated up to the latest commit 9e3b069 |
… time Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
/agentic_review |
|
Code review by qodo was updated up to the latest commit d8f15e0 |
AI-3419 (no GitHub issue)
What & why
With
ProcessType=Adaptive, launchd runs the daemon at priority 4, and under load its hub heartbeat starves into reconnect storms. New plists are now written asStandard. launchd reads that key only when a job loads, sodaemon service refreshruns from the post-update refresh list. It rewrites the plist and reloads the job, but only after the daemon accepts an idle-only restart (Restart "now", a frame older daemons already handle). A busy daemon is left for the next update.Where to look
LaunchdServiceManager.RefreshProcessType: the bootout runs while the accepted restart is still exiting, so launchd can't relaunch from its cached definition. A failed bootstrap restores the old plist and bootstraps again.Verification
LaunchdProcessTypeRefreshTests7/7,Launchd*50/50,DaemonRestartCommandTests4/4. Removing the idle gate failsBusy_daemon_is_not_reloaded_but_its_plist_is_rewritten.node npm/kcap/bin/refresh.test.jspasses.🤖 Generated with Claude Code