Implementation: What branch name should wrangler send to Cloudflare for prod...

Documentation for Sessions

⚙️ Implementation: What branch name should wrangler send to Cloudflare for prod...

Date: 2026-01-28
Time: 18:48:40 UTC
Session: editor2-73.5
Agent: orchestrator
Confidence: 100%
Status: ✅ Documented


📋 Decision Context

Question:

What branch name should wrangler send to Cloudflare for production deployments?

Task: Fix Cloudflare deploying to Preview instead of Production


🎯 Decision Made

Chosen:

The branch name in wrangler --branch flag MUST match Cloudflare's production branch setting exactly

Options Considered:

  1. --branch=main (traditional)
  2. --branch=deploy/docs (match CF setting)
  3. --branch=production (semantic)

💭 Reasoning

Critical discovery: If Cloudflare production branch is set to "deploy/docs", wrangler must send --branch=deploy/docs. Sending --branch=main (even if logical) results in Preview deployment, not Production. Cloudflare uses exact string matching between the wrangler branch parameter and its production branch setting to determine deployment environment.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation