Skip to content

test: scoped instruction-cache matrix exceeds Vitest deadline under full-suite load #676

Description

@bcdonadio

Observed

The repository-required post-merge npm test at exact main merge commit 3375aa7c244ad52aa3c0e2c845cb0e1aaf7035d9 timed out two rows of the existing parameterized test in test/worktree-reconciliation.test.ts:

  • rejects a scoped instruction-cache divergence or deduplicates the 'newer target' case (approximately 5.343 s)
  • rejects a scoped instruction-cache divergence or deduplicates the 'exact duplicate' case (approximately 6.922 s)

Both inherited Vitest's default 5,000 ms deadline. The full run ended with 2 failures, 6,427 passes, and 12 skips.

A focused rerun of the exact three-row matrix passed all 3 rows in 3.69 s total:

npm test -- --run test/worktree-reconciliation.test.ts -t "rejects a scoped instruction-cache divergence"

Expected

This pre-existing reconciliation matrix should complete within a test-owned deadline under canonical full-suite load, without relying on the global 5,000 ms default.

Root cause

The parameterized matrix at line 2106 has no explicit per-test timeout, although neighboring load-sensitive worktree-reconciliation tests use named 15-second full-suite deadlines. Under concurrent full-suite load, individual rows can exceed the inherited 5-second default even though focused behavior passes. This is distinct from closed #609, which added a deadline only to the separate fails closed on instruction-cache divergence test.

Repro

git checkout 3375aa7c244ad52aa3c0e2c845cb0e1aaf7035d9
npm test

Environment: Node.js v25.9.0, Fedora Linux. The same exact commit passed protected CI and a prior npm run test:ci, indicating a load-sensitive test-harness deadline rather than a production regression in PR #675.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugflaky-testingTests that have race conditions or fail non-deterministically

    Type

    Fields

    Priority

    Medium

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions