Skip to content

Rust backend parity harness

State: open/building · Kind: module · Audience: system

  • 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.

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.

  • 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 parity CLI bin that drives these
  • 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
  • solutions/determined/crates/determined-parity/
  • solutions/determined/crates/determined-parity/src/lib.rs
  • solutions/determined/crates/determined-parity/src/manifest.rs#TreeManifest
  • solutions/determined/crates/determined-parity/src/classify.rs
  • solutions/determined/crates/determined-parity/src/differential.rs
  • solutions/determined/crates/determined-parity/src/shadow.rs
  • solutions/determined/crates/determined-parity/src/doubles.rs
  • solutions/determined/crates/determined-parity/src/bin/parity.rs
  • solutions/determined/crates/determined-parity/fixtures/cases/

← Back to Capabilities