// CONTENTS Part 14 · Appendices

// PART 14

Runbooks

Chapter 57 / 60 3 min read English Part 14 of 15

Six runbooks cover the on-call surface. Each alert names exactly one runbook; the mapping lives in ops/slo.yaml (objective.<id>.runbook). Acknowledging an alert without opening its runbook is not an acknowledgement.

The runbooks

Runbook Use when Owner
Deploy and rollback a release must ship or be reverted (binary, UI, desktop payload); error_rate burn platform-oncall
Restore PostgreSQL/OtterIO data loss, corruption, failed migration, tenant-isolation doubt storage-oncall (OtterIO) / platform-oncall (PostgreSQL)
Rotate Vault secrets credential leak, provider token expiry, rotation window; auth 5xx platform-oncall
Drain or disable a tenant one tenant/bot must be stopped, or an app/channel needs a kill switch; ws_handshake burn channels-oncall / platform-oncall
LLM provider outage provider errors, first-token/answer SLO burn, quota exhaustion ai-oncall
Disk full / stuck queue disk pressure, failed migration, queue depth growing without draining; api_p95 burn platform-oncall

What every runbook contains

Trigger, impact, diagnosis (the exact SQL/commands), mitigation, verification, rollback, escalation. The pattern to keep when writing a new one: diagnosis before mitigation, verification with expected values, and an owner who is allowed to decide the rollback.

Who can deploy at 2 a.m.

  • The on-call engineer may roll back any deployment without approval.
  • The on-call engineer may deploy forward only with the approval of the scope owner or, when unreachable for 15 minutes, of the incident commander.
  • Nobody deploys a schema migration at 2 a.m. unless the migration is the fix for the incident and the backup restore path has been verified.

Severity and response times

Severity Meaning First response Update cadence
SEV1 users cannot chat, or data loss is possible 15 min, 24/7 every 30 min
SEV2 a dependency is degraded; answers are slow or a channel is down 1 h business hours, 4 h otherwise every 2 h
SEV3 budget burn without user impact, single tenant issue next business day daily

Escalation path

on-call → backup → scope owner → incident commander. If the first responder has not acknowledged in 15 minutes, the backup is paged.

Game days

A drill is only useful when its timings and gaps are written down. The four standard scenarios: LLM provider killed for 5 minutes (users get a clear fallback message); PostgreSQL stopped for 60 s (reconnect or fail gracefully); backup restored into a scratch DB (scripts/restore_drill.sh exits 0, row counts match, tenant probes zero); one deploy rolled back (previous version serves traffic). Record expected vs observed per scenario and file the gaps as issues.

Postmortem

Copy the template (Summary, Impact, Timeline UTC, Root cause, Detection gap, What worked / what did not, Action items with owners and dates) into the issue tracker when an incident closes. The postmortem is not closed until every action item is an issue with an owner and a date.

Found a mistake? Open an issue · All books

// SEARCH ESC
Pagefind · 236 pages · 4 books Enter to open ↑ ↓ to move