Cloudflare Worker Previews: one-command deploys, per-PR URLs, isolated state
dinasaur_404 · x · 2026-09-22
Cloudflare's Worker Previews hands-on flow: requires Wrangler 4.135.0+, a previews block in your config for preview-specific vars, then npx wrangler preview deploys a preview named after your current Git branch—no production deploy needed. Connect Workers Builds to auto-create previews per push with a stable URL on each PR; every deployment also gets an immutable URL for exact-version review.
Related details:
- Isolation: each Preview automatically provisions its own Durable Objects namespace/storage and container app/instances, so state changes, migrations, sessions, and concurrent tests stay scoped; KV/D1/R2 bind by id/name and share data unless rebound
- Config model: previews don't inherit production settings—define a Base previews block on main with shared secrets, override per-branch (different database or test API key); Base secret changes only affect new Previews
The point: give AI agents a full isolated production-like environment for every change, enabling end-to-end verification.
More from coding & agent
- Ten wild Gemini 4 Carbon demos in 24 hours: CUDA meadows, V8 engines, mech stomps — socialwithaayan · 2026-11-12
- How to cut Fable 5.2 token costs by 90%: Arc routing plus a lean CLAUDE.md — EXM7777 · 2026-11-12
- Hamel Husain's complete AI evals framework for PMs and engineers — aakashgupta · 2026-11-12
- AI coding in one year: from unusable to full automation with no code review — angelaqdai · 2026-11-12
- Interactions Tool Searches Web Animations by Motion for Claude Code to Rebuild — yuwen_lu_ · 2026-11-12
- Agent Substrate Calculator Estimates Session Resume Speed Under Load — pjausovec · 2026-11-12