Accumulates the typed result of applying governed ChangeSet operations.
Registered Spectre.Governance.ChangeSet.Handler implementations receive a
Composition and return its next immutable value. The struct records the
candidate Definition, evaluation obligations, state migrations, affected
component classes, operation vocabulary, and maximum risk observed so far.
A Composition is transient governance state. It is never an activation, authority grant, or durable Candidate by itself.
Summary
Functions
Records an operation type, affected component classes, and risk.
Creates an empty composition rooted in the supplied Definition.
Applies one validated handler result to the composition.
Types
@type risk() :: :low | :medium | :high | :critical
The highest governance risk contributed by applied operations.
Functions
Records an operation type, affected component classes, and risk.
@spec new(Spectre.Definition.Canonical.t()) :: t()
Creates an empty composition rooted in the supplied Definition.
Applies one validated handler result to the composition.
:operation_type is required. A handler may also provide a replacement
Definition, one evaluation case, one state migration, component classes, and
its risk contribution.