01 / DECISION
When this primitive earns a place
Cloudflare now tells new projects to start with Workers, so make the review loop Workers-native: one Preview per branch, promoted to production only after it has been exercised.
02 / ARCHITECTURE
Build the smallest defensible path
Declare Preview variables, bindings, and settings in the previews block of the Wrangler configuration, apply secrets with Wrangler commands, bind KV, D1, and R2 to separate resources, then run wrangler preview or let Workers Builds create the Preview from the pull request.
- 01Name the contract
Cloudflare now tells new projects to start with Workers, so make the review loop Workers-native: one Preview per branch, promoted to production only after it has been exercised.
- 02Add one primitive
Declare Preview variables, bindings, and settings in the previews block of the Wrangler configuration, apply secrets with Wrangler commands, bind KV, D1, and R2 to separate resources, then run wrangler preview or let Workers Builds create the Preview from the pull request.
- 03Capture failure evidence
Send real traffic to the Preview URL, read the logs, errors, metrics, and traces that belong to that Preview, confirm the stable URL picked up the last push, and check that the Preview wrote only to its own bound resources before promoting.
03 / REPRODUCE
Evidence before confidence
Send real traffic to the Preview URL, read the logs, errors, metrics, and traces that belong to that Preview, confirm the stable URL picked up the last push, and check that the Preview wrote only to its own bound resources before promoting.
npx wrangler preview # requires Wrangler 4.135.0 or later 04 / BOUNDARY
The production boundary
Cloudflare provisions a separate Durable Object namespace and container instances for every Preview, but account-level resources such as KV, D1, and R2 are isolated only when you bind each Preview to its own resource. Preview URLs are public unless Cloudflare Access is placed in front, and each Worker is capped at 100 Previews on Free and 500 on Paid, with the oldest deleted automatically.
05 / FIRST-PARTY SOURCES
Keep first-party sources authoritative
Product behavior, limits, pricing, and availability can change. Re-check these sources before acting.