Spectre.Operation.Runtime.Recovery (Spectre v0.3.0)

Copy Markdown View Source

Restart recovery and checkpoint validation for the operation runtime.

Validates a restored loop and its control plane against the current code-owned definition, refreshes definition-owned policy metadata, and reduces an interrupted attempt by its declared side-effect class before advancing or rejecting any pending control command.

Summary

Functions

Recovers portable loop state after an Agent restart and invalidates the old epoch.

Validates a restored loop and control plane against a loaded definition.

Functions

recover(loop, control, env)

Recovers portable loop state after an Agent restart and invalidates the old epoch.

validate_checkpoint(loop, control, definition, env)

@spec validate_checkpoint(
  Spectre.Operation.Loop.t(),
  Spectre.Operation.Control.t(),
  Spectre.Operation.Definition.t(),
  map()
) :: :ok | {:error, term()}

Validates a restored loop and control plane against a loaded definition.