Skip to content

fix(test): App.test.tsx's Ink fake-timer test blows the unit project's 5s default under full-suite load (sibling of #842) #880

Closed

Description

@admarble

Found by QA on #871 / PR #876, where it was the only failure in an otherwise-green 4727-test full-suite run.

src/ui/tui/App.test.tsx > App completed-issue header freeze (#866) > keeps a running issue's header advancing when a stale completedAt survives fails under full-suite load with:

Error: Test timed out in 5000ms.

reported at 5100ms. The same file passes 4/4 in isolation in ~1s, and CI's full run is green — so it is load-dependent, not a logic defect.

Cause. App.test.tsx has no .integration. infix, so it lands in the unit vitest project, which keeps vitest's 5s default testTimeout. vitest.config.ts states that split deliberately:

Deliberately scoped to integration — the unit project keeps vitest's 5s default, where a slow test is a real signal. Files needing more override it locally.

This test is not slow logic: it renders an Ink tree and then flushes it with await vi.advanceTimersByTimeAsync(5000). Under the CPU contention of a 229-file suite that combination exceeds 5s, which is the same class as #842 (subprocess tests inheriting the 5s default) but for an in-process TUI render rather than a spawn.

Note this is exactly the sibling case #842's fix did not cover: #842 raised the timeout for the whole integration project, and this file is in unit.

Acceptance Criteria

  • AC-1: The test no longer fails on timeout under full-suite load, using the local-override escape hatch vitest.config.ts already documents rather than raising the unit project's global default.
  • AC-2: The unit project's 5s default is unchanged, so a genuinely slow unit test is still a real signal.
  • AC-3: Any other test in the unit project that renders Ink and flushes with advanceTimersByTimeAsync gets the same treatment, so the fix is not one-off.
  • AC-4: A comment at the override states why this test needs more than 5s (Ink render + fake-timer flush under load), so it is not later "cleaned up" as an unexplained magic number.

Activity

  1. added
    bug
    on Jul 30, 2026
  2. added a commit that references this issue on Jul 30, 2026
  3. added a commit that references this issue on Jul 30, 2026
  4. added 2 commits that reference this issue on Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions