Skip to content

Model library-neutral validation declaration and application facts #20

Description

@woksin

Learning

Concept validation, Wolverine validation activation, and future FluentValidation support are different semantic dimensions. A validator declaration does not prove it is active for a handler; package presence does not prove application; and arbitrary predicates must remain named external behavior rather than guessed built-in rules.

Desired neutral model

Add library-neutral facts for:

  1. validator/rule declaration;
  2. target subject/type applicability;
  3. validation activation for a handler/endpoint/profile scope;
  4. actual application to an entry point;
  5. execution phase/order when exact;
  6. named external or unrepresentable behavior;
  7. source/evidence/producer and derivation lineage.

Example deterministic join:

  • FluentValidation adapter: validator V validates command C.
  • Wolverine adapter: handler H handles C; validation is active for H's exact scope.
  • Generation derivation: V applies to H/C.

Neither adapter consumes the other.

Acceptance criteria

  • Preserve concept invariants independently from command/handler validation.
  • Represent declaration, applicability, activation, and application as separate facts.
  • Duplicate rules corroborate; conflicting rules remain visible.
  • Runtime/custom/conditional activation fails closed with located diagnostics.
  • Generated validators or generated handlers cannot originate semantics.
  • Existing Vogen named validation and Wolverine activation evidence map without behavior loss.
  • A standalone FluentValidation adapter composes with Arc and Critter profiles without either stack owning it.
  • Lowering coverage/disposition is explicit when Screenplay cannot express a rule or phase.
  • Valid input remains order-independent and compiler-verified.

Related: #17, Cratis/Screenplay.CritterStack#4, Cratis/Arc issue to export neutral facts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions