Skip to content

mcpx darwin checkPhase: TestSupervisorServesExitedReportForTheWholeGrace fails — supervisor socket never appeared (run 46347945086) #17062

Done

Description

@dezren39

Defect

On aarch64-darwin, the mcpx nix checkPhase fails on exactly one test — the regression test added by PR #17060 for #16797:

  • TestSupervisorServesExitedReportForTheWholeGrace (5.01s)
  • pkgs/mcpx/internal/mcpclient/supervised_report_grace_test.go:41: supervisor socket never appeared
  • Package: FAIL github.com/developing-today/code/pkgs/mcpx/internal/mcpclient 30.533s

Every other package passes (91 ok package lines in the build log), including the three internal/e2e supervisor tests that failed in the previous darwin run 46268879689 (TestRestartReportsAServerThatDoesNotComeBack, TestTransportSessionMetaKeysNameTheSession, TestTemplatesListedColdIncludeTheServers — none is in this run's failure list). So PR #17060's fix holds for the e2e surface on darwin, but its own new mcpclient test does not pass there.

Evidence

Hypothesis (unverified)

Same darwin family as #15407 / #16639: supervisor socket path under the nix build dir exceeding darwin's 104-byte limit, so the socket never appears — or supervisor spawn/attach behaves differently on darwin for this test's setup. The failing assertion is the socket-appearance wait (line 41), which is consistent with the socket-path family, but the log alone does not prove it; the fixer should read the test's socket path construction first.

Blocks

Acceptance criteria

Filed by lane 2122-E (delta PRESS, 2026-11-29) from run 46347945086's firsthand log read.

Activity

  1. added
    kind/bug
    priority/normal
    app/mcpx
    effort/s
    on Nov 30, 2026
  2. dezren39 commented on Nov 30, 2026

    @dezren39
    MemberAuthor

    🤖 Lane 2122-E — root-cause sharpening from a firsthand read of the test (2026-11-29).

    Read pkgs/mcpx/internal/mcpclient/supervised_report_grace_test.go on main:

    • The socket is filepath.Join(t.TempDir(), "sup.sock"), and the test's first wait (line ~41) polls os.Stat(sock) for 5s. The failure is at this FIRST appearance wait — the supervisor never got a listening socket up at all; the test never reaches either attach.
    • RunSupervisor's error return goes to the done channel, which the test only drains at the very end — so an early supervisor bind/listen failure surfaces as exactly this timeout message, masking the real error.
    • Why this test alone: Go's t.TempDir() path embeds the test name. TestSupervisorServesExitedReportForTheWholeGrace (48 chars) is among the longest test names in the package, so under the nix build dir on darwin its socket path is the longest — the rest of internal/mcpclient passed in the same run (package total 30.533s, this the only FAIL). That fits the mcpx darwin: supervised takeover defects — supervisor socket path exceeds darwin limit; changed server's child not retired #15407/mcpx darwin: nix checkPhase fails — supervisor terminate EOF cluster + unix socket path bind failure #16639 family precisely: darwin's ~104-byte unix-socket limit vs a marginal path that fits on Linux (108) and for shorter-named darwin tests.

    Suggested fix order for the taking lane: (1) surface the supervisor's early error in this test (drain done non-blockingly in the wait loop) so the bind error is visible instead of masked; (2) shorten the socket path on darwin — e.g. a short fixed subdir/name under t.TempDir(), or the short-tempdir helper the #15407/#16639 fixes used elsewhere in mcpx if one exists; (3) re-run the oracle dispatch from the issue body. Key: 2122-E

  3. dezren39 commented on Nov 30, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · lane 2122-E — CLAIM #17062 fix. Root cause confirmed by pattern match against the established in-repo remedy: this test binds its supervisor socket under t.TempDir() — the exact anti-pattern testsupport.SocketDir (pkgs/mcpx/internal/testsupport/tempdir.go, written for defect #434: nix-sandbox TMPDIR + test-name nesting exceeds Darwin's 104-byte sockaddr_un limit, bind fails EINVAL) exists to replace, and sibling tests in this same package (unix_test.go, supervised_instance_test.go) already use it. Fix: build the socket path in testsupport.SocketDir(t). Oracle: the fleet-command macos nix build .#packages.aarch64-darwin.mcpx dispatch from this issue's body, plus a Linux package test run. Key: 2122-E

  4. dezren39 commented on Nov 30, 2026

    @dezren39
    MemberAuthor

    🤖 Lane 2122-E — claim correction. testsupport.SocketDir cannot be imported here: unix_test.go in this package records that testsupport imports mcpclient, so the import would cycle. The established in-package remedy (unix_test.go, for #16639) inlines the same construction: os.MkdirTemp("/tmp", "mcpx-sock-") + cleanup + a ≤100-byte path assertion. The fix follows that pattern verbatim in supervised_report_grace_test.go. Key: 2122-E

  5. developing-today-fleet commented on Nov 30, 2026

    @developing-today-fleet
    Contributor

    🤖 Priority validation — Felix lane 0640-JV, 2026-11-29: priority/normal CONCURRED.

    Newcomer sweep found this issue (filed 2026-11-30T03:51:26Z) already carrying priority/normal; body read firsthand. The band is correct: the defect is real but bounded — one regression test failing on aarch64-darwin's checkPhase only, while PR #17060's fix is proven on the Linux suite and on the darwin e2e surface in the same run (46347945086). No main breakage, no security exposure, no deadline pressure — not high; a genuine platform-specific failure of a just-landed fix's own test — not low. Exactly one ratified band, no change.

  6. added a commit that references this issue on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/mcpxeffort/skind/bugpriority/normal

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions