ExGAM.Kernel.Authority.Attenuation (ExGAM v0.1.0)

Copy Markdown View Source

Pure non-amplification checks for Mandate descendants and successors.

Delegation may only subtract authority and quantitative ceilings. Restriction may only narrow a Mandate in place and therefore keeps lineage, roles, Meter allocation and revocation policy fixed. Inputs are restored through ExGAM.Mandate once at this boundary; every comparison after that point is between typed fields rather than storage-shaped maps.

Summary

Functions

Verifies that a child Mandate is a subtractive delegation of its parent.

Verifies that a successor is a strict, non-quantitative restriction.

Functions

delegation_within?(parent, child, time)

@spec delegation_within?(
  ExGAM.Mandate.t() | map() | keyword(),
  ExGAM.Mandate.t() | map() | keyword(),
  integer()
) :: :ok | {:error, term()}

Verifies that a child Mandate is a subtractive delegation of its parent.

restriction_within?(predecessor, successor, time)

@spec restriction_within?(
  ExGAM.Mandate.t() | map() | keyword(),
  ExGAM.Mandate.t() | map() | keyword(),
  integer()
) :: :ok | {:error, term()}

Verifies that a successor is a strict, non-quantitative restriction.