Spectre.Operation.Executor (Spectre v0.3.0)

Copy Markdown View Source

Executes one closed-catalog operation inside a temporary Runner.

Summary

Functions

Runs one operation end to end: input validation, portability check, policy authorization, kind-specific invocation and output/domain validation.

Resolves an ambiguous outcome by calling the spec's reconcile executor with the stored receipt, then validates the produced execution.

Types

result()

@type result() :: {:ok, term()} | {:error, term()} | {:ambiguous, term()}

Functions

execute(spec, request, context)

Runs one operation end to end: input validation, portability check, policy authorization, kind-specific invocation and output/domain validation.

Returns {:ok, execution}, {:error, reason}, or {:ambiguous, reason} when a side-effecting operation failed in a way whose outcome is unknown (timeout, crash, declared ambiguity).

reconcile(spec, receipt, context)

Resolves an ambiguous outcome by calling the spec's reconcile executor with the stored receipt, then validates the produced execution.

Returns {:error, {:operation_not_reconcilable, id}} when the spec has no reconcile executor.