Skip to content

fix(one): run +not-found middleware for static-looking probes#712

Merged
natew merged 1 commit into
mainfrom
fix/static-probe-middleware
May 26, 2026
Merged

fix(one): run +not-found middleware for static-looking probes#712
natew merged 1 commit into
mainfrom
fix/static-probe-middleware

Conversation

@natew

@natew natew commented May 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • CI failure on main (tests/middleware.test.ts > Middleware > middleware runs even on not found routes) was caused by the previous +not-found static-probe shortcut bailing to null before middleware ran.
  • Now the shortcut still bypasses the page render, but routes through runMiddlewares first when the matched +not-found has middleware — middleware can intercept (e.g. JSON 404), otherwise we return a bare 404 instead of SSR'ing the not-found page.
  • Routes with no middleware still get the cheap return null path so the unit test for sourcemap probes is unaffected.

Test plan

  • packages/one vitest passes (20/20 in createHandleRequest, 518/574 overall)
  • CI: full tests/test dev + prod suites green (the integration middleware test was the failure)

@railway-app railway-app Bot temporarily deployed to onestack.dev / one-pr-712 May 26, 2026 07:59 Destroyed
@railway-app

railway-app Bot commented May 26, 2026

Copy link
Copy Markdown

🚅 Deployed to the one-pr-712 environment in onestack.dev

Service Status Web Updated (UTC)
one ✅ Success (View Logs) Web May 26, 2026 at 8:02 am

@natew natew added this pull request to the merge queue May 26, 2026
@natew natew removed this pull request from the merge queue due to a manual request May 26, 2026
@natew natew merged commit 0737160 into main May 26, 2026
3 checks passed
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