fix(update): ignore inherited macOS XPC for respawn#85789
Merged
giodl73-repo merged 1 commit intoMay 24, 2026
Conversation
Contributor
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(update): ignore inherited macOS XPC for respawn This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
f65b026 to
6590bed
Compare
6590bed to
05e7265
Compare
SebTardif
pushed a commit
to SebTardif/openclaw
that referenced
this pull request
May 24, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 24, 2026
SebTardif
pushed a commit
to SebTardif/openclaw
that referenced
this pull request
May 26, 2026
SebTardif
pushed a commit
to SebTardif/openclaw
that referenced
this pull request
May 26, 2026
SebTardif
pushed a commit
to SebTardif/openclaw
that referenced
this pull request
May 26, 2026
jameslcowan
pushed a commit
to jameslcowan/openclaw
that referenced
this pull request
Jun 2, 2026
SYU8384
pushed a commit
to SYU8384/openclaw
that referenced
this pull request
Jun 3, 2026
sablehead
pushed a commit
to sablehead/openclaw
that referenced
this pull request
Jun 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
XPC_SERVICE_NAMEvalues do not masquerade as gateway launchd supervision.OPENCLAW_LAUNCHD_LABEL, matchingLAUNCH_JOB_LABEL/LAUNCH_JOB_NAME, and the default gatewayXPC_SERVICE_NAMElabel.Fixes #85224.
Verification
OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 CI=1 node scripts/run-vitest.mjs src/infra/supervisor-markers.test.ts src/infra/process-respawn.test.ts src/daemon/service-env.test.tsgit diff --check origin/main...HEAD && git diff --checkcorepack pnpm exec oxfmt --check --threads=1 CHANGELOG.md src/infra/supervisor-markers.ts src/infra/supervisor-markers.test.ts src/infra/process-respawn.test.tscorepack pnpm exec oxlint src/infra/supervisor-markers.ts src/infra/supervisor-markers.test.ts src/infra/process-respawn.test.tscodex review --base origin/main-> no actionable correctness issuesReal behavior proof
Behavior addressed: On macOS, a gateway spawned from the app could inherit the app's launchd
XPC_SERVICE_NAME, causing update respawn to falsely returnmode=supervisedand exit without spawning a detached replacement.Real environment tested: WSL Ubuntu 24.04 durable OpenClaw checkout on branch
fix-85224-darwin-respawn-supervisor, commitf65b02606f.Exact steps or command run after this patch: Ran the focused Vitest command above against
src/infra/supervisor-markers.test.ts,src/infra/process-respawn.test.ts, andsrc/daemon/service-env.test.ts, plus diff/format/lint and Codex review.Evidence after fix: Regression tests now prove
XPC_SERVICE_NAME=ai.openclaw.macstays unmanaged, includingOPENCLAW_PROFILE=mac;respawnGatewayProcessForUpdate()spawns a detached replacement for inherited app XPC; OpenClaw's explicit launchd marker and matching gateway launchd labels still return supervised; service-env still emitsOPENCLAW_LAUNCHD_LABEL.Observed result after fix: 3 test files passed, 110 tests passed; diff check, oxfmt check, oxlint, and Codex review passed.
What was not tested: A live macOS LaunchAgent/app update flow was not replayed; this PR uses focused process-env regression proof for the reported supervisor detection branch.