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
Found by lane any-b, task 17502 (2026-11-16), while trying to build-verify PR #10817 (nixpkgs-update 2026-11-16) for darwin-nix#1913.
Symptom
pkgs/mcpx's nix build fails its checkPhase: every test passes, but the examples package fails the testsupport process sweep (#1971):
testsupport: 8 process(es) still executing from the suite's build temp dirs after the suite ran (#1971)
FAIL github.com/developing-today/code/pkgs/mcpx/examples 66-86s
8 survivors = 4 example daemons' worth. Inspection of a survivor shows it is not the daemon itself but its server supervisor:
still alive 38s+ after the test suite ended (the sweep polls a 10s shutdown budget before declaring a leak). The example's own cleanup (mcpx stop --all, t.Cleanup in examples_test.go) exits without error, yet the supervise process and its fakemcp child survive. Supervise processes from e2e subset runs were likewise still alive an hour later on the laptop.
cd pkgs/mcpx && go test ./examples/ -count=1
# PASS for every test, then:
# testsupport: 8 process(es) still executing ... FAIL
A single subtest reproduces it: go test ./examples/ -run 'TestExamples/discover' -count=1 -v — test PASSes, 2 survivors (1 supervise + 1 fakemcp).
Impact
nix build .#nixosConfigurations.amd.config.system.build.toplevel fails on the mcpx derivation (builder exit 1) — verified in 3 full attempts on PR chore(deps): nixpkgs update 2026-11-16 #10817's branch (which has current main merged) on 2026-11-16; the mcpx derivation was the ONLY failing dependency (full-log + --keep-going runs; logs at ~/git/fleet/17502-build-full.log and 17502-build-retry.log on the laptop).
A second, load-sensitive failure was seen once under load ~30 (internal/pool TestDefaultConfigStdioRunsSupervised: "supervised child still alive after the reap") — same supervise-reap family; it passed at low load. The examples leak reproduces at load ~1.5, so it is not a load flake.
Suspected area
The supervise lifecycle: a mcpx supervise parent for a supervised stdio server (fakemcp here) is not reaped when the owning command/daemon stops. Either stop --all does not signal supervisors, or the supervisor ignores the daemon's shutdown. The #1971 sweep (commits 6599706, ff4b38a, 7beef75) is doing its job — the leak is real.
Acceptance
go test ./examples/ -count=1 exits 0 with no surviving supervise/fakemcp processes after the suite.
agent-note:v1
state: pr_opened (task 17545, lane any-b)
Fix: PR #10857 — examples cleanup now terminates the test's supervisors (mcpclient.TerminateSupervisorSocket over the state dir's sup-*.sock, with retry while the daemon detaches) after mcpx stop --all. Production supervisor semantics unchanged (survive daemon restart where reattach is possible); the suite's throwaway state dir has no reattacher, so the suite reaps its own.
Verified: go test ./examples/ -count=1 ok 52.97s (was: all tests pass + sweep FAIL, 8 survivors); nix build .#mcpx NIX_EXIT=0 with full checkPhase (was builder exit 1). On merge + issue close, task 17502 (dep-blocked on this issue) returns to the pool to rebuild/merge PR #10817.
Activity
developing-today commentedon Nov 16, 2026
CODE-3918
dezren39 commentedon Nov 16, 2026
agent-note:v1
state: pr_opened (task 17545, lane any-b)
Fix: PR #10857 — examples cleanup now terminates the test's supervisors (mcpclient.TerminateSupervisorSocket over the state dir's sup-*.sock, with retry while the daemon detaches) after
mcpx stop --all. Production supervisor semantics unchanged (survive daemon restart where reattach is possible); the suite's throwaway state dir has no reattacher, so the suite reaps its own.Verified:
go test ./examples/ -count=1ok 52.97s (was: all tests pass + sweep FAIL, 8 survivors);nix build .#mcpxNIX_EXIT=0 with full checkPhase (was builder exit 1). On merge + issue close, task 17502 (dep-blocked on this issue) returns to the pool to rebuild/merge PR #10817.Merge pull request #10857 from developing-today/queue/17545-10853-sup…
merge main into chore/nixpkgs-update-2026-11-16b (pick up #10853 mcpx…