Expand description
The re-validation gate (docs/06-repair.md §8).
A repair is sound only if it does not trade one violation for another, so the
gate is whole-graph, not focus-local: it re-validates G ⊕ ΔG and diffs
the violation set against G’s. It decides nothing and applies nothing —
it returns a RepairOutcome the driver reads.
The verdict is a set difference over the existing [validate] oracle, keyed by
(focus, statement). Because the contract is this delta (not a bare v ⊨ φ),
a cheaper affected-set re-validation can replace the implementation later
with identical semantics.
Structs§
- Repair
Outcome - The gate’s verdict on a candidate
ΔG.
Functions§
- apply
G ⊕ ΔG: deletes first, then adds (so a re-add wins on conflict).- gate
- Validate
data ⊕ deltaagainstschemaand diff the violations againstdata’s. Paths and the class hierarchy are evaluated againstcontext, which should containdata; passdataagain when there is no separate shapes/ontology graph. For split inputscontext = data ∪ shapes, so the re-validation sees(data ⊕ δ)for focus and(context ⊕ δ)for evaluation — letting the gate discharge a constraint likesh:class Cagainst a value typed with a subclass ofCwhen the hierarchy lives in the shapes graph. The gate dual ofcrate::validate_with_context. Errors only if the schema is not stratifiable. - outcome_
index - A driver-friendly key index, should a driver wish to look outcomes up.