Rollback runbook
- Status: M0 local recovery documented; future environment steps pending
When to use
Use rollback when a validated change makes the local scaffold unusable or, in a future environment, when a release causes sustained errors, data-integrity risk, privacy exposure, or a failed health gate.
Rollback is not automatically safe for data-contract or schema changes. Prefer containment and a reviewed forward fix when reverting would corrupt or hide data.
M0 local recovery
- Preserve useful non-sensitive error output; never copy tokens, photos, or personal records.
- Stop the affected development process.
- Return the working tree to a known reviewed revision using the team’s normal version-control workflow.
-
Recreate dependencies from the lockfile:
corepack pnpm install --frozen-lockfile
corepack pnpm prisma:generate
-
Validate local service configuration and the workspace:
corepack pnpm compose:config
corepack pnpm check
- Start the required local processes and verify
/health.
Do not delete Docker volumes merely to hide a compatibility defect. If synthetic local state can be discarded intentionally, docker compose down -v removes it permanently; confirm no needed data exists first.
Future beta containment
All steps are PENDING until real infrastructure exists:
- Declare an incident and pause additional releases.
- Protect data first: disable the affected write path/provider or put the service into an approved reduced mode.
- Identify the last known-good immutable API and worker artifacts.
- Check schema and contract compatibility before changing runtime versions.
- Roll back one controlled stage using the approved deployment mechanism.
- Verify health, error rate, authorization, queues, data integrity, and critical adult/manual flows.
- Decide whether queued jobs need pause, replay, deduplication, or quarantine.
- Communicate status and continue heightened monitoring.
Database and irreversible changes
PENDING: adopt expand/contract migrations, backward-compatible queue contracts, and tested restoration. Never run an ad hoc destructive migration or restore over the only copy. A backup restore is a separate incident-level decision under Backup and restore.
Exit criteria
- Triggering impact has stopped.
- No unauthorized exposure or silent data corruption remains.
- Queue and provider states are understood.
- Validation evidence and timeline are recorded.
- Follow-up owner and post-incident review are assigned.