ConformanceCheck

works.iterative.workflow.ConformanceCheck

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def errors[R, State, Entity, Command, Event](defn: EngineDefinition[R, State, Entity, Command, Event], foldEvent: (Entity, Event) => Either[Any, Entity], witnesses: List[Witness[State, Entity, Command]]): List[String]

Enumerates every (transition, outcome) in defn and asserts declaration ≡ real code:

Enumerates every (transition, outcome) in defn and asserts declaration ≡ real code:

  1. 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).
  2. Per witness, against the real code:
    • t.classify(entity, command).label == outcomeLabel;
    • 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.

Attributes