Repository navigation
fix(platform): preserve immutable cached asset responses - #334
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7e13837dbe
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Brooooooklyn
enabled auto-merge (squash)
September 22, 2026 14:01
Brooooooklyn
disabled auto-merge
September 22, 2026 14:10
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.
Problem
After a platform rollout, existing projects can return HTTP 500 for cached hashed assets without an application redeploy. Commit 5c0b5ba added a header deletion in
finalizeAsset, but Cloudflare Cache API responses have immutable headers. When no header rule matches,applyHeaderRulesreturns that original response and the deletion throwsCan't modify immutable headers.The actual dispatcher reproduces this in Miniflare/workerd: the first request returns 200, then cache hits return 500. This matches the affected
voidzero.devrouting and reported recovery after platform rollback; historical incident logs were unavailable, so incident attribution remains based on the reproduction and configuration.Change
Remove the internal shared-cache marker from the writable client response already constructed by
meter. Preserve the marker in the stored cache entry and avoid modifying the immutable cached response.Add real Workers Cache API regressions under
platform/packages/dispatch/test/runtime/, covering absent, unmatched, and matched header rules. Each verifies repeated cache hits, unchanged origin request counts, response content and caching headers, and removal of the internal marker. The existing mutable response mocks did not expose this failure.The regressions run in the existing
platform-unitproject and Platform CI. The dispatch typecheck command checks the Node-based runtime harness separately from the Worker source to keep their global types isolated.Validation
vp test run --project 'platform-*' platform/packages/dispatch/test/runtime/asset-cache.test.tsalso passes all three runtime cases at their final location.20260913054327_elite_betty_ross.sql.vp run checkremains blocked by a missing compiler dependency in the ignored localplayground-local/deploy-verifyapp. This blocker is outside the changed code.No production deployment or app redeployment was performed.