Commit 1c65f5d
chore(ci): stop windows-latest/Node-24 vitest worker OOM kills
Recent main runs failed only on the windows-latest + Node 24 matrix cell:
~5 forks-pool workers died with "Worker exited unexpectedly" (an OS reap, no
JS error — classic OOM), which (a) surfaced as unhandled errors and (b)
dropped packages/mcp-server/src/profiles.js function coverage from 87.5% to
83.33%, under its 85% per-file floor. It reproduced on neither ubuntu nor
windows/Node-22, nor locally (test:coverage passes clean: 1172 tests,
profiles.js funcs 87.5%, zero crashes).
Root cause: NODE_OPTIONS=--max-old-space-size=4096 was set at the workflow
env level (for the tsup/tsc build) and inherited by the vitest test step, so
every forked worker was allowed a 4GB heap; several parallel workers ×4GB on
the Node-24 Windows runner caused OOM worker kills.
Fix (CI-only, no package change):
- Move NODE_OPTIONS=--max-old-space-size=4096 off the global env onto the
build and typecheck steps only; the multi-worker test step now runs with
Node's default per-worker heap.
- Cap the vitest forks pool to maxForks=2 in CI (poolOptions.forks) to bound
peak concurrent memory. Local runs keep default parallelism.
Verified the config parses and tests pass under CI=1 locally (maxForks path);
the OOM kills only repro on the hosted runner, so the real confirmation is the
next CI run on this commit.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent adc5986 commit 1c65f5d
2 files changed
Lines changed: 26 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
| |||
47 | 51 | | |
48 | 52 | | |
49 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
50 | 58 | | |
| 59 | + | |
| 60 | + | |
51 | 61 | | |
| 62 | + | |
| 63 | + | |
52 | 64 | | |
53 | 65 | | |
54 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
28 | 38 | | |
29 | 39 | | |
30 | 40 | | |
| |||
0 commit comments