Adapter-neutral conformance checks for an Instance Checkpoint Store.
The runner writes two consecutive canonical checkpoints through
Spectre.Instance.CheckpointStore, verifies semantic readback, reconciles an
exact retry, proves that a stale writer cannot replace revision two, and
races two revision-three writers to require a single CAS winner. It uses the
real current checkpoint codec and Instance validator and has no ExUnit
dependency.
The Checkpoint Store behaviour deliberately leaves the adapter's conflict
vocabulary open. The race therefore accepts any declared error from the
losing writer, but rejects {:ambiguous, reason} because that outcome cannot
prove there was only one commit.
A run leaves revision three in storage. Callers must pass a fresh, isolated
Spectre.Instance.Ref; adapter options belong in the ordinary store config.
Summary
Functions
Compares one checkpoint semantically through two store configurations.
Runs the public CAS contract using a fresh Instance Ref.
Types
@type report() :: %{ create: :committed, update: :committed, exact_retry: :accepted | :readback_verified, stale_write: :rejected, concurrent_cas: :single_winner, readback: :verified, revision: 3, checkpoint_digest: String.t() }
Functions
@spec read_after_restart( Spectre.Instance.CheckpointStore.config(), Spectre.Instance.CheckpointStore.config(), Spectre.Instance.Ref.t() ) :: :ok | {:error, term()}
Compares one checkpoint semantically through two store configurations.
@spec run(Spectre.Instance.CheckpointStore.config(), Spectre.Instance.Ref.t()) :: {:ok, report()} | {:error, term()}
Runs the public CAS contract using a fresh Instance Ref.