Skip to main content

Module gate

Module gate 

Source
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§

RepairOutcome
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 ⊕ delta against schema and diff the violations against data’s. Errors only if the schema is not stratifiable (as validate does).
outcome_index
A driver-friendly key index, should a driver wish to look outcomes up.