Skip to content
Sniptide

Incident postmortem template

A postmortem records what happened during an incident, why it happened and what will change so it doesn't happen again, without blaming the people involved. Copy the example below into docs/postmortems, fill it in within a few days of the incident, and give every action item an owner and a due date.

Updated

Files

docs/postmortems/2026-11-18-checkout-errors.mdRaw
# Postmortem: Checkout errors after a database migration

- Date of incident: 2026-11-18
- Duration: 47 minutes (14:12 to 14:59 UTC)
- Severity: SEV-2
- Author: Payments team
- Status: Action items in progress

## Summary

For 47 minutes, 31% of checkout attempts failed with a server error. A migration added a
`NOT NULL` column without a default while the previous app version was still serving traffic.
Rolling back the app did not help, and the incident ended when we added a default to the column.
About 1,900 customers saw an error, and 240 of them did not retry.

## Impact

- 31% of checkout requests returned `500` between 14:12 and 14:59 UTC.
- An estimated 240 orders were lost, worth about EUR 18,000.
- No data was lost or corrupted. Payments that failed were never charged.

## Timeline

All times UTC.

| Time | Event |
| --- | --- |
| 14:08 | Deploy 2026.11.18-3 starts. The migration adds `orders.tax_region NOT NULL`. |
| 14:12 | The migration finishes. Old app pods still insert orders without `tax_region`. Errors begin. |
| 14:15 | The checkout error-rate alert fires and pages the on-call engineer. |
| 14:21 | On-call declares an incident and opens #inc-checkout. |
| 14:26 | The deploy is rolled back. Errors continue, because the column stays. |
| 14:41 | Logs show `null value in column "tax_region" violates not-null constraint`. |
| 14:55 | `ALTER TABLE orders ALTER COLUMN tax_region SET DEFAULT 'unknown'` runs. |
| 14:59 | The error rate returns to normal. |
| 15:30 | The incident is closed and customers who saw errors are identified. |

## Root cause

The migration and the code that writes the new column shipped in one deploy. During a rolling
deploy, old and new app versions run at the same time for several minutes. The old version
didn't know about `tax_region`, so its inserts failed once the column became required.

Our migration rules require expand and contract changes, but nothing checks them, and the review
didn't catch it.

## What went well

- The alert fired three minutes after errors began.
- Failed checkouts never charged a customer.

## What went wrong

- Rollback was the first response, but a rollback can't undo a schema change.
- It took 15 minutes to find the error in logs, because checkout errors log only a generic message.

## Action items

| Action | Owner | Due | Issue |
| --- | --- | --- | --- |
| Add a CI check that fails on `NOT NULL` without a default in a migration | Platform | 2026-12-05 | #1412 |
| Log the database error message on checkout failures | Payments | 2026-11-28 | #1413 |
| Add "schema changes can't be rolled back" to the incident runbook | On-call lead | 2026-11-25 | #1414 |
| Email affected customers with a discount code | Support | 2026-11-20 | Done |

Save with your agent

Run this command to add Sniptide to Claude Code in the current project. Open /mcp in Claude Code and sign in to Sniptide. Once the server shows as connected, use the prompt below to save a private copy in your library.

Terminal
claude mcp add --scope local --transport http sniptide https://app.sniptide.com/api/mcp
Prompt
Read https://sniptide.com/templates/postmortem-template.json and use create_snippet to save its files as a private Sniptide snippet titled "Incident postmortem template". Keep the file names and contents from the JSON.

Write it blameless

People make reasonable decisions with the information and tools they have. A postmortem asks why the system let a mistake through, not who made it. "The migration and the code shipped in one deploy, and nothing checks for that" leads to a CI check. "An engineer forgot the rule" leads to people hiding mistakes next time.

Write about what happened, using roles or teams rather than names. Write the postmortem within five working days, while logs and memories are fresh.

What each section does

Section
What it answers
How to write it
Header
When, how long, how bad and whether it is finished.
Use your severity scale. Keep Status current until the action items close.
Summary
The whole story in one paragraph.
What broke, the cause, how it ended and the impact in numbers.
Impact
Who was affected and how much.
Users, requests, money and data, with numbers. Say explicitly when no data was lost.
Timeline
What happened, in order.
Times in one time zone, from the trigger to the all-clear. Include detection and each response.
Root cause
Why it happened.
Keep asking why until you reach something you can change. Usually there is more than one cause.
What went well and what went wrong
What to keep and what to fix in the response itself.
Detection, communication, tools and runbooks.
Action items
What will change.
Each item is specific, has one owner, a due date and a tracking issue. "Be more careful" isn't an action item.

Review it together

Hold a 30-minute review with the people involved and the owners of the affected systems. Read the timeline together, because people remember different moments. Agree the action items in the meeting, then track them like any other work. Check open action items in your weekly planning until they close, and set Status to Complete when they do.

Put the steps that would have shortened the incident into a runbook.

Variant: a short postmortem

For a minor incident, five lines are enough:

docs/postmortems/2026-11-22-stale-search.md
# Postmortem: Stale search results (SEV-4)

**What happened:** Search showed results up to 2 hours old on 22 November, 09:10 to 11:05 UTC.
**Cause:** The indexing worker crashed on a malformed document and didn't restart.
**Impact:** Search only. No data lost.
**Fix:** Skip and log malformed documents (#1420). Alert when the index is more than 10 minutes behind (#1421).
All templates
  • Runbook
    WritingRunbook template

    A runbook template in Markdown for an on-call alert, with what it means, the first five minutes, diagnosis steps, fixes, verification and escalation.

  • ADR
    SpecsArchitecture decision record template

    An architecture decision record (ADR) template in Markdown with status, context, decision, consequences and alternatives, shown on a real example.

  • Design doc
    SpecsSoftware design document template

    A software design document template in Markdown with goals, non-goals, proposed design, alternatives, security, rollout and open questions, on a real feature.

Pick where your library lives.

Use sniptide.com

Save your first pattern in the app, then connect Claude Code, Cursor or Codex with one sign-in in the browser.

Run it on your own server

One image and a database give you the app, the API and the MCP endpoint. Sniptide is open source under AGPL-3.0.

$docker compose up -d