Sealed, non-executable provider-selection normalization rules.
Rules contain only bounded data: exact fields, scalar or unique-list types,
literal or named-set defaults, finite named sets, and the closed cross-rule
vocabulary subset_of, required_when_set_nonempty, and
ceiling_of_context_limit. They cannot contain functions, modules, MFAs,
regular expressions, or caller-owned schemas.
Summary
Functions
Normalizes a selection and names the closed rule that rejected it.
Validates and seals one closed selection-rule program.
Purely normalizes one provider selection under the effective limits.
Checks the complete data-only rule shape and its construction seal.
Types
@type field() :: %{ :type => scalar_type(), :input => boolean(), optional(:required) => boolean(), optional(:default) => default(), optional(:minimum) => integer(), optional(:maximum) => integer(), optional(:minimum_items) => non_neg_integer(), optional(:members) => binary() }
@type scalar_type() :: :string | :integer | :boolean | {:unique_list, :string}
Functions
@spec explain(t(), term(), PtcRunner.Kernel.Limits.t()) :: {:ok, map()} | {:error, rejection()}
Normalizes a selection and names the closed rule that rejected it.
Validates and seals one closed selection-rule program.
@spec normalize(t(), term(), PtcRunner.Kernel.Limits.t()) :: {:ok, map()} | {:error, :invalid_selection}
Purely normalizes one provider selection under the effective limits.
Checks the complete data-only rule shape and its construction seal.