Skip to content

bootstrap: honor macOS .service records that carry the full plist path - #164

Merged
JPDuchesne merged 1 commit into
mainfrom
jpd/macos-service-record-plist-path
Sep 13, 2026
Merged

bootstrap: honor macOS .service records that carry the full plist path#164
JPDuchesne merged 1 commit into
mainfrom
jpd/macos-service-record-plist-path

Conversation

@JPDuchesne

Copy link
Copy Markdown
Contributor

Caught live during the plans#36 ceremony: `dev runner register --org --ai-flow` reported writing the service env into

```
/Users/jpduchesne/Library/LaunchAgents/Users/jpduchesne/Library/LaunchAgents/actions.runner.d3mlabs.JeanPhiippesMBP.plist.plist
```

On macOS the runner's `svc.sh` writes the absolute plist path into `.service` (on Linux it is the bare service name). `configure_service!` assumed the Linux shape, joining the record under `launch_agents_dir` and appending a second `.plist`. Every PlistBuddy call hit a nonexistent path, so the real plist never received `Umask 002` or `AI_FLOW_AGENT_USER` — the runner restarted without the cooperative-access settings.

Fix: use the `.service` record verbatim when it already names a plist; keep the join for the bare-name shape. Test-first: new test writes a macOS-shaped record (absolute plist path) and asserts PlistBuddy targets it exactly — failed before the fix, passes after.

Note: 4 `BuildContainerTest` failures appear locally on any bootstrapped agent host (they hard-code `~/.dev/...` while DataRoot now resolves the shared root) — pre-existing on main, unrelated, issue to follow.

Made with Cursor

On macOS, the runner's svc.sh writes the absolute plist path into
.service; on Linux it writes the bare service name. configure_service!
assumed the Linux shape and joined the record under launch_agents_dir
with a second .plist suffix, so on macOS PlistBuddy targeted a
nonexistent doubled path and the real plist never received Umask 002 or
AI_FLOW_AGENT_USER — caught live during the plans#36 ceremony.

Use the record verbatim when it already names a plist; keep the join
for the bare-name shape.

Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov

codecov Bot commented Sep 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@JPDuchesne
JPDuchesne merged commit 39cf63f into main Sep 13, 2026
5 checks passed
@JPDuchesne
JPDuchesne deleted the jpd/macos-service-record-plist-path branch September 13, 2026 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant