Skip to content

Fix fallback workspace key derivation in forceStopDaemon

699fe46
Select commit
Loading
Failed to load commit list.
Merged

feat: Workspace filesystem cleanup #391

Fix fallback workspace key derivation in forceStopDaemon
699fe46
Select commit
Loading
Failed to load commit list.
@sentry/warden / warden: xcodebuildmcp-runtime-boundary-review completed May 4, 2026 in 37s

1 issue

xcodebuildmcp-runtime-boundary-review: Found 1 issue (1 medium)

Medium

forceStopDaemon bypasses centralized cleanup with a direct unlinkSync fallback - `src/cli/daemon-control.ts:58-66`

When no registry entry is found for the socket path, forceStopDaemon falls back to unlinkSync(socketPath) directly instead of going through cleanupWorkspaceDaemonFiles. This creates a parallel cleanup path that skips the workspace-keyed mutation lock and ownership/PID checks that the rest of this PR introduces, and silently swallows the error. Per the runtime boundary guardrails ("Avoid silent fallbacks and parallel invocation paths"), this fallback can race with another live process owning the same socket path and remove its socket without an ownership check.


Duration: 35.8s · Tokens: 177.6k in / 1.9k out · Cost: $0.98

Annotations

Check warning on line 66 in src/cli/daemon-control.ts

See this annotation in the file changed.

@sentry-warden sentry-warden / warden: xcodebuildmcp-runtime-boundary-review

forceStopDaemon bypasses centralized cleanup with a direct unlinkSync fallback

When no registry entry is found for the socket path, forceStopDaemon falls back to unlinkSync(socketPath) directly instead of going through cleanupWorkspaceDaemonFiles. This creates a parallel cleanup path that skips the workspace-keyed mutation lock and ownership/PID checks that the rest of this PR introduces, and silently swallows the error. Per the runtime boundary guardrails ("Avoid silent fallbacks and parallel invocation paths"), this fallback can race with another live process owning the same socket path and remove its socket without an ownership check.