From a87566014def6fb5199941a40f637dee5ff35f68 Mon Sep 17 00:00:00 2001 From: ICanHazCrypto Date: Wed, 9 Sep 2026 10:01:38 -0700 Subject: [PATCH] fix: stop the Windows CI job timing out on integration tests The Windows job has been failing intermittently on main while Ubuntu passes, on a different handful of tests each run: three from the locked-protocol guards on 602640de, eight across those and the dashboard tests on f7242fbd. Every one failed with "Test timed out in 5000ms" rather than on an assertion, which is a scheduling problem, not a regression. 5s is Vitest's default and was never chosen for this suite. The tests that hit it do real work rather than compute: the locked-protocol guards initialise scratch git repositories and run the CLIs as child processes, and the dashboard tests build the site and hash artifacts. Measured on a developer machine they peak around 2.1s each, and Windows runners are several times slower at process spawning and file I/O, which puts the slowest of them close enough to the ceiling to cross it some runs and not others. testTimeout and hookTimeout are now 20s. That is headroom rather than permission to be slow: a genuinely hung process still fails the run, just later, and any test approaching this ceiling is doing something worth looking at. Nothing about the tests themselves changes. Full suite 552 passing. --- vitest.config.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/vitest.config.ts b/vitest.config.ts index 3a81fb3..3674fb9 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -20,5 +20,22 @@ export default defineConfig({ include: ['packages/*/test/**/*.test.ts', 'apps/*/test/**/*.test.ts'], environment: 'node', reporters: ['default'], + /** + * Above Vitest's 5s default, which was never a deliberate choice here. + * + * The heaviest tests are integration tests that do real work rather than compute: + * the locked-protocol guards initialise scratch git repositories and run the CLIs + * as child processes, and the dashboard tests build the site and hash artifacts. + * They peak around 2s on a developer machine, and Windows CI runners are several + * times slower at process spawning and file I/O, so 5s sat close enough to the + * edge that the Windows job failed intermittently on a different handful of tests + * each time while Ubuntu passed. + * + * This is headroom, not permission to be slow: a genuinely hung process still + * fails the run, and any test that actually approaches this ceiling is doing + * something worth looking at. + */ + testTimeout: 20_000, + hookTimeout: 20_000, }, });