@@ -17,6 +17,7 @@ GOTESTSUM ?= $(shell command -v gotestsum 2>/dev/null || printf '%s/bin/gotestsu
1717# use more than the historical four-test cap.
1818TEST_PARALLELISM ?= 8
1919TEST_PACKAGE_PARALLELISM ?= 8
20+ RACE_TEST_PACKAGE_PARALLELISM ?= 1
2021RACE_TEST_PARALLELISM ?= 4
2122INTEGRATION_PARALLELISM ?= 4
2223GOTESTSUM_FLAGS ?= --rerun-fails=2 --rerun-fails-max-failures=5
@@ -78,14 +79,14 @@ test-uncached:
7879 $(GO ) test -short -p=$(TEST_PACKAGE_PARALLELISM ) -parallel=$(TEST_PARALLELISM ) -count=1 -timeout 120s ./...
7980
8081test-race :
81- # Keep package-level overlap for cross- package race coverage while bounding
82- # in-process test concurrency for the CPU-heavy SQLite tests .
83- $(GO ) test -short -race -p=4 -parallel=$(RACE_TEST_PARALLELISM ) -timeout 600s ./internal/app ./internal/corpus ./internal/mcpserver ./internal/workspace
82+ # Race tests run each package in a separate process, so package overlap adds
83+ # CPU contention without extending race coverage across package boundaries .
84+ $(GO ) test -short -race -p=$( RACE_TEST_PACKAGE_PARALLELISM ) -parallel=$(RACE_TEST_PARALLELISM ) -timeout 600s ./internal/app ./internal/corpus ./internal/mcpserver ./internal/workspace
8485
8586test-race-full :
86- # Keep package-level overlap for cross-package race coverage while bounding
87- # in-process test concurrency for the CPU-heavy SQLite tests .
88- $(GO ) test -race -p=4 -parallel=$(RACE_TEST_PARALLELISM ) -count=1 -timeout 900s ./...
87+ # Keep the same package isolation for the full race suite; callers can raise
88+ # package concurrency explicitly on hosts with enough CPU and memory .
89+ $(GO ) test -race -p=$( RACE_TEST_PACKAGE_PARALLELISM ) -parallel=$(RACE_TEST_PARALLELISM ) -count=1 -timeout 900s ./...
8990
9091test-verbose :
9192 $(GO ) test -short -v -p=$(TEST_PACKAGE_PARALLELISM ) -parallel=$(TEST_PARALLELISM ) -timeout 120s ./...
0 commit comments