Enumerates every (transition, outcome) in defn and asserts declaration ≡ real code:
Enumerates every (transition, outcome) in defn and asserts declaration ≡ real code:
Missing-witness = failure by construction — any enumerated edge with zero witnesses is reported as an error (adding an outcome without a witness fails the suite).
SET-conformance of emit: every emitted event matches some declared EventShape and every declared shape is produced (cardinality is deliberately unchecked — emit fan-out is data-dependent);
fold: emits.foldLeft(Right(entity))(_ flatMap foldEvent(_, _)) lands on an entity whose defn.stateOf equals the outcome's declared to.
Returns Nil when the definition and its witnesses are conformant.