Incident response lab
Run the incident response baseline
Production rule: Code and measure the normal path for a citation-producing RAG API; no stage is complete until another operator can reproduce its evidence and reverse its risky action.
Before you start
Why this matters
In two minutes, write the user-visible outcome this page protects, one numerical threshold, and the first signal you expect to move. Then name an observation that would prove your initial theory wrong. Keep the answer beside your terminal; this lab rewards prediction before inspection rather than explanations invented after the graph changes.
1Learn the idea
Read
Lab target
You own a citation-producing RAG API at POST /v1/research. The goal is to coordinate detection, severity, roles, mitigation, evidence, and communication during a user-visible correctness incident. The measurable target is declare SEV-1 within 8 minutes when more than 5% of answers cite nonexistent documents, assign commander/comms/operations roles, disable the faulty reranker within 12 minutes, and preserve a timestamped evidence bundle. The known production tension is fast rollback limits harm but may erase runtime evidence; broad shutdown is simple but denies service to unaffected tenants that could safely remain online.
Read
Implement one ordinary journey
Build the smallest normal path through POST /v1/research for a citation-producing RAG API. Use a fixed, non-sensitive fixture and assign a correlation identifier at ingress. The purpose is to establish known-good semantics before fault injection. For Incident response, the path must contribute directly to this goal: coordinate detection, severity, roles, mitigation, evidence, and communication during a user-visible correctness incident. Avoid adding retries, fallback branches, or tuning until the baseline is observable.
Use the reviewed configuration:
severity_rules:
sev1:
any:
- citation_failure_rate: "> 0.05 for 5m"
- regulated_tenant_affected: true
roles: [incident_commander, operations, communications, scribe]
mitigations:
- disable_flag: reranker_v2
- rollback: reranker
evidence_retention_days: 90
Run the baseline command:
./ops/incident declare --severity 1 --title 'invalid citations' --dry-run
./ops/evidence snapshot --service rag-api --output artifacts/pre-drill
Record response status or operator state, important headers or fields, elapsed time, and side effects. Follow the same correlation identifier through structured logs. If the system is asynchronous, capture enqueue time, start time, completion time, retry count, and durable checkpoint. Run at least five samples so one warm cache or connection setup does not masquerade as normal behavior.
Read
Reconcile behavior with telemetry
The acceptance target is declare SEV-1 within 8 minutes when more than 5% of answers cite nonexistent documents, assign commander/comms/operations roles, disable the faulty reranker within 12 minutes, and preserve a timestamped evidence bundle. Query citation_validation_failures_total, affected_answers_total{tenant}, incident_mttd_seconds, incident_mttm_seconds, deployment_version, and feature_flag_state immediately before and after the baseline. Calculate deltas rather than trusting dashboard shape. Every successful user event should map to a defined outcome counter; every duration should have a clearly named clock boundary. Confirm version and environment dimensions let an operator distinguish old and new code without adding customer-specific cardinality.
Write an expected event sequence before looking at logs. Compare it to the observed sequence and explain every extra event, especially hidden retries or duplicate processing. A successful response with unexpected retries is operational debt because it consumes capacity and predicts a sharper failure under load. Verify that logs contain reason codes and correlation IDs but not request bodies, credentials, or private document content.
Read
Establish the baseline envelope
Vary one legitimate input dimension—request size, tenant class, queue age, or dependency latency—and keep the rest fixed. Identify where the normal path approaches the target. Save p50, p95, and maximum for a bounded sample, plus demand and saturation. The baseline is invalid if traffic count is missing.
Use the historical failure as a warning: reranker v2.7 sorted ascending scores, producing 11.8% invalid citations for legal-research users while HTTP latency and status dashboards remained green. Explain which normal-path measurement would have made that incident easier to recognize. Also record the production tension: fast rollback limits harm but may erase runtime evidence; broad shutdown is simple but denies service to unaffected tenants that could safely remain online. The baseline page passes when another engineer can reproduce the journey and predict which telemetry changes before running it.