Immutable, non-executable proposal to derive a Definition from an observed Instance Activation.
A ChangeSet binds the exact Activation receipt, Candidate, Definition, authority epoch, and mechanical evidence observed by its author. Composition fails when any of those observations is stale; rebasing is always an explicit new ChangeSet.
Summary
Functions
Decodes and revalidates a ChangeSet.
Returns the stable ChangeSet digest.
Encodes a ChangeSet with the production canonical codec.
Derives the mechanical evidence digest used for stale-base detection.
Binds an Activation to exact Reflection/Experience evidence.
Restores a ChangeSet from portable data.
Builds and verifies a ChangeSet from host or decoded JSON-shaped data.
Builds a ChangeSet or raises with the stable validation reason.
Returns the maximum number of ordered operations in one ChangeSet.
Returns the ChangeSet schema version.
Returns canonical portable ChangeSet data.
Checks that this proposal still describes the supplied Activation.
Checks the Activation plus exact external evidence observed by a proposal.
Types
@type t() :: %Spectre.Governance.ChangeSet{ author_ref: String.t(), base_activation_receipt: String.t(), base_candidate_ref: Spectre.Definition.Candidate.Ref.t(), created_at: non_neg_integer(), observed_authority_epoch: non_neg_integer(), observed_definition_ref: Spectre.Definition.Ref.t(), observed_evidence_digest: String.t(), operations: [Spectre.Governance.ChangeSet.Operation.t()], provenance: map(), reason: String.t(), schema_version: pos_integer() }
Functions
Decodes and revalidates a ChangeSet.
Returns the stable ChangeSet digest.
Encodes a ChangeSet with the production canonical codec.
@spec evidence_digest(Spectre.Instance.Activation.t()) :: String.t()
Derives the mechanical evidence digest used for stale-base detection.
@spec evidence_digest(Spectre.Instance.Activation.t(), map()) :: String.t()
Binds an Activation to exact Reflection/Experience evidence.
Restores a ChangeSet from portable data.
Builds and verifies a ChangeSet from host or decoded JSON-shaped data.
Builds a ChangeSet or raises with the stable validation reason.
@spec operation_limit() :: pos_integer()
Returns the maximum number of ordered operations in one ChangeSet.
@spec schema_version() :: pos_integer()
Returns the ChangeSet schema version.
Returns canonical portable ChangeSet data.
@spec verify_base(t(), Spectre.Instance.Activation.t() | nil) :: :ok | {:error, term()}
Checks that this proposal still describes the supplied Activation.
@spec verify_base(t(), Spectre.Instance.Activation.t() | nil, map()) :: :ok | {:error, term()}
Checks the Activation plus exact external evidence observed by a proposal.