test(web-e2e): say WHICH subsystem failed when the deep route never serves - #863
Merged
Conversation
…erves
The CI failure on 2026-08-01 reported `last probe: 404 (no Location)` for the
full 180-second budget — the catch-all answered every poll, so the deepest route
never served. That message then blamed the scan, and it cannot know that.
"Never served" has two unrelated causes:
· the SCAN never reached the route — next dev is still walking src/app, a
filesystem-walk problem; or
· the route WAS registered and never compiled or served — a different
subsystem entirely, with the scan exonerated.
The message asserted the first. Reading it sends you through src/app discovery
even when next dev's own route table already listed the route, which is exactly
the wrong-subsystem trip this file elsewhere goes to some length to prevent.
`awaitRouteScan` now returns which of three things it saw and the failure
quotes it: `listed` (registered, still 404 — not the scan), `missing-route`
(the table was being written and this route never appeared — the scan really
did not reach it), or `absent` (no readable types file, so the gate was INERT
and proved nothing either way — stated explicitly, because "the scan was fine"
is the one conclusion an inert gate cannot support).
Read/sleep are injected so all three outcomes are tested without a dev server
or a real clock, and the early-return case is pinned so the gate cannot quietly
start burning its whole budget on success.
⚠️ This does not fix the flake and is not meant to. It converts one ambiguous
timeout into a message that names a subsystem, so the NEXT occurrence is
evidence instead of another guess. Verified by forcing the timeout: the harness
printed `route scan: listed — … so this is not the scan`, which is correct
locally, where the scan completes in well under a second.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BRmGUnxeYsQoG9c8BCZcae
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The CI failure on 2026-08-01 reported
last probe: 404 (no Location)for the full 180s — the catch-all answered every poll, so the deepest route never served. The message then blamed the scan, which it cannot know."Never served" has two unrelated causes:
src/app), orReading the old message sends you through
src/appdiscovery even when next dev's own route table already listed the route.Change
awaitRouteScanreturns which of three things it saw, and the failure quotes it:listedmissing-routeabsentThat last one is stated explicitly because "the scan was fine" is the one conclusion an inert gate can't support.
This does not fix the flake and isn't meant to. It turns one ambiguous timeout into a message that names a subsystem, so the next occurrence is evidence rather than another guess.
Test plan
pnpm lint— 0 fail; real suite 25 passed in 31sroute scan: listed — … so this is not the scan, correct locally🤖 Generated with Claude Code