Skip to content

Onset Rollback Runbook

Severity Levels

  • SEV-1: App launch crash, auth outage, widespread inability to use core flow.
  • SEV-2: AI/protocol degraded but app usable.
  • SEV-3: Non-critical regression, cosmetic or limited-scope issue.

Immediate Triage (0-15 minutes)

  1. Confirm blast radius:
  2. iOS app version affected
  3. function(s) affected (daily-insight, generate-protocol, client-event, admin-dashboard)
  4. whether issue is auth, model/provider, DB migration, or client regression
  5. Freeze deploys:
  6. stop additional App Store/TestFlight promotions
  7. stop Supabase function/migration deploys
  8. Post status update to internal channel with current severity.

Rollback Paths

A) Supabase Function Regression

  1. Re-deploy previous known-good function source (from git tag/commit).
  2. Verify with smoke:
  3. python3 scripts/supabase-smoke.py --project-ref <ref>
  4. Confirm app recovers without client update.

B) Migration Regression

  1. Do not apply new migrations until root cause identified.
  2. If migration is additive and safe to ignore, hotfix app/function to bypass new objects.
  3. If migration caused hard failure, apply explicit forward-fix migration.
  4. Prefer forward-fix over destructive rollback.

C) iOS Client Regression

  1. If severe, stop phased release / halt rollout in App Store Connect.
  2. Ship hotfix build (bump versions with scripts/ios-version.py).
  3. Keep backend compatible with both current and previous client versions during transition.

D) Model/Provider Outage

  1. Verify provider status and API key validity.
  2. Switch to available fallback model ID.
  3. Keep user-facing fallback messaging active in app.

Verification Checklist

  • [ ] client-event returns 200
  • [ ] daily-insight returns 200 or graceful fallback behavior confirmed
  • [ ] Admin metrics RPC returns expected payload
  • [ ] iOS app build and launch sanity check passes
  • [ ] No new crash spike after rollback

Postmortem (within 24h)

  • Timeline of incident + root cause.
  • Why checks did not catch it.
  • Preventive actions:
  • add/adjust CI checks
  • add synthetic monitor
  • adjust runbook steps