Quality¶
Governance tag: overwatch · Min version: overwatch-serve 0.0.1 · Anchor: #quality
Quality validates the stored records of a tenant's streams. An audit runs a family of checks per datatype over a window; each check that finds violations records one exception carrying the offending count, a human note, and a sample timestamp pointing at one offender.
Check families¶
| Datatype | Checks |
|---|---|
| orderbook | crossed_book, nonpositive_best, empty_side |
| trades | nonpositive_price, nonpositive_amount, bad_side, future_ts |
| liquidations | nonpositive_value |
| funding | rate_out_of_range, next_funding_in_past |
| open_interest | negative_oi |
Severity¶
severity |
Meaning |
|---|---|
critical |
Invalid data — a crossed book, a non-positive price, a null in a required field |
warn |
Suspicious but not invalid — an outlier, a large jump, elevated ingest lag |
info |
Noted for context |
A stream's max_severity is the most severe exception in the run; a clean run
reports none.
Exception record¶
| Field | Type | Meaning |
|---|---|---|
check_name |
string | The check that fired |
severity |
string | critical · warn · info |
observed |
f64 | Offending count or value |
detail |
string | Human note / sample |
ts_window_start_ms · ts_window_end_ms |
u64 | Audited slice bounds |
sample_ts_ms |
u64 | One offending event timestamp |
flowchart LR
A[Audit run over window] --> C[Run per-datatype checks]
C --> V{Violations?}
V -- yes --> E[Emit exception: count, detail, sample]
V -- no --> P[No exception]
E --> M[max_severity across the run]
Read it¶
The Governance API returns the quality block for one stream — the exception count, the max severity, and every check that fired in the run.
Cross-links¶
- Completeness — scores presence; quality scores validity.
- Alerts — turns critical and warn exceptions into notifications.
- API — scorecard — the HTTP surface.