Content-addressed evidence emitted by one trusted governance checker.
Receipts bind the immutable proposal, both Definition identities, execution
closure, evaluation corpus, checker version, profile, result, provenance,
and validity window. Passing a struct does not grant trust: activation reads
the receipt back from the configured Definition Store by Receipt.Ref.
Summary
Functions
Decodes and revalidates a receipt.
Returns the canonical receipt digest.
Encodes a receipt with the production canonical codec.
Builds and validates one gate receipt.
Builds a receipt or raises with the stable validation reason.
Returns the receipt's content Ref.
Returns canonical portable receipt data.
Verifies receipt binding, freshness, status, and optional checker policy.
Verifies immutable proposal binding without interpreting gate outcome.
Types
@type gate_class() :: Spectre.Governance.CandidateState.gate_class() | :approval
@type t() :: %Spectre.Gate.Receipt{ candidate_definition_ref: String.t(), candidate_digest: String.t(), checker_id: String.t(), checker_version: pos_integer(), closure_digest: String.t(), evaluation_cases_digest: String.t(), expires_at: non_neg_integer() | nil, gate_class: gate_class(), issued_at: non_neg_integer(), parent_definition_ref: String.t(), profile_ref: String.t() | nil, provenance: map(), result_digest: String.t(), schema_version: pos_integer(), status: :passed | :failed }
Functions
Decodes and revalidates a receipt.
Returns the canonical receipt digest.
Encodes a receipt with the production canonical codec.
Builds and validates one gate receipt.
Builds a receipt or raises with the stable validation reason.
@spec ref(t()) :: Spectre.Gate.Receipt.Ref.t()
Returns the receipt's content Ref.
Returns canonical portable receipt data.
@spec verify(t(), Spectre.Governance.CandidateState.t(), keyword()) :: :ok | {:error, term()}
Verifies receipt binding, freshness, status, and optional checker policy.
@spec verify_binding(t(), Spectre.Governance.CandidateState.t()) :: :ok | {:error, term()}
Verifies immutable proposal binding without interpreting gate outcome.