Standard library only · runs in your browser
It's the morning after the checkout incident. The review starts at ten, and someone has already written "cause: the 14:00 checkout deploy" on the whiteboard, because that's the most recent change. Bring the facts, computed from the evidence rather than from the timeline everyone remembers.
You have the deploy history and the incident's logs. first_failure from stage 3 is provided.
Write incident_review(deploys, lines), returning:
{"root_service": "payments-db", "first_failure_at": "2026-10-20T14:03:01Z",
"trigger_deploy": "d-43", "rollback_to": "d-41", "affected_requests": 6}root_service and first_failure_at come from the first failure.trigger_deploy: the most recent deploy of the root service at or before the first failure. Deploys of other services don't count. The list isn't sorted.rollback_to: the root service's deploy before the trigger, or None if there isn't one.affected_requests: distinct request ids on ERROR lines that have a valid timestamp.None.incident_review(deploys: list[dict], lines: list[str]) -> dict | None