daemon: set macOS LaunchAgent ProcessType and WorkingDirectory#58070
daemon: set macOS LaunchAgent ProcessType and WorkingDirectory#58070zssggle-rgb wants to merge 1 commit into
Conversation
Greptile SummaryThis PR makes two targeted improvements to generated macOS
Confidence Score: 5/5Safe to merge — changes are well-scoped, well-tested, and have no runtime regressions. Both new plist keys (ProcessType and WorkingDirectory) are standard launchd fields with clear semantics. The implementation correctly handles the empty/whitespace input edge case, the plist round-trip is consistent, and the added tests cover both the default and explicit-directory cases. No P0 or P1 issues found. No files require special attention.
|
| Filename | Overview |
|---|---|
| src/daemon/launchd-plist.ts | Adds ProcessType=Interactive and unconditional WorkingDirectory (defaulting to /) to generated plists; logic is correct and handles edge cases cleanly. |
| src/daemon/launchd.test.ts | Extends existing test to assert new plist keys and adds a dedicated test for explicit working directory preservation; coverage is appropriate. |
Reviews (1): Last reviewed commit: "Fix launchd gateway defaults on macOS" | Re-trigger Greptile
This comment was marked as spam.
This comment was marked as spam.
|
Rechecked CI on this PR. Current failing jobs are still outside the launchd change scope:
This PR only changes:
Local verification for this change passed:
I also attempted to re-run the failed jobs, but GitHub rejected the re-run request for this workflow run ( |
|
Following up on this one: the PR is still mergeable and the change remains tightly scoped to macOS launchd plist generation and its tests. I rechecked the state here because the earlier failing jobs were outside these touched files, so if this looks good I would appreciate a merge/review when convenient. Thanks. |
|
Following up here: this change is still narrowly scoped to macOS LaunchAgent plist generation and its tests. I rechecked it because the earlier CI failures were outside the touched files, and local validation for this change passed. If it looks good from the maintainer side, I would appreciate a review or merge when convenient. Thanks. |
6cdc0f9 to
e489f7e
Compare
|
Refreshed this branch on top of the latest upstream/main and force-pushed the update. Re-ran:
|
e489f7e to
3ca7a8c
Compare
|
Followed up on the current CI failures after the refresh. The failing jobs on the current head are pointing at files outside this PR's diff:
This PR only touches:
Local verification on the refreshed branch is still green:
So the current red checks look like unrelated repo-baseline failures rather than regressions from the launchd plist change itself. |
3ca7a8c to
7423755
Compare
|
Refreshed this PR onto the latest Validation:
This is back in a mergeable state and ready for another review pass. |
|
CI note: the current red jobs still match the upstream baseline, not this PR diff. Examples from this run:
This PR only touches:
Focused validation for this PR is still green:
|
|
Following up after #72616 landed in main: that PR explicitly kept #58070 separate and did not include the ProcessType/WorkingDirectory plist defaults from this branch. I rechecked this PR against the current upstream
Greptile previously rated this 5/5 and safe to merge, and the focused launchd test validation was green. If the maintainer side is comfortable with the scoped plist default change, I would appreciate a review/merge when convenient. |
|
Codex review: needs changes before merge. Summary Reproducibility: yes. A high-confidence source-level reproduction is to inspect current Next step before merge Security Review findings
Review detailsBest possible solution: Land one canonical macOS LaunchAgent Do we have a high-confidence way to reproduce the issue? Yes. A high-confidence source-level reproduction is to inspect current Is this the best way to solve the issue? Partly yes. Adding the key in the shared plist builder is the narrow maintainable runtime fix, and the branch now avoids the stale Full review comments:
Overall correctness: patch is incorrect Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against f43a184103b6. |
7423755 to
b4153d0
Compare
|
Updated this PR after the clawsweeper review:
Validation:
The branch is now mergeable on the current PR state, with new CI running. |
|
Follow-up on the current CI run: the only failing check is checks-fast-protocol: https://github.com/openclaw/openclaw/actions/runs/24994878496/job/73189179668 The failure is from pnpm protocol:check, which regenerates the Swift protocol models and produces an unrelated diff adding NodePairRemoveParams in:
This PR only updates the macOS launchd plist/test path (src/daemon/launchd-plist.ts, src/daemon/launchd.test.ts). The focused local validation for that scope passed:
Could a maintainer confirm whether checks-fast-protocol is unrelated/base drift here, or whether you want that generated protocol diff folded into this branch? |
|
Follow-up on the current CI run: the only failing check is checks-fast-protocol.\n\nThe failure is from
wrote /Users/sjs/Documents/codex/2026-04-27/gmail-plugin-gmail-openai-curated-openclaw/openclaw-pr58070/dist/protocol.schema.json
wrote /Users/sjs/Documents/codex/2026-04-27/gmail-plugin-gmail-openai-curated-openclaw/openclaw-pr58070/apps/macos/Sources/OpenClawProtocol/GatewayModels.swift
|
|
Closing this as superseded by #62308, which has now landed on main as a2b8f2a. The landed change covers the shared generated LaunchAgent plist path and adds Thanks @zssggle-rgb for the original A/B launchd evidence and patch trail. |
Summary
ProcessType=InteractiveWorkingDirectory, defaulting to/when no explicit directory is providedTesting
Closes #58061
Related to #54861