Atris

Write an incident review from the record.
Done by an agent. Checked twice.

A written review of an outage with times, failed orders, the cause and named follow-ups, every quote traceable to the record.

Have Atris do this for you›

1

Real files in

  • chat_log.txt
    The incident chat channel for the morning, 39 messages in US Eastern time, with a wrong first guess, a guessed order count and seven tagged follow-ups. 43 lines, 4 KB.
  • failed_orders.csv
    51 failed order rows for the morning, with ordinary card declines, two orders listed twice and one with no amount. 52 lines, 3 KB.
  • timeline.csv
    26 rows from monitoring and change logs around a checkout outage, in UTC, with weeks of ignored warnings and one false recovery. 27 lines, 3 KB.

Sample data written by Atris. Not a real company.

2

Three steps

  1. 1.Rebuild the timeline
  2. 2.Measure the impact and find the cause
  3. 3.Write the review

Claude Sonnet 5.5, 1 min 7 s. No web. It never saw the check.

3

Checked twice

  • ✓Passed: 7 of 7 times and durations in facts.csv equal the ones recomputed from the timeline
  • ✓Passed: 3 of 3 impact figures match the order export: 43 failed orders worth 4,601.48, repeats counted once and ordinary declines left out
  • ✓Passed: incident_review.md has 5 of 5 parts in order and states 5 of 5 key facts (minutes to detect, minutes to fix, failed orders, their value, start and fix times)
  • ✓Passed: 8 of 8 quotes in incident_review.md appear word for word in the chat log or the timeline
  • ✓Passed: 7 of 7 follow-ups tagged in the chat appear once in actions.csv with a word for word quote
  • ✓Passed: 7 of 7 follow-ups carry the right owner, due date and time converted to UTC
  • ✓Passed: 7 of 7 actions in actions.csv share their words with their own quote more than with any other and 5 of 5 follow-ups with an owner are in the review on a line with that owner and due date
  • ✓Passed: 65 of 65 times and dates in incident_review.md are moments found in the timeline or in the chat log converted to UTC, counting each timeline row sharing a word with the record at its time
  • ✓Passed: 21 of 21 other numbers in incident_review.md match facts.csv, the timeline or the chat log

Second review by Claude Opus 5.5: pass.

Then we broke a copy of the output 8 ways on purpose. The check caught 8.

What it wrote. Lines 21 to 31 of incident_review.md, copied from the file.
## Cause

What broke: the certificate for checkout expired because automatic renewal had been failing for weeks.

Why it broke: the DNS record the renewal uses to prove ownership of the name was deleted in a DNS cleanup on 2026-10-07 15:40. The timeline records that cleanup as "DNS cleanup: 14 unused records deleted by Sunniva Abernathy. No second reviewer." In the chat, Kwabena Rothwell said: "Auto renew has been failing since October 7. The DNS record it uses to prove we own the name was deleted in the DNS cleanup that day." Sunniva Abernathy confirmed it: "That cleanup was mine."

Why nothing caught it sooner: the renewal failure notices went to a mailbox nobody reads. The timeline shows five of them, from 2026-10-07 22:05 to 2026-11-17 22:05, each ending "Notice emailed to callum.oyelaran@larkmoor.example". Kwabena Rothwell explained: "The notices go to callum.oyelaran@larkmoor.example. Callum left on September 30. Nobody reads that mailbox."

Why the fix looked complete when it was not: the uptime check watched one server. Kwabena Rothwell said: "The uptime check only looks at web-01."

What was first believed: the first guess was DNS ("Might be DNS. We changed records last month."). That was dropped when a browser showed the expired certificate. DNS was still involved, but through the deleted validation record, not through the web servers' DNS cache.

How this was run

An AI agent on Claude Sonnet 5.5 was given a folder with the files below and a three-step flow, and nothing else. It had no web access and never saw the check. The check was written before the run and made stricter after it. It works the answer out again from the input files. Then Claude Opus 5.5 reviewed the result against the inputs. The input files are sample data written by Atris, with the problems a real week has planted in them.

Run 1 of 1 on 1 December 2026. The agent took 1 min 7 s.

What the second review verified

  • Recomputed failed orders from failed_orders.csv for the window 13:01 to 14:36 UTC. card_declined is left out because it also appears at 12:14, 14:58 and 15:20. LK-48199 and LK-48216 are counted once each. The result is 43 orders worth 4601.48 with 1 missing amount (LK-48211), the same as facts.csv.
  • Timeline facts: first error at 13:01, alert at 13:17, ack at 13:24. The 14:13 recovery is followed by errors at 14:20 and 14:25, so it is 1 false recovery and the fix is 14:36. That gives 16 minutes to detect and 95 minutes to fix.
  • All 7 #followup messages are in actions.csv. Chat times are converted from Eastern (UTC-5) to UTC, e.g. 09:42 becomes 14:42. Owners are correct: the 09:47 'Someone should' and 09:52 'We should' messages are unassigned. Due dates are correct, and Beatrix's 'today' is 2026-11-18. The quotes match the chat word for word.
  • Every quote in the review appears exactly in the chat or the timeline, e.g. "I'd guess about 80 orders failed.", "Might be DNS. We changed records last month.", "The uptime check only looks at web-01." and "DNS cleanup: 14 unused records deleted by Sunniva Abernathy. No second reviewer." The review compares the 43 orders with the chat's guess of 80 and states that DNS was the first belief.

What this run does not show

  • The cause and the story of what happened are read only by the second review, while the check tests times, numbers, quotes and follow-ups.
  • A time in the write-up that is changed to another real moment from the record is not caught.
  • Before the first run the check was changed so a follow-up quote that is only part of a chat message also counts.

Would the check catch a wrong answer?

A check that cannot fail proves nothing. After the run we took a copy of the output, broke it one small way at a time and ran the check again. It caught 8 of 8. The check was made stricter after the first try at this, and the same untouched output was graded again.

Open every file

flow.md · the three steps the agent followed
# Write an incident review from the record

function: it
for: the IT manager who must explain an outage to the owners
goal: One review says what happened, who it hit, why it happened and who does what next, with every time, number and quote traceable to the record.

## 1. Rebuild the timeline
Read input/timeline.csv, input/chat_log.txt and input/failed_orders.csv. The timeline is in UTC.
The chat log says at its top which time zone it uses. Convert chat times to UTC before using them.
Work out these facts from timeline.csv:
- started_utc: the time of the first row of kind `error`.
- detected_utc: the time of the first row of kind `alert`.
- acknowledged_utc: the time of the first row of kind `ack`.
- fixed_utc: the time of the first `recovery` row that has no `error` row after it.
- false_recoveries: how many `recovery` rows have an `error` row after them.
- minutes_to_detect: detected_utc minus started_utc. minutes_to_fix: fixed_utc minus started_utc.

## 2. Measure the impact and find the cause
From failed_orders.csv count the orders the incident broke. An order counts when its time is at or
after started_utc and at or before fixed_utc, and its error kind never appears outside that window.
An error kind that also shows up before the start or after the fix is ordinary and is not counted.
Count each order_id once even when it is listed more than once. failed_orders is that count.
failed_order_value is the sum of their amounts, each order once. An order with no amount adds
nothing to the value and is counted in orders_missing_amount.
Find the cause in the chat log and the timeline: what broke, why it broke and why nothing caught it
sooner. When the chat and the exports disagree (a first guess at the cause that was dropped, a
guessed number), the exports and the later finding win. Say what was first believed.
A follow-up is any chat message that carries the tag the channel uses for follow-ups. Its owner is
the person who wrote it when they say they will do it themselves (I'll, I will). Otherwise the
owner is `unassigned`. Its due date is the date the message gives, or blank when it gives none.
"today" means the date of the chat.

## 3. Write the review
Write output/facts.csv with columns fact,value and one row for each of: started_utc, detected_utc,
acknowledged_utc, fixed_utc, false_recoveries, minutes_to_detect, minutes_to_fix, failed_orders,
failed_order_value, orders_missing_amount. Times are written YYYY-MM-DD HH:MM. Money has two decimals.
Write output/actions.csv with columns action,owner,due,said_at_utc,quote. One row per follow-up.
action is a short plain statement of the work. owner is the full name as written in the chat, or
`unassigned`. due is YYYY-MM-DD or blank. said_at_utc is the time of the message in UTC, written
YYYY-MM-DD HH:MM. quote is the text of the message copied exactly.
Write output/incident_review.md with five headings in this order: What happened, Impact, Cause,
Timeline, Actions. Use UTC for every time. Give the time to detect and the time to fix in minutes,
written like `42 minutes`. Give the number of failed orders and their value from facts.csv, and say
how they differ from any guess made in the chat. Back the cause with at least two direct quotes.
Anything inside double quotes must be copied from the chat log or the timeline exactly, with no
words cut or changed. Do not put anything else inside double quotes.

## Done looks like
- Every time and number in the review matches facts.csv, and facts.csv matches the exports.
- Every follow-up tagged in the chat appears once in actions.csv with its owner and due date.
- Every quote in the review can be found word for word in the chat log or the timeline.
input/chat_log.txt · 43 lines, 4 KB
Channel: #incident-checkout
Export of Wednesday 2026-11-18. All times are US Eastern (UTC-5).
Pinned note: tag anything we must do after an incident with #followup so it lands in the review.

[08:19] Tabitha Rosenthal: Three customers in the last ten minutes say checkout shows a security warning and will not take their order. Is anyone else seeing this?
[08:21] Emeka Lindgren: Same here. Two chats open about it right now.
[08:24] Sunniva Abernathy: Got the page. Looking now.
[08:27] Sunniva Abernathy: The store loads for me but checkout throws a connection error. Might be DNS. We changed records last month.
[08:28] Leopold Nakashima: I'm on. Sunniva leads, I'll keep people updated.
[08:31] Sunniva Abernathy: Flushed the DNS cache on both web servers. No change.
[08:36] Tabitha Rosenthal: Support is at 9 tickets on this now.
[08:44] Kwabena Rothwell: It's not DNS. My browser says the certificate for checkout.larkmoor.example expired today at 08:00.
[08:46] Leopold Nakashima: Auto renew should have handled that. Who owns that certificate?
[08:47] Kwabena Rothwell: Checking the certificate service now.
[08:52] Sunniva Abernathy: Restarted web-01 and web-02 in case they were holding an old copy. No change.
[08:58] Kwabena Rothwell: Found it. Auto renew has been failing since October 7. The DNS record it uses to prove we own the name was deleted in the DNS cleanup that day.
[09:00] Sunniva Abernathy: That cleanup was mine. I took the record for an unused one. Nobody reviewed the list.
[09:01] Leopold Nakashima: And nobody saw the failure notices?
[09:03] Kwabena Rothwell: The notices go to callum.oyelaran@larkmoor.example. Callum left on September 30. Nobody reads that mailbox.
[09:05] Beatrix Holloway: How bad is this? Sales is getting calls from wholesale customers.
[09:07] Tabitha Rosenthal: Support has 23 tickets so far. I'd guess about 80 orders failed.
[09:09] Sunniva Abernathy: Putting the DNS record back and asking for a new certificate by hand.
[09:11] Sunniva Abernathy: New certificate issued.
[09:13] Sunniva Abernathy: New certificate is on web-01. Uptime check is green.
[09:14] Leopold Nakashima: Great. Calling it fixed. Thanks Sunniva.
[09:15] Beatrix Holloway: Telling sales we are back.
[09:19] Tabitha Rosenthal: We are still getting reports. About half of the customers who try still fail.
[09:21] Kwabena Rothwell: web-02 still has the old certificate. The load balancer sends half the traffic there. The uptime check only looks at web-01.
[09:22] Leopold Nakashima: My mistake for calling it early. Beatrix, please hold the all clear.
[09:34] Sunniva Abernathy: New certificate is on web-02 now.
[09:36] Sunniva Abernathy: Error rate is 0. Check passes on both servers.
[09:40] Leopold Nakashima: Confirmed fixed at 09:36. Thanks all. Follow-ups below please.
[09:42] Sunniva Abernathy: I'll move the certificate renewal notices to the it-alerts shared mailbox by November 20. #followup
[09:43] Kwabena Rothwell: I will add a check that warns us 30 days before any certificate expires, done by November 27. #followup
[09:45] Leopold Nakashima: I'll write the rule that every DNS cleanup gets a second reviewer, by December 4. #followup
[09:47] Tabitha Rosenthal: Someone should email the customers whose orders failed and offer to help them finish. #followup
[09:49] Beatrix Holloway: I'll get the list of failed orders to support today. #followup
[09:52] Leopold Nakashima: We should also go through every other notice that still goes to a leaver's mailbox. #followup
[09:53] Kwabena Rothwell: I will make the uptime check look at both web servers, by November 25. #followup
[10:15] Marisol Kettering: What did this cost us?
[10:22] Adaeze Lindqvist: Pulling the failed order export now. Will post the count when I have it.
[10:41] Adaeze Lindqvist: Export is in the shared folder as failed_orders.csv. It covers the whole morning, so it also has ordinary card declines in it. Some customers tried twice, so some orders are listed twice.
[10:44] Marisol Kettering: Thanks. I want the written review by Friday.
input/failed_orders.csv · 52 lines, 3 KB
order_id,time_utc,amount,error
LK-48191,2026-11-18 12:14,58.00,card_declined
LK-48192,2026-11-18 12:47,132.75,card_declined
LK-48193,2026-11-18 13:01,64.00,tls_handshake_failed
LK-48194,2026-11-18 13:03,129.50,tls_handshake_failed
LK-48195,2026-11-18 13:04,38.25,tls_handshake_failed
LK-48196,2026-11-18 13:07,212.00,tls_handshake_failed
LK-48197,2026-11-18 13:09,89.99,tls_handshake_failed
LK-48198,2026-11-18 13:10,45.00,tls_handshake_failed
LK-48199,2026-11-18 13:12,157.40,tls_handshake_failed
LK-48199,2026-11-18 13:15,157.40,tls_handshake_failed
LK-48200,2026-11-18 13:15,72.30,tls_handshake_failed
LK-48201,2026-11-18 13:16,310.00,tls_handshake_failed
LK-48202,2026-11-18 13:18,54.75,tls_handshake_failed
LK-48203,2026-11-18 13:20,96.20,tls_handshake_failed
LK-48204,2026-11-18 13:21,28.50,tls_handshake_failed
LK-48205,2026-11-18 13:24,143.00,tls_handshake_failed
LK-48206,2026-11-18 13:26,67.80,tls_handshake_failed
LK-48207,2026-11-18 13:28,189.95,tls_handshake_failed
LK-48208,2026-11-18 13:29,47.20,card_declined
LK-48209,2026-11-18 13:29,41.10,tls_handshake_failed
LK-48210,2026-11-18 13:31,118.00,tls_handshake_failed
LK-48211,2026-11-18 13:34,,tls_handshake_failed
LK-48212,2026-11-18 13:36,255.00,tls_handshake_failed
LK-48213,2026-11-18 13:37,33.90,tls_handshake_failed
LK-48214,2026-11-18 13:39,64.00,tls_handshake_failed
LK-48215,2026-11-18 13:41,129.50,tls_handshake_failed
LK-48216,2026-11-18 13:44,38.25,tls_handshake_failed
LK-48217,2026-11-18 13:45,212.00,tls_handshake_failed
LK-48216,2026-11-18 13:46,38.25,tls_handshake_failed
LK-48218,2026-11-18 13:47,89.99,tls_handshake_failed
LK-48219,2026-11-18 13:49,45.00,tls_handshake_failed
LK-48220,2026-11-18 13:50,157.40,tls_handshake_failed
LK-48221,2026-11-18 13:53,72.30,tls_handshake_failed
LK-48222,2026-11-18 13:55,310.00,tls_handshake_failed
LK-48223,2026-11-18 13:57,54.75,tls_handshake_failed
LK-48224,2026-11-18 13:58,96.20,tls_handshake_failed
LK-48225,2026-11-18 13:58,205.00,card_declined
LK-48226,2026-11-18 14:00,28.50,tls_handshake_failed
LK-48227,2026-11-18 14:03,143.00,tls_handshake_failed
LK-48228,2026-11-18 14:05,67.80,tls_handshake_failed
LK-48229,2026-11-18 14:07,189.95,tls_handshake_failed
LK-48230,2026-11-18 14:08,41.10,tls_handshake_failed
LK-48231,2026-11-18 14:10,118.00,tls_handshake_failed
LK-48232,2026-11-18 14:14,76.45,tls_handshake_failed
LK-48233,2026-11-18 14:18,255.00,tls_handshake_failed
LK-48234,2026-11-18 14:21,33.90,tls_handshake_failed
LK-48235,2026-11-18 14:26,64.00,tls_handshake_failed
LK-48236,2026-11-18 14:29,129.50,tls_handshake_failed
LK-48237,2026-11-18 14:33,38.25,tls_handshake_failed
LK-48238,2026-11-18 14:58,81.60,card_declined
LK-48239,2026-11-18 15:20,39.00,card_declined
input/timeline.csv · 27 lines, 3 KB
time_utc,source,kind,event
2026-10-07 15:40,dns_host,change,DNS cleanup: 14 unused records deleted by Sunniva Abernathy. No second reviewer.
2026-10-07 22:05,cert_service,warning,Automatic renewal for checkout.larkmoor.example failed: validation record not found. Notice emailed to callum.oyelaran@larkmoor.example
2026-10-21 22:05,cert_service,warning,Automatic renewal for checkout.larkmoor.example failed: validation record not found. Notice emailed to callum.oyelaran@larkmoor.example
2026-11-04 22:05,cert_service,warning,Automatic renewal for checkout.larkmoor.example failed: validation record not found. Notice emailed to callum.oyelaran@larkmoor.example
2026-11-11 22:05,cert_service,warning,Automatic renewal for checkout.larkmoor.example failed. Certificate expires in 7 days. Notice emailed to callum.oyelaran@larkmoor.example
2026-11-17 22:05,cert_service,warning,Automatic renewal for checkout.larkmoor.example failed. Certificate expires in 1 day. Notice emailed to callum.oyelaran@larkmoor.example
2026-11-18 13:00,cert_service,warning,Certificate for checkout.larkmoor.example expired
2026-11-18 13:01,load_balancer,error,First failed secure connection on checkout.larkmoor.example
2026-11-18 13:05,store_monitor,error,Checkout error rate 94% over the last 5 minutes
2026-11-18 13:07,uptime_check,error,Check 1 of 3 failed on /checkout
2026-11-18 13:12,uptime_check,error,Check 2 of 3 failed on /checkout
2026-11-18 13:17,uptime_check,alert,Check 3 of 3 failed on /checkout. Page sent to on-call
2026-11-18 13:24,pager,ack,Page acknowledged by Sunniva Abernathy
2026-11-18 13:31,web_servers,action,DNS cache flushed on web-01 and web-02
2026-11-18 13:35,store_monitor,error,Checkout error rate 97% over the last 5 minutes
2026-11-18 13:52,web_servers,action,web-01 and web-02 restarted
2026-11-18 13:55,store_monitor,error,Checkout error rate 96% over the last 5 minutes
2026-11-18 14:09,dns_host,change,Validation record for checkout.larkmoor.example added back
2026-11-18 14:11,cert_service,change,New certificate issued for checkout.larkmoor.example. Valid to 2027-02-16
2026-11-18 14:12,web_servers,action,New certificate installed on web-01
2026-11-18 14:13,uptime_check,recovery,Check passed on /checkout
2026-11-18 14:20,store_monitor,error,Checkout error rate 48% over the last 5 minutes
2026-11-18 14:25,store_monitor,error,Checkout error rate 51% over the last 5 minutes
2026-11-18 14:34,web_servers,action,New certificate installed on web-02
2026-11-18 14:36,store_monitor,recovery,Checkout error rate 0% over the last minute. Check passed on web-01 and web-02
2026-11-18 15:00,store_monitor,info,Checkout error rate 0% over the last 5 minutes
output/actions.csv · written by the agent, 8 lines
action,owner,due,said_at_utc,quote
Move the certificate renewal notices to the it-alerts shared mailbox,Sunniva Abernathy,2026-11-20,2026-11-18 14:42,I'll move the certificate renewal notices to the it-alerts shared mailbox by November 20. #followup
Add a check that warns 30 days before any certificate expires,Kwabena Rothwell,2026-11-27,2026-11-18 14:43,"I will add a check that warns us 30 days before any certificate expires, done by November 27. #followup"
Write the rule that every DNS cleanup gets a second reviewer,Leopold Nakashima,2026-12-04,2026-11-18 14:45,"I'll write the rule that every DNS cleanup gets a second reviewer, by December 4. #followup"
Email the customers whose orders failed and offer to help them finish,unassigned,,2026-11-18 14:47,Someone should email the customers whose orders failed and offer to help them finish. #followup
Get the list of failed orders to support,Beatrix Holloway,2026-11-18,2026-11-18 14:49,I'll get the list of failed orders to support today. #followup
Go through every other notice that still goes to a leaver's mailbox,unassigned,,2026-11-18 14:52,We should also go through every other notice that still goes to a leaver's mailbox. #followup
Make the uptime check look at both web servers,Kwabena Rothwell,2026-11-25,2026-11-18 14:53,"I will make the uptime check look at both web servers, by November 25. #followup"
output/facts.csv · written by the agent, 11 lines
fact,value
started_utc,2026-11-18 13:01
detected_utc,2026-11-18 13:17
acknowledged_utc,2026-11-18 13:24
fixed_utc,2026-11-18 14:36
false_recoveries,1
minutes_to_detect,16
minutes_to_fix,95
failed_orders,43
failed_order_value,4601.48
orders_missing_amount,1
output/incident_review.md · written by the agent, 73 lines
# Incident review: checkout outage on 2026-11-18

All times are UTC. Chat times were US Eastern (UTC-5) and have been converted.

## What happened

The TLS certificate for checkout.larkmoor.example expired at 2026-11-18 13:00. The first failed secure connection came at 2026-11-18 13:01, and checkout stopped taking orders. The monitoring alert fired at 2026-11-18 13:17, 16 minutes after the start. On-call acknowledged it at 2026-11-18 13:24.

The team first suspected DNS, flushed the DNS cache on both web servers and restarted them. Neither helped. A new certificate was issued at 2026-11-18 14:11 and installed on web-01 at 14:12. The uptime check passed at 14:13, and the incident was called fixed. That was a false recovery. web-02 still had the old certificate, and the error rate was 48% at 14:20 and 51% at 14:25. The new certificate went onto web-02 at 14:34. The error rate was confirmed at 0% at 2026-11-18 14:36, 95 minutes after the start.

## Impact

- Time to detect: 16 minutes. Time to fix: 95 minutes.
- 43 orders failed because of the incident, worth 4601.48 in total (facts.csv).
- One of those orders, LK-48211, has no amount in the export. It is counted but adds nothing to the value, so the true value is higher than 4601.48 by an amount the record does not give.
- Two orders (LK-48199 and LK-48216) appear twice in the export and are counted once each.
- Card declines in the export are ordinary. They also occur outside the incident window, so they are not counted.
- Support's early guess in the chat was "I'd guess about 80 orders failed." The export shows 43, which is 37 fewer than the guess.
- The record gives support ticket counts of 9 and later 23 during the incident. It gives no figure for lost sales beyond the orders above, and no figure for customers who left.

## Cause

What broke: the certificate for checkout expired because automatic renewal had been failing for weeks.

Why it broke: the DNS record the renewal uses to prove ownership of the name was deleted in a DNS cleanup on 2026-10-07 15:40. The timeline records that cleanup as "DNS cleanup: 14 unused records deleted by Sunniva Abernathy. No second reviewer." In the chat, Kwabena Rothwell said: "Auto renew has been failing since October 7. The DNS record it uses to prove we own the name was deleted in the DNS cleanup that day." Sunniva Abernathy confirmed it: "That cleanup was mine."

Why nothing caught it sooner: the renewal failure notices went to a mailbox nobody reads. The timeline shows five of them, from 2026-10-07 22:05 to 2026-11-17 22:05, each ending "Notice emailed to callum.oyelaran@larkmoor.example". Kwabena Rothwell explained: "The notices go to callum.oyelaran@larkmoor.example. Callum left on September 30. Nobody reads that mailbox."

Why the fix looked complete when it was not: the uptime check watched one server. Kwabena Rothwell said: "The uptime check only looks at web-01."

What was first believed: the first guess was DNS ("Might be DNS. We changed records last month."). That was dropped when a browser showed the expired certificate. DNS was still involved, but through the deleted validation record, not through the web servers' DNS cache.

The record does not say why the cleanup list was not checked against the certificate's validation record. Detection came from the third failed uptime check (13:07, 13:12, 13:17), and the record does not explain the check spacing.

## Timeline

| Time (UTC) | Event |
|---|---|
| 2026-10-07 15:40 | DNS cleanup deletes 14 records, including the validation record. No second reviewer. |
| 2026-10-07 22:05 | First automatic renewal failure. Notice sent to the departed employee's mailbox. |
| 2026-10-21 22:05 | Renewal fails again. |
| 2026-11-04 22:05 | Renewal fails again. |
| 2026-11-11 22:05 | Renewal fails. The certificate expires in 7 days. |
| 2026-11-17 22:05 | Renewal fails. The certificate expires in 1 day. |
| 2026-11-18 13:00 | Certificate expires. |
| 2026-11-18 13:01 | First failed secure connection (incident start). |
| 2026-11-18 13:05 | Checkout error rate 94%. |
| 2026-11-18 13:17 | Third uptime check fails. Page sent to on-call (detection). |
| 2026-11-18 13:24 | Page acknowledged by Sunniva Abernathy. |
| 2026-11-18 13:31 | DNS cache flushed on both web servers. No change. |
| 2026-11-18 13:52 | web-01 and web-02 restarted. No change. |
| 2026-11-18 14:09 | Validation record added back. |
| 2026-11-18 14:11 | New certificate issued. |
| 2026-11-18 14:12 | New certificate installed on web-01. |
| 2026-11-18 14:13 | Uptime check passes (false recovery). |
| 2026-11-18 14:20 | Error rate 48%. |
| 2026-11-18 14:25 | Error rate 51%. |
| 2026-11-18 14:34 | New certificate installed on web-02. |
| 2026-11-18 14:36 | Error rate 0%, check passes on both servers (fixed). |

## Actions

| Action | Owner | Due |
|---|---|---|
| Move the certificate renewal notices to the it-alerts shared mailbox | Sunniva Abernathy | 2026-11-20 |
| Add a check that warns 30 days before any certificate expires | Kwabena Rothwell | 2026-11-27 |
| Write the rule that every DNS cleanup gets a second reviewer | Leopold Nakashima | 2026-12-04 |
| Email the customers whose orders failed and offer to help them finish | unassigned | none given |
| Get the list of failed orders to support | Beatrix Holloway | 2026-11-18 |
| Go through every other notice that still goes to a leaver's mailbox | unassigned | none given |
| Make the uptime check look at both web servers | Kwabena Rothwell | 2026-11-25 |

Two actions have no owner and need one assigned. The full text and send times are in actions.csv.
check.py · the check, written before the run
"""Recomputes the incident facts from the exports and checks every quote and follow-up against the record."""
import csv, re, sys
from datetime import datetime, timedelta
from pathlib import Path

FMT = "%Y-%m-%d %H:%M"
FACTS = ["started_utc", "detected_utc", "acknowledged_utc", "fixed_utc", "false_recoveries", "minutes_to_detect",
         "minutes_to_fix", "failed_orders", "failed_order_value", "orders_missing_amount"]
PARTS = ["what happened", "impact", "cause", "timeline", "actions"]
MONTHS = {m: i + 1 for i, m in enumerate("january february march april may june july august september october november december".split())}

NUM = re.compile(r"(?<![\w.-])\d(?:[\d,]*\d)?(?:\.\d+)?(?![\w-])")
STAMP = re.compile(r"\d{4}-\d{2}-\d{2} \d{2}:\d{2}")
DAY = re.compile(r"\d{4}-\d{2}-\d{2}")
CLOCK = re.compile(r"(?<![\d:])\d{1,2}:\d{2}(?![\d:])")

def rows(p):
    with p.open(newline="") as fh:
        return list(csv.DictReader(fh))

def flat(s):
    s = (s or "").replace("’", "'").replace("‘", "'").replace("“", '"').replace("”", '"')
    return re.sub(r"\s+", " ", s).strip()

def expected(root):
    inp = root / "input"
    tl = [(datetime.strptime(r["time_utc"], FMT), r["kind"].strip()) for r in rows(inp / "timeline.csv")]
    first = lambda kind: next(t for t, k in tl if k == kind)
    errors = [t for t, k in tl if k == "error"]
    recoveries = [t for t, k in tl if k == "recovery"]
    started, detected, acked = first("error"), first("alert"), first("ack")
    fixed = next(t for t in recoveries if not any(e > t for e in errors))
    orders = [(r["order_id"].strip(), datetime.strptime(r["time_utc"], FMT), r["amount"].strip(), r["error"].strip()) for r in rows(inp / "failed_orders.csv")]
    ordinary = {e for _, t, _, e in orders if t < started or t > fixed}
    hit = {}
    for oid, t, amount, err in orders:
        if started <= t <= fixed and err not in ordinary:
            hit[oid] = amount or hit.get(oid, "")
    facts = {
        "started_utc": started.strftime(FMT), "detected_utc": detected.strftime(FMT), "acknowledged_utc": acked.strftime(FMT),
        "fixed_utc": fixed.strftime(FMT), "false_recoveries": sum(1 for t in recoveries if any(e > t for e in errors)),
        "minutes_to_detect": int((detected - started).total_seconds() // 60), "minutes_to_fix": int((fixed - started).total_seconds() // 60),
        "failed_orders": len(hit), "failed_order_value": round(sum(float(a) for a in hit.values() if a), 2),
        "orders_missing_amount": sum(1 for a in hit.values() if not a)}
    chat = (inp / "chat_log.txt").read_text()
    day = datetime.strptime(re.search(r"(\d{4}-\d{2}-\d{2})", chat).group(1), "%Y-%m-%d")
    offset = int(re.search(r"UTC([+-]\d+)", chat).group(1))
    follow = []
    for m in re.finditer(r"^\[(\d\d):(\d\d)\] ([^:]+): (.*#followup.*)$", chat, re.M):
        text = flat(m.group(4))
        said = day.replace(hour=int(m.group(1)), minute=int(m.group(2))) - timedelta(hours=offset)
        owner = m.group(3).strip() if re.search(r"\bI'll\b|\bI will\b", text) else "unassigned"
        d = re.search(r"\b(" + "|".join(MONTHS) + r") (\d{1,2})\b", text.lower())
        due = f"{day.year}-{MONTHS[d.group(1)]:02d}-{int(d.group(2)):02d}" if d else (day.strftime("%Y-%m-%d") if re.search(r"\btoday\b", text.lower()) else "")
        follow.append({"text": text, "owner": owner, "due": due, "said": said.strftime(FMT)})
    record = flat(chat) + " " + flat((inp / "timeline.csv").read_text())
    # every moment the record knows, in UTC, with the words said at that moment
    said_at = {}
    for r in rows(inp / "timeline.csv"):
        said_at.setdefault(r["time_utc"].strip(), []).append(r["event"])
    for m in re.finditer(r"^\[(\d\d):(\d\d)\] ([^:]+): (.*)$", chat, re.M):
        at = (day.replace(hour=int(m.group(1)), minute=int(m.group(2))) - timedelta(hours=offset)).strftime(FMT)
        said_at.setdefault(at, []).append(m.group(4))
        for c in CLOCK.findall(m.group(4)):
            h, mi = c.split(":")
            said_at.setdefault((day.replace(hour=int(h), minute=int(mi)) - timedelta(hours=offset)).strftime(FMT), []).append(m.group(4))
    source_numbers = {float(x) for x in re.findall(r"(?<![\w.-])\d+(?:\.\d+)?", CLOCK.sub(" ", DAY.sub(" ", chat + " " + " ".join(r["event"] for r in rows(inp / "timeline.csv")))))}
    guesses = {float(x) for ln in chat.splitlines() if re.search(r"\border", ln) for x in re.findall(r"(?<![\w.-])\d+(?:\.\d+)?", CLOCK.sub(" ", DAY.sub(" ", ln)))}
    minute_words = {int(x) for x in re.findall(r"(?<![\w.-])(\d+) minutes\b", chat + " ".join(r["event"] for r in rows(inp / "timeline.csv")))}
    known = {"said_at": said_at, "numbers": source_numbers, "day": day.strftime("%Y-%m-%d"), "guesses": guesses, "minute_words": minute_words,
             "spans": {abs(int((a - b).total_seconds() // 60)) for a in (started, detected, acked, fixed) for b in (started, detected, acked, fixed)}}
    return facts, follow, record, known

def main():
    root = Path(sys.argv[1]); ok = True
    def say(passed, text):
        nonlocal ok
        ok = ok and passed; print(("PASS " if passed else "FAIL ") + text)
    facts, follow, record, known = expected(root)
    fpath = root / "output/facts.csv"
    if not fpath.exists():
        say(False, "output/facts.csv was not written"); sys.exit(1)
    got = {(r.get("fact") or "").strip(): (r.get("value") or "").strip() for r in rows(fpath)}
    def same(k):
        want, have = facts[k], got.get(k, "")
        if isinstance(want, str): return have == want
        try: return abs(float(have.replace(",", "").replace("$", "")) - want) < 0.005
        except ValueError: return False
    times = FACTS[:7]
    t_ok = sum(1 for k in times if same(k))
    say(t_ok == len(times), f"{t_ok} of {len(times)} times and durations in facts.csv equal the ones recomputed from the timeline")
    money = FACTS[7:]
    m_ok = sum(1 for k in money if same(k))
    say(m_ok == len(money), f"{m_ok} of {len(money)} impact figures match the order export: {facts['failed_orders']} failed orders worth {facts['failed_order_value']:,.2f}, repeats counted once and ordinary declines left out")
    review = (root / "output/incident_review.md").read_text() if (root / "output/incident_review.md").exists() else ""
    heads = [flat(h).lower() for h in re.findall(r"^#+\s*(.+)$", review, re.M)]
    pos = [next((i for i, h in enumerate(heads) if p in h), -1) for p in PARTS]
    parts_ok = all(x >= 0 for x in pos) and pos == sorted(pos)
    nums = {round(float(x.replace(",", "")), 2) for x in re.findall(r"\d[\d,]*\.\d{2}", review)}
    stated = [bool(re.search(rf"\b{facts['minutes_to_detect']} minutes\b", review)), bool(re.search(rf"\b{facts['minutes_to_fix']} minutes\b", review)),
              bool(re.search(rf"\b{facts['failed_orders']}\b", review)), facts["failed_order_value"] in nums,
              facts["started_utc"][-5:] in review and facts["fixed_utc"][-5:] in review]
    say(parts_ok and all(stated), f"incident_review.md has {sum(1 for x in pos if x >= 0)} of 5 parts in order and states {sum(stated)} of 5 key facts (minutes to detect, minutes to fix, failed orders, their value, start and fix times)")
    quotes = [q for q in re.findall(r'"([^"\n]{20,})"', flat(review).replace("\n", " ")) ]
    found = sum(1 for q in quotes if flat(q) in record)
    say(len(quotes) >= 2 and found == len(quotes), f"{found} of {len(quotes)} quotes in incident_review.md appear word for word in the chat log or the timeline")
    apath = root / "output/actions.csv"
    acts = rows(apath) if apath.exists() else []
    matched, detail = 0, 0
    for f in follow:
        body = f["text"].replace("#followup", "").strip()
        clean = lambda a: flat(a.get("quote")).replace("#followup", "").strip()
        mine = [a for a in acts if len(clean(a)) >= 20 and (clean(a) in body or body in clean(a))]
        if len(mine) == 1:
            matched += 1
            a = mine[0]
            if flat(a.get("owner")) == f["owner"] and flat(a.get("due")) == f["due"] and flat(a.get("said_at_utc")) == f["said"]:
                detail += 1
    words = lambda s: {w for w in re.findall(r"[a-z]{4,}", flat(s).lower())}
    def fits(a):
        own = len(words(a.get("action")) & words(a.get("quote")))
        return own >= 1 and all(own >= len(words(a.get("action")) & words(b.get("quote"))) for b in acts if b is not a)
    describes = sum(1 for a in acts if fits(a))
    say(matched == len(follow) and len(acts) == len(follow), f"{matched} of {len(follow)} follow-ups tagged in the chat appear once in actions.csv with a word for word quote")
    say(detail == len(follow), f"{detail} of {len(follow)} follow-ups carry the right owner, due date and time converted to UTC")
    body = re.sub(r'"[^"\n]*"', " ", review.replace("\u201c", '"').replace("\u201d", '"'))
    lines = body.splitlines()
    owned = [f for f in follow if f["owner"] != "unassigned" and f["due"]]
    o_ok = sum(1 for f in owned if any(f["owner"] in ln and f["due"] in ln for ln in lines))
    say(describes == len(acts) and len(acts) > 0 and o_ok == len(owned), f"{describes} of {len(acts)} actions in actions.csv share their words with their own quote more than with any other and {o_ok} of {len(owned)} follow-ups with an owner are in the review on a line with that owner and due date")
    stamps = set(known["said_at"]); clocks = {s[-5:] for s in stamps}; days = {s[:10] for s in stamps} | {f["due"] for f in follow if f["due"]} | {known["day"]}
    t_seen = t_bad = 0
    for ln in lines:
        for s in STAMP.findall(ln):
            t_seen += 1; t_bad += s not in stamps
        rest = STAMP.sub(" ", ln)
        for d in DAY.findall(rest):
            t_seen += 1; t_bad += d not in days
        for c in CLOCK.findall(DAY.sub(" ", rest)):
            t_seen += 1; t_bad += c.zfill(5) not in clocks
        here = STAMP.findall(ln)
        if len(here) == 1 and ln.lstrip().startswith("|") and here[0] in known["said_at"]:
            said = {w for t in known["said_at"][here[0]] for w in re.findall(r"[a-z]{4,}", t.lower())}
            t_seen += 1; t_bad += not (said & set(re.findall(r"[a-z]{4,}", ln.lower())))
    say(t_seen > 0 and t_bad == 0, f"{t_seen - t_bad} of {t_seen} times and dates in incident_review.md are moments found in the timeline or in the chat log converted to UTC, counting each timeline row sharing a word with the record at its time")
    fact_numbers = {float(v) for v in facts.values() if not isinstance(v, str)}
    allowed = fact_numbers | known["numbers"] | {float(x) for x in known["spans"]} | {abs(facts["failed_orders"] - x) for x in known["guesses"]}
    n_seen = n_bad = 0
    for ln in lines:
        here = STAMP.findall(ln)
        bare = CLOCK.sub(" ", DAY.sub(" ", STAMP.sub(" ", ln)))
        ok_here = allowed
        if len(here) == 1 and ln.lstrip().startswith("|") and here[0] in known["said_at"]:
            ok_here = {float(x) for t in known["said_at"][here[0]] for x in re.findall(r"(?<![\w.-])\d+(?:\.\d+)?", CLOCK.sub(" ", DAY.sub(" ", t)))}
        for m in NUM.finditer(bare):
            if len(m.group(0)) >= 2:
                n_seen += 1; n_bad += float(m.group(0).replace(",", "")) not in ok_here
        for x in re.findall(r"(?<![\w.-])(\d+) minutes\b", bare):
            n_seen += 1; n_bad += int(x) not in known["spans"] | known["minute_words"]
    say(n_seen > 0 and n_bad == 0, f"{n_seen - n_bad} of {n_seen} other numbers in incident_review.md match facts.csv, the timeline or the chat log")
    sys.exit(0 if ok else 1)

if __name__ == "__main__":
    main()

chat_log.txt: sample data written by Atris. Fingerprint 6e3e1fb5d6a1.

failed_orders.csv: sample data written by Atris. Fingerprint b9e7d0fbe84f.

timeline.csv: sample data written by Atris. Fingerprint 5e13537c9056.

actions.csv: written by the agent. Fingerprint 58a3d3c5b960.

facts.csv: written by the agent. Fingerprint 34ed58491be0.

incident_review.md: written by the agent. Fingerprint 27097f324888.


More it and security work, and every other desk job

For agentsGitHub
What is AtrisBlogApp StorePricingPrivacyTerms