[miniflare] Restrict dev registry registration to user workers - #15040
Conversation
🦋 Changeset detectedLatest commit: db3a117 The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
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 |
|
Codeowners approval required for this PR:
Show detailed file reviewers |
|
✅ All changesets look good |
|
Confirmed: The PR is well-implemented, well-tested, and correctly scoped. All user-worker instantiation paths are updated, docs and changeset are correct, and I found no logic bugs, security issues, backward-compat violations, or incorrect API behavior. LGTM |
@cloudflare/autoconfig
@cloudflare/build-output-utils
@cloudflare/config
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-functions
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-auth
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
|
Validation result: this does not fix the Windows flake, so #15040 should be judged as the internal-worker collision/churn fix for #15035 only. I reused #15038's harness unchanged in #15041 and ran the
Job: https://github.com/cloudflare/workers-sdk/actions/runs/31017919389/job/92346768939 The difference in raw abort count is too small and noisy to indicate an improvement; the abort remains readily reproducible after the internal registry entries are removed. #15018's Windows skip needs to stay. This rules out the fixed-name internal-worker collisions as the sole trigger, while #15040 still removes those accidental entries and the cross-session registry traffic they cause. |
petebacondarwin
left a comment
There was a problem hiding this comment.
Approved with a few nits.
To be clear this is actually a breaking change for Miniflare, which is allowed because we are in v5 pre-release.
workers-devprod
left a comment
There was a problem hiding this comment.
Codeowners reviews satisfied
Fixes #15035.
This replaces #10411 with a fresh implementation on current
main.Miniflare previously advertised every named worker in the dev registry. That includes internal workers started by the Cloudflare Vite plugin and any external helper workers sharing the Miniflare instance. This adds an opt-in
unsafeRegisterWorkerworker option and enables it only for user-worker paths in Wrangler, the Vite plugin, and platform proxy.The dev registry, cross-process queue, Local Explorer, and compatibility fixture tests now explicitly register the workers that other processes need to discover.
Windows validation using the same harness as #15038 is running in #15041.
A picture of a cute animal (not mandatory, but encouraged)