Skip to content

[services] frontend + backend routing bugfixes#15018

Merged
ricardo-agz merged 30 commits intomainfrom
ricardo/vite-fix-plus-e2e-fixtures
Feb 12, 2026
Merged

[services] frontend + backend routing bugfixes#15018
ricardo-agz merged 30 commits intomainfrom
ricardo/vite-fix-plus-e2e-fixtures

Conversation

@ricardo-agz
Copy link
Copy Markdown
Contributor

@ricardo-agz ricardo-agz commented Feb 11, 2026

Fixes a few issues relating to Next.js/Vite + FastAPI project routing

  • Fixes issue where if you have a Vite app mounted at the root + a Next.js app mounted at /dashboard and you ping a route like: /dashboard/nonexistent-route, it falls back to Vite's index.html instead of Next.js's 404
  • Moves service functions to an internal _svc namespace to prevent an issue where hitting /backend would be handled by FastAPI instead of Next.js 404
  • Also adds a few e2e fixture tests for services
  • Moves some helper functions like normalizeRoutePrefix() to routing-utils

Warning

High Risk Change

This PR fixes routing bugs by scoping service routes with ownership guards and moving function outputs to a reserved internal namespace, which are infrastructure-level routing changes that could affect request handling across services.

  • Removes isRouteOwningBuilder condition, applying route scoping to all builders
  • Adds reserved /_svc prefix validation and internal function path namespace
  • Modifies route source generation with ownership guards to prevent cross-service route capture

Risk assessment for commit b25567b.

@ricardo-agz ricardo-agz requested review from a team, agadzik, chloetedder and ijjk as code owners February 11, 2026 23:59
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Feb 11, 2026

🦋 Changeset detected

Latest commit: b25567b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@vercel/fs-detectors Patch
@vercel/routing-utils Patch
vercel Patch
@vercel/client Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ricardo-agz ricardo-agz marked this pull request as draft February 12, 2026 00:02
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 12, 2026

📦 CLI Tarball Ready

The Vercel CLI tarball for this PR is now available!

Quick Test

You can test this PR's CLI directly by running:

npx https://vercel-9ewuj9pp7.vercel.sh/tarballs/vercel.tgz --help

Use in vercel.json

To use this CLI version in your project builds, add to your vercel.json:

{
  "build": {
    "env": {
      "VERCEL_CLI_VERSION": "vercel@https://vercel-9ewuj9pp7.vercel.sh/tarballs/vercel.tgz"
    }
  }
}

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 12, 2026

🧪 Unit Test Strategy

Comparing: a960cf2b25567b (view diff)

Strategy: Affected packages only

✅ Only testing packages that have been modified or depend on modified packages.

Affected packages - 40 (100%)
  1. @vercel-internals/get-package-json
  2. @vercel/backends
  3. @vercel/build-utils
  4. @vercel/cervel
  5. @vercel/cli-auth
  6. @vercel/client
  7. @vercel/config
  8. @vercel/detect-agent
  9. @vercel/edge
  10. @vercel/elysia
  11. @vercel/error-utils
  12. @vercel/express
  13. @vercel/fastify
  14. @vercel/firewall
  15. @vercel/frameworks
  16. @vercel/fs-detectors
  17. @vercel/functions
  18. @vercel/gatsby-plugin-vercel-builder
  19. @vercel/go
  20. @vercel/h3
  21. @vercel/hono
  22. @vercel/hydrogen
  23. @vercel/koa
  24. @vercel/nestjs
  25. @vercel/next
  26. @vercel/node
  27. @vercel/oidc
  28. @vercel/oidc-aws-credentials-provider
  29. @vercel/python
  30. @vercel/python-analysis
  31. @vercel/redwood
  32. @vercel/related-projects
  33. @vercel/remix-builder
  34. @vercel/routing-utils
  35. @vercel/ruby
  36. @vercel/rust
  37. @vercel/static-build
  38. @vercel/static-config
  39. examples
  40. vercel

Results

  • Unit tests: Only affected packages will run unit tests
  • E2E tests: Handled separately (Version Packages PRs or run-e2e-tests label)
  • Type checks: Only affected packages will run type checks

This comment is automatically generated based on the affected testing strategy

@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​docusaurus/​preset-classic@​3.9.2991007098100
Addednpm/​@​docusaurus/​core@​3.9.2981007598100

View full report

Copy link
Copy Markdown
Contributor

@brookemosby brookemosby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ricardo-agz ricardo-agz merged commit 3cd0b55 into main Feb 12, 2026
473 of 479 checks passed
@ricardo-agz ricardo-agz deleted the ricardo/vite-fix-plus-e2e-fixtures branch February 12, 2026 21:01
mehulkar pushed a commit that referenced this pull request Feb 13, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and publish to npm
yourself or [setup this action to publish
automatically](https://github.com/changesets/action#with-publishing). If
you're not ready to do a release yet, that's fine, whenever you add more
changesets to main, this PR will be updated.


# Releases
## vercel@50.17.0

### Minor Changes

- Install builder packages on demand
([#15023](#15023))

- Display functions exceeding 250MB uncompressed size limit with total
size and breakdown of largest dependencies (requires environment
variable VERCEL_ANALYZE_BUILD_OUTPUT=1).
([#14067](#14067))

### Patch Changes

- Add `--format=json` option to `vercel integration list` and show
project name in table header when results are scoped to a project
([#15007](#15007))

- Fix builder import resolution from pre-installed depenencies
([#15041](#15041))

- Services routing improvements:
([#15018](#15018))

- Fix route ownership scoping so parent service catch-alls (e.g. Vite
SPA fallback) don't capture sibling service prefixes
- Move shared ownership-guard helpers (`getOwnershipGuard`,
`scopeRouteSourceToOwnership`) to `@vercel/routing-utils`
- Place runtime service function outputs under internal
`/_svc/<service>/index` namespace to prevent filesystem path leakage
    -   Block `/_svc` as a reserved routePrefix in service validation
- Scope all builder-emitted routes (not just route-owning builders) to
their service ownership before merging

-   Updated dependencies \[]:
    -   @vercel/static-build@2.8.37
    -   @vercel/build-utils@13.4.0
    -   @vercel/next@4.15.28
    -   @vercel/redwood@2.4.9
    -   @vercel/rust@1.0.5

## @vercel/client@17.2.41

### Patch Changes

- Updated dependencies
\[[`3cd0b559f1815fdb13f7aa05114bae2b0b0b0e68`](3cd0b55)]:
    -   @vercel/routing-utils@5.3.3
    -   @vercel/build-utils@13.4.0

## @vercel/fs-detectors@5.8.6

### Patch Changes

- Services routing improvements:
([#15018](#15018))

- Fix route ownership scoping so parent service catch-alls (e.g. Vite
SPA fallback) don't capture sibling service prefixes
- Move shared ownership-guard helpers (`getOwnershipGuard`,
`scopeRouteSourceToOwnership`) to `@vercel/routing-utils`
- Place runtime service function outputs under internal
`/_svc/<service>/index` namespace to prevent filesystem path leakage
    -   Block `/_svc` as a reserved routePrefix in service validation
- Scope all builder-emitted routes (not just route-owning builders) to
their service ownership before merging

- Updated dependencies
\[[`3cd0b559f1815fdb13f7aa05114bae2b0b0b0e68`](3cd0b55)]:
    -   @vercel/routing-utils@5.3.3
    -   @vercel/frameworks@3.17.1

## @vercel/routing-utils@5.3.3

### Patch Changes

- Services routing improvements:
([#15018](#15018))

- Fix route ownership scoping so parent service catch-alls (e.g. Vite
SPA fallback) don't capture sibling service prefixes
- Move shared ownership-guard helpers (`getOwnershipGuard`,
`scopeRouteSourceToOwnership`) to `@vercel/routing-utils`
- Place runtime service function outputs under internal
`/_svc/<service>/index` namespace to prevent filesystem path leakage
    -   Block `/_svc` as a reserved routePrefix in service validation
- Scope all builder-emitted routes (not just route-owning builders) to
their service ownership before merging


<!-- VADE_RISK_START -->
> [!NOTE]
> Low Risk Change
>
> This PR is an automated Changesets release that only updates version
numbers in package.json files and adds changelog entries - no source
code changes are present.
> 
> - Deletes changeset markdown files after consuming them
> - Bumps version numbers in 4 package.json files
> - Adds changelog entries documenting previous changes
>
> <sup>Risk assessment for [commit
9186d29](https://github.com/vercel/vercel/commit/9186d293adee9d555b8582f5c1d0cec87689acf1).</sup>
<!-- VADE_RISK_END -->

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants