From d06a830d8f312762c8f3272a123455103f96853e Mon Sep 17 00:00:00 2001 From: Pierre Brisorgueil Date: Fri, 1 May 2026 08:59:33 +0200 Subject: [PATCH] fix(test): set --max-old-space-size=6144 on test:coverage to prevent OOM under --runInBand MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `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. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 75c6dae40..352ab661d 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "test:integration": "cross-env NODE_ENV=test NODE_OPTIONS=--experimental-vm-modules jest --runInBand --testPathPatterns='integration'", "test:e2e": "cross-env NODE_ENV=test NODE_OPTIONS=--experimental-vm-modules jest --runInBand --testPathPatterns='e2e'", "test:watch": "cross-env NODE_ENV=test NODE_OPTIONS=--experimental-vm-modules jest --watchAll", - "test:coverage": "cross-env NODE_ENV=test NODE_OPTIONS=\"--experimental-vm-modules --expose-gc\" jest --coverage --runInBand", + "test:coverage": "cross-env NODE_ENV=test NODE_OPTIONS=\"--experimental-vm-modules --max-old-space-size=6144 --expose-gc\" jest --coverage --runInBand", "test:parallel-smoke": "cross-env NODE_ENV=test node scripts/parallel-integration.smoke.js", "lint": "eslint ./modules ./lib ./config ./scripts", "seed:dev": "cross-env NODE_ENV=development node scripts/seed.js seed",