Rust backend parity harness
State: open/building · Kind: module · Audience: system
Summary
Section titled “Summary”- Checks that a Rust backend behaves like the Node one before its default is flipped, by diffing responses and the vault tree bytes. Only backup runs end to end so far.
- Dev-only (publish = false); other determined crates use its fixtures and doubles in their own tests.
Statement
Section titled “Statement”Two implementations of the same port trait either behave identically or they do not. A response-only diff can pass while a run silently rewrites notes and drops YAML comments or key order. This crate hashes every file in the vault after a run, compares the manifests, and reports the exact path, byte offset and named corruption class.
What it provides
Section titled “What it provides”- Golden fixture cases (backup, notekit) where expected.json states a vault delta
- Vault-tree hash manifest and a differ that reports path, byte offset and corruption class
- Normalized response comparison (Value, not strings)
- A/B differential replay: restore, run Node, snapshot, restore, run Rust, diff
- Shadow-mode record format and report (the platform call site is not built)
- Test doubles (JobSink, EngineProbe, VaultRegistry) and a synthetic adversarial vault fixture
- A
parityCLI bin that drives these
Underlying implementation
Section titled “Underlying implementation”- solutions/determined/crates/determined-parity/src/manifest.rs and classify.rs hash the vault tree and name each corruption class
- solutions/determined/crates/determined-parity/src/differential.rs and shadow.rs replay Node then Rust, and collect real-corpus evidence
- solutions/determined/crates/determined-parity/src/doubles.rs holds the test doubles
- solutions/determined/crates/determined-parity/src/bin/parity.rs is the CLI
Locations
Section titled “Locations”solutions/determined/crates/determined-parity/solutions/determined/crates/determined-parity/src/lib.rssolutions/determined/crates/determined-parity/src/manifest.rs#TreeManifestsolutions/determined/crates/determined-parity/src/classify.rssolutions/determined/crates/determined-parity/src/differential.rssolutions/determined/crates/determined-parity/src/shadow.rssolutions/determined/crates/determined-parity/src/doubles.rssolutions/determined/crates/determined-parity/src/bin/parity.rssolutions/determined/crates/determined-parity/fixtures/cases/