From 7ad09202e8eea190aab1b2e76e8c3151a3a3205e Mon Sep 17 00:00:00 2001 From: Vianney MORAIN Date: Sat, 18 Jul 2026 01:46:38 +0200 Subject: [PATCH] test(cli): retry flaky subprocess tests in CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The evaluations/high-impact/* tests spawn CLI subprocesses and occasionally exceed the 15s timeout on a loaded runner (observed intermittently on unrelated PRs). Add `retry: 2` in CI to vitest's config for this package so a transient timeout is absorbed; a genuinely broken test still fails all attempts. Local runs stay strict (retry: 0). Verified the retry applies from packages/cli/vite.config.ts (the config vitest actually loads for this package — the root vitest.config.ts does not reach it). Co-Authored-By: Claude Opus 4.8 --- packages/cli/vite.config.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/cli/vite.config.ts b/packages/cli/vite.config.ts index 9ea26a694cb9..bac10f65bcc6 100644 --- a/packages/cli/vite.config.ts +++ b/packages/cli/vite.config.ts @@ -1,8 +1,5 @@ -import { - defaultClientConditions, - defaultServerConditions, - defineConfig, -} from "vite"; +import { defaultClientConditions, defaultServerConditions } from "vite"; +import { defineConfig } from "vitest/config"; import { createRequire } from "node:module"; import pkg from "./package.json"; @@ -46,6 +43,13 @@ export default defineConfig({ conditions: ["webstudio", ...defaultServerConditions], }, }, + test: { + // Retry in CI to absorb rare, environment-induced flakes — notably the + // evaluations/high-impact/* tests, which spawn CLI subprocesses and + // occasionally exceed their timeout on a loaded runner. A genuinely broken + // test still fails every attempt. Local runs stay strict (no retry). + retry: process.env.CI ? 2 : 0, + }, build: { target: "node22", minify: false,