Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
#
Expand Down
2 changes: 1 addition & 1 deletion apps/viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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')",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Limit serial execution to CI shards

When the canonical root pnpm test runs with TEST_SHARDS unset, this hardcoded value serializes all 521 viewer test files, not merely each CI shard. The four-way parallelism described in test.yml exists only in CI, while the preceding change measured the unsharded suite at 142s with concurrency 4 versus 295s with concurrency 1, so every developer/full Turbo run now incurs this regression. Keep the package default parallel and pass concurrency 1 specifically from the viewer-tests workflow.

AGENTS.md reference: AGENTS.md:L12-L13

Useful? React with 👍 / 👎.

"check:templates": "tsc -p src/lib/scripts/templates/tsconfig.json --noEmit"
},
"dependencies": {
Expand Down
Loading