feat(cache): deploy probed manifests in two stages - #3093
Open
james-elicx wants to merge 15 commits into
Open
Conversation
commit: |
Contributor
Performance benchmarksCompared 0 improved · 0 regressed · 6 within ±1.5%
View detailed results and traces 🟢 improvement · 🔴 regression · ⚫ change below 1.5% · paired base/head |
Contributor
|
james-elicx
force-pushed
the
codex/cacheability-two-stage-deploy
branch
from
August 26, 2026 14:45
5f0f93a to
86bfd1d
Compare
james-elicx
force-pushed
the
codex/cacheability-two-stage-deploy
branch
from
August 26, 2026 17:14
86bfd1d to
d8edfb7
Compare
james-elicx
force-pushed
the
codex/cacheability-two-stage-deploy
branch
from
August 26, 2026 17:18
d8edfb7 to
88ecf0f
Compare
james-elicx
force-pushed
the
codex/cacheability-two-stage-deploy
branch
from
August 26, 2026 18:01
88ecf0f to
a015349
Compare
james-elicx
changed the base branch from
codex/cacheability-manifest-admission
to
codex/cacheability-use-cache-ownership
August 26, 2026 18:05
james-elicx
force-pushed
the
codex/cacheability-two-stage-deploy
branch
from
August 26, 2026 18:29
a015349 to
5b19e9d
Compare
james-elicx
force-pushed
the
codex/cacheability-two-stage-deploy
branch
from
August 26, 2026 19:33
5b19e9d to
3b67854
Compare
james-elicx
force-pushed
the
codex/cacheability-two-stage-deploy
branch
from
August 26, 2026 19:42
3b67854 to
b94677e
Compare
james-elicx
force-pushed
the
codex/cacheability-two-stage-deploy
branch
from
August 26, 2026 22:22
b94677e to
3ac792c
Compare
james-elicx
force-pushed
the
codex/cacheability-two-stage-deploy
branch
from
August 26, 2026 22:31
3ac792c to
e1f432b
Compare
Member
Author
|
/bigbonk review for issues. Hard time limit: 20 minutes; return all findings or a partial review by then. |
Contributor
|
@james-elicx Bonk workflow was cancelled. View workflow run · To retry, trigger Bonk again. |
james-elicx
force-pushed
the
codex/cacheability-two-stage-deploy
branch
from
August 27, 2026 00:43
26f6ed1 to
3ad2c96
Compare
james-elicx
force-pushed
the
codex/cacheability-two-stage-deploy
branch
from
August 27, 2026 00:58
3ad2c96 to
aba8b6f
Compare
james-elicx
force-pushed
the
codex/cacheability-two-stage-deploy
branch
2 times, most recently
from
August 27, 2026 01:24
47d046b to
68e846a
Compare
james-elicx
force-pushed
the
codex/cacheability-two-stage-deploy
branch
from
August 27, 2026 01:41
68e846a to
6668f7c
Compare
james-elicx
force-pushed
the
codex/cacheability-two-stage-deploy
branch
from
August 27, 2026 01:50
6668f7c to
03d5e5e
Compare
james-elicx
marked this pull request as ready for review
August 27, 2026 08:09
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.
Capability stack 6/9. Exact head:
03d5e5edf7fa831c68e110ec96a00c1af21f12e6. Base: #3103.Full chain: #3108 → #3090 → #3091 → #3092 → #3103 → #3093 → #3094 → #3098 → #3113.
Summary
Implement the two-upload deployment protocol:
A valid empty manifest is also deployed: zero-discovered and all-dynamic applications upload the final fail-closed Worker, skip warming, and either promote it or leave it staged when
--warm-cdn-no-promoteis set.The normal flow makes one final cache-fill request per admitted identity. It does not perform certification or a second fill request; #3094 adds that only behind
--warm-cdn-certify.Deployment-state safety
wrangler versions deploythrows after Cloudflare created the deployment but failed while synchronizing settings, the CLI immediately re-reads state and reports whether the requested stage/promotion happened, the prior state remains, or the outcome is unknown--warm-cdn-no-promoteand post-stage failures apply production triggers exactly once; the help text explicitly states that no-promote leaves those triggers applied while the old version remains at 100%Remaining concurrency boundary
Cloudflare's create-deployment API and Wrangler expose no ETag,
If-Match, expected deployment ID, or other compare-and-swap precondition. Deployment-ID checks close observable long windows, but cannot make the final status-read → deployment-POST pair atomic. Deploy pipelines for the same Worker must therefore be serialized; a separate writer racing inside that final API-call window can still overwrite state, as it can with ordinarywrangler versions deploy.Artifact model
The manifest is an ESM module included in the second Worker upload. It is not an environment, service, KV, or static-assets binding. The original build directory is not mutated; an isolated copy replaces only
__vinext_cacheability_manifest.js.Application code is not rebuilt between uploads. Dynamic identities are represented by absence and are neither embedded nor rendered again during final warming.
Review guide
packages/cloudflare/src/cacheability-probe.tssends authenticated version-pinned probes, cancels stale bodies, and emits a deterministic static-only result.packages/cloudflare/src/cacheability-artifact.tsvalidates module reachability and enforces route/byte bounds.packages/cloudflare/src/deploy.tsowns probe upload → final upload → static-only warm → promotion, deployment identity checks, and post-command reconciliation.packages/cloudflare/src/version-deploy.tsparses Wrangler's deployment ID and traffic state.tests/cloudflare-cdn-warm-deploy.test.tsproves mixed filtering, fail-closed orchestration, no-promote behavior, concurrent-state rejection, and all reconciled failure outcomes.Review size
Layer-only diff against this PR's base: 28 files, +2,888/-119.
Validation
--warm-cdn-no-promoteempty-manifest flows are coveredvp checkandgit diff --check