Immutable governance state attached to a Definition Candidate.
proposal_digest identifies the fixed proposal independently from later
gate and approval receipts. Advancing the state creates a new outer
Candidate.Ref, while every receipt remains bound to the same proposal.
This avoids circular receipt identities without weakening content addressing.
Summary
Functions
Returns the non-negotiable gate floor for a Candidate risk class.
Returns the supported non-approval gate classes.
Builds and verifies a Candidate governance state.
Builds governance state or raises with the stable validation reason.
Returns the immutable proposal digest from normalized core fields.
Returns the governance Candidate-state schema version.
Returns portable governance state data.
Advances mutable review state while preserving the proposal digest.
Types
@type gate_class() ::
:structural
| :authority
| :closure
| :prompt_budget
| :applicability
| :replay
| :regression
| :semantic_live
| :evaluation_delta
@type risk() :: :low | :medium | :high | :critical
@type state() :: :composed | :evaluated | :approved | :rejected
@type t() :: %Spectre.Governance.CandidateState{ applicability_ceilings: map(), approval_receipt_ref: String.t() | nil, base_activation_receipt: String.t(), base_candidate_ref: String.t(), candidate_case_ids: [String.t()], candidate_cases: [map()], candidate_definition_ref: String.t(), change_set_digest: String.t(), closure_digest: String.t(), evaluation_cases_digest: String.t(), gate_receipt_refs: [String.t()], lineage_refs: [String.t()], observed_authority_epoch: non_neg_integer(), observed_evidence_digest: String.t(), parent_definition_ref: String.t(), prompt_token_ceiling: number() | nil, proposal_digest: String.t(), protected_cases_digest: String.t(), report: Spectre.Projection.HumanReport.t() | nil, report_digest: String.t() | nil, required_gates: [gate_class()], risk: risk(), schema_version: pos_integer(), state: state(), state_migrations: [map()] }
Functions
@spec constitutional_gates(risk()) :: [gate_class()]
Returns the non-negotiable gate floor for a Candidate risk class.
@spec gate_classes() :: [gate_class()]
Returns the supported non-approval gate classes.
Builds and verifies a Candidate governance state.
Builds governance state or raises with the stable validation reason.
Returns the immutable proposal digest from normalized core fields.
@spec schema_version() :: pos_integer()
Returns the governance Candidate-state schema version.
Returns portable governance state data.
Advances mutable review state while preserving the proposal digest.