From 97972ca7fd235d78979cb0f9524c0fb502d2b21c Mon Sep 17 00:00:00 2001 From: Tom Boucher Date: Mon, 6 Jul 2026 12:11:08 -0400 Subject: [PATCH] fix(#1575): lower MAX_FILES_PER_CHUNK from 90 to 60 to fix macOS Node 22 timeout Shard 2/3 chunk 2 (~80 files including state.test.cjs, perf-*, worktree-cleanup) exceeded the 600s per-chunk timeout on macOS Node 22. Reducing the cap from 90 to 60 splits this into two ~40-file chunks, each well within the 600s budget. Three chunks at ~5 min each = ~15 min, safely under the 20m job cap. --- scripts/run-tests.cjs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/run-tests.cjs b/scripts/run-tests.cjs index b4df63d3c..e52c7fe92 100644 --- a/scripts/run-tests.cjs +++ b/scripts/run-tests.cjs @@ -570,11 +570,13 @@ function main() { // progress (verified: no leaked handle / hang; --test-force-exit exits leaks // cleanly, so the timeout was pure slowness, NOT the leak the kill message guesses). // The per-chunk timeout is sized for a "healthy chunk (~4-5 min)"; keep chunks at - // roughly half a shard so each gets its own fresh 600s budget and a fresh node - // process (also relieving per-process memory pressure from 170+ files at once). + // roughly a third of a shard so each gets its own fresh 600s budget and a fresh + // node process (also relieving per-process memory pressure from 170+ files at once). + // Lowered from 90 to 60 after #1575 — macOS Node 22 shard 2/3 chunk 2 (~80 files + // including state.test.cjs, perf-*, worktree-cleanup) exceeded 600s with 90. const MAX_FILES_PER_CHUNK = process.env.RUN_TESTS_MAX_FILES_PER_CHUNK ? Number(process.env.RUN_TESTS_MAX_FILES_PER_CHUNK) - : 90; + : 60; // node:test does not exit until the event loop drains. A unit test that leaks // an open handle (un-terminated Worker, un-killed child_process, ref'd timer)