Skip to content

Flaky server-unit 404s under full-suite runs: routes intermittently unmounted #6837

Description

@bokelley

Two distinct server unit tests have failed precommit full-suite runs today with the same signature — an HTTP route test that expects a real status gets 404, and the same file passes in isolation:

  • server/tests/unit/registry-brand-setup-route.test.ts > rejects unsafe logo URL — expected 400, got 404 (passes 22/22 alone)
  • server/tests/unit/slack-webhook-signature-gate.test.ts > answers only valid signed URL verification challenges — expected 200, got 404 (passes 13/13 alone)

Both under vitest run of the full server-unit suite (~434 files / 6.1k tests), different test each occurrence, ~2 of 4 full-suite runs affected on one machine today. The 404 shape suggests order-dependent route mounting or shared app/server state across test files (a race in app construction or a file that tears down/replaces the router), not assertion drift.

Impact: intermittent precommit/CI failures on unrelated diffs (hit repeatedly while landing PR #6549's docs-only changes).

Repro attempt: npx vitest run --dir server/tests/unit --pool=threads in a loop; failures are probabilistic.

No workaround applied — flagging for triage per the file-issues-for-workarounds policy. Removal criterion: 20 consecutive full-suite runs with no 404-flake.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingclaude-triagedIssue has been triaged by the Claude Code triage routine. Remove to re-triage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions