Flaky front test: router.test.tsx "brings a Player back to a Room they left" #360

Closed
opened 2026-10-11 15:32:47 +00:00 by root · 1 comment
root commented 2026-10-11 15:32:47 +00:00 (Migrated from gitlab.core-project.space)

Imported from GitHub amaurycoudr/chess-project#360, opened by @amaurycoudr on 2026-10-11 15:32 UTC.
Closed on GitHub on 2026-10-11 16:00 UTC as not planned.


What happens

In CI, apps/front/src/app/router.test.tsx › "router smoke test — leaving a Room" › "brings a Player back to a Room they left without a glimpse of the Seat they gave up" fails intermittently:

AssertionError: expected 1 to be +0 // Object.is equality

The same log shows [ORPCError: Internal Server Error] and Warning: Error in route match: /room/$code/room/ABC123 just before the failure.

Where seen

Cost

A manual rerun each time it hits; this one held the PR for about 4 minutes.

Expected

The test passes or fails deterministically. The assertion that counts a glimpse of the given-up Seat likely races a render or a pending query; reproduce by looping the test (--repeat / sharded runs) before fixing.

> _Imported from GitHub [amaurycoudr/chess-project#360](https://github.com/amaurycoudr/chess-project/issues/360), opened by [@amaurycoudr](https://github.com/amaurycoudr) on 2026-10-11 15:32 UTC._ > _Closed on GitHub on 2026-10-11 16:00 UTC as not planned._ <!-- github-issue:360 --> --- ## What happens In CI, `apps/front/src/app/router.test.tsx` › "router smoke test — leaving a Room" › "brings a Player back to a Room they left without a glimpse of the Seat they gave up" fails intermittently: ``` AssertionError: expected 1 to be +0 // Object.is equality ``` The same log shows `[ORPCError: Internal Server Error]` and `Warning: Error in route match: /room/$code/room/ABC123` just before the failure. ## Where seen - CI run https://github.com/amaurycoudr/chess-project/actions/runs/38141063949, attempt 1, job `test (front, shard 1/3)`, on `feat/game-status-326`. Attempt 2 passed with no code change, so it is a flake, not a regression. ## Cost A manual rerun each time it hits; this one held the PR for about 4 minutes. ## Expected The test passes or fails deterministically. The assertion that counts a glimpse of the given-up Seat likely races a render or a pending query; reproduce by looping the test (`--repeat` / sharded runs) before fixing.
root commented 2026-10-11 16:00:12 +00:00 (Migrated from gitlab.core-project.space)

Imported from a GitHub comment by @amaurycoudr on 2026-10-11 16:00 UTC.

Closing: could not reproduce. The failure is at router.test.tsx:297 (theLeaveIsAnswered: queryClient.isMutating() still 1 after waitFor's 1s timeout), not the orientation assertion; the ORPCError / route-match lines in the log come from the earlier 'leaves any other failure to the router' test and are unrelated. No failures in 100x repeats with jittered RPC latency, 4x/8x Chromium CPU throttling, whole-file loops, or cold-cache runs of shard 1/3. One hit in the last 100 CI runs. Reopen with the failing job's log if it recurs.

> _Imported from a [GitHub comment](https://github.com/amaurycoudr/chess-project/issues/360#issuecomment-6110886383) by [@amaurycoudr](https://github.com/amaurycoudr) on 2026-10-11 16:00 UTC._ <!-- github-comment:6110886383 --> Closing: could not reproduce. The failure is at router.test.tsx:297 (theLeaveIsAnswered: queryClient.isMutating() still 1 after waitFor's 1s timeout), not the orientation assertion; the ORPCError / route-match lines in the log come from the earlier 'leaves any other failure to the router' test and are unrelated. No failures in 100x repeats with jittered RPC latency, 4x/8x Chromium CPU throttling, whole-file loops, or cold-cache runs of shard 1/3. One hit in the last 100 CI runs. Reopen with the failing job's log if it recurs.
root (Migrated from gitlab.core-project.space) closed this issue 2026-10-11 16:00:12 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amaurycoudr/chess-project#360
No description provided.