Pure traversal of the current typed Mandate lineage.
The caller supplies the exact indexes derived by the governed-act fold. This module neither decodes records nor tolerates alternate key shapes: a missing ancestor, malformed index entry or cycle is a history error, never an implicit revocation decision.
Summary
Functions
Checks whether an authority change affects a Mandate.
Checks whether a Mandate is the target or descends from it.
Checks only the Mandate's own revocation record, excluding ancestors.
Returns the Mandate and each typed ancestor in leaf-to-root order.
Checks direct and cascading revocation without guessing through an invalid lineage.
Selects named Mandates and their complete ancestry without unrelated branches.
Returns the exact Mandate in the lineage whose recorded revocation applies.
Returns whether a Mandate is expired or revoked at the supplied trusted time.
Types
@type mandates() :: %{optional(String.t()) => ExGAM.Mandate.t()}
@type revocations() :: %{optional(String.t()) => ExGAM.Mandate.Revocation.t()}
@type status() :: :current | {:revoked, :direct | :ancestor, String.t()}
Functions
@spec affected_by?(mandates(), String.t(), String.t(), boolean()) :: {:ok, boolean()} | {:error, term()}
Checks whether an authority change affects a Mandate.
Checks whether a Mandate is the target or descends from it.
@spec directly_revoked?(revocations(), ExGAM.Mandate.t(), integer()) :: {:ok, boolean()} | {:error, term()}
Checks only the Mandate's own revocation record, excluding ancestors.
@spec lineage(mandates(), ExGAM.Mandate.t()) :: {:ok, [ExGAM.Mandate.t()]} | {:error, term()}
Returns the Mandate and each typed ancestor in leaf-to-root order.
@spec revoked?(mandates(), revocations(), ExGAM.Mandate.t(), integer()) :: {:ok, boolean()} | {:error, term()}
Checks direct and cascading revocation without guessing through an invalid lineage.
Selects named Mandates and their complete ancestry without unrelated branches.
Selection does not validate or repair the graph. Cycles and malformed records
remain visible to lineage/2; a missing parent remains missing. This prevents
a narrowed read from accidentally turning invalid ancestry into a new root.
@spec status(mandates(), revocations(), ExGAM.Mandate.t(), integer()) :: {:ok, status()} | {:error, term()}
Returns the exact Mandate in the lineage whose recorded revocation applies.
@spec terminal?(mandates(), revocations(), ExGAM.Mandate.t(), integer()) :: {:ok, boolean()} | {:error, term()}
Returns whether a Mandate is expired or revoked at the supplied trusted time.