Skip to main content

fetchium_core/validate/
mod.rs

1//! 6-layer validation + RAR self-correction (PRD §19, §8.6).
2//!
3//! ## Validation Pipeline
4//!
5//! Results pass through 6 validators in sequence:
6//!
7//! | Layer | Validator | What it checks |
8//! |-------|-----------|----------------|
9//! | V1 | `AuthorityScorer` | Domain reputation, SSL, redirect chains |
10//! | V2 | `ContentValidator` | Paywall detection, relevance, min length |
11//! | V3 | `TemporalValidator` | Freshness with exponential decay |
12//! | V4 | `CrossSourceVerifier` | Cross-source claim agreement |
13//! | V5 | `ExtractionValidator` | Truncation, encoding errors, segments |
14//! | V6 | `OutputValidator` | Citation reachability, content hash drift |
15//!
16//! The [`ConfidenceCalibrator`] aggregates all layer scores into a single
17//! calibrated confidence score. The [`RarEngine`] drives 5-checkpoint
18//! self-correction (R1–R5) when confidence falls below threshold.
19
20pub mod authority;
21pub mod calibration;
22pub mod content;
23pub mod cross_source;
24pub mod extraction;
25pub mod output;
26pub mod rar;
27pub mod temporal;
28pub mod types;
29
30pub use authority::AuthorityScorer;
31pub use calibration::ConfidenceCalibrator;
32pub use cross_source::{CrossSourceVerifier, SourceContent};
33pub use rar::{RarConfig, RarEngine, RarState};
34pub use temporal::TemporalValidator;
35pub use types::*;