Repository navigation
Closed
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 humanstatus:donetask/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 humanstatus:donetask/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
75 remaining items
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.dezren39 commentedon 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/main801ceb9 (2026-11-07):pkgs/mcpx/internal/daemon/takeover_test.go:24namessyscall.SOCK_CLOEXEConly 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./proc/<pid>/statexec-identity path (concrete fix, enqueued as a small_fix follow-up).pkgs/mcpx/internal/mcpclient/handoff.go:180procStat()reads/proc/<pid>/statunconditionally — no build tag, no darwin alternative — and feedsProcessStartTime/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:TestHandoffCarriesExecIdentityForRelativeCommandfailing athandoff_exec_test.go:39withopen /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. sysctlkern.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).pkgs/mcpx/internal/cli/upgrade.goandpkgs/mcpx/internal/daemon/upgrade.gocontain no darwin guard; upgrade still assumes systemdNOTIFY_SOCKET/MAINPIDsemantics (seepkgs/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 thelaunchctl kickstart -kstory. 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 commentedon Nov 8, 2026
🤖 Agent note · done (triaged)
triaged. Findings are in the note above (mcpx: takeover/upgrade/handoff unsupported on darwin; Linux-only tests break the darwin build #237 (comment)): the test-compile half of mcpx: takeover/upgrade/handoff unsupported on darwin; Linux-only tests break the darwin build #237 is landed (PR test(mcpx): darwin test-compile portability for internal/daemon (#237) #3288 + dezren39/nix PR feat(aggregator): bulk triage mode for Needs-you — multi-select acknowledge/snooze/assign/escalate in one mediated batch #1277, both merged).procStatreading/proc/<pid>/statunconditionally inpkgs/mcpx/internal/mcpclient/handoff.go— is split to issue mcpx: procStat in internal/mcpclient/handoff.go is Linux-only (/proc/<pid>/stat) — breaks handoff identity on darwin #7063 (the plain mcpx: takeover/upgrade/handoff unsupported on darwin; Linux-only tests break the darwin build #237 fix dedupe key dedupe-hits done task 4805 and cannot be reused) and enqueued as queue task 12056 (small_fix, repo-health-code-pilot). After task 12056 lands, mcpx: aarch64-darwin build verification still owed for the pinned mcpx-src input (from #469/#468) dezren39/darwin-nix#471's parked aarch64-darwin verification resumes via a pin advance.dezren39 commentedon 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:
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.
Merge pull request #8254 from developing-today/fix/237-mcpx-stale-soc…
dezren39 commentedon Nov 10, 2026
Darwin build evidence update (2026-11-10): the aarch64-darwin mcpx build is now green end to end.
f8957acd(the merge of PR fix(mcpx): bind stale-socket tests in testsupport.SocketDir (#237) #8254, which moved theTestClearStaleSocket*socket binds totestsupport.SocketDir— the last darwin check-phase failure found).packages.aarch64-darwin.mcpxfrom that pin: all test packages pass, includinginternal/daemonandinternal/refdoc, and the built binary runs (mcpx --helpoutput recorded in the run): https://github.com/dezren39/darwin-nix/actions/runs/42898904547internal/poolhandoff reading/proc/<pid>/stat) is gone at this pin — the sysctlprocStatport (PR mcpx: portable procStat for darwin via sysctl kern.proc (#7063) #8008) covers it.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 commentedon Nov 16, 2026
Queue task 17495 — capability gate, not code-blocked
Checked for a darwin runner before attempting the shrink of
darwinSkipinpkgs/mcpx/package.nix:tailscale status): the only online hosts are thislinux laptop (
amd-6),muse, and an Android phone. Nodarwin/macOS nodeis online (and none is configured in
~/.ssh/config).mcpx.yml,mcpx-nixbuild.ymlandmcpx-release.ymlall run onubuntu-latest; there is no macOS job anywhere in.github/workflows.So the acceptance item — run the 20
darwinSkiptests on darwin, record eachresult 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-15arm64 runnerjob) able to run
go test ./internal/daemon/ ./internal/e2e/ ./internal/mcpclient/ ./internal/pool/inpkgs/mcpx. Once one exists, thework is mechanical: the compile blocker is already gone (task 17484 verified
GOOS=darwin GOARCH=arm64 go vetclean for all four packages), so each testeither passes → drop it from
darwinSkip, or fails → keep it and record thefailure mode here.
dezren39 commentedon 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
darwinSkipremain 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/workflowshas 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.