Repository navigation
fix(deploy): upload the same Worker exports as cf when secrets are pinned - #487
Merged
Merged
Conversation
Member
Author
|
@codex review |
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. |
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://fix-cf-pinned-exports-shape-void-cloud.voidzero-docs.workers.dev (commit 564e90e)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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
force-pushed
the
fix/cf-pinned-exports-shape
branch
from
October 19, 2026 04:00
d2654a4 to
1c71aab
Compare
cpojer
approved these changes
Oct 19, 2026
Merge activity
|
…nned (#487) Fixes #460 ## Problem ``` 1. void deploy cf workers versions create --prebuilt DO export: {type:"durable-object", storage:"sqlite"} 2. void secret put PUT /scripts/{w}/secrets → Cloudflare copies v1 → 100% 3. void deploy live version has a secret → Void's pinned uploader DO export: {type, storage, state:"created"} ← differs preview_urls:false → stage [v2 @100%, v3 @0%] → 100405 "versions must declare identical exports" ``` The first secret on a Worker moves `void deploy` from cf's uploader to Void's pinned-secret uploader (`cf-version-runner.ts`), and the two wrote `exports` differently: - Void added `state: "created"` to live Durable Object classes; cf leaves it out. - Void kept Build Output order; cf sends Worker entrypoints, then Durable Objects, then Workflows. - Void kept `container` on legacy-kv classes and sent `{}` for no exports; cf drops both. With `preview_urls: false`, Void checks a new version by staging it at 0% beside the live one. Cloudflare only splits traffic between versions with identical `exports`, so every retry failed. ## Fix - `exportsFromOutput` keeps its checks, then builds the entries with `@cloudflare/config`'s `convertToWranglerConfig` (the converter cf uses) and orders and trims them like cf's `resolveExportsUploadPayload` (Workflows stay identity-only, as before). - On 100405 during staging, the error now says the versions declare different exports and suggests one `void deploy --platform cloudflare --atomic`. "Production traffic is unchanged" stays. - The touched 10210 hint check uses `includes` instead of a regex. **Note:** a Worker whose live version was already uploaded by the old pinned path (with `state: "created"`) may hit 100405 once more; the new hint tells the user to run `--atomic` once. ## Tests | Test | Old code | Fix | |---|---|---| | `uploads the same exports as cf for the same Build Output`: runs the real `cf` against a fake API and compares its upload with the pinned upload (key order counts) | fail | pass | | `converts Container and transfer exports as cf does`: expectation built from `convertToWranglerConfig` so cf drift shows up | fail | pass | | Updated locked shapes (live secrets ×2, Sandbox lifecycle ×6) | fail | pass | | `suggests one atomic publication when the versions declare different exports` | fail | pass | `cf-version-runner.test.ts` + `cloudflare-deploy.test.ts`: 545 passed. Typecheck, lint, format clean. Not run against a real Cloudflare account. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
graphite-app
Bot
force-pushed
the
fix/cf-pinned-exports-shape
branch
from
October 19, 2026 05:33
1c71aab to
564e90e
Compare
This branch was successfully deployed
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.
Fixes #460
Problem
The first secret on a Worker moves
void deployfrom cf's uploader to Void's pinned-secret uploader (cf-version-runner.ts), and the two wroteexportsdifferently:state: "created"to live Durable Object classes; cf leaves it out.containeron legacy-kv classes and sent{}for no exports; cf drops both.With
preview_urls: false, Void checks a new version by staging it at 0% beside the live one. Cloudflare only splits traffic between versions with identicalexports, so every retry failed.Fix
exportsFromOutputkeeps its checks, then builds the entries with@cloudflare/config'sconvertToWranglerConfig(the converter cf uses) and orders and trims them like cf'sresolveExportsUploadPayload(Workflows stay identity-only, as before).void deploy --platform cloudflare --atomic. "Production traffic is unchanged" stays.includesinstead of a regex.Note: a Worker whose live version was already uploaded by the old pinned path (with
state: "created") may hit 100405 once more; the new hint tells the user to run--atomiconce.Tests
uploads the same exports as cf for the same Build Output: runs the realcfagainst a fake API and compares its upload with the pinned upload (key order counts)converts Container and transfer exports as cf does: expectation built fromconvertToWranglerConfigso cf drift shows upsuggests one atomic publication when the versions declare different exportscf-version-runner.test.ts+cloudflare-deploy.test.ts: 545 passed. Typecheck, lint, format clean. Not run against a real Cloudflare account.🤖 Generated with Claude Code