Expand description
Off-trader verifier that proves a run file’s integrity before the trader opens it.
See README.md “Storage backend” and “Determinism contract” sections for the SPEC
posture: redb 4.x does not framewise-checksum data pages, so a zero-tail corruption
opens cleanly and panics on first read. The verifier therefore exercises every entry
and every stored index pair, accumulating findings so a single run produces one
actionable report rather than failing fast on the first hit. The supervisor runs the
verifier in an isolated process so a bad file aborts the verifier, not trading.
Scope:
- Walk every
seqover[1, high_watermark]and recomputecrate::EntryHash. - Detect gaps in the seq sequence (the SPEC’s gap-detection idempotency primitive).
- Validate that every
client_order_idandvenue_order_idstored target seq still resolves to a clean entry; full payload-derived rebuild is deferred until the wrapper-type encoders land. - Validate manifest invariants:
high_watermarkmatches the durable last seq, the recordedstart_ts_initandend_ts_initbracket the entry stream, and a sealed manifest’s status is a terminal state.
The library API stays narrow: a single Verifier type that owns a backend, a
VerifyReport structured for downstream operator tooling, and a VerifyError
reserved for failures that prevent the verifier from producing any report at all.
Structs§
- GapRange
- An inclusive
[from, to]range of missing seqs. - Verifier
- Verifier over a single open run.
- Verify
Report - The structured report produced by
Verifier::verify.
Enums§
- Index
Drift - The kind of drift observed for a sidecar index key.
- Manifest
Field - A manifest field flagged by
VerifyFinding::ManifestMismatch. - Verify
Error - Errors that prevent the verifier from producing a report at all.
- Verify
Finding - One actionable integrity finding from a verifier run.