Domain-facing driver and query API for disposable governed state.
A projection is rebuilt from the canonical ledger and can always be thrown
away. Structural snapshot verification belongs here; transition semantics
live in Spectre.GAM.GovernedAct.Fold, while derived reads live in
Spectre.GAM.GovernedAct.View. None of these modules is an authority store.
Summary
Functions
Applies one timestamped payload batch to disposable governed state.
Returns the immutable authority facts consumed by the pure kernel.
Looks up the durable Decision selected by a Candidate identity key.
Looks up the Act paired with a durable Decision.
Looks up one immutable governed Definition by exact reference.
Looks up a Duty by stable cause key or durable reference.
Resolves an exact Evidence set from disposable state.
Returns physical Meter accounts for a logical Mandate revision.
Creates empty disposable state for a Domain.
Verifies a ledger snapshot and folds its canonical governed history.
Checks an authenticated context against its durable Scope opening.
Types
@type dispatch_cancellation() :: Spectre.GAM.GovernedAct.State.dispatch_cancellation()
@type meter_recontainment() :: Spectre.GAM.GovernedAct.State.meter_recontainment()
@type meter_reservation() :: Spectre.GAM.GovernedAct.State.meter_reservation()
@type reservation_status() :: Spectre.GAM.GovernedAct.State.reservation_status()
@type t() :: Spectre.GAM.GovernedAct.State.t()
Functions
@spec apply_payloads(t(), [map()], non_neg_integer()) :: {:ok, t()} | {:error, term()}
Applies one timestamped payload batch to disposable governed state.
@spec authority_view(t()) :: Spectre.GAM.Kernel.Authority.Facts.t()
Returns the immutable authority facts consumed by the pure kernel.
@spec candidate_decision(t(), String.t()) :: {:ok, Spectre.GAM.Decision.t()} | :not_found | {:error, term()}
Looks up the durable Decision selected by a Candidate identity key.
@spec decision_act(t(), Spectre.GAM.Decision.t()) :: {:ok, Spectre.GAM.Act.t() | nil} | {:error, term()}
Looks up the Act paired with a durable Decision.
@spec definition(t(), String.t()) :: {:ok, Spectre.GAM.Definition.t()} | {:error, term()}
Looks up one immutable governed Definition by exact reference.
@spec duty(t(), {:cause_key, term()} | {:ref, String.t()}) :: {:ok, Spectre.GAM.Duty.t()} | :not_found | {:error, :invalid_duty_lookup}
Looks up a Duty by stable cause key or durable reference.
Resolves an exact Evidence set from disposable state.
Returns physical Meter accounts for a logical Mandate revision.
Creates empty disposable state for a Domain.
@spec replay(Spectre.GAM.Ledger.snapshot(), map()) :: {:ok, t()} | {:error, term()}
Verifies a ledger snapshot and folds its canonical governed history.
@spec scope_context(t(), Spectre.GAM.SubmissionContext.t()) :: {:ok, Spectre.GAM.Scope.Opening.t()} | {:error, term()}
Checks an authenticated context against its durable Scope opening.