From f9b7de90a79a275566f924a4658fa56049f04e47 Mon Sep 17 00:00:00 2001 From: HelloThisWorld Date: Tue, 18 Aug 2026 23:35:58 +0800 Subject: [PATCH] fix(ci): double the test timeout on Windows CI runners The post-merge main run failed with a single 30s test timeout on the 4-vCPU Windows runner: resume.test.ts "recovers each intermediate phase" -- the git-heaviest test in the suite (five git-initialized fixtures plus per-resume snapshots, roughly fifty blocking git spawns) -- while 1,647 of 1,648 tests passed. Windows process spawn costs several times more than Linux, and the second vitest worker now runs the subprocess-heavy v1.2 driver suites concurrently, so the test''s long-standing margin inside 30s is gone: aggregate Windows test time was 1,102s in that run versus ~160s on ubuntu. A timeout is a slowness budget, not a correctness assertion. The budget doubles to 60s exactly where the slowness lives -- CI AND win32 -- and stays 30s for Linux, macOS, and local runs, protecting every borderline git-heavy test instead of patching this one with a per-test override. --- vitest.config.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/vitest.config.ts b/vitest.config.ts index 16bae4f..c239ce7 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -81,7 +81,15 @@ export default defineConfig({ // The v0.3 execution tests are process-level integration tests (git // snapshots, runner subprocesses, verification commands); slow CI // runners regularly exceed the 5s default. - testTimeout: 30_000, + // + // Windows CI gets double the budget: process spawn costs several times + // more there, and with a second worker running the subprocess-heavy + // v1.2 driver suites, the git-heaviest single test (resume.test.ts + // "recovers each intermediate phase" — five git-initialized fixtures, + // ~50 blocking git spawns) ran out of its 30s on the 4-vCPU runner + // while 1,647 of 1,648 tests passed. A timeout is a slowness budget, + // not a correctness assertion; local runs and Linux/macOS stay tight. + testTimeout: process.env['CI'] !== undefined && process.platform === 'win32' ? 60_000 : 30_000, maxWorkers: workerCeiling(), pool: poolForPlatform(), // On CI the default reporter writes a line per test to a non-TTY stream