Prepare/commit protocol for registered, pure Work state migrations.
Authored data selects only an operation ID already present in the Agent's
reviewed registry. prepare/5 resolves and snapshots its portable contract;
the host executes the returned request through its normal operation boundary;
commit/3 re-resolves the contract and validates the migrated state before
issuing an integrity receipt.
Summary
Functions
Commits an already executed migration after revalidating its exact contract.
Prepares one declared migration without executing its operation.
Returns privacy-safe migration lineage.
Verifies the prepared migration and request binding.
Types
@type t() :: %Spectre.Execution.Migration{ definition_ref: term(), digest: term(), materialization_digest: term(), operation_contract_digest: term(), operation_ref: term(), program: term(), request: term(), schema_version: term(), source_state: term(), source_state_digest: term(), source_version: term(), target_version: term() }
Functions
@spec commit(t(), Spectre.Operation.Execution.t(), module()) :: {:ok, term(), Spectre.Execution.Migration.Receipt.t()} | {:error, term()}
Commits an already executed migration after revalidating its exact contract.
@spec prepare(Spectre.Execution.Program.t(), term(), term(), module(), keyword()) :: {:ok, t()} | {:error, term()}
Prepares one declared migration without executing its operation.
Returns privacy-safe migration lineage.
Verifies the prepared migration and request binding.