Skip to content
Unverified: This page has not yet been anchored to automated code tests.

vox-wire-format-validator API Reference (generated)

Crate: vox-wire-format-validator · Version: 0.6.0 · Target: Library (lib.rs)

CI guard: enforces that the Wire Format v1 SSOT and the Contract IR implementation have not drifted apart. Run via cargo run -p vox-wire-format-validator.

Wire-format SSOT drift detector.

Checks that docs/src/architecture/wire-format-v1-ssot.md has not been modified without a corresponding update to the Contract IR implementation (vox_compiler::contract_ir).

How the lock works:

  • [EXPECTED_SSOT_HASH] contains the blake3 hex digest of the SSOT doc as it stood when the Contract IR was last updated.
  • [check_ssot_drift] re-hashes the live file and compares.
  • If they differ, the SSOT changed without an IR update (or vice versa if someone updated the IR and forgot to run --update).

Updating the lock after a legitimate SSOT change:

cargo run -p vox-wire-format-validator -- --update

Commit the resulting change to src/expected_hash.rs.

ModuleDescription
expected_hash—
StructDescription
SpecDriftErrorError returned when the SSOT has drifted from the expected hash.
FunctionDescription
check_ssot_driftCheck whether [SSOT_DOC_PATH] (resolved from repo_root) matches the stored hash in [EXPECTED_SSOT_HASH]. Returns Ok(()) if the hashes match, Err(SpecDriftError) if they diverge.
compute_ssot_hashCompute and return the blake3 hex digest of the SSOT doc at repo_root. Used by --update mode and tests.
ConstantDescription
SSOT_DOC_PATHThe repo-relative path to the wire-format SSOT document.
DRIFT_DIAGNOSTIC_IDDiagnostic ID emitted on drift (stable, append-only per the diagnostic catalog).