GeezerVison is showing github.com — mcpx: takeover/upgrade/handoff unsupported on darwin; Linux-only tests break the darwin build · Issue #237 · developing-today/code
mcpx: takeover/upgrade/handoff unsupported on darwin; Linux-only tests break the darwin build #237Labels app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)effort/lLarge: multi-day or open-ended; expect staged check-inskind/bugSomething isn't working (prefixed form of the classic bug label)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/humanFiled directly by a humanstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests Descriptionpkgs/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.go does not compile: syscall.SOCK_CLOEXEC is Linux-only (the unixPair helper, line 24). Because handoff_conns_test.go uses unixPair, the whole internal/daemon test package fails to build.
- Every takeover/upgrade/handoff test fails at runtime (
takeover: EOF, or the successor never takes over), across internal/daemon, internal/e2e, internal/mcpclient and internal/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
TestExecChangeRestartsThatPoolAndNoOther passes 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_pidpath instead 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 upgrade refuse cleanly on darwin and document a launchd story (e.g. launchctl kickstart -k with children adopted on restart).
Acceptance criteria
- The
internal/daemon test package compiles on aarch64-darwin (no unguarded Linux-only constants such as syscall.SOCK_CLOEXEC in 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: EOF failures
- 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)
Activityadded kind/bugSomething isn't working (prefixed form of the classic bug label) effort/lLarge: multi-day or open-ended; expect staged check-ins app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo) meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added on Oct 27, 2026dezren39 commented on Oct 27, 2026 Intake review
Still live (verified this run): pkgs/mcpx/internal/daemon/takeover_test.go:24 on current main still uses syscall.SOCK_CLOEXEC in the unixPair helper, 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 commented on Nov 1, 2026 dezren39 commented on 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.mcpx at mcpx pin 282064c (reached via dezren39/nix's flake.lock). Compilation passed and all mcpx test packages passed except internal/pool:
--- FAIL: TestHandoffCarriesExecIdentityForRelativeCommand (0.01s)
handoff_exec_test.go:39: detach: server "fake": child 11053: open /proc/11053/stat: no such file or directory
Same family as the /proc/<pid>/exe case 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 commented on 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:24 no longer uses syscall.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 plus exe_bytes_{darwin,linux}_test.go and scripts/darwin-compile-check.sh. So acceptance item 1 (internal/daemon test package compiles on aarch64-darwin) is satisfied.
- Anything else in
pkgs/mcpx with go:build darwin is 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 in internal/pool with TestHandoffCarriesExecIdentityForRelativeCommand: 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).
- Support-or-refuse decision for takeover/upgrade/handoff on darwin — the issue's real ask, unchanged.
mcpx upgrade still assumes cgroup MAINPID/NOTIFY_SOCKET; launchd has neither. This needs a design decision (support via fd-passing fixes, or explicit refusal + documented launchctl kickstart -k story) — it is effort/l, not a small fix.
- Cross-repo carry — after 1/2, update the
mcpxDarwinSkip/checkPhase coupling in dezren39/nix (nix#471 tracks the verification; no duplicate filing here).
Packet note: task 7592 arrived as small_fix with effort/l labels 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 commented on Nov 3, 2026 dezren39 commented on Nov 8, 2026 🤖 Agent note · findings (triage of the remainder)
Verdict: still live in part — the compile half is done; two items remain, one of them a concrete small fix.
Verified fresh at origin/main 801ceb9 (2026-11-07):
- Done — test-compile portability.
pkgs/mcpx/internal/daemon/takeover_test.go:24 names syscall.SOCK_CLOEXEC only in a comment; PR test(mcpx): darwin test-compile portability for internal/daemon (#237) #3288 merged 2026-11-01 added the portable helper. Cross-repo carry also done: dezren39/nix PR feat(aggregator): bulk triage mode for Needs-you — multi-select acknowledge/snooze/assign/escalate in one mediated batch #1277 ("fix(mcpx): drop darwin workarounds fixed upstream by code#237") merged 2026-11-02T15:22:01Z. Acceptance item 1 is satisfied.
- Still live —
/proc/<pid>/stat exec-identity path (concrete fix, enqueued as a small_fix follow-up). pkgs/mcpx/internal/mcpclient/handoff.go:180 procStat() reads /proc/<pid>/stat unconditionally — no build tag, no darwin alternative — and feeds ProcessStartTime/handoff identity checks used during detach. This is the failure mcpx: aarch64-darwin build verification still owed for the pinned mcpx-src input (from #469/#468) dezren39/darwin-nix#471 (queue task 8082) recorded on aarch64-darwin: TestHandoffCarriesExecIdentityForRelativeCommand failing at handoff_exec_test.go:39 with open /proc/11053/stat: no such file or directory, gating the nix package checkPhase. Scope of the fix packet: a portable process start-time/identity source on darwin (e.g. sysctl kern.proc / proc_pidpath-family equivalent, or an explicit unsupported-platform error with the affected tests skipping with a stated reason), Linux behavior unchanged. After it lands, the mcpx pin in dezren39/nix advances and nix#471's parked verification can resume (cross-repo set rule — tracked from this issue, no duplicate filing).
- Still open — the takeover/upgrade support-or-refuse decision on darwin (separate decision task, not part of the fix packet).
pkgs/mcpx/internal/cli/upgrade.go and pkgs/mcpx/internal/daemon/upgrade.go contain no darwin guard; upgrade still assumes systemd NOTIFY_SOCKET/MAINPID semantics (see pkgs/mcpx/internal/sdnotify/sdnotify.go) that launchd does not have. This is the effort/l design decision recorded in task 7592's findings (2026-11-03): support takeover via fd-passing fixes, or refuse cleanly on darwin and document the launchctl kickstart -k story. It is not Drew-escalated here — it is a design task the fleet can draft — but it must not be folded into the item-2 fix.
Ordering: item 2 fix first (it also unblocks nix#471's verification); item 3 decision in parallel or after; issue #237 stays open until both land.
dezren39 commented on Nov 8, 2026 🤖 Agent note · done (triaged)
dezren39 commented on Nov 8, 2026 Partial verification — staying open (2026-11-07 done-task-only audit, tracking: #7016).
Queue task(s) [4805, 7592, 2054] were marked done, and some work did land:
- PR docs: refresh ROADMAP Current focus column #416 — docs: refresh ROADMAP Current focus column (merged 2026-10-20T13:01:12Z): docs: refresh ROADMAP Current focus column #416
- PR opencode: pool pass 2 — contributor seats, variant remaps, speed pool #1023 — opencode: pool pass 2 — contributor seats, variant remaps, speed pool (merged 2026-10-26T22:34:30Z): opencode: pool pass 2 — contributor seats, variant remaps, speed pool #1023
- PR feat(aggregator): /program hub + per-project pages for all projects (#1120, #1121) #1142 — feat(aggregator): /program hub + per-project pages for all projects (design(aggregator): project configuration registry — one config per project for the program pages #1120, impl(aggregator): /program hub + /program/<project> pages for all configured projects #1121) (merged 2026-10-27T03:46:06Z): feat(aggregator): /program hub + per-project pages for all projects (#1120, #1121) #1142
- PR docs(roadmap): drop landed items, link mcpx design epics (corrected) #1426 — docs(roadmap): drop landed items, link mcpx design epics (corrected) (merged 2026-10-27T17:34:54Z): docs(roadmap): drop landed items, link mcpx design epics (corrected) #1426
- PR mcpx: darwin/arm64 test-compile gate (#1988) #2995 — mcpx: darwin/arm64 test-compile gate (mcpx: Go tests fail on macOS (2 path tests in internal/config, plus 2 unidentified packages) #1988) (merged 2026-10-31T10:28:16Z): mcpx: darwin/arm64 test-compile gate (#1988) #2995
- PR test(mcpx): darwin test-compile portability for internal/daemon (#237) #3288 — test(mcpx): darwin test-compile portability for internal/daemon (mcpx: takeover/upgrade/handoff unsupported on darwin; Linux-only tests break the darwin build #237) (merged 2026-11-01T03:54:46Z): test(mcpx): darwin test-compile portability for internal/daemon (#237) #3288
- Direct commits referencing this issue: 3e74b3cde1e7, 6e7f8fc
No merged change closes this issue's full scope, so the done status is not treated as completion. Remainder re-queued as triage task 11509. dezren39 commented on Nov 10, 2026 Darwin build evidence update (2026-11-10): the aarch64-darwin mcpx build is now green end to end.
This closes the "tests break the darwin build" half of this issue as far as the nix check phase shows. The takeover/handoff feature-portability half (20 tests skipped by name on darwin in package.nix) is unchanged. dezren39 commented on Nov 16, 2026 Queue task 17495 — capability gate, not code-blocked
Checked for a darwin runner before attempting the shrink of darwinSkip in
pkgs/mcpx/package.nix:
- Fleet reachability (
tailscale status): the only online hosts are this
linux laptop (amd-6), muse, and an Android phone. No darwin/macOS node
is online (and none is configured in ~/.ssh/config).
- Repo CI:
mcpx.yml, mcpx-nixbuild.yml and mcpx-release.yml all run on
ubuntu-latest; there is no macOS job anywhere in .github/workflows.
So the acceptance item — run the 20 darwinSkip tests on darwin, record each
result here, and remove only the ones that pass — cannot be executed by a fleet
lane. Nothing was edited: shrinking the skip list without a darwin run would be
exactly the unverified claim #237 exists to prevent.
Unblock condition: a darwin machine (or a macos-14/macos-15 arm64 runner
job) able to run go test ./internal/daemon/ ./internal/e2e/ ./internal/mcpclient/ ./internal/pool/ in pkgs/mcpx. Once one exists, the
work is mechanical: the compile blocker is already gone (task 17484 verified
GOOS=darwin GOARCH=arm64 go vet clean for all four packages), so each test
either passes → drop it from darwinSkip, or fails → keep it and record the
failure mode here. dezren39 commented on Nov 22, 2026 agent-note:v1
state: picked_up -> blocked
queue-task: 17495
issue: #237
lane: oc-code-07
worker: repo-worker-code
origin: openchamber-scheduled-lane
stage: capability_revalidated
Fresh revalidation (2026-11-22): #237 is CLOSED, but its latest detailed comments explicitly say the 20 takeover/handoff tests in darwinSkip remain unchanged; the 2026-11-16 capability note requires a real aarch64-darwin runner before any skip-list edit. #9963 remains OPEN; Phase 3 PR #10767 is merged. This laptop is Linux x86_64, Tailscale shows no online macOS peer, GitHub Actions runner inventory for developing-today/code is empty, and .github/workflows has no macOS test job. No test run or source edit was made. Do not treat the cross-compile result or the unrelated macOS build check as test-runtime evidence.
Resume when an aarch64-darwin machine or authorized macOS CI runner can run the 20 named tests; record per-test outcomes, edit only the proven passing entries, and run the specified buildcheck. The issue closed state is left unchanged; this note records that the narrow queue acceptance remains unverified.
MetadataMetadataapp/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)effort/lLarge: multi-day or open-ended; expect staged check-inskind/bugSomething isn't working (prefixed form of the classic bug label)meta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/humanFiled directly by a humanstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests DevelopmentNo branches or pull requestsIssue actions
|