diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2f67d3941..c637b13f2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -373,6 +373,16 @@ jobs: # knows what good looks like rather than only what broken looked like: # 2:29, 2:01, 1:50 against a 25 minute cap. # + # Parallelism comes from the SHARDS, not from concurrency inside a shard. + # `--test-concurrency=1` is deliberate: at 4 a timing-sensitive test races + # three neighbours, and `useSandbox.runSupersession.test.tsx` failed on three + # unrelated PRs in one hour that way (issue #3060) while passing locally 3/3. + # The bump to 4 came from an earlier attempt at this lane that was MEASURED + # not to help on CI, and it was carried forward as harmless once sharding + # worked. It is not harmless, and its speedup is redundant with sharding. + # Cost of going back to 1, measured: ~70s versus ~19s per shard locally, + # roughly 8 minutes versus 2 on CI, against a 25 minute cap. + # # Two earlier explanations in this file were WRONG and are corrected here, # because a confident wrong comment is worse than none: # diff --git a/apps/viewer/package.json b/apps/viewer/package.json index 62baee7f5..715e816c6 100644 --- a/apps/viewer/package.json +++ b/apps/viewer/package.json @@ -14,7 +14,7 @@ "build": "vite build && node ../../scripts/check-tla-chunk-await.mjs", "typecheck": "tsc --noEmit", "preview": "vite preview", - "test": "tsx --import ./src/test/vite-module-hooks.mjs --test --test-timeout=120000 --test-concurrency=4 $(find src -type f \\( -name '*.test.ts' -o -name '*.test.tsx' \\) | sort | awk -v s=\"${TEST_SHARD:-0}\" -v n=\"${TEST_SHARDS:-1}\" 'NR % n == s')", + "test": "tsx --import ./src/test/vite-module-hooks.mjs --test --test-timeout=120000 --test-concurrency=1 $(find src -type f \\( -name '*.test.ts' -o -name '*.test.tsx' \\) | sort | awk -v s=\"${TEST_SHARD:-0}\" -v n=\"${TEST_SHARDS:-1}\" 'NR % n == s')", "check:templates": "tsc -p src/lib/scripts/templates/tsconfig.json --noEmit" }, "dependencies": {