You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mcpx: preserve regular files at the Unix socket path during daemon startup #5742
Daemon startup can delete a regular file that happens to occupy the configured Unix socket path. In pkgs/mcpx/internal/daemon/server.go, the cleanup path around lines 342–345 and 479–489 attempts a Unix dial and removes the path whenever dialing fails. A regular file is not a live socket, so the failed dial is followed by os.Remove and its contents are lost before the daemon binds.
A stale Unix socket should be removable, but an unrelated regular file or symlink must not be treated as stale socket state.
Required behavior
Inspect the path type before removal. Remove only a stale socket file after confirming it cannot be connected to; for any non-socket filesystem entry, preserve it and return a clear startup error that identifies the collision.
Acceptance criteria
A test creates a regular file at the configured socket path, attempts daemon startup, and asserts startup fails while the file contents remain unchanged.
A stale Unix socket at that path is still cleaned up and startup succeeds.
An active socket remains protected and is not removed.
Cover custom MCPX_SOCKET and the default socket path through the same cleanup helper where possible.
Expectation: execution lane is opencode — the laptop claimant launches the bound opencode session for task 10156, which drives it to a terminal state under this queue's worker id.
Next: implement the ModeSocket guard in clearStaleSocket (pkgs/mcpx/internal/daemon/server.go) with the acceptance tests on a laptop worktree; PR + merge under standing criteria; release done.
Heartbeat by repo-worker-code-y (lane code-y, FALLBACK MODE): implementation complete on laptop worktree ~/git/fleet/queue-5742-mcpx-socket-guard (branch queue/5742-mcpx-socket-guard) — clearStaleSocket now Lstats the path and refuses to remove any non-socket entry (regular file, symlink, directory) with a startup error naming the collision; stale-socket removal and active-socket protection unchanged. New tests in stale_socket_test.go cover all four acceptance cases plus the absent-path no-op. ServeInline disposition: its unconditional remove targets its own private per-process socket it just created the path for, not the daemon's configured path — left unchanged, noted here per criterion 4. Next: push, PR, CI, merge.
clearStaleSocket now Lstats the socket path: non-socket entries (regular file, symlink, directory) are preserved and startup fails naming the collision; stale sockets are still removed after a failed dial; active sockets still return the already-listening error.
Tests: 6 new tests in stale_socket_test.go (regular file, symlink, symlink-to-stale-socket [added for a Codex P1 finding, fixed in-PR with a thread reply], stale socket, active socket, absent path) — all PASS on the laptop: go test ./internal/daemon/ -run TestClearStaleSocket -count=1.
ServeInline disposition and cross-repo note stand as recorded in the heartbeat above (no darwin-nix change owed; fix propagates via the package pin).
Activity
developing-today commentedon Nov 5, 2026
CODE-1431
dezren39 commentedon Nov 5, 2026
🤖 Agent note · handed off
opencode— the laptop claimant launches the bound opencode session for task 10156, which drives it to a terminal state under this queue's worker id.146 remaining items
dezren39 commentedon Nov 7, 2026
Picked up by repo-worker-code-y (lane code-y, repo-queue-worker-shift-y) in FALLBACK MODE (backend down: fleet queue health HTTP 503 PGRST002).
🤖 Agent note · picked up
dezren39 commentedon Nov 7, 2026
Heartbeat by repo-worker-code-y (lane code-y, FALLBACK MODE): implementation complete on laptop worktree ~/git/fleet/queue-5742-mcpx-socket-guard (branch queue/5742-mcpx-socket-guard) — clearStaleSocket now Lstats the path and refuses to remove any non-socket entry (regular file, symlink, directory) with a startup error naming the collision; stale-socket removal and active-socket protection unchanged. New tests in stale_socket_test.go cover all four acceptance cases plus the absent-path no-op. ServeInline disposition: its unconditional remove targets its own private per-process socket it just created the path for, not the daemon's configured path — left unchanged, noted here per criterion 4. Next: push, PR, CI, merge.
test(mcpx): pin symlink-to-stale-socket preservation (#5742)
Merge pull request #6738 from developing-today/queue/5742-mcpx-socket…
dezren39 commentedon Nov 7, 2026
Released done by repo-worker-code-y (lane code-y, FALLBACK MODE): issue #5742 fixed and merged via PR #6738 (merge e5916a6); issue closed by the PR.
🤖 Agent note · done
Outcome