Skip to content

Commit a40e4c5

Browse files
fix(test): set --max-old-space-size=6144 on test:coverage to prevent OOM under --runInBand (#3554)
`test:coverage` runs `jest --runInBand` (single Node process) so `workerIdleMemoryLimit` from #3550 does not apply — there are no worker children to recycle. Without an explicit heap cap, Node defaults to ~2 GB old-space which is enough for devkit (~18 suites) but immediately OOMs on larger downstream test suites (trawl_node hit OOM at 1.9 GB on 214 suites). Setting `--max-old-space-size=6144` matches the existing per-project override that downstream projects had to maintain locally as patches. Bumping it upstream eliminates the divergence and prevents the `feedback_update_stack_theirs_wipes_patches` failure mode where `/update-stack --theirs` silently strips the override. Sized for the largest known downstream (trawl_node ~214 suites peaks ~4.3 GB pre-fixes / ~2 GB post). Headroom keeps room for further growth without re-tuning. CI runners on lily ARC have ≥6 GiB, GitHub-hosted runners have 7 GiB — both fit. Note: `workerIdleMemoryLimit: '512MB'` from #3550 still applies for non- coverage parallel runs (`test:parallel-smoke`, etc.) where worker children exist.
1 parent 3afaf3c commit a40e4c5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"test:integration": "cross-env NODE_ENV=test NODE_OPTIONS=--experimental-vm-modules jest --runInBand --testPathPatterns='integration'",
3535
"test:e2e": "cross-env NODE_ENV=test NODE_OPTIONS=--experimental-vm-modules jest --runInBand --testPathPatterns='e2e'",
3636
"test:watch": "cross-env NODE_ENV=test NODE_OPTIONS=--experimental-vm-modules jest --watchAll",
37-
"test:coverage": "cross-env NODE_ENV=test NODE_OPTIONS=\"--experimental-vm-modules --expose-gc\" jest --coverage --runInBand",
37+
"test:coverage": "cross-env NODE_ENV=test NODE_OPTIONS=\"--experimental-vm-modules --max-old-space-size=6144 --expose-gc\" jest --coverage --runInBand",
3838
"test:parallel-smoke": "cross-env NODE_ENV=test node scripts/parallel-integration.smoke.js",
3939
"lint": "eslint ./modules ./lib ./config ./scripts",
4040
"seed:dev": "cross-env NODE_ENV=development node scripts/seed.js seed",

0 commit comments

Comments
 (0)