Skip to content

ADR-0022: Production-branch deploy gate — production branch only

Guide

ADR-0022: Production-branch deploy gate — production branch only

  • Status: Accepted · Date: 2026-06-08
  • Supersedes: ADR-0009 (amends the deploy model; the budget-conservation levers in ADR-0009 remain in force)
  • Decider: Principal

Context

ADR-0009 reduced deploy frequency via path-gating and batch-push discipline, but every merge to main that touches portal-relevant content still triggers a Vercel production deploy. As the agent workforce merges PRs in sessions, main is a continuous integration branch — not an intentional deployment event. The distinction between “work is integrated” and “work is deployed” was absent.

The goal is to make a production deploy an explicit, deliberate act — a checkpoint the Principal or an agent consciously reaches — not an automatic consequence of merging.

Decision

Vercel’s Production Branch is changed from main to production. The production branch becomes the deploy gate:

  • main — continuous integration target. CI runs on every push and PR; no Vercel production deploy fires.
  • production — deploy target. A push here is a deliberate checkpoint and triggers the Vercel production build. Normal flow: git push origin main:production at the end of a session or named release boundary.
  • Preview deploys remain disabled (ADR-0009 lever 1; git.deploymentEnabled map in vercel.json).
  • Path-gating (vercel-ignore.sh) remains in force on the production branch to skip builds for non-portal-relevant pushes.

The vercel.json deploymentEnabled map no longer needs to enumerate working branches — preview deploys are off project-wide by default.

Consequences

  • Positive: Deploying is now intentional. A merge to main does not consume a daily deploy credit. The checkpoint = git push origin main:production (or an equivalent explicit step in a release SOP).
  • Cost: The production branch must be created and Vercel’s Production Branch setting updated in the dashboard (Settings → Git → Production Branch → production). This is a one-time browser action; the Vercel CLI is not required.
  • GR-7 update: The rule’s “Merge to main (the only deploy-triggering event)” statement is now false. GR-7 is updated to reflect that deploy trigger = push to production, not merge to main. The batch-merge discipline intent is preserved.
  • CONTRIBUTING.md update: The §“Push deliberately” section is updated to describe the production branch as the deploy gate.
  • vercel.json update: The hardcoded deploymentEnabled branch entry for the working branch is removed; the entry is no longer needed.
  • Milestone tagging: Milestone tags (milestone/*) continue to trigger release.yml (static artifact packaging) and are orthogonal to the deploy gate. A checkpoint deploy and a milestone release may coincide or be separate events.
  • Follow-on: Update deploy runbook (JA-058) and SOP-055 to include git push origin main:production as the deploy step.