docs: state both worker defaults with their lower clamp (#2336)

Copilot review round 2: both expressions omitted Vitest's `max(…, 1)`, so
as written they described zero workers on a one-core runner. Now
`max(availableParallelism() - 1, 1)` for the forks pool and
`max(min(12, availableParallelism() - 1), 1)` for the browser pool, and the
browser pool's single-worker condition names all three of its terms
(headless, file parallelism, provider support).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PsmUAZ6aLUAFqenjJKSSRp
Signed-off-by: cliffhall <cliff@futurescale.com>
This commit is contained in:
cliffhall 2026-09-13 00:40:12 -04:00
commit 99d6b193d9
2 changed files with 9 additions and 8 deletions

View file

@ -458,9 +458,9 @@ free to run a full `local:gate`). Raising a budget nobody chose hides no race.
option, a `describe` option, a project setting and a `--retry` flag all land
on the same check.
- **`maxWorkers` stays unset — on measurement, not by omission (#2336).** The
five forks-pool projects inherit `availableParallelism() - 1`; web's
five forks-pool projects inherit `max(availableParallelism() - 1, 1)`; web's
`storybook` project runs the browser pool, whose own default is
`min(12, availableParallelism() - 1)` and which was not measured (a cap set
`max(min(12, availableParallelism() - 1), 1)` and which was not measured (a cap set
there would apply, so it is not exempt — it just needs its own numbers).
Capping the forks pool to 4 was
measured at the leased baseline as +14% wall on the web unit suite and +39%

View file

@ -83,12 +83,13 @@ export const INTEGRATION_TIMEOUTS = Object.freeze({
*
* The five forks-pool projects — web `unit` and `integration`, `cli`, `tui`,
* `launcher` — therefore inherit Vitest's non-watch default,
* `availableParallelism() - 1`: 7 on the eight-logical-core M3 this team
* works on. Web's `storybook` project is the exception: it runs the browser
* pool, whose default is a different expression,
* `min(12, availableParallelism() - 1)` — also 7 here, but capped on larger
* machines because the main thread chokes past ~12 browser workers
* (vitest#7871) — and 1 unless the run is headless with file parallelism. A
* `max(availableParallelism() - 1, 1)`: 7 on the eight-logical-core M3 this
* team works on. Web's `storybook` project is the exception: it runs the
* browser pool, whose default is a different expression,
* `max(min(12, availableParallelism() - 1), 1)` — also 7 here, but capped on
* larger machines because the main thread chokes past ~12 browser workers
* (vitest#7871) — and a single worker unless the run is headless, file
* parallelism is on, and the provider supports it. A
* `maxWorkers` set on that project *would* apply to it (`getThreadsCount`
* reads it before falling back), so it is not exempt from this decision;
* but nothing below measured it. The numbers are the forks pool's, and a cap