Workflows
Feature Flag Rollout Workflow
Decouple code merge from user exposure by rolling features out gradually behind flags, reducing one-shot release risk.
- Teams turning commands into repeatable routines
- Readers who need sequencing, branch, and sync discipline
- Basic understanding of fetch, pull, push, and branches
- A sense of how and why branches diverge
- Copying a workflow without checking branch state
- Choosing the wrong integration path on shared branches
Feature flags separate two timelines: code integration into main and feature exposure to users. That allows continuous integration without forcing immediate full rollout.
When this workflow fits
- high-impact features cannot be safely released to 100% immediately
- experimentation or cohort-based exposure is required
- teams want release flexibility without shipping new builds repeatedly
Recommended sequence
1. Implement a clean off path
When the flag is off, legacy behavior should remain intact.
2. Merge with default-off behavior
git switch -c feature/new-checkout-flow
git commit -m "add new checkout flow behind flag"
3. Start with internal or low-percentage rollout
Typical ramp: 1% → 5% → 20% → 50% → 100%, with gate checks at each step.
4. On anomaly, disable flag first
Use flag rollback for immediate mitigation, then decide whether code revert is needed.
5. Remove stale flags after stabilization
Long-lived flags increase cognitive and maintenance debt.
If you cannot observe latency, errors, and conversion effects, staged rollout becomes blind risk distribution.
Common mistakes
Mistake 1: one flag controls too many behaviors
Overloaded flags create unpredictable rollback effects.
Mistake 2: continuing feature changes during incident rollback
Mitigate first, then resume development.
Mistake 3: leaving flags permanently
This accumulates configuration debt and dead-path complexity.
- Define off-state behavior.
- Define four rollout stages and pass criteria.
- Define kill-switch trigger thresholds.
- Set a target date to retire the flag.
Good follow-up reads
Trunk-based development workflowCode freeze and release candidate workflowRevert-first stabilization workflow