Skip to content

feat(adr-084): Pass 4 mesh-exchange compression + Pass 5 privacy-preserving event log#1254

Open
compiledbyutkarsh wants to merge 2 commits into
ruvnet:mainfrom
compiledbyutkarsh:feat/pass-4-mesh-compression
Open

feat(adr-084): Pass 4 mesh-exchange compression + Pass 5 privacy-preserving event log#1254
compiledbyutkarsh wants to merge 2 commits into
ruvnet:mainfrom
compiledbyutkarsh:feat/pass-4-mesh-compression

Conversation

@compiledbyutkarsh

Copy link
Copy Markdown

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_sec floor 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 PrivacyEventLog audit trail — (sketch_bytes, sketch_version, novelty, witness_sha256) instead of raw embeddings. The existing full-precision EmbeddingHistory bank 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 unaffected
  • v2/crates/wifi-densepose-sensing-server/src/main.rsNodeState gains a fixed-capacity (256-event) PrivacyEventLog, populated in update_novelty()
  • v2/crates/wifi-densepose-sensing-server/Cargo.tomlwifi-densepose-ruvector promoted to a direct dependency

Testing

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.

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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant