feat: Workspace filesystem cleanup #391
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
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.