Title: mcpx: takeover/upgrade/handoff unsupported on darwin; Linux-only tests break the darwin build · Issue #237 · developing-today/code · GitHub
Open Graph Title: mcpx: takeover/upgrade/handoff unsupported on darwin; Linux-only tests break the darwin build · Issue #237 · developing-today/code
X Title: mcpx: takeover/upgrade/handoff unsupported on darwin; Linux-only tests break the darwin build · Issue #237 · developing-today/code
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/n...
Open Graph 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...
X 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...
Opengraph URL: https://github.com/developing-today/code/issues/237
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"mcpx: takeover/upgrade/handoff unsupported on darwin; Linux-only tests break the darwin build","articleBody":"`pkgs/mcpx` (at 6081a86a) 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.\n\n## What fails on darwin\n\n1. **`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.\n2. **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`:\n - daemon: TestAnIdleConnectionSurvivesATakeoverInProcess, TestACallInFlightAtTheHandoverIsAnsweredByTheOldDaemon, TestKeepAliveCallersLoseNoCallsAcrossATakeover, TestCallsIssuedDuringATakeoverNeverFail, TestAClientLeaseSurvivesADaemonTakeover, TestHandoffRecordsTheIdentityAPoolWasMadeWith, TestRegistryHandoffKeepsTheChildAcrossTheSuccessor, TestRegistryHandoffThatIsNotCommittedRestoresTheChild\n - e2e: TestAnIdleKeepAliveConnectionSurvivesATakeover, TestACallInFlightAtATakeoverIsAnsweredAndItsConnectionMovesOn, TestKeepAliveCallersLoseNoCallsAcrossARealTakeover, TestTakeoverKeepsTheChildAndTheListener, TestTakeoverRestartsAChangedServerAndKeepsTheRest, TestTakeoverLosesNoCallsWhileAClientKeepsCalling, TestClientLeaseSurvivesDaemonTakeover, TestUpgradeKeepsTheChildAndHandsMainPIDToTheSuccessor\n - mcpclient: TestDetachedChildKeepsItsPipesAndAdoptionResumesThem, TestHandoffDoesNotSplitAFrameAcrossTheTwoProcesses, TestClientHandoffCommitsOnlyWhenActivated\n - pool: TestDetachRefusesWhileACallIsInFlight\n3. **`TestExecChangeRestartsThatPoolAndNoOther`** passes functionally (the pool restarts) but verifies the new executable via `/proc/\u003cpid>/exe`, which darwin lacks.\n\nEverything else (adapter, api, cli, config, conformance, catalog, preflight, secrets, scripting, ...) passes on darwin.\n\n## Why it matters beyond tests\n\n`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`).\n\n## Asks\n\n- Make the test helpers portable (no `SOCK_CLOEXEC`; `os.Executable`/`proc_pidpath` instead of `/proc/\u003cpid>/exe`), or build-tag the Linux-only tests.\n- 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).\n\n## Acceptance criteria\n\n- [ ] 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)\n- [ ] 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\n- [ ] The same suites still pass on Linux with no regressions\n- [ ] The fix is carried to the mcpx copy dezren39/nix consumes (cross-repo set rule — tracked from this issue, no duplicate filing)\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-17T03:13:09Z","url":"https://github.com/developing-today/code/issues/237"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:98a0eed6-088f-0425-4c10-1b5b12b7a2e8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CFC0:2A9AB5:3A038A:4BBD4D:6B0618CD |
| html-safe-nonce | 442fe4ff3df7510c417c27cca3bce4e4334bef37c2b6d2bc49e99888606ecc13 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRkMwOjJBOUFCNTozQTAzOEE6NEJCRDREOjZCMDYxOENEIiwidmlzaXRvcl9pZCI6IjMwMDU1NzI4NTk0NjU5NjM3MjUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b3205f22acc59dc3375387d07ed409afd9f2f6772a1b0c6d72fbd9d484dc88cb |
| hovercard-subject-tag | issue:5894283867 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/237/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a8ded6ec1543c770a03b168f70f29db24d8133785154ff72bc69e4289ec7c0f2/developing-today/code/issues/237 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a8ded6ec1543c770a03b168f70f29db24d8133785154ff72bc69e4289ec7c0f2/developing-today/code/issues/237 |
| og:image:alt | 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... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 97d4714e567728e1f85f88b0cf68c89f0f8a3dc41e8869af7aeb8195ad990374 |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 866f202ebf7ac5aff8f633417d9fd8a53818a977 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width