Repository navigation
Open
Labels
app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)Package/app: mcpx (pkgs/ or apps/ in this repo)effort/lLarge: multi-day or open-ended; expect staged check-insLarge: multi-day or open-ended; expect staged check-inskind/bugSomething isn't working (prefixed form of the classic bug label)Something isn't working (prefixed form of the classic bug label)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)Ordinary priority (the default)source/humanFiled directly by a humanFiled directly by a humantask/small-fixQueue packet kind: bounded fix with reproduction and targeted testsQueue packet kind: bounded fix with reproduction and targeted tests
Description
pkgs/mcpx (at 6081a86) builds and runs on aarch64-darwin, but its daemon handover features do not work there, and the test suite fails without exclusions. Found while vendoring it verbatim into the nix-darwin config (dezren39 ~/.config/nix, pkgs/mcpx), where it runs as a launchd agent.
What fails on darwin
internal/daemon/takeover_test.godoes not compile:syscall.SOCK_CLOEXECis Linux-only (theunixPairhelper, line 24). Becausehandoff_conns_test.gousesunixPair, the wholeinternal/daemontest package fails to build.- Every takeover/upgrade/handoff test fails at runtime (
takeover: EOF, or the successor never takes over), acrossinternal/daemon,internal/e2e,internal/mcpclientandinternal/pool:- daemon: TestAnIdleConnectionSurvivesATakeoverInProcess, TestACallInFlightAtTheHandoverIsAnsweredByTheOldDaemon, TestKeepAliveCallersLoseNoCallsAcrossATakeover, TestCallsIssuedDuringATakeoverNeverFail, TestAClientLeaseSurvivesADaemonTakeover, TestHandoffRecordsTheIdentityAPoolWasMadeWith, TestRegistryHandoffKeepsTheChildAcrossTheSuccessor, TestRegistryHandoffThatIsNotCommittedRestoresTheChild
- e2e: TestAnIdleKeepAliveConnectionSurvivesATakeover, TestACallInFlightAtATakeoverIsAnsweredAndItsConnectionMovesOn, TestKeepAliveCallersLoseNoCallsAcrossARealTakeover, TestTakeoverKeepsTheChildAndTheListener, TestTakeoverRestartsAChangedServerAndKeepsTheRest, TestTakeoverLosesNoCallsWhileAClientKeepsCalling, TestClientLeaseSurvivesDaemonTakeover, TestUpgradeKeepsTheChildAndHandsMainPIDToTheSuccessor
- mcpclient: TestDetachedChildKeepsItsPipesAndAdoptionResumesThem, TestHandoffDoesNotSplitAFrameAcrossTheTwoProcesses, TestClientHandoffCommitsOnlyWhenActivated
- pool: TestDetachRefusesWhileACallIsInFlight
TestExecChangeRestartsThatPoolAndNoOtherpasses functionally (the pool restarts) but verifies the new executable via/proc/<pid>/exe, which darwin lacks.
Everything else (adapter, api, cli, config, conformance, catalog, preflight, secrets, scripting, ...) passes on darwin.
Why it matters beyond tests
mcpx upgrade relies on the successor staying in the unit's cgroup and claiming MAINPID via NOTIFY_SOCKET. launchd has neither, so on macOS the only safe deploy is a plain restart (which ends every MCP child). The nix-darwin config does that today and skips the tests above (flake.nix, mcpxDarwinSkip).
Asks
- Make the test helpers portable (no
SOCK_CLOEXEC;os.Executable/proc_pidpathinstead of/proc/<pid>/exe), or build-tag the Linux-only tests. - Decide whether takeover is supported on darwin at all. If yes, find what breaks it (fd passing over the unix socket looks like the common factor); if not, have
mcpx upgraderefuse cleanly on darwin and document a launchd story (e.g.launchctl kickstart -kwith children adopted on restart).
Acceptance criteria
- The
internal/daemontest package compiles on aarch64-darwin (no unguarded Linux-only constants such assyscall.SOCK_CLOEXECin test helpers, or darwin equivalents/build tags in their place) - Takeover/upgrade/handoff tests on darwin either pass, or the unsupported feature returns an explicit error and the tests skip with a stated reason — no bare
takeover: EOFfailures - The same suites still pass on Linux with no regressions
- The fix is carried to the mcpx copy dezren39/nix consumes (cross-repo set rule — tracked from this issue, no duplicate filing)
Metadata
Metadata
Assignees
Labels
app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)Package/app: mcpx (pkgs/ or apps/ in this repo)effort/lLarge: multi-day or open-ended; expect staged check-insLarge: multi-day or open-ended; expect staged check-inskind/bugSomething isn't working (prefixed form of the classic bug label)Something isn't working (prefixed form of the classic bug label)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)Ordinary priority (the default)source/humanFiled directly by a humanFiled directly by a humantask/small-fixQueue packet kind: bounded fix with reproduction and targeted testsQueue packet kind: bounded fix with reproduction and targeted tests
Activity
opencode/openchamber: build from our forks, standing OpenChamber serv…
dezren39 commentedon Oct 27, 2026
Intake review
Still live (verified this run):
pkgs/mcpx/internal/daemon/takeover_test.go:24on current main still usessyscall.SOCK_CLOEXECin theunixPairhelper, so the darwin test-compile failure stands; nothing found merged that ports the takeover/handoff suite to darwin.Related: dezren39/nix #366 (mcpx Go tests failing on macOS — the config-package sibling of this one; per the cross-repo set rule these darwin-mcpx items should be handled as a set, tracked from the repo where the fix lands), dezren39/nix #362 (downstream mcpx pin), code #241 (unrelated).
Notes / risks: this is the largest item in this intake batch — the runtime failures (
takeover: EOF, successor never taking over) suggest darwin differences in fd passing / listener handover, not just test portability. Effort classed l. The compile fix alone (build tags or a darwin socketpair helper) is a separable first step that at least makes the failure modes visible per-test.Suggested approach: first make the test packages compile on darwin (portable socketpair helper), then triage the runtime failures by subsystem (daemon, e2e, mcpclient, pool) and decide per feature: port, or explicit unsupported-error + skip with reason.
— fleet monitor intake (repo-fleet-monitor, 2026-10-26 20:19 CDT run)
dezren39 commentedon Nov 1, 2026
🤖 Agent note · picked up
66 remaining items
dezren39 commentedon Nov 3, 2026
agent-note:v1
state: triaged (coverage pass)
Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as small_fix at priority 40 (priority/normal). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
Found via: coverage pass 2026-11-03
dezren39 commentedon Nov 3, 2026
agent-note:v1
task: 7592
lane: code-h
stage: handed_off
execution_lane: opencode
Task 7592 (small_fix: #237 — mcpx takeover/upgrade/handoff unsupported on darwin) re-claimed by lane code-h at 2026-11-03T15:00Z; execution-lane assignment returned
opencodewith no session bound yet. Handing off to the opencode claimant per the worker runbook — this lane does not work the task directly. Claim labels synced on #237 (work/assigned, queue/claimed, status/in-progress added; queue/queued and status/needs-triage removed).dezren39 commentedon Nov 3, 2026
New evidence from the nix-side aarch64-darwin verification (dezren39/darwin-nix#471, queue task 8082):
One-off macos-15 workflow run https://github.com/dezren39/nix/actions/runs/41657026522 built
.#packages.aarch64-darwin.mcpxat mcpx pin 282064c (reached via dezren39/nix's flake.lock). Compilation passed and all mcpx test packages passed exceptinternal/pool:--- FAIL: TestHandoffCarriesExecIdentityForRelativeCommand (0.01s)handoff_exec_test.go:39: detach: server "fake": child 11053: open /proc/11053/stat: no such file or directorySame family as the
/proc/<pid>/execase already listed here (item 3): the pool handoff exec-identity path also reads/proc/<pid>/stat, which darwin lacks — so the aarch64-darwin package build currently fails in its check phase on this test. Adding it here rather than filing a duplicate; nix#471 stays open and its re-verification is parked pending a fix here reaching the pin.dezren39 commentedon Nov 3, 2026
🤖 Agent note · findings
Verdict: still live, but the compile half is done. At current
main:pkgs/mcpx/internal/daemon/takeover_test.go:24no longer usessyscall.SOCK_CLOEXEC— it is only named in a comment. PR test(mcpx): darwin test-compile portability for internal/daemon (#237) #3288 ("test(mcpx): darwin test-compile portability for internal/daemon", merged 2026-11-01T03:54:46Z) added the portable helper plusexe_bytes_{darwin,linux}_test.goandscripts/darwin-compile-check.sh. So acceptance item 1 (internal/daemon test package compiles on aarch64-darwin) is satisfied.pkgs/mcpxwithgo:build darwinis deliberate per-platform code (config/git discovery, tty echo), not a skip.Remaining, ordered:
/proc-based exec identity still breaks the darwin check — new evidence (2026-11-03) from mcpx: aarch64-darwin build verification still owed for the pinned mcpx-src input (from #469/#468) dezren39/darwin-nix#471 / queue task 8082: the aarch64-darwin package build fails ininternal/poolwithTestHandoffCarriesExecIdentityForRelativeCommand:handoff_exec_test.go:39: detach: server "fake": child 11053: open /proc/11053/stat: no such file or directory. Same family as item 3 in this issue (/proc/<pid>/exe), now also gates the nix package's checkPhase. Concrete, portable fix needed (ps/proc_pidpath/os.Executable, or build-tag the check).mcpx upgradestill assumes cgroupMAINPID/NOTIFY_SOCKET; launchd has neither. This needs a design decision (support via fd-passing fixes, or explicit refusal + documentedlaunchctl kickstart -kstory) — it is effort/l, not a small fix.mcpxDarwinSkip/checkPhase coupling in dezren39/nix (nix#471 tracks the verification; no duplicate filing here).Packet note: task 7592 arrived as
small_fixwitheffort/llabels on the issue and triage-shaped acceptance; it was not worked as an implementation in this launch. The next execution packet should be scoped to item 1 only, with item 2 as its own decision task.dezren39 commentedon Nov 3, 2026
🤖 Agent note · done
triaged. Compile half verified done (PR test(mcpx): darwin test-compile portability for internal/daemon (#237) #3288); the issue remains open for (1) the/proc/<pid>/statexec-identity portability failure now gating the aarch64-darwin package check (nix#471), and (2) the support-or-refuse decision for takeover/upgrade on darwin. Ordering and blockers are recorded in the findings note above. No code edits were made in this launch.