vox-wire-format-validator API Reference (generated)
vox-wire-format-validator
Section titled “vox-wire-format-validator”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.
Crate Overview
Section titled “Crate Overview”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 -- --updateCommit the resulting change to src/expected_hash.rs.
Public API Surface
Section titled “Public API Surface”Modules
Section titled “Modules”| Module | Description |
|---|---|
expected_hash | — |
Structs
Section titled “Structs”| Struct | Description |
|---|---|
SpecDriftError | Error returned when the SSOT has drifted from the expected hash. |
Functions
Section titled “Functions”| Function | Description |
|---|---|
check_ssot_drift | Check 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_hash | Compute and return the blake3 hex digest of the SSOT doc at repo_root. Used by --update mode and tests. |
Constants
Section titled “Constants”| Constant | Description |
|---|---|
SSOT_DOC_PATH | The repo-relative path to the wire-format SSOT document. |
DRIFT_DIAGNOSTIC_ID | Diagnostic ID emitted on drift (stable, append-only per the diagnostic catalog). |