Skip to content

Two tests fail only under full-suite load and pass in isolation — the suite has load-dependent flakes #4208

Description

@kevinthelago

npx vitest run (full suite, 720 files) fails:

FAIL src/features/designs/DesignerTerminal.test.tsx — 5000ms test timeout

Run alone it is green:

npx vitest run src/features/designs/DesignerTerminal.test.tsx
  Test Files  1 passed (1)
  Tests       7 passed (7)

So it is a load-dependent timeout, not a real assertion failure — the 5s default is not enough when
720 files are competing for workers.

Why it is worth fixing rather than tolerating

A suite that fails intermittently trains people to re-run until green, which is how a genuine failure gets
waved through. It also costs every worktree agent a diagnosis: two separate agents this session both hit
it, both had to stash their work and re-run against a clean base to prove it was not theirs.

Likely fix

Find what the test actually waits on. A 5s timeout that only fails under contention usually means a
waitFor on something that never settles quickly — a PTY mock, a terminal mount, an animation frame —
rather than genuinely slow work. Prefer making the wait deterministic (resolve the thing it is waiting
for) over raising the timeout, which only moves the threshold.

Raise the timeout only if the wait is legitimately slow and cannot be made deterministic — and say which
in the fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Someday / backlogbugSomething isn't workingtest

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions