Spectre.Governance.Checker.Declarative (Spectre v0.3.0)

Copy Markdown View Source

Model-free replay and regression checker for closed declarative Skill replies.

It resolves both Definitions from the Store, runs the canonical evaluation cases through the same Skill runtime loader used by live turns, and binds route, outcome, context and optional exact output to the protected corpus digest. Candidates containing Operation or Work handlers are refused.

Summary

Functions

Returns the checker versions trusted by the built-in Morph workflow.

Runs protected and Candidate-owned cases against exact parent/Candidate refs.

Types

evaluation_case()

@type evaluation_case() :: Spectre.Eval.Case.t() | map()

governed_candidate()

@type governed_candidate() ::
  Spectre.Definition.Candidate.t()
  | %{governance: Spectre.Governance.CandidateState.t()}

result()

@type result() ::
  {:ok, Spectre.Governance.EvaluationDelta.t(), [Spectre.Gate.Receipt.t()]}
  | {:error, term()}

Functions

checker_versions()

@spec checker_versions() :: %{
  replay: {String.t(), pos_integer()},
  regression: {String.t(), pos_integer()}
}

Returns the checker versions trusted by the built-in Morph workflow.

run(store, candidate, cases, opts \\ [])

Runs protected and Candidate-owned cases against exact parent/Candidate refs.