Skip to content

bug_studies_detail_vitest_intermittent_timeout: studies/[id] page test intermittently times out under full-suite vitest run #487

@SoundMindsAI

Description

@SoundMindsAI

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

  • Stage: IDEA
  • Priority: P2

Definition of done

  • pnpm test (default pool, all files) runs 10× consecutively with zero timeouts on the studies/[id]/page.test.tsx cases, or
  • the polluting sibling test is identified + fixed with a one-line regression assertion.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    mvp2MVP2 backlog itemneeds-preflightIdea-stage; run /idea-preflight before /pipelinepriority/P2P2 — important to file, not blockingtype/bugBug — pre-existing failure or regression

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions