fix(ci): drop in-file test concurrency, keep file-level parallelism

The fourth CI run failed broadly: ~15 timing-sensitive tests (throttle, flush,
resize clear-counts, rapid-input ordering) failed under sequence.concurrent on
the 4-core ubuntu runner. These assert render/commit counts driven by the
~32ms commit throttle; in-file concurrency starves them of wall-clock when many
share few cores. It passed locally only because dev machines have more cores —
the classic "works on my 12-core mac" trap.

Remove sequence.concurrent from both the main and PTY configs; keep
fileParallelism (pool: forks), which is the proven, stable win (PTY suite still
~3x faster than serial). The it.sequential/describe.sequential markers and
context-local expect become harmless no-ops under serial in-file execution.

Verified cold (no dist): vp run ci exits 0, 0 lint warnings, all tests pass.
This commit is contained in:
Yunfei He
2026-05-29 14:50:09 +08:00
parent ee286a3246
commit a4116ba08f
2 changed files with 9 additions and 9 deletions
+3 -4
View File
@@ -6,10 +6,9 @@ export default defineConfig({
test: {
// chalk disables color in non-TTY envs; force it on so ANSI style bugs don't hide from tests
env: { FORCE_COLOR: "3" },
// Tests run concurrently by default. Tests that genuinely need serial
// execution (process-global fake timers) live in their own *.sequential
// files. Snapshot tests stay concurrent by using the context-local expect.
sequence: { concurrent: true },
// Files parallelize, but tests within a file run serially: many assert
// timing-sensitive render/commit/flush counts that destabilize under
// in-file concurrency on a constrained (4-core) CI runner.
// PTY tests run separately via vitest.pty.config.ts (they need node-pty's forks pool and a longer timeout)
exclude: ["integration/pty/**", "node_modules/**"],
},