Repository navigation
fix(mcpx): bind stale-socket tests in testsupport.SocketDir (#237) - #8254
Conversation
The three clearStaleSocket tests that bind a unix socket used t.TempDir() directly. Under a nix build TMPDIR the socket path exceeds Darwin's 100-byte sun_path ceiling and bind fails with EINVAL, failing the aarch64-darwin mcpx build (dezren39/darwin-nix#1770, #471) even though the product code is fine. testsupport.SocketDir exists for exactly this (#434); use it, like every other socket-binding test. Reproduced the darwin failure on Linux with a deep TMPDIR (same three tests, same bind error); all six TestClearStaleSocket* pass with the fix, full internal/daemon suite passes.
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 53 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Part of #237 (mcpx darwin portability). Found by the aarch64-darwin verification run for dezren39/darwin-nix#1770 / #471.
Failure (real macos-15 runner,
nix build .#packages.aarch64-darwin.mcpxat codef2223b6d):Cause: the three
clearStaleSockettests that bind a socket uset.TempDir()directly. Under a nix build, TMPDIR is the long build dir, so the socket path exceeds Darwin's 100-bytesun_pathceiling andbindreturns EINVAL. The product code is not involved — this is the exact failuretestsupport.SocketDirwas written to prevent (#434); the #5742 tests missed it.Fix: use
testsupport.SocketDir(t)for the socket-bearing directories in those three tests. No product code changed, no test skipped — the tests now run on darwin too.Verification:
bind: invalid argument; fixed code passes.TestClearStaleSocket*pass; fullinternal/daemonsuite passes (ok ... 91.9son a loaded machine).GOOS=darwin GOARCH=arm64 go vet ./internal/daemon ./internal/testsupportclean.After this merges, dezren39/darwin-nix PR #1775 re-pins mcpx-src to the merge rev and re-runs its Linux + macos-15 darwin build verification.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.