Iter 37. Adds the cross-pipeline counterpart to iter 31's I3 isolation
tests. Iter 31 proved hash DIFFERENCES across sites and days; this
iter proves event-stream EQUALITY across two pipeline instances with
matching configuration. Operators capturing BFI for offline replay
analysis can now trust that replaying the same input stream produces
byte-identical JSON output across BFLD versions.
Added (in v2/crates/wifi-densepose-bfld/tests/pipeline_determinism.rs):
- 5 named tests, all green:
two_pipelines_with_identical_config_produce_identical_event_streams
Build two BfldPipelines from the same BfldConfig (same node_id,
same SignatureHasher salt, same class), drive both with 5
identical (timestamp, motion, embedding) tuples, then walk both
event vecs field-by-field asserting equality of every
publishable BfldEvent field including the derived
rf_signature_hash and identity_risk_score.
two_pipelines_produce_byte_identical_event_json_streams
(gated on serde-json) — same fixture, but compares the
serde_json::to_string output as Vec<String>. This is the
operator's true wire-form replay guarantee.
replaying_same_input_sequence_after_pipeline_reset_reproduces_events
Catches accidental hidden state by building, draining, and
rebuilding the pipeline twice; asserts the hash sequences match.
If a future PR adds an internal counter that affects output,
this test fires.
different_input_sequences_diverge_after_the_first_difference
Negative control: identical first two inputs produce identical
hashes; changing the third input (different embedding) produces
a different hash. Pins that the determinism is genuine, not
"always returns the same value."
class_3_pipelines_produce_identical_stripped_event_streams
Determinism property must hold across privacy classes too —
operators running Restricted deployments need replay to work
even though identity fields are stripped.
ADR-124 status (iter step 0 sibling check):
- docs/adr/ADR-124-rvagent-mcp-ruvector-npm-integration.md unchanged
at 431 lines. SENSE-BRIDGE scope remains orthogonal.
ACs progressed:
- ADR-119 AC6 (deterministic serialization) lifted from the
BfldFrame layer (iter 2) to the BfldEvent + JSON layer.
Operators get end-to-end determinism guarantees from sensing
input through to MQTT topic payload.
- ADR-118 §2.1 pipeline correctness — two-pipeline equality is the
strongest form of the "same input → same output" contract the
facade can offer. Combined with iter 31's I3 difference proof,
the pipeline now has both "should match" and "should differ"
invariants pinned at the public-API level.
Test config:
- cargo test --no-default-features → 80 passed (pipeline_determinism cfg-out)
- cargo test → 248 passed (243 + 5)
Out of scope (next iter target):
- PR-readiness pivot — CHANGELOG batch, witness bundle, AC closeout
table for the eventual PR description. All in-crate ACs are now
covered by iters 1-37; remaining work is either external-resource-
gated (KIT BFId, Pi5/Nexmon) or PR-prep.
Co-Authored-By: claude-flow <ruv@ruv.net>