Skip to content

[vite-plugin] Fix cloudflare:node server dispatch in Vite and Vitest - #15637

Closed
petebacondarwin wants to merge 4 commits into
mainfrom
fix/vite-runner-port-scope
Closed

[vite-plugin] Fix cloudflare:node server dispatch in Vite and Vitest#15637
petebacondarwin wants to merge 4 commits into
mainfrom
fix/vite-runner-port-scope

Conversation

@petebacondarwin

@petebacondarwin petebacondarwin commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Related to cloudflare/workerd#7306.

Paired runtime change: cloudflare/workerd#7352

This draft fixes cloudflare:node HTTP server dispatch in the Vite and Vitest integrations after Node virtual port tables became Durable Object instance-scoped.

Both integrations evaluate user modules inside pinned synthetic runner Durable Objects, but invoke exported handlers from their real I/O contexts. Servers created during module evaluation were consequently registered in the runner actor's table and could not be found by httpServerHandler() during dispatch. Miniflare now exposes the paired workerd namespace option, and each internal runner service opts in only its explicitly named "singleton" actor. Other actor IDs retain their normal isolated port tables.

The branch includes the two dependency-update commits from #15633, because the workerd 1.20260914.1 update exposed the regression. Keeping them here lets the runtime update and compatibility fix land atomically; this draft does not close #15633.

Important

This remains blocked on a workerd release containing the paired runtime PR. With the currently pinned 1.20260914.1 binary, the new schema field is ignored and the two integration regressions fail with the expected missing-port error. Before this is ready to merge, update the pin to the first fixed workerd release and regenerate Miniflare's Cap'n Proto types.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: this is an internal runner/runtime configuration detail with no new user-facing API.

Focused coverage includes Miniflare option conversion and serialization, the existing Vite playground regression, and a new Vitest SELF.fetch() regression using httpServerHandler().

dependabot Bot and others added 3 commits September 14, 2026 06:06
Bumps the workerd-and-workers-types group with 2 updates: [@cloudflare/workers-types](https://github.com/cloudflare/workerd) and [workerd](https://github.com/cloudflare/workerd).


Updates `@cloudflare/workers-types` from 4.20260702.1 to 5.20260914.1
- [Release notes](https://github.com/cloudflare/workerd/releases)
- [Changelog](https://github.com/cloudflare/workerd/blob/main/RELEASE.md)
- [Commits](https://github.com/cloudflare/workerd/commits)

Updates `workerd` from 1.20260911.1 to 1.20260914.1
- [Release notes](https://github.com/cloudflare/workerd/releases)
- [Changelog](https://github.com/cloudflare/workerd/blob/main/RELEASE.md)
- [Commits](cloudflare/workerd@v1.20260911.1...v1.20260914.1)

---
updated-dependencies:
- dependency-name: "@cloudflare/workers-types"
  dependency-version: 5.20260914.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: workerd-and-workers-types
- dependency-name: workerd
  dependency-version: 1.20260914.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: workerd-and-workers-types
...

Signed-off-by: dependabot[bot] <support@github.com>
The following dependency versions have been updated:

| Dependency                | From          | To            |
| ------------------------- | ------------- | ------------- |
| @cloudflare/workers-types | ^5.20260911.1 | ^5.20260914.1 |
| workerd                   | 1.20260911.1  | 1.20260914.1  |
@changeset-bot

changeset-bot Bot commented Sep 14, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 622e6e9

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

This PR includes changesets to release 8 packages
Name Type
miniflare Minor
wrangler Patch
@cloudflare/vite-plugin Patch
@cloudflare/vitest-plugin Patch
@cloudflare/deploy-helpers Patch
@cloudflare/pages-shared Patch
@cloudflare/remote-bindings Patch
@cloudflare/runtime-types 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

@pkg-pr-new

pkg-pr-new Bot commented Sep 14, 2026

Copy link
Copy Markdown
@cloudflare/autoconfig

npm i https://pkg.pr.new/@cloudflare/autoconfig@15637

@cloudflare/build-output-utils

npm i https://pkg.pr.new/@cloudflare/build-output-utils@15637

@cloudflare/codemods

npm i https://pkg.pr.new/@cloudflare/codemods@15637

@cloudflare/config

npm i https://pkg.pr.new/@cloudflare/config@15637

@cloudflare/containers-shared

npm i https://pkg.pr.new/@cloudflare/containers-shared@15637

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@15637

@cloudflare/deploy-helpers

npm i https://pkg.pr.new/@cloudflare/deploy-helpers@15637

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@15637

miniflare

npm i https://pkg.pr.new/miniflare@15637

@cloudflare/pages-functions

npm i https://pkg.pr.new/@cloudflare/pages-functions@15637

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@15637

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@15637

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@15637

@cloudflare/vitest-plugin

npm i https://pkg.pr.new/@cloudflare/vitest-plugin@15637

@cloudflare/workers-auth

npm i https://pkg.pr.new/@cloudflare/workers-auth@15637

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@15637

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@15637

wrangler

npm i https://pkg.pr.new/wrangler@15637

commit: 622e6e9

@ask-bonk

ask-bonk Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

@petebacondarwin Bonk workflow was cancelled.

View workflow run · To retry, trigger Bonk again.

@petebacondarwin

Copy link
Copy Markdown
Contributor Author

I think that this will not be needed once cloudflare/workerd#7357 lands.
Closing for now.
Will follow up in the workerd bump PR once the fix arrives.

@github-project-automation github-project-automation Bot moved this from Untriaged to Done in workers-sdk Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants