Expand description
Validation pipeline types for pack-contributed KG rules (ADR-034).
This module defines the trait surface and supporting types used by packs
to contribute domain-specific validation rules. Rules are compiled into the
pack binary and collected at boot time via the Pack::VALIDATION_RULES IDs
plus runtime rule implementations registered through PackRuntime.
§Two rule shapes
ADR-034 §9a defines two complementary rule shapes:
-
CorpusCheck: whole-corpus rules that receive all entities and edges together. Right for rules that need cross-entity joins (referential integrity, remote resolution, min-edge-density). -
StreamingRule: per-record rules that evaluate one record at a time. Cheaper for rules that check individual entities or edges without joins (required properties, naming conventions, no-self-loops).
Both shapes return Vec<Violation> per invocation. The validator aggregates
them into a ValidationReport.
Structs§
- Graph
Patch - Opaque graph patch produced by a fix function (ADR-034 §7).
- Graph
Snapshot - Opaque snapshot of the KG corpus passed to
CorpusCheck::check. - Validation
Context - Context passed to all rule implementations.
- Validation
Report - Aggregated result of running the full rule pipeline (ADR-034 §5).
- Validation
Rule - A pack-contributed validation rule (ADR-034 §9).
- Violation
- A single rule violation produced by a rule implementation (ADR-034 §5).
Enums§
- Severity
- Severity of a validation finding (ADR-034 §1).