Skip to content

test(web-e2e): say WHICH subsystem failed when the deep route never serves - #863

Merged
choraria merged 1 commit into
mainfrom
lane/e2e-scan-outcome
Jul 31, 2026
Merged

test(web-e2e): say WHICH subsystem failed when the deep route never serves#863
choraria merged 1 commit into
mainfrom
lane/e2e-scan-outcome

Conversation

@choraria

Copy link
Copy Markdown
Contributor

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:

  • the scan never reached the route (next dev still walking src/app), or
  • the route was registered and never compiled/served — a different subsystem, scan exonerated.

Reading the old message sends you through src/app discovery even when next dev's own route table already listed the route.

Change

awaitRouteScan returns which of three things it saw, and the failure quotes it:

outcome what it means
listed registered and still 404 — not the scan; look at compile/serve
missing-route the table was being written and this route never appeared — the scan really didn't reach it
absent no readable types file, so the gate was inert and proved nothing either way

That last one is stated explicitly because "the scan was fine" is the one conclusion an inert gate can't support.

⚠️ Scope

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 31s
  • 4 unit tests (injected read/sleep) covering all three outcomes plus early return
  • Forced a real timeout: harness printed route scan: listed — … so this is not the scan, correct locally

🤖 Generated with Claude Code

…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
@choraria
choraria merged commit 7214c48 into main Jul 31, 2026
31 checks passed
@choraria
choraria deleted the lane/e2e-scan-outcome branch July 31, 2026 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant