Available on crate feature
quality only.Expand description
Data-quality checks: declarative per-record and per-batch assertions that
quarantine violating records to the DLQ or abort the run. Pure evaluation;
the pipeline wires the DLQ routing in run_stream.
See docs/superpowers/specs/2026-05-29-quality-checks-design.md.
Re-exports§
pub use compile::CompiledQuality;pub use config::BatchCheck;pub use config::CompareOp;pub use config::JsonType;pub use config::OnFailure;pub use config::QualitySpec;pub use config::RecordCheck;
Modules§
- batch
- Per-batch check evaluation over the survivor slice. Aggregate checks return
a single pass/fail;
uniquereturns the indices of the duplicate rows (row-attributable). - compile
- Compile a
QualitySpecinto aCompiledQuality: parse paths/regexes/ schemas once, validate theon_failuresubset and numeric bounds. Failures surface asFaucetError::Config. - config
- Config-shaped types for the data-quality layer. Pure declarations — no
evaluation logic (that lives in
record.rs/batch.rs) and no compilation (that lives incompile.rs). - record
- Per-record check evaluation. Pure functions over
&Value. A check returnsOk(())on pass orErr(message)on fail; the message is surfaced in the DLQ envelope or the abort error.
Structs§
- Check
Tally - Per-check counters + elapsed time, keyed by check name. Emitted as metrics by the observability wrapper.
- Quality
Outcome - Result of applying the quality pass to one page.
- Quarantined
Record - A record removed from the page by a quality check, destined for the DLQ.
Functions§
- apply_
quality - Apply the full per-page quality pass. Pure: no metrics, no DLQ I/O.