Immutable parameter state with playbook-style revision lineage.
A committed set increments revision, records the prior hash as
parent_hash, and rehashes the complete canonical data representation. This
gives a compact persistence boundary while each individual change retains its
own base_digest optimistic guard.
Summary
Functions
Applies all changes or returns an error without yielding a partial set.
Returns the minimal ordered replacement changes from source to target.
Returns a deterministic data-only representation.
Returns a parameter by stable string ID.
Loads and verifies a persisted parameter set.
Builds a root parameter set from unique typed parameters.
Types
@type t() :: %Imp.Optimizer.Parameter.Set{ hash: String.t(), id: String.t(), parameters: [Imp.Optimizer.Parameter.t()], parent_hash: String.t() | nil, revision: non_neg_integer() }
Functions
@spec apply_changes(t(), [Imp.Optimizer.Parameter.Change.t() | map()]) :: {:ok, t()} | {:error, term()}
Applies all changes or returns an error without yielding a partial set.
@spec diff(t(), t()) :: [Imp.Optimizer.Parameter.Change.t()]
Returns the minimal ordered replacement changes from source to target.
Returns a deterministic data-only representation.
@spec fetch(t(), String.t()) :: {:ok, Imp.Optimizer.Parameter.t()} | :error
Returns a parameter by stable string ID.
Loads and verifies a persisted parameter set.
@spec new(String.t(), [Imp.Optimizer.Parameter.t()]) :: t()
Builds a root parameter set from unique typed parameters.