Feature Flag
// Definition
A runtime toggle that turns code paths on or off without redeploying. Enables progressive rollouts, A/B tests, and instant kill switches. Decouples deploy from release — code ships dark and is enabled later.
// Code Example
function withFlag(name: string, on: boolean) {
cy.intercept('GET', '/api/flags', { body: { [name]: on } });
}
it('shows new checkout when flag is on', () => {
withFlag('newCheckout', true);
cy.visit('/cart');
cy.get('[data-testid=new-checkout]').should('be.visible');
});
it('falls back to legacy when flag is off', () => {
withFlag('newCheckout', false);
cy.visit('/cart');
cy.get('[data-testid=legacy-checkout]').should('be.visible');
});// Related terms
Canary Deployment
Routing a small slice of traffic (1%, 5%) to a new version while the rest stays on the old one. Metrics from the canary decide whether to progress or roll back. Limits blast radius and surfaces issues that staging missed.
Rollback
Reverting a deployment to the previous known-good version when a release introduces a regression. Modern pipelines aim for one-command rollback; database migrations are the usual complication.
Deploy
The act of releasing a built artifact to a target environment (staging, production). Modern teams aim to deploy as often and as automatically as possible.