Shared access rules for collections in disposable governed state.
Transition modules use these functions so missing-record and duplicate-record errors remain stable as the fold is split by concern. This is not a general repository abstraction: it only reads and updates the in-memory projection rebuilt from the ledger.
Summary
Functions
Requires every reference to exist in a collection, preserving caller error context.
Fetches an Act using the common governed-history error vocabulary.
Fetches an Attempt using the common governed-history error vocabulary.
Fetches a Decision using the common governed-history error vocabulary.
Fetches a Duty by its stable causal identity.
Fetches a Duty by its durable record reference.
Fetches a Mandate using the common governed-history error vocabulary.
Fetches a required value while preserving the caller's record kind.
Restores one canonical record and rejects identity reuse in its target index.
Rejects a duplicate identity in a governed-state collection.
Functions
Requires every reference to exist in a collection, preserving caller error context.
@spec fetch_act(ExGAM.GovernedAct.State.t(), String.t()) :: {:ok, ExGAM.Act.t()} | {:error, term()}
Fetches an Act using the common governed-history error vocabulary.
@spec fetch_attempt(ExGAM.GovernedAct.State.t(), String.t()) :: {:ok, ExGAM.Attempt.t()} | {:error, term()}
Fetches an Attempt using the common governed-history error vocabulary.
@spec fetch_decision(ExGAM.GovernedAct.State.t(), String.t()) :: {:ok, ExGAM.Decision.t()} | {:error, term()}
Fetches a Decision using the common governed-history error vocabulary.
@spec fetch_duty_by_cause(ExGAM.GovernedAct.State.t(), term()) :: {:ok, ExGAM.Duty.t()} | {:error, term()}
Fetches a Duty by its stable causal identity.
@spec fetch_duty_by_ref(ExGAM.GovernedAct.State.t(), term()) :: {:ok, ExGAM.Duty.t()} | {:error, term()}
Fetches a Duty by its durable record reference.
@spec fetch_mandate(ExGAM.GovernedAct.State.t(), String.t()) :: {:ok, ExGAM.Mandate.t()} | {:error, term()}
Fetches a Mandate using the common governed-history error vocabulary.
Fetches a required value while preserving the caller's record kind.
@spec restore_unique(map(), module(), String.t(), term(), atom()) :: {:ok, struct()} | {:error, term()}
Restores one canonical record and rejects identity reuse in its target index.
Rejects a duplicate identity in a governed-state collection.