Back to Cloudflare

Build a Release Pipeline You Can Recover From

November 5, 2026 Wasil Zafar 27 min read

Connect previews, approvals, migrations, feature flags, and rollback

Table of Contents

  1. Build Artifacts and Runtime Configuration Have Different Lifecycles
  2. Preview, Integration, and Production Gates
  3. Migrations and Rollbacks Must Agree
  4. Gradual Deployment and Feature Flags
  5. Design a Release Pipeline With an Exercised Recovery Path
  6. Demonstrate the Evidence Required Before Production Promotion

Build Artifacts and Runtime Configuration Have Different Lifecycles

A support team ships a new ticket filter. The pull request preview responds correctly, the tests pass, and the merge to the main branch deploys the same commit. Within a minute, production returns a 500 error for anyone with an open ticket. The code is identical. The difference is underneath it: the preview Worker was bound to a staging D1 database with a state column, while production still has status. The artifact was promoted; the configuration and data were not.

A build artifact is the output of a build: bundled code, static assets, and compatibility settings. Cloudflare records it as a version, an immutable snapshot with a version ID. A deployment assigns versions to traffic percentages. A Wrangler environment is a separately named Worker, such as app-staging, with its own configuration and resources. A Preview is a branch-scoped environment under the same Worker, with its own settings, URL, and, when bound, its own resources.

Runtime configuration is everything resolved when the version runs: variables, secrets, bindings to D1, KV, R2, Queues, or services, routes, Cron Triggers, and feature-flag values. Some of it is captured at upload, but it is not immutable like code. A binding points at a resource whose rows change. A secret rotates. Routes and triggers are deployment-level state. A Flagship flag lives outside the version entirely.

Think of a vinyl record and a listening room. The record is the artifact: pressed once and labeled. The room is the environment: its speakers and wiring differ from the next room. Carrying the same record into another room is promotion. A rollback puts the previous record back on, but it does not rewire the room.

Figure 1 shows the two tracks. The build track ends at a version ID. The configuration track resolves credentials, bindings, and flags per environment. A deployment joins them, so "it worked in preview" describes one join, not every join.

Build Artifacts and Runtime Configuration Have Different Lifecycles
%%{init: {'theme':'base','themeCSS':'.edgeLabel .label text, .edgeLabel text, .edgeLabel span { fill:#132440 !important; color:#132440 !important; }','themeVariables': {'primaryColor':'#16476A','primaryTextColor':'#ffffff','primaryBorderColor':'#132440','secondaryColor':'#3B9797','secondaryTextColor':'#ffffff','secondaryBorderColor':'#132440','tertiaryColor':'#c4873b','tertiaryTextColor':'#132440','tertiaryBorderColor':'#132440','lineColor':'#5a6e82','textColor':'#132440','titleColor':'#132440','mainBkg':'#16476A','nodeBorder':'#132440','clusterBkg':'#eef3f7','clusterBorder':'#132440','edgeLabelBackground':'#ffffff','actorBkg':'#16476A','actorTextColor':'#ffffff','actorBorder':'#132440','activationBkgColor':'#3B9797','activationBorderColor':'#132440','signalColor':'#5a6e82','signalTextColor':'#132440','noteBkgColor':'#c4873b','noteTextColor':'#132440','noteBorderColor':'#132440','labelBoxBkgColor':'#a8dede','labelBoxBorderColor':'#132440','labelTextColor':'#132440','loopTextColor':'#132440','altBackground':'#f8f9fa','fontFamily':'DM Sans, sans-serif'}}}%%
flowchart TD
    subgraph Build["Build once"]
        A["Commit SHA"] --> B["Install, test, bundle"]
        B --> C["Bundle and assets"]
        C --> D["wrangler versions upload
version ID and tag"] end subgraph Configure["Resolve per environment"] E["CI secret store"] --> F["Token scoped to environment"] G["Wrangler config
vars and bindings"] --> H["Preview, staging, or production values"] I["Flagship or config flags"] --> J["Release state"] end D --> K{"Deployment"} F --> K H --> K J --> K K --> L["Traffic split"] L --> M{"What changed?"} M -- "code" --> N["Rollback version"] M -- "configuration" --> O["Change binding, secret, or flag
then redeploy or re-evaluate"] M -- "data" --> P["Forward migration or D1 restore"] N --> Q["Older code on current data"] Q --> R{"Schema still compatible?"} R -- "no" --> S["Rollback unsafe"] R -- "yes" --> T["Recovered"] classDef primary fill:#132440,color:#ffffff,stroke:#0b172b; classDef secondary fill:#16476A,color:#ffffff,stroke:#0f314a; classDef ok fill:#3B9797,color:#ffffff,stroke:#2a6f6f; classDef danger fill:#BF092F,color:#ffffff,stroke:#7a0420; classDef warn fill:#c4873b,color:#132440,stroke:#8a5a1f; class F,J primary; class A,B,C,D,E,G,H,I,K,L,M,N,O,P,Q,R,T secondary; class S ok;

Figure 2 separates the layers so an incident can be assigned to the right one. The artifact is on the left; the production runtime, its traffic split, and its data are on the right. The dashed line is the deploy-time credential boundary. A preview job should not cross it, and a production token should not exist in the preview job's environment.

Artifact and configuration lifecycles A build produces an immutable version. Environment configuration resolves bindings, secrets, and flags. A deployment joins them. Rolling back swaps the version but does not restore data. Build once, configure per environment, deploy deliberately Git and CI commit and tests reproducible build Immutable version version ID and tag bundle, assets compatibility settings same commit and bundle Runtime configuration vars, secrets, bindings routes and triggers feature-flag values changes without a rebuild deploy-time credential boundary Production runtime Version B: canary 10% new artifact Version A: stable 90% rollback target move traffic D1, KV, R2, Queues data outlives every version rollback does not restore it build deploy resolve A release record names both the version ID and the configuration snapshot that were live.

Build once, scope each credential separately

Promote the same build inputs, and make the environment configuration explicit and reviewable. Use three credentials — preview, staging, and production — not one, with the last held only in a protected environment with required reviewers. Scope each to the account and the minimum permission groups it needs. Never put CLOUDFLARE_API_TOKEN in a repository variable, never echo it, and never let a pull-request job read the production secret. Cloudflare's GitHub Actions guidance says the same: keep the token in the CI secret store (Workers CI/CD).

Configuration changes deserve the same review as code. A binding swap, a route change, or a secret rotation can break production without a code change. Record the configuration diff next to the code diff and attach it to the deployment record. That turns "the deploy was fine" into "this version ran with this configuration and this data."

Preview, Integration, and Production Gates

Take the ticket-priority change. In Preview, the question is whether the branch builds, starts, and serves the changed route with preview-safe bindings. npx wrangler preview creates a branch-scoped Preview under the production Worker, with its own previews block for variables, secrets, and storage. It does not inherit production settings, and it does not exercise Cron Triggers or Queue consumers; service bindings call the bound Worker's production deployment. Apply the migration to the Preview's D1 database first, then smoke the URL. Evidence: the Preview URL, a response body, and a binding check.

In integration, the question is whether the change works as a persistent service against staging data and production-like triggers. Use a separate Wrangler environment such as --env staging, with its own Worker name, D1 database, routes, and Queue consumer. Apply the same migration, run end-to-end tests, and let the Cron Trigger fire once. This is the first gate that can prove a scheduled or consumer path.

In production, the question is whether this exact artifact is safe to expose, and whether we can undo it. Upload the version without deploying (wrangler versions upload), attach a tag, obtain the named approval, then deploy a small percentage. Evidence: version ID, approver, canary window, metric comparison, and rollback target.

The table compares the gates by what they isolate and what they can prove.

GateIsolation unitConfiguration and dataEvidence it can produceWhat it cannot proveCredential scope
PreviewBranch-scoped Preview under the same WorkerSeparate previews block; Preview-safe D1, KV, R2, and secretsBranch builds, route responds, binding exists, secret presentProduction data shape, Cron Triggers, Queue consumers, cross-Worker service bindingsPreview-only token; no production secret
IntegrationNamed Wrangler environment, for example app-stagingStaging Worker, staging D1, staging queues, staging routesMigrations apply, E2E flows, scheduled and consumer paths, load behaviorReal traffic mix, real customer data, production quota pressureStaging token; separate account or scoped token
ProductionDeployment of one or more versionsProduction bindings, secrets, routes, triggers, and dataCanary metrics, approval record, rollback target, customer impactWhether the next change will be safe; only this change's behaviorProduction token in a protected environment with reviewers

Figure 3 puts the gates in order, including the two failure branches that matter most: a failed preview blocks the merge, and a failed canary chooses between disabling a flag and rolling back the version.

Preview, Integration, and Production Gates
%%{init: {'theme':'base','themeCSS':'.edgeLabel .label text, .edgeLabel text, .edgeLabel span { fill:#132440 !important; color:#132440 !important; }','themeVariables': {'primaryColor':'#16476A','primaryTextColor':'#ffffff','primaryBorderColor':'#132440','secondaryColor':'#3B9797','secondaryTextColor':'#ffffff','secondaryBorderColor':'#132440','tertiaryColor':'#c4873b','tertiaryTextColor':'#132440','tertiaryBorderColor':'#132440','lineColor':'#5a6e82','textColor':'#132440','mainBkg':'#16476A','nodeBorder':'#132440','clusterBkg':'#eef3f7','clusterBorder':'#132440','edgeLabelBackground':'#ffffff','actorBkg':'#16476A','actorTextColor':'#ffffff','actorBorder':'#132440','activationBkgColor':'#3B9797','activationBorderColor':'#132440','signalColor':'#5a6e82','signalTextColor':'#132440','noteBkgColor':'#c4873b','noteTextColor':'#132440','noteBorderColor':'#132440','labelBoxBkgColor':'#a8dede','labelBoxBorderColor':'#132440','labelTextColor':'#132440','loopTextColor':'#132440','altBackground':'#f8f9fa','fontFamily':'DM Sans, sans-serif'}}}%%
flowchart TD
    A["Pull request opened"] --> B["Build once
test and bundle"] B --> C["Preview: wrangler preview
branch-scoped settings"] C --> D{"Preview smoke and binding check"} D -- "fail" --> E["Block merge"] D -- "pass" --> F["Merge to main"] F --> G["Staging Worker
wrangler --env staging"] G --> H["Apply migration to staging D1"] H --> I{"Integration, E2E, and trigger test"} I -- "fail" --> J["Stop before production credentials"] I -- "pass" --> K["Upload production version
tag equals commit"] K --> L{"Named approver accepts evidence?"} L -- "no" --> M["Hold: version stays undeployed"] L -- "yes" --> N["Deploy 10% canary"] N --> O{"Error rate and latency within budget?"} O -- "no" --> P["Disable flag or roll back version"] O -- "yes" --> Q["Promote to 100%"] Q --> R["Record evidence and close change"] classDef primary fill:#132440,color:#ffffff,stroke:#0b172b; classDef secondary fill:#16476A,color:#ffffff,stroke:#0f314a; classDef ok fill:#3B9797,color:#ffffff,stroke:#2a6f6f; classDef danger fill:#BF092F,color:#ffffff,stroke:#7a0420; classDef warn fill:#c4873b,color:#132440,stroke:#8a5a1f; class A,B,C,D,F,G,H,I,J,K,L,M,P,Q,R secondary; class E,O danger; class N warn;

Two product boundaries are easy to overstate. At the verification date, Previews have these limits: 100 per Worker on Free, 500 on paid plans, 100 deployments per Preview, and Wrangler 4.135.0 or later in the project dependency. Preview URLs are public by default; use Cloudflare Access for sensitive content. Workers Builds runs a build command then a deploy command on push, with a separate Preview command for branches. It provides 3,000 build minutes per month on Free and 6,000 on paid plans, a 20-minute timeout, and currently user tokens rather than account-owned tokens (build limits, build configuration). For a named approver, use an external CI environment or split upload from deploy.

The YAML panel shows that split in GitHub Actions: a preview job on pull requests, and a production job that runs only on main inside a protected production environment. The Bash panel shows an operator-run canary with an explicit recovery step. The environment rule supplies the human approval; the workflow supplies the artifact and evidence.

name: release-gates
"on":
  pull_request:
  push:
    branches: [main]
permissions:
  contents: read
concurrency:
  group: release-${{ github.ref }}
  cancel-in-progress: true
jobs:
  preview:
    if: github.event_name == 'pull_request'
    runs-on: ubuntu-latest
    environment: preview
    env:
      CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_PREVIEW_TOKEN }}
      CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
    steps:
      - uses: actions/checkout@v6
      - uses: actions/setup-node@v4
        with:
          node-version: 22
          cache: npm
      - run: npm ci
      - run: npx wrangler preview --name "pr-${{ github.event.pull_request.number }}"
      - run: ./scripts/smoke.sh "https://pr-${{ github.event.pull_request.number }}-${{ vars.WORKER_NAME }}.${{ vars.WORKERS_SUBDOMAIN }}.workers.dev"
  production:
    if: github.event_name == 'push' && github.ref == 'refs/heads/main'
    runs-on: ubuntu-latest
    environment: production
    env:
      CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_PRODUCTION_TOKEN }}
      CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
    steps:
      - uses: actions/checkout@v6
      - uses: actions/setup-node@v4
        with:
          node-version: 22
          cache: npm
      - run: npm ci
      - run: npx wrangler d1 migrations apply APP_DB --remote
      - run: npx wrangler versions upload --tag "$GITHUB_SHA"
      - run: npx wrangler versions deploy --version-tag "$GITHUB_SHA@100%" --yes
set -euo pipefail
: "${CLOUDFLARE_API_TOKEN:?set a production-scoped token}"
: "${CLOUDFLARE_ACCOUNT_ID:?set the Cloudflare account ID}"
: "${PREVIOUS_TAG:?set the tag of the version serving production}"
TAG="release-${GITHUB_SHA::7}"
npx wrangler d1 migrations apply APP_DB --remote
npx wrangler versions upload --tag "$TAG" --message "commit ${GITHUB_SHA}"
npx wrangler versions deploy --version-tag "$TAG@10%" --version-tag "$PREVIOUS_TAG@90%" --yes
if ! ./scripts/smoke.sh "https://app.example.com"; then
  npx wrangler rollback --message "smoke failed for $TAG"
  exit 1
fi
npx wrangler versions deploy --version-tag "$TAG@100%" --yes

The workflow promotes atomically after approval. The Bash panel is the conservative variant: it records a previous tag, deploys a 10% split, runs a smoke check, and rolls back immediately if the check fails. Both need a migration that the old version can still tolerate. The no-argument rollback targets the version uploaded before the new one, so keep one upload per release or pass the target version ID explicitly.

Migrations and Rollbacks Must Agree

The most expensive misconception in release engineering is that a rollback undoes a release. On Workers, wrangler rollback creates a new deployment that sends 100% of traffic to an earlier version. It can replace a split deployment and target one of the 100 most recently published versions. It does not change the resources connected to the Worker. Cloudflare documents that a rollback can error if the data structure changed, and that Durable Object lifecycle changes or deleted bindings can block it (Rollbacks).

D1 makes the same point from the other side. Its recovery tools are real, but none is a per-release undo button. The comparison is worth keeping next to the release record.

MechanismWhat it changesWhat it cannot restoreConstraint
Version rollback (wrangler rollback)Sends 100% of traffic to an earlier versionBindings, rows, queue messages, flag valuesTarget must be among the 100 most recent versions; it can fail after a schema change
D1 migrationApplies forward-only SQL files, tracked in d1_migrationsThe previous schema; there is no down commandEvery version in the rollback window must tolerate the current schema
D1 Time TravelRestores a database in place to any minute in the last 30 days on Workers Paid or 7 days on FreeWrites after the bookmark; the restore is destructive and overwrites in placeRestoring before a deploy discards every legitimate write after that bookmark

Sources: D1 migrations and Time Travel.

The safe pattern is expand and contract. For the ticket priority feature, migration 0007 adds a nullable priority column. Deploy code that writes both shapes but reads the old one. Backfill in batches. Deploy code that reads the new column. Only after the rollback window closes does migration 0008 add the constraint or remove the old column. Every version in that window can run against the schema that exists, so a code rollback is genuinely available.

Rollback restores a version, not your data

A successful wrangler rollback restores a Worker version, not your data. If the release changed a schema, a row shape, or a queue message format, rolling back the code can turn one bad deploy into a sustained outage. Decide before the release whether the rollback target is schema-compatible; if it is not, the recovery plan is a forward fix, not a rollback.

Content releases need the same discipline. Publishing JSON with a renamed field is a schema change in disguise. Keep both fields for one release, or version the endpoint, and purge the CDN only after the origin serves the new shape. A cache purge changes which copy is served, not whether it is compatible.

Decide the failure policy before the incident

  • Hold when evidence is missing or the canary is inconclusive: keep the small percentage and investigate.
  • Roll back when a new error class or latency regression crosses the threshold, or when a flag can be disabled faster than a deploy.
  • Roll forward only for a non-data change with a new version, a new canary, and a fresh approval.

The release owner may always roll back without asking; promotion requires the approver.

Gradual Deployment and Feature Flags

Gradual deployment changes the blast radius of a code change. Upload a version, then deploy it to a percentage while the previous version keeps the rest. Cloudflare routes each request independently by default, so consecutive requests from one user can hit different versions. That is version skew. In a checkout flow, it can produce a cart that changes shape between page loads. Version affinity can pin a user to one version, and version overrides can pin a downstream Worker during a service-binding call. Neither removes the need to keep both contracts compatible. Durable Objects are a special case because only one version can run at a time; apply a pending migration with wrangler deploy (Gradual deployments).

Feature flags change a different variable: exposure. A flag is a named decision with variants, targeting rules, and a default. In Flagship, flags are grouped into apps, evaluated through a native Worker binding or an OpenFeature SDK, and can roll out a variant to a percentage of users with consistent hashing. Changes propagate within seconds, though the documentation allows up to 30 seconds; during that window some evaluations return the previous value. A disabled flag always serves its default, which makes disable a kill switch rather than a delete. The binding falls back to the default you pass in code if evaluation fails (Flagship concepts, binding).

Flagship is an optional beta dependency

Flagship was in public beta at the 2026-11-02 planning baseline. Treat it as an optional extension, not a dependency assumed to be generally available, covered by an SLA, or included in every plan.

Keep a portable fallback. A versioned JSON document in KV or another config store is read through the same wrapper. It is slower to change and needs its own audit trail, but it preserves the deploy-versus-release split. Expose one method so switching providers is a configuration change:

type FlagContext = { userId?: string; accountId?: string };

export interface FlagProvider {
  getBoolean(key: string, fallback: boolean, context: FlagContext): Promise<boolean>;
}

// Call sites depend on this wrapper, not on Flagship or a KV reader.
export function flagReader(provider: FlagProvider) {
  return async (key: string, fallback: boolean, context: FlagContext) => {
    try {
      return await provider.getBoolean(key, fallback, context);
    } catch {
      return fallback;
    }
  };
}

Figure 4 contrasts the paths. On the left, a code deploy reaches all users and an incident forces a full rollback. On the right, code deploys dark, a flag exposes it in steps, and a failure disables the flag in seconds without moving traffic between versions.

Deploy versus release Without flags, a bad deploy affects all users and recovery requires a version rollback. With flags, code deploys dark and exposure grows from one percent to one hundred percent; a failure disables the flag in seconds. Deploy without flags Deploy dark, release by flag Deploy 100% one version Incident all users exposed Rollback version minutes of impact recover Deploy dark flag off, 100% Flag 1% internal Flag 10% canary users Flag 100% remove next release Failure found at 10% disable flag Both paths still need a schema the old version can read and a named rollback target.

The advantage is speed, not immunity. A flag disable takes effect in seconds and affects only the flagged path; a version rollback creates a deployment, moves all traffic, and may be blocked by data changes. That is why both belong in one pipeline. Deploy the artifact dark, use the canary to prove the infrastructure and version-skew behavior, then use the flag to widen exposure.

A composite scenario shows the split. A support platform adds a filter behind ticket-filter-v2, defaulting to off. The version deploys at 100% but no customer sees it. The team enables it for internal accounts, then 5% of users, then 25%. At 25%, filtered requests show an error rate rising from 0.2% to 1.4% and p95 latency doubling. On-call disables the flag. The code stays deployed; the old path returns. No version rollback, no schema risk, no all-user outage. The team fixes the filter, redeploys, and restarts at 5%. The flag is removed after a week at 100%.

That scenario is a composite, not a measured incident; the numbers are illustrative. The lesson: choose the smallest exposure unit that can produce a signal, and make the kill switch independent of the deploy.

Feature flags create debt

Every flag doubles the paths to test, and a permanent flag becomes an untested branch. Give each flag an owner, a creation date, and a removal condition; review flags older than 90 days; delete the flag and the dead branch together. Never use a flag as an authorization check, and never put a secret in a flag value.

Design a Release Pipeline With an Exercised Recovery Path

The exercise below is design-only. No hosted deployment was executed for this article, and none of the observations are measured results. It uses a tabletop failure injection so you can exercise recovery decisions without paid resources. If you later run the optional hosted variant, label that run separately and record the actual versions and account IDs.

Guided exercise

Design a Release Pipeline With an Exercised Recovery Path

Mode: design-only tabletop. No Cloudflare resources are created, so there is no hosted validation and no measured latency or error rate.

Prerequisites and plan: a Worker repository with a Wrangler configuration, a D1 binding, and a test command; a Git host with protected environments or required reviewers; a release-record template. Workers Free is enough. The optional hosted variant may need Workers Paid for Time Travel beyond 7 days and extra build minutes.

Setup: name four roles: release owner, approver, on-call engineer, and data owner. Define the three environments and record each one's Worker name, credential name, D1 database, and gate evidence in the table below. Do not put secret values in the document.

EnvironmentWorkerCredentialD1 databaseGate evidence to record
Previewbranch Preview namepreview token namepreview databasePreview URL, response body, binding check
Stagingstaging Worker namestaging token namestaging databaseE2E result, trigger or consumer run, version ID
Productionproduction Worker nameproduction token nameproduction databaseCanary metrics, approver, rollback target

Actions:

  1. Classify the change as code, configuration, schema, or content. For each, write what a rollback restores and what it does not.
  2. Build once. Record the commit SHA, version tag, and bundle hash; confirm the same tag is used in staging and production.
  3. Run the preview gate. Confirm the previews block points at preview-safe resources, apply the migration to the preview database, smoke the URL, and record the response.
  4. Run the staging gate. Apply the same migration, exercise the Cron Trigger or Queue consumer if present, and record the staging version ID plus the migration bookmark.
  5. Inject failure A: the new version is at 10% and the error rate triples. Decide whether to disable a flag, roll back, or hold. Write the exact command and the person allowed to run it.
  6. Inject failure B: the release renamed a column and the old version cannot read the new schema. Decide whether rollback is allowed. If not, write the forward-fix and restore plan, including the Time Travel bookmark and the writes that would be lost.
  7. Produce the release record and run the self-check against it: version ID, configuration diff, migration name, approver, canary window, threshold, rollback target, and data-compatibility statement.

Expected observations: step 3 should reveal at least one setting that exists only in production. Step 5 should produce a recovery action measured in seconds, not a deploy. Step 6 should show that at least one plausible rollback is unsafe, or document why the schema is compatible.

Failure checks: fail if the preview job can read the production token; if the record has no rollback target; if the target predates a destructive migration; if the canary has no numeric threshold or window; if the only approver wrote the change; or if the recovery command has never been run in staging.

Cost dimensions: Workers requests and CPU, D1 rows and storage, R2 operations, Queue operations, CI or Workers Builds minutes, and any Flagship usage. Check current pricing. The tabletop costs only the CI minutes used to build.

Cleanup: delete Previews with npx wrangler preview delete --name <preview-name>; delete or pause the staging Worker and its D1 database; revoke temporary tokens; remove test rows; close the change record. If you used Flagship, disable the test flag and delete the app after exporting its changelog.

Demonstrate the Evidence Required Before Production Promotion

A production promotion should be boring to audit. The approver should answer five questions without opening a terminal: what artifact is this, what configuration will it run with, what data shape does it expect, what did the gates prove, and how do we get back.

Pass/fail evidence. Mark the release PASS only when all of the following are attached. Mark it FAIL if any item is missing or contradicted.

  • The production version ID and tag match the commit SHA, and staging ran the same commit and build inputs.
  • The production token was unavailable to the pull-request job, and no secret value appears in logs.
  • The migration name, applied bookmark, and backward-compatibility statement are recorded. For a destructive migration, the record names the restore bookmark and the writes that would be lost.
  • Preview smoke, staging E2E, and the trigger or consumer test have named results.
  • The canary window, baseline, threshold, and observed result are recorded. A result outside the threshold is a FAIL even if no customer complained.
  • A named approver accepted the evidence, and the release owner differs from the approver.
  • A rollback target exists, is within the last 100 versions, and has been exercised in staging. If rollback is unsafe, an approved forward-fix plan replaces it.

Change record. A minimal record has: change ID, release owner, approver, artifact version and tag, configuration diff, migration and bookmark, evidence links, canary window and thresholds, rollback target or forward-fix plan, customer impact, and start and end time. Keep it next to the code change, not in a spreadsheet nobody updates. A leaked token is an incident, not a lint error: revoke it first, then inspect the deployment.

Self-check with explained answers.

  1. A rollback restores code and data, so it is always safe. False. wrangler rollback creates a new deployment for an earlier version. It does not revert bindings, D1 rows, queue messages, or flag values, and it can error when the data structure changed.
  2. A Preview is a smaller production, so a green Preview is enough to promote. False. A Preview has its own settings and resources, does not exercise Cron Triggers or Queue consumers, and its service bindings reach production. It is strong evidence for the branch, not for production.
  3. Feature flags remove the need for canaries. False. Flags control exposure; they do not prove the code, the schema, or version-skew behavior. A canary proves the deployment path; a flag controls who sees the result.

Unresolved limitations. No hosted deployment was run, so there are no measured latency, error-rate, or cost figures. Flagship was in public beta at the planning baseline; its plan availability, limits, and behavior may change, and the configuration-based alternative is the portable path. Workers Builds approval is external. Preview isolation has gaps around Cron Triggers, Queue consumers, and service bindings. D1 Time Travel is destructive and bounded to 30 days on paid plans and 7 days on Free. Canary sampling can miss a rare failure, and version skew can persist for the rollout.

Verification and references. Documentation was checked on 2026-11-05 against the pages below; the planning baseline is 2026-11-02. Command syntax was checked against Wrangler 4.157.0 CLI help. No runtime deployment was executed because the exercise is design-only. Re-check commands, limits, and availability before using this in a live pipeline.

Next in the Series

In Estimate Cost, Capacity, and Data Boundaries, we'll explore Turn measured workloads into operational decisions.