Shared vocabulary for the operation runtime modules.
Small pure helpers used across Spectre.Operation.Runtime and its
Contract/Transitions/Results/Controls/Recovery submodules: controller
callback invocation, reduced controller contexts, event-spec builders and
option/portability utilities. Intended to be imported by those modules.
Summary
Functions
Default maximum retained loop artifacts.
Builds the payload for attempt-started events.
Builds the payload for budget-exhaustion events.
Invokes a controller callback, capturing crashes as tagged errors.
Builds the reduced context passed to controller callbacks.
Builds one event spec.
Maximum retained invalidation entries.
Accepts a map or keyword option, tagging invalid shapes with the field.
Puts a key only when the value is present.
Normalizes a keyword list to a map, dropping invalid shapes.
Reads the deterministic clock from the environment.
Reads one option from a map with a default.
Validates a value as portable, tagging failures as operational.
Reduces an arbitrary failure term to a privacy-safe atom class.
Maximum retained loop results.
Classifies a trigger value into its declared trigger type.
Maximum retained applied updates.
Builds the payload for wait-related events.
Functions
@spec artifact_limit() :: pos_integer()
Default maximum retained loop artifacts.
@spec attempt_event(Spectre.Operation.Attempt.t()) :: map()
Builds the payload for attempt-started events.
Builds the payload for budget-exhaustion events.
Invokes a controller callback, capturing crashes as tagged errors.
@spec controller_context(Spectre.Operation.Loop.t() | nil, map()) :: map()
Builds the reduced context passed to controller callbacks.
Builds one event spec.
@spec invalidation_limit() :: pos_integer()
Maximum retained invalidation entries.
Accepts a map or keyword option, tagging invalid shapes with the field.
Puts a key only when the value is present.
Normalizes a keyword list to a map, dropping invalid shapes.
Reads the deterministic clock from the environment.
Reads one option from a map with a default.
Validates a value as portable, tagging failures as operational.
Reduces an arbitrary failure term to a privacy-safe atom class.
@spec result_limit() :: pos_integer()
Maximum retained loop results.
Classifies a trigger value into its declared trigger type.
@spec update_limit() :: pos_integer()
Maximum retained applied updates.
@spec wait_event(Spectre.Operation.Wait.t(), Spectre.Operation.Loop.t(), map()) :: map()
Builds the payload for wait-related events.