Practise this: Run an incident drill
A drill, worked on paper. You are on call this week for the appointment-reminder service of Tallow Dental, a group of nine dental clinics in Sydney. The service texts each patient two hours before their appointment. Sydney is on daylight time in December, UTC+11; the logs are in UTC and everything else is in Sydney time. It is 08:31 on Tuesday 1 December 2026. This is everything you have.
The alert
PAGE appointment-reminders Tue 1 Dec 2026 08:16 AEDT
Reminders sent, last 15 minutes: 1,217
Usual range for a Tuesday 08:00-08:15: 30 to 75
Service answering: yes Error rate, last 5 minutes: 0.2% (usual 0.1-0.4%)
The deploy record
| Time (AEDT) | What |
|---|---|
| Mon 30 Nov, 16:40 | Pull request #412, release 57, merged after review |
| Tue 1 Dec, 07:52 | CI passes for release 57: 412 tests (runner ubuntu-latest, clock in UTC) |
| 07:58 | Deploy of release 57 starts. Migration 0031_appointment_times_utc runs |
| 07:59 | Release 57 live on both servers (servers run with TZ=Australia/Sydney, set in 2019 for the clinic reports) |
| Previous deploy | Release 56, Thu 26 Nov, 08:05: a wording change to the booking confirmation email |
Release 57's pull request
#412 Store appointment times in UTC (written by an agent from the ticket "Store times in UTC so the new Perth clinic works")
Converts
appointments.starts_atandappointments.remind_atfrom Sydney time to UTC for every appointment from today on, and makes the booking screen and the booking API write UTC and show local time. Files:migrations/0031_appointment_times_utc.sql,booking/screen.py,booking/api.py,tests/test_booking.py. All 412 tests pass.
The reminder job
# reminders/job.py, unchanged since March. Runs every 5 minutes.
def run(conn, sms):
now = datetime.now().strftime("%Y-%m-%d %H:%M")
due = conn.execute(
"SELECT id, clinic, phone, starts_at FROM appointments "
"WHERE remind_at <= ? AND reminder_sent_at IS NULL", (now,)
).fetchall()
for appointment_id, clinic, phone, starts_at in due:
sms.send(phone, f"Tallow Dental: your appointment at {clinic} is today at {starts_at[11:16]}. Reply C to cancel.")
conn.execute("UPDATE appointments SET reminder_sent_at = ? WHERE id = ?", (now, appointment_id))
conn.commit()
A reminder is due two hours before the appointment: remind_at is starts_at minus two hours. A reply of C cancels the appointment and frees the slot.
The logs (an excerpt the triage agent pulled, oldest first; the first two lines are from the same time last Tuesday)
{"ts":"2026-11-23T21:00:02Z","release":"55","event":"reminder_run","due":48,"sent":48,"failed":0}
{"ts":"2026-11-23T21:05:01Z","release":"55","event":"reminder_run","due":11,"sent":11,"failed":0}
{"ts":"2026-11-30T20:55:01Z","release":"56","event":"reminder_run","due":13,"sent":13,"failed":0}
{"ts":"2026-11-30T20:58:09Z","release":"57","event":"migration","name":"0031_appointment_times_utc","rows":9870,"took_ms":41022}
{"ts":"2026-11-30T21:00:02Z","release":"57","event":"reminder_run_start","now":"2026-12-01 08:00","due":1214}
{"ts":"2026-11-30T21:00:03Z","release":"57","event":"sms_sent","appointment_id":88412,"clinic":"Bondi Junction","starts_at":"2026-12-01 03:30","remind_at":"2026-12-01 01:30","provider_status":202,"attempt":1}
{"ts":"2026-11-30T21:00:03Z","release":"57","event":"sms_sent","appointment_id":88413,"clinic":"Bondi Junction","starts_at":"2026-12-01 03:30","remind_at":"2026-12-01 01:30","provider_status":202,"attempt":1}
{"ts":"2026-11-30T21:00:04Z","release":"57","event":"sms_sent","appointment_id":88257,"clinic":"Parramatta","starts_at":"2026-12-01 07:15","remind_at":"2026-12-01 05:15","provider_status":202,"attempt":1}
{"ts":"2026-11-30T21:00:04Z","release":"57","event":"sms_sent","appointment_id":88102,"clinic":"Manly","starts_at":"2026-11-30 23:00","remind_at":"2026-11-30 21:00","provider_status":202,"attempt":1}
{"ts":"2026-11-30T21:01:52Z","release":"57","event":"reminder_run_done","due":1214,"sent":1214,"failed":0,"took_ms":110204}
{"ts":"2026-11-30T21:02:30Z","release":"57","event":"http_summary","window":"5m","requests":2210,"errors":4}
{"ts":"2026-11-30T21:05:01Z","release":"57","event":"reminder_run","due":3,"sent":3,"failed":0}
{"ts":"2026-11-30T21:06:12Z","release":"57","event":"sms_reply","appointment_id":88412,"text":"C","action":"cancelled"}
{"ts":"2026-11-30T21:10:01Z","release":"57","event":"reminder_run","due":0,"sent":0,"failed":0}
{"ts":"2026-11-30T21:15:01Z","release":"57","event":"reminder_run","due":0,"sent":0,"failed":0}
{"ts":"2026-11-30T21:29:58Z","release":"57","event":"sms_reply_summary","since":"2026-11-30T21:00:00Z","replies":212,"cancelled":37}
The chat so far
- 08:19 Jo (on call this week; builds the patient web app, first time on call for this service) acknowledges the page.
- 08:21 Jo asks the team's triage agent, which has read access to the logs and the deploy record, what is going on.
- 08:24 Triage agent: "Likely cause: the SMS provider retried a batch of messages (a retry storm), which inflates the sent count. Release 57 only changed how times are stored and all 412 tests passed. Recommended action: roll back to release 56 to rule it out, and open a ticket with the provider."
- 08:26 Bondi Junction front desk, by phone: two patients have called asking whether their appointment has moved to 03:30, and one says she replied C by mistake.
- 08:31 The SMS provider's status page shows no incidents. You take over from here.
Work it the way the module does: evidence first, a control, and a person checking at each point where it matters. If you want an agent's help, give it these materials and hold it to the same standard. Then write, in the box below:
- Diagnosis. What caused this, with the log lines and the code that show it, and a control: a case where the fault does not appear, compared with one where it does. Say whether the agent's stated cause holds, and what evidence decides it.
- Impact. Who is affected and how many, and the queries you would run yourself to get the numbers you give to the clinics. Say what will happen next if nothing is done, and when.
- The rollback decision. Answer the agent's proposal. What would rolling back to release 56 change, and what would it leave as it is? What do you do instead, in what order, and which of those steps a person must decide and run?
- Who is told what. The clinics, and the patients: draft the message the patients get, and say who checks it before it is sent.
- Timeline. From the merge to the moment you would call it resolved, in Sydney time, with the log lines' UTC times converted.
- The post-mortem's check. Blameless causes: what let this change through, not who. Then the check that would have caught it: a test, a rule in CI, or an alert, written out precisely enough that someone could add it today. Say how you would show it fails against release 57.
Your mark is based on the criteria listed under "What you are marked on".
Open the lab · needs a free Tarmac account to have your work marked