Skip to main content

Module field_anomaly

Module field_anomaly 

Source
Expand description

T107 poisoned-data field-level anomaly detector.

Catches the “tarpit / poisoned data / silent 200s” pattern from https://web-scraping-guide.com/#post-extract: targets that return clean 200 responses with subtly wrong field values (price drift, listing reorder, fabricated rows, stale snapshots). The detector observes every field value the pipeline publishes and emits field_anomaly::AnomalyReports when a value is statistically inconsistent with the rolling baseline.

Hidden behind a field-anomaly cargo feature so existing charon users aren’t forced to opt in. T107 poisoned-data field-level anomaly detector.

Catches the “tarpit / poisoned data / silent 200s” pattern from https://web-scraping-guide.com/#post-extract: a target returns clean 200 responses with subtly wrong field values (price drift, listing reorder, fabricated rows, stale snapshots). The detector observes every field value the pipeline publishes and emits AnomalyReports when a value is statistically inconsistent with the rolling baseline.

Two pieces:

Hidden behind a field-anomaly cargo feature in the parent crate so existing charon users aren’t forced to opt in.

Structs§

AnomalyReport
One anomaly emitted by FieldAnomalyDetector::observe.
FieldPath
Dot-path to a field within a record ("price", "items.0.sku").
SchemaBaseline
Per-field rolling baseline — the statistical summary the detector compares new observations against.
SchemaId
Stable identifier for a schema or data-contract version. Two observations with different SchemaId belong to different baselines — the detector resets state on schema change.
StatisticalFieldAnomalyDetector
Default statistical detector. Rolling-window-based: keeps the last Self::WINDOW_SIZE observations per field per schema and applies the five heuristics in AnomalySignal.

Enums§

AnomalyError
Errors raised by FieldAnomalyDetector operations.
AnomalySeverity
Severity of an AnomalyReport.
AnomalySignal
The five anomaly kinds the detector emits.
FieldValue
One observed field value.

Traits§

FieldAnomalyDetector
Port trait: observe a field value, baseline reset on schema change.