Prototype Incident

A concrete before-vs-after data drift story using the bundled orders snapshots.

Open example data
Prototype
Critical incident
Orders dataset

The repo now shows a real quality incident, not a hypothetical dashboard alert.

A clean baseline snapshot is compared against a degraded candidate snapshot with missing region data, identifier type drift, a sharp row-count drop, and a suspicious revenue spike. The watchtower turns that into a named incident with a failing gate.

Incident summary

Rows

9

-25%

Schema fingerprint

cf171c4c74e3d910

changed

Severity

critical

escalated

Gate verdict

fail

blocked

Drift breakdown
The watchtower names the specific failure mode instead of returning a generic anomaly score.

customer_id

schema
critical

Type changed from integer to string, which invalidates downstream joins and ID assumptions.

region

schema
critical

Column disappeared entirely in the drifted snapshot.

discount_pct

null
warning

Null rate jumped from 0.000 to 0.889, suggesting upstream extraction loss or partial writes.

revenue_usd

numeric
warning

Mean moved from 103.408 to 624.683 and outlier rate nearly tripled due to a suspicious 5400.00 spike.

customer_id

cardinality
critical

Identifier cardinality collapsed and formatting shifted, a strong signal that source semantics changed.

CLI flow
The repo includes the exact data and commands used to reproduce this incident.
bash
uv run data-quality-watchtower profile examples/orders.csv --output baseline.json
bash
uv run data-quality-watchtower profile examples/orders_drifted.csv --output new_run.json
bash
uv run data-quality-watchtower compare baseline.json new_run.json --format markdown --report reports/incident.md
bash
uv run data-quality-watchtower gate baseline.json new_run.json --allowed-severity warning --max-row-count-drop-ratio 0.15
bash
uv run data-quality-watchtower show baseline.json
Gate artifact
A saved report can be attached directly to CI output, review threads, or incident follow-ups.
md
# Data Quality Gate FAIL

- Allowed severity: `warning`
- Max row-count drop ratio: `0.150`
- Max null drift count: `0`
- Max numeric drift count: `0`
- Max cardinality drift count: `0`

## Reasons

- incident severity critical exceeded allowed warning
- row-count drop 0.250 exceeded limit 0.150
- null-rate drift count 1 exceeded limit 0
- numeric drift count 3 exceeded limit 0
- cardinality drift count 1 exceeded limit 0