fix(cloudflare): verify Worker version IDs during CDN warmup - #3072
Merged
james-elicx merged 9 commits intoAug 24, 2026
Merged
Conversation
commit: |
Contributor
Performance benchmarksCompared 0 improved · 1 regressed · 5 within ±1.5%
View detailed results and traces 🟢 improvement · 🔴 regression · ⚫ change below 1.5% · paired base/head |
Contributor
|
james-elicx
marked this pull request as ready for review
August 24, 2026 21:32
james-elicx
marked this pull request as draft
August 24, 2026 21:33
james-elicx
marked this pull request as ready for review
August 24, 2026 21:37
james-elicx
marked this pull request as draft
August 24, 2026 22:02
stack merge was automatically disabled
August 24, 2026 22:02
Pull request was converted to draft
james-elicx
marked this pull request as ready for review
August 24, 2026 22:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Cache-Control: no-cacheorPragma: no-cacheX-Vinext-Expected-Worker-Versionassertion alongside Cloudflare's version override during staged warmupCdnCacheAdapter.validateRequest(request)hook which App and Pages Worker entries invoke before application routingCloudflare-Workers-Version-Overridesdictionaries that do not carry vinext's assertion--warm-cdn-strict--dangerously-promote-on-cdn-warm-erroras the explicit escape hatch which may promote after failed staged readiness/warmup and retry unresolved paths after promotionCF_VERSION_METADATA, customizable withcdnAdapter({ versionMetadataBinding: "CUSTOM_VERSION" })version_metadataduringvinext init --platform=cloudflare, preserving custom binding names; Wrangler named environments remain user-managed and must repeat this non-inheritable bindingRuntime flow
Cloudflare-Workers-Version-OverridesandX-Vinext-Expected-Worker-Versionwith the uploaded version ID.env[versionMetadataBinding].id.503withCache-Control: no-store, preventing the wrong Worker invocation from rendering or populating cache.Ordinary requests and version-override dictionaries intended only for downstream Workers are unaffected.
Configuration
Default init output:
Custom binding:
Wrangler does not inherit
version_metadatainto named environments. Repeat the same binding under everyenv.<name>used for CDN warmup.Dangerous fallback:
Regression coverage
Validation
vp checkpassed with no formatting, lint, or type errorsvp run vinext#buildvp run @vinext/cloudflare#buildvp run workers-cache#build; emitted Worker contains the version assertion validator and version metadata bindingThis is Cloudflare deployment and cache orchestration; there is no equivalent Next.js behavior to port.
Stacked on #3057.