Problem
Under the full pnpm test run (vitest run, default worker pool), src/__tests__/app/studies/[id]/page.test.tsx ("renders header, trials table, and digest panel for a completed study") sometimes blocks past the 5 s testTimeout and emits a JSDOM Not implemented: navigation to another Document line. It passes in isolation in <1 s and passes on a re-run with no code change. Reproduces on main — a test-isolation flake, not a product bug. The cost is future operator time burned on false-alarm investigations.
What this delivers
Pin the offending cross-test state (likely a sibling test in the same worker leaving a stray timer / pending fetch / window.location assignment) and fix it, or — as a last resort — a defensive testTimeout bump with a recorded reason.
Status
Definition of done
Artifacts
How to execute
Run /idea-preflight on the folder, then /pipeline docs/00_overview/planned_features/02_mvp2/bug_studies_detail_vitest_intermittent_timeout --auto. Investigation start: pnpm test --pool=forks --poolOptions.forks.singleFork=true to confirm cross-test pollution, then bisect the file list.
Problem
Under the full
pnpm testrun (vitest run, default worker pool),src/__tests__/app/studies/[id]/page.test.tsx("renders header, trials table, and digest panel for a completed study") sometimes blocks past the 5 stestTimeoutand emits a JSDOMNot implemented: navigation to another Documentline. It passes in isolation in <1 s and passes on a re-run with no code change. Reproduces onmain— a test-isolation flake, not a product bug. The cost is future operator time burned on false-alarm investigations.What this delivers
Pin the offending cross-test state (likely a sibling test in the same worker leaving a stray timer / pending fetch /
window.locationassignment) and fix it, or — as a last resort — a defensivetestTimeoutbump with a recorded reason.Status
Definition of done
pnpm test(default pool, all files) runs 10× consecutively with zero timeouts on thestudies/[id]/page.test.tsxcases, orArtifacts
How to execute
Run
/idea-preflighton the folder, then/pipeline docs/00_overview/planned_features/02_mvp2/bug_studies_detail_vitest_intermittent_timeout --auto. Investigation start:pnpm test --pool=forks --poolOptions.forks.singleFork=trueto confirm cross-test pollution, then bisect the file list.