Executable compatibility gate for Spectre's durable foundations.
The gate gives applications and satellite libraries one public place to verify legacy checkpoints, the current Definition/Manifest pair, and the schema matrix supported by the running Spectre release. It performs real decode, migration, validation, and current-writer round trips; it does not maintain a second representation of any runtime value.
This module deliberately has no ExUnit dependency, so downstream projects can call it from their own test or release-verification tooling.
Summary
Functions
Returns the executable foundation-conformance contract version.
Returns the reader/writer and public golden-path matrix for this release.
Verifies one canonical Definition and its sealed Manifest.
Verifies a transported Forge Proposal and its complete evidence lineage.
Verifies an Instance checkpoint and rewrites it through the current writer.
Verifies a transported Reflection projection against all of its exact inputs.
Verifies a Run checkpoint and rewrites it through the current Run writer.
Verifies a State payload and rewrites it through the current State writer.
Types
@type report() :: %{ :contract_version => pos_integer(), :format => atom(), :digest => String.t(), optional(atom()) => term() }
Functions
@spec contract_version() :: pos_integer()
Returns the executable foundation-conformance contract version.
@spec matrix() :: map()
Returns the reader/writer and public golden-path matrix for this release.
Reader lists are normative. A writer always emits only the last version in its corresponding family; older versions are accepted solely at recovery boundaries and are migrated into the current in-memory model.
@spec verify_definition( Spectre.Definition.Canonical.t() | binary(), Spectre.Definition.Manifest.t() | binary() ) :: {:ok, report()} | {:error, term()}
Verifies one canonical Definition and its sealed Manifest.
Each argument may be the validated struct or its canonical encoded bytes. The returned identity is derived from the same canonical model consumed by publication and activation.
@spec verify_forge_proposal(Spectre.Forge.Proposal.t() | map() | binary()) :: {:ok, report()} | {:error, term()}
Verifies a transported Forge Proposal and its complete evidence lineage.
Verifies an Instance checkpoint and rewrites it through the current writer.
verify_checkpoint/1 is retained as a concise alias for tooling whose only
canonical checkpoint family is the Instance checkpoint.
@spec verify_reflection( Spectre.Projection.t() | map() | binary(), Spectre.Definition.Canonical.t() | binary(), Spectre.Definition.Manifest.t() | binary(), Spectre.Instance.Activation.t() | map(), Spectre.Experience.Store.snapshot() | map() ) :: {:ok, report()} | {:error, term()}
Verifies a transported Reflection projection against all of its exact inputs.
This gate regenerates the projection; checking its stored digest alone is insufficient because effective Activation and Experience may have changed.
Verifies a Run checkpoint and rewrites it through the current Run writer.
Verifies a State payload and rewrites it through the current State writer.