Implementation plan
Phase 5: deployment, preview, migration, and recovery
Deliverables and exit criteria for deployment, preview, migration, and recovery.
Status: planned; completion evidence not yet recorded in this documentation.
Implement:
- Deployment state machine
- Preview environment provisioning
- Synthetic seed data
- Capability diff
- Approval records
- Migration runner
- Migration classification
- Pre-migration snapshots
- Blue/green activation
- Health checks
- Artifact rollback
- Database restore workflow
- Database export
- Preview expiration
- App soft deletion/recovery
Exit criteria:
- Preview uses a separate DB and KV namespace.
- Destructive migration cannot run without approval.
- Failed migration leaves current production available.
- Rollback switches artifacts without automatically restoring data.
- Snapshot restore to a new DB passes an integrity drill.
- Every deployment is traceable to source, artifact, policy, and approver.
Failure acceptance
The old production revision may remain available only while its schema remains compatible. Exercise partial migration failures and unsafe rollback cases; see the migration failure boundary.
Evidence to record
Record implementation revisions, test reports, relevant ADRs, unresolved findings, the accepting owner, and acceptance date. Leave this phase planned until its exit criteria are demonstrated.

