From eaa2018d550e5ef6cc39064f1cac02e869811a25 Mon Sep 17 00:00:00 2001 From: Muse Sweep Date: Tue, 20 Oct 2026 08:22:14 -0500 Subject: [PATCH 1/2] mcpx: give the nix check phase a 30m per-package test timeout Go's default per-package timeout is 10m; on a 2-CPU machine internal/e2e was still progressing when the cap killed it, failing the whole mcpx build and blocking dependent packages (dezren39/nix#510). Run the computed package list with -timeout 30m and update the buildcheck guard to require the new canonical line. --- pkgs/mcpx/internal/buildcheck/checkphase_test.go | 4 ++-- pkgs/mcpx/package.nix | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgs/mcpx/internal/buildcheck/checkphase_test.go b/pkgs/mcpx/internal/buildcheck/checkphase_test.go index 0aa93a6c74..132ee844e1 100644 --- a/pkgs/mcpx/internal/buildcheck/checkphase_test.go +++ b/pkgs/mcpx/internal/buildcheck/checkphase_test.go @@ -83,8 +83,8 @@ func TestCheckPhaseTestsEveryPackageWithTests(t *testing.T) { if !strings.Contains(nix, derivedList) { t.Fatalf("checkPhase must compute its packages with\n %s\nso new packages are tested by default", derivedList) } - if !strings.Contains(nix, "go test $pkgs") { - t.Fatal("checkPhase must run `go test $pkgs` on the computed list") + if !strings.Contains(nix, "go test -timeout 30m $pkgs") { + t.Fatal("checkPhase must run `go test -timeout 30m $pkgs` on the computed list (the 30m per-package budget keeps internal/e2e from hitting Go's 10m default on small machines, dezren39/nix#510)") } // A hand-written package list next to the computed one would silently // narrow it again. diff --git a/pkgs/mcpx/package.nix b/pkgs/mcpx/package.nix index 7baba2a60e..88f63ee45b 100644 --- a/pkgs/mcpx/package.nix +++ b/pkgs/mcpx/package.nix @@ -116,7 +116,13 @@ buildGo127Module { pkgs=$(go list -f '{{if or .TestGoFiles .XTestGoFiles}}{{.ImportPath}}{{end}}' ./... \ | grep -vxF -e "" ${lib.concatMapStringsSep " " (p: "-e github.com/dezren39/mcpx/${p}") checkExclude}) echo "testing $(echo "$pkgs" | wc -l) packages: $pkgs" - go test $pkgs + # Go's default per-package timeout is 10m. On a 2-CPU machine the + # internal/e2e package was still making progress when that cap killed + # it, which failed the whole mcpx build and blocked the packages that + # depend on it (dezren39/nix#510). The timeout is per package, so one + # explicit 30m budget covers e2e without sharding the suite; the + # other packages finish far under it. + go test -timeout 30m $pkgs runHook postCheck ''; From f27752c539f338719a902b3e96da439f52637262 Mon Sep 17 00:00:00 2001 From: Muse Sweep Date: Tue, 20 Oct 2026 08:32:13 -0500 Subject: [PATCH 2/2] mcpx: apply pinned nixfmt to package.nix The changed-files treefmt gate formats whole files; package.nix had drifted from the pinned formatter in two pre-existing blocks (src filter, pkgs= interpolation). Pure reflow, no semantic change; format-check now reports 0 changed on this file. --- pkgs/mcpx/package.nix | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/pkgs/mcpx/package.nix b/pkgs/mcpx/package.nix index 88f63ee45b..2a4d3f5604 100644 --- a/pkgs/mcpx/package.nix +++ b/pkgs/mcpx/package.nix @@ -29,12 +29,7 @@ buildGo127Module { let base = baseNameOf path; in - !( - base == "bin" - || base == "result" - || lib.hasPrefix "result-" base - || base == "mcpx-client.ts" - ); + !(base == "bin" || base == "result" || lib.hasPrefix "result-" base || base == "mcpx-client.ts"); }; # Five direct Go dependencies. @@ -114,7 +109,9 @@ buildGo127Module { export HOME=$TMPDIR/home MCPX_STATE_DIR=$TMPDIR/state MCPX_CACHE_DIR=$TMPDIR/cache mkdir -p "$HOME" pkgs=$(go list -f '{{if or .TestGoFiles .XTestGoFiles}}{{.ImportPath}}{{end}}' ./... \ - | grep -vxF -e "" ${lib.concatMapStringsSep " " (p: "-e github.com/dezren39/mcpx/${p}") checkExclude}) + | grep -vxF -e "" ${ + lib.concatMapStringsSep " " (p: "-e github.com/dezren39/mcpx/${p}") checkExclude + }) echo "testing $(echo "$pkgs" | wc -l) packages: $pkgs" # Go's default per-package timeout is 10m. On a 2-CPU machine the # internal/e2e package was still making progress when that cap killed