feat(adr-084): Pass 4 mesh-exchange compression + Pass 5 privacy-preserving event log#1254
Open
compiledbyutkarsh wants to merge 2 commits into
Open
feat(adr-084): Pass 4 mesh-exchange compression + Pass 5 privacy-preserving event log#1254compiledbyutkarsh wants to merge 2 commits into
compiledbyutkarsh wants to merge 2 commits into
Conversation
Pass 4 of ADR-084 (RaBitQ similarity sensor) — the happiness-ingest cycle now sketches the 8-d vector to a single sign byte and compares it against the last vector actually sent. When the hamming distance stays below novelty_threshold, the ingest is suppressed and only the suppressed-cycle counter increments; the wire format to the Cognitum Seed is unchanged, so no Seed-side changes are required. max_suppress_sec is a floor that forces a full send even on a perfectly stable room, so the Seed's view of a node never goes stale indefinitely. Heartbeats are unaffected — they stay unconditional since they are the liveness signal, not a happiness observation. New config fields default to 0 and are normalized to their real defaults in swarm_bridge_init(), so the existing designated-initializer call site in main.c needs no changes.
Pass 5 of ADR-084 — the cluster-Pi novelty sensor (Pass 3) now feeds every scored frame into a wifi-densepose-ruvector::PrivacyEventLog audit trail, alongside the existing ephemeral last_novelty_score. Each NodeState gets its own fixed-capacity (256-event) log. On every update_novelty() call, the same feature vector novelty() already scored is sketched and pushed as (sketch_bytes, sketch_version, novelty, witness_sha256) — never the raw Vec<f32> embedding. The existing EmbeddingHistory bank (used for full-precision matching) is unchanged; this only adds a durable, non-invertible audit trail alongside it. wifi-densepose-ruvector added as a direct dependency of wifi-densepose-sensing-server (previously only reachable transitively through wifi-densepose-signal). Verified: cargo check -p wifi-densepose-sensing-server clean build, cargo test -p wifi-densepose-sensing-server and -p wifi-densepose-ruvector both green (156 passed in ruvector, 0 regressions).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the two remaining passes from #432 (ADR-084 RaBitQ similarity sensor):
Pass 4 — Mesh-exchange compression: the ESP32 swarm bridge (ADR-066) now sketches each happiness vector to a 1-byte sign fingerprint and compares it against the last vector actually sent. Below-threshold novelty suppresses the ingest POST; a
max_suppress_secfloor guarantees the Seed's view never goes stale indefinitely. Wire format to the Cognitum Seed is unchanged — no Seed-side changes needed.Pass 5 — Privacy-preserving event log: the cluster-Pi novelty sensor (Pass 3) now feeds every scored frame into a
PrivacyEventLogaudit trail —(sketch_bytes, sketch_version, novelty, witness_sha256)instead of raw embeddings. The existing full-precisionEmbeddingHistorybank is untouched; this adds a durable, non-invertible trail alongside it.Changes
firmware/esp32-csi-node/main/swarm_bridge.{c,h}— novelty-gated suppression for the happiness-ingest cycle, heartbeats unaffectedv2/crates/wifi-densepose-sensing-server/src/main.rs—NodeStategains a fixed-capacity (256-event)PrivacyEventLog, populated inupdate_novelty()v2/crates/wifi-densepose-sensing-server/Cargo.toml—wifi-densepose-ruvectorpromoted to a direct dependencyTesting
cargo check -p wifi-densepose-sensing-server --no-default-features (clean build)
cargo test -p wifi-densepose-sensing-server --no-default-features (all green)
cargo test -p wifi-densepose-ruvector --no-default-features (156 passed, 0 failed)
No changes to wifi-densepose-ruvector's existing sketch/event-log primitives — both were already implemented; this PR wires them into their two remaining ADR-084 use sites.