241 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased
Security
ruview-swarmbeyond-SOTA security + correctness review (ADR-148 drone swarm control plane; needs ADR slot 176) — 4 real fail-open / DoS bugs fixed in the NaN-state-poisoning class, each pinned fails-on-old / passes-on-new; 5 dimensions confirmed clean with evidence. The shared theme is IEEE-754 NaN/Inf silently defeating a safety comparison on data that crosses the untrusted swarm-comm trust boundary (SwarmOrchestrator::receive_peer_state/receive_peer_detectionaccept fullDroneState/CsiDetectionwhose f64/f32 fields deserialize with no finite-check; the integer-encoded MAVLink wire formats inmavlink_messages.rscannot carry NaN, but the serde struct path can). (1) HIGH —failsafe::FailSafeMachine::tickcollision-avoidance + battery fail-open (failsafe/mod.rs:51,75).nearest_neighbor_dist < collision_dist_mandbattery_pct <= rth_pctboth evaluatefalsefor a NaN operand, so a poisoned peer position (→ NaNnearest_peer_distanceviaPosition3D::distance_to) silently disabled collision avoidance and a NaN battery reading kept a drone Nominal — the worst failure for a physical airframe. Fixed to fail CLOSED (!is_finite() ||→EmergencyDiverge/ReturnToHome). MEASURED fails-on-old:test_nan_neighbor_distance_fails_closed_to_diverge/test_nan_battery_fails_closed_to_rthboth returnedNominalpre-fix. (2) MEDIUM —security::geofence::Geofence::checkNaN-altitude bypass (security/geofence.rs:33). A NaNz(altitude) with valid x/y skipped the altitude breach (NaN < min || NaN > max=false) and returnedSafethrough the point-in-polygon path — a silent geofence bypass. Fixed with a leading non-finite-coordinate →HardBreachguard. MEASURED fails-on-old:test_nan_altitude_fails_closedreturnedSafepre-fix. (3) MEDIUM/DoS —security::antijamming::FhssRadio% 0panic on emptychannels_mhz(security/antijamming.rs:65,71,102).FhssConfigisDeserialize; an empty channel list (malformed/hostile config) madenext_hop/current_channel_mhz/evasive_hop/tickpanic withremainder with a divisor of zero, crashing the radio task. Fixed withlen == 0early-returns (benign0.0sentinel). MEASURED fails-on-old:test_empty_channels_does_not_panicpanicked (divisor of zero) pre-fix. (4) LOW —sensing::multiview::MultiViewFusion::fuseNaN victim-position propagation (sensing/multiview.rs:70). A NaNvictim_positionpassed theis_some()filter and propagated through the confidence-weighted average into the fused "confirmed victim" location dispatched to the swarm. Fixed by requiring finiteconfidence+ finite position components (fail-closed drop). MEASURED fails-on-old:test_nan_victim_position_dropped_from_fusionproduced a non-finite fused position pre-fix. Dimensions confirmed clean (with evidence): (a) MAVLink decode panic-safety —SwarmNodeState::decode(&[u8;20])try_into().unwrap()s are over fixed const ranges of a fixed-size array (provably infallible; no arbitrary-length&[u8]path exists). (b) UWB GPS anti-spoofing is NaN-safe —(gps_dist - uwb_dist).abs() <= tolalready fails CLOSED on a NaN range/position (counts as inconsistent → spoof rejected), verified by reasoning + existingtest_spoofed_gps_invalid. (c) Bounded grid / no allocation-from-length-field —ProbabilityGrid::update_bayesian/mark_scannedbounds-checkcx >= width || cy >= height;pos_to_celluses saturatingas u32(Rustassaturates, no UB). (d) Meshnearest_kNaN-safe sort —partial_cmp(..).unwrap_or(Equal)cannot panic on NaN distances. (e) No hardcoded secrets —MavlinkSignerkey is constructor-injected ([u8;32]), nothing embedded. Documented-not-fixed (for ADR-176, not churned to avoid test-rewrite risk): (i) RaftAppendEntrieslacks the Log-Matching consistency check (topology/raft.rs:187) — a follower appends leader entries onterm >= current_termwithout validatingprev_log_index/prev_log_term, so a malformed/byzantine leader can corrupt a follower's log (a genuine consensus-safety gap; vote tallying is also delegated to the caller per the existinghandle_messagecomment). (ii)MavlinkSigner::verifyuses a non-constant-time tag==and has no replay/timestamp-window rejection (security/mavlink_signing.rs:64) — the doc comment already flags the replay limitation as a known demo/test simplification.cargo test -p ruview-swarm --no-default-features: 117 → 123 passed, 0 failed (+6 pins). Workspace green; Python deterministic proof unchanged (f8e76f21a0f9852b70b6d9dd5318239f6b20cbcb4cdd995863263cecdc446f7a, bit-exact —ruview-swarmis off the signal proof path).nvsim(ADR-089 NV-diamond magnetometer simulator) beyond-SOTA security review — two real degenerate-input findings fixed (config-induced panic/DoS + NaN-state-poisoning silent-corruption), each pinned by a fails-on-old test; determinism integrity, panic-free deserialisation, and RNG-seeding confirmed clean with evidence. Needs ADR slot 177. Beyond-SOTA review of the standalone WASM-ready forward-only pipeline (scene → source → propagation → NV ensemble → digitiser → MagFrame + SHA-256 witness). The real risk surface is degenerate physical-parameter input (the scene + config are the external boundary, especially via the WASMconfig_json/scene_jsonentry points). Finding 1 — NVSIM-DT-01 (config-induced panic / DoS, MEDIUM;pipeline.rs:58,95).dtwas derived asconfig.dt_s.unwrap_or(1.0 / f_s_hz); an externally-suppliedf_s_hz == 0.0makesdt == +Inf,(dt*1e6) as u64saturates tou64::MAX, and(sample as u64) * dt_usthen panicsattempt to multiply with overflowforsample >= 2(MEASURED: probe panicked atpipeline.rs:95:30under the debug/test profile; inpanic=abortWASM this aborts the module, in release it silently wrapst_usto garbage). Fixed by sanitisingdt(non-finite/non-positive → 1 µs fallback), capping theu64cast atu64::MAX, and usingsaturating_mulfor the timestamp so no config can ever overflow it. Finding 2 — NVSIM-NAN-01 (NaN-state-poisoning silent corruption, MEDIUM; funnel atdigitiser.rs::adc_quantise). A non-finite scene parameter (e.g. aNaN/Infdipole position,Infmoment, orNaNloop radius) flows throughscene_field_atand bypasses the near-field clamp —NaN < R_MIN_Misfalse, so the1/r³path is taken and produces aNaN/Inffield (MEASURED:b=[NaN,NaN,NaN], sat=false). At the ADC that non-finite value hit theelsebranch andNaN as i32 == 0(Rust saturating cast), emitting a frame withb_pt=[0,0,0]and theADC_SATURATEDflag CLEAR — a frame indistinguishable from a legitimate zero-field reading (MEASURED:b_pt=[0.0,0.0,0.0] flags=0b0000). This is the same NaN-poisoning class flagged across the calibration/vitals crates; thepropagationmodule already guards its NaN paths, but the source→ADC path did not. Fixed at the single funnel point:adc_quantisenow treats any non-finite input as out-of-range → clamps to code0and raises the saturation flag, so the corruption is visible downstream (the pipeline's existingadc_satOR-reduction propagatesADC_SATURATEDonto the frame). Dimensions confirmed clean (with evidence): (1) Determinism integrity — clean. The only RNG isChaCha20Rng::seed_from_u64(seed)fully seeded from the caller'su64(grep: oneseed_from_u64, zerothread_rng/getrandom/SystemTime/Instant/HashMap); Cargo.toml pinsrand/rand_chachawithdefault-features=false(no OS-entropy path). Box–Muller draws fromgen_range(f64::EPSILON..=1.0)(avoidsln(0) = -Infby construction). Frame serialisation is fixed little-endian; source summation order is fixed byVecorder. The published cross-machine witnesscc8de9b0…93b4(proof::tests::proof_witness_publishes_a_known_value) still passes unchanged after both fixes — the happy-path output is byte-identical, confirming the guards only affect degenerate inputs. (Attested caveat, not a finding: libmcos/ln/sqrtcould differ x86↔wasm; witness is documented as x86_64-captured.) (2) Panic-free deserialisation — clean.MagFrame::from_bytesvalidateslen/magic/version, then the per-fieldbuf[a..b].try_into().expect(...)calls are over fixed sub-ranges of an already-length-checked 60-byte buffer → provably infallible, not reachable panic vectors. Nounsafe, nopanic!/unreachable!in production code; every otherunwrap/expectis#[cfg(test)]. (3) Div-by-zero — clean.dipole_field/current_loop_fieldclampr_norm < R_MIN_M(1 mm) before the1/r³/1/r²divide (finite inputs);shot_noise_floorguardsdenom <= 0.0 → f64::INFINITY;vec3_normaliseguardsn < 1e-20. (The only gap was the NaN case that bypasses ther_normclamp — fixed at the ADC funnel above.) Pinning tests (fails-on-old / passes-on-new, MEASURED):pipeline::degenerate_zero_sample_rate_does_not_panic(panicked on old code; now finite frames),pipeline::non_finite_scene_input_flags_frame_instead_of_silently_zeroing(old:flags=0b0000; nowADC_SATURATEDset,b_ptfinite),digitiser::adc_quantise_flags_non_finite_as_saturated(old:(0,false)for NaN; now(0,true)).cargo test -p nvsim --no-default-features: 50 → 53 passed, 0 failed. Workspace green; Python deterministic proof unchanged (f8e76f21…46f7a, bit-exact — nvsim is off the signal proof path). Needs ADR slot 177.wifi-densepose-core+wifi-densepose-clibeyond-SOTA security review (ADR-127 note; CLI needs ADR slot) — NaN-state-poisoning bug class does NOT originate in core (verdict: no + evidence); both crates confirmed clean on all reviewed dimensions; 4 regression pins added locking in two real DoS guards. Load-bearing question — verdict NO (with evidence, MEASURED). The NaN-state-poisoning class that hitwifi-densepose-calibration/-vitals/-geo(a non-finite input latching into a persistent IIR/Welford/von-Mises/voxel accumulator → silent permanent feature failure) does not live in a sharedwifi-densepose-coreprimitive: core exposes no stateful accumulator at all — no Welford/running-mean, no von-Mises/circular-mean, no IIR/biquad filter state, no voxel grid. Grep overcore/srcforwelford|von_mises|biquad|y1|y2|running_mean|accumulat|voxel|self.*+=matched only theInvalidStateerror enum, "reset state" doc comments, and a test-only LCG — zero stateful logic (MEASURED). Each downstream crate rolls its own accumulator, so each fix is correctly local; corroborated bywifi-densepose-calibration::Features::from_series, which already filters non-finite samples and returnsFeatures::ZERO(the downstream re-implementation of the fix). The only float math in core's hot path is construction-time projection (CsiFrame::new→amplitude/phaseviamapv) and pure statelessutilsfunctions — none persists state across frames. Dimensions confirmed clean (with evidence): (1) panic-on-adversarial-input = 0 —CsiFrame::from_canonical_bytes(the replay/forward deserialisation boundary) returns a typedCanonicalDecodeErrorfor every malformed input (truncation, bad discriminant, non-UTF-8 device id, nonzero reserved bytes, shape/payload mismatch, trailing bytes); the CLI UDP parserparse_csi_packet(the widest CLI attack surface — bound to0.0.0.0by default) returnsNoneon any malformed datagram. Both proven panic-free over deterministic-LCG fuzz sweeps (new pins). (2)Confidence::newrejects NaN (!(0.0..=1.0).contains(&NaN)⇒true⇒Err);compute_bounding_box/to_flat_arrayare NaN-tolerant (f32min/maxignore NaN). (3)amplitude_variance/mean_amplitudepanic-free on empty frames — ndarray 0.17var(0.0)/mean()return finite/None(handled), not a panic (MEASURED via throwaway probe). (4) Unbounded-memory DoS bounded in both deserialisers:from_canonical_bytesguards theVec::with_capacity(rows*cols)withrows.saturating_mul(cols).saturating_mul(16) <= bytes.len();parse_csi_packetguardsArray2::zeroswithbuf.len() < 20 + n_pairs*2— a header lying about an enormousrows×cols/n_antennas×n_subcarriersis rejected before allocation. (5) CLI path-traversal incalibrate-servealready defended bysanitize_room_id(keeps[A-Za-z0-9_-], caps 64 chars, with tests) on every client-suppliedroom_id/bank/baselinename that reaches a file path; bearer-auth gate + non-loopback-bind warning present. (6) No hardcoded secrets (--tokenread fromCALIBRATE_TOKENenv, never embedded). Regression pins added (fails-on-old / passes-on-new): corecanonical_decode_oversized_shape_is_bounded_not_allocated(MEASURED: with the saturating guard removed it panicscapacity overflowattypes.rs:801; passes with the guard) andcanonical_decode_never_panics_on_arbitrary_bytes; CLItest_parse_csi_packet_oversized_claim_is_rejected_not_allocated(a 255×65535-pair claim ≈ 33 MB in a 2 KB datagram →None, never OOMs) andtest_parse_csi_packet_never_panics_on_arbitrary_bytes.cargo test -p wifi-densepose-core: 35 → 37 lib tests, 0 failed;cargo test -p wifi-densepose-cli --no-default-features: 24 → 26, 0 failed. Workspace green; Python deterministic proof unchanged (f8e76f21…46f7a, bit-exact — core/cli are off the signal proof path). No production code changed — review is clean-with-evidence plus pins.homecorefoundational state-machine review (ADR-127) — one real concurrency bug fixed (state-set TOCTOU dropping/reorderingstate_changedevents) + two hardening fixes (entity_id memory-DoS, service-handler panic isolation), each pinned by a fails-on-old test; event-bus lag & lock discipline confirmed clean with evidence. Beyond-SOTA security+concurrency review of the crate every other HOMECORE module builds on (state storestate.rs, event busbus.rs, service/entity registries, theHomeCorecoordinator), un-covered by the ADR-154–159 sweep — a bug here is high-blast-radius. HC-RACE-01 (state-set TOCTOU, the crux — race/lost-event).StateMachine::setdidget()(releasing the DashMap shard lock) → compute the next snapshot + the no-op/last_changeddecision →insert()(re-acquiring the lock) →send(); the read-modify-write was not atomic w.r.t. a concurrent writer on the same entity, contradicting ADR-127 §2.1's promise that "the writer atomically replaces the map entry." A writer that read a staleoldcould mis-classify a genuine transition as a no-op and silently drop itsstate_changedevent (a missed automation trigger) or fire an event whosenew_stateduplicated the previously delivered one (a spurious trigger for any automation keyed onold_state != new_state). Fixed by holding the shard write-lock across the whole read→decide→insert→fire sequence viaentry()/insert_entry()—tx.sendis non-blocking, non-async, and never re-enters the map, so firing under the shard lock cannot deadlock and keeps global event order in lock-step with global commit order. Pinned byconcurrent_set_fires_no_duplicate_adjacent_events(4 writers toggling one entity A/B; asserts no two consecutive fired events carry an identicalnew_state— impossible under correct serialisation; an instrumented probe observed ~93k such duplicate-adjacent events across 200 trials on the racy code, zero on the fix; the test fails reliably on the first trial pre-fix). HC-EID-LEN-01 (unboundedentity_id, memory-DoS).homecore-api/src/rest.rsparses untrusted REST path segments straight throughEntityId::parse; with no length cap an otherwise-valid id (a.+ many MB of[a-z0-9_]) was accepted, and aPOST /api/states/<giant>would persist it into the DashMap state store (permanent growth across distinct ids). Fixed by rejecting ids longer thanMAX_ENTITY_ID_LEN(255, HA-compatible) up front inparse(), before any per-char scan, with a newEntityIdError::TooLong— fail-closed at the boundary type protects every caller (REST, registry deserialize, automation). Pinned byentity_id_length_boundary(exactly-MAX accepted; MAX+1 and a 4 MiB id rejected — oversized parsesOkon old code). HC-SVC-PANIC-01 (service-handler panic not isolated).ServiceRegistry::callalready ran handlers outside the registry lock (theArc<dyn ServiceHandler>is cloned out of the read guard first → noRwLockpoisoning, no blocking of other callers — clean), but a panicking handler unwound throughcall()into the caller's task (the task driving the engine). Hardened by wrapping the handler future inAssertUnwindSafe+catch_unwind, converting a panic toServiceError::HandlerPanicked; the registry stays fully usable (a sibling healthy service still returns, the bad service stays registered). Pinned bypanicking_handler_is_isolated_and_registry_survives(unwinds throughcallon old code). Dimensions confirmed clean (with evidence, no invented issues): (1) event-bus bounds / lag (the homecore-api WS lag-DoS class) — bothStateMachineandEventBususe boundedtokio::sync::broadcast(capacity 4,096); a slow subscriber gets a recoverableLagged(n)(drop-oldest + re-sync) whilefire_*is non-blocking and never waits on slow receivers, so a lagging subscriber cannot block the publisher, grow the channel without bound, or kill a fast subscriber (evidenced byslow_subscriber_does_not_block_publisher_or_kill_the_bus— fire 3× capacity at an idle subscriber, publisher unblocked, bus stays live, fresh fast subscriber receives, lagged one recovers); (2) lock ordering / lock-across-await (deadlock) — no code path holds two of{state DashMap, registry RwLock, service RwLock}simultaneously, so no inconsistent-ordering deadlock can exist; everytokio::sync::RwLockguard inregistry.rs/service.rsis used in one synchronous statement and dropped before any.await(callexplicitly scopes the read guard out before awaiting the handler); the only guard held across a send is the DashMap shard lock inset, across a synchronous broadcast send — safe; (3) panic-on-input — no reachableunwrap/expect/index in non-test code beyond the safesend().unwrap_or(0)and the dead-but-harmlesssplit_once(...).unwrap_or(...)fallbacks on already-validated ids.cargo test -p homecore --no-default-features: 20 → 24 passed, 0 failed (+4 pins). Workspace green; Python deterministic proof unchanged (f8e76f21…46f7a, bit-exact —homecoreis off the signal proof path). Review notes appended to ADR-127 §9.homecore-migratesecurity review (ADR-165 surfaces) — one real secret-leak fix; traversal / data-loss / panic / injection dimensions confirmed clean with evidence. Beyond-SOTA review of the Home-Assistant.storage/secrets.yaml/automations.yamlmigrator, the two sharp surfaces being secret handling (secrets.rs) and untrusted-file parsing. Finding + fix (secret-leak,secrets.rs): a malformedsecrets.yamlwhose offending scalar fails a typed-tag coercion (e.g.port: !!int <value>) produced aserde_yamlerror whose message embeds the scalar verbatim —invalid value: string "<the-secret-value>". The old code wrapped that message intoMigrateError::YamlParse { source }; the error propagates out ofread_secrets, is?-returned by theInspectSecretsCLI path inmain.rs, and printed to stderr byanyhow— leaking a secret value despite the CLI's deliberate<redacted>design (main.rsonly ever prints keys as<key> = <redacted>). Fix:secrets.yamlparse failures now map to a dedicated redacting variantMigrateError::SecretsParse { path, line, column }carrying only the file path + a coarse location (fromserde_yaml::Error::location()), never the scalar; other (non-secret) YAML files keepYamlParse. Pinned bysecrets::tests::malformed_secrets_error_never_contains_secret_value, which asserts the rendered error and its full#[source]chain never contain the secret value and that the error is still the structuredSecretsParse(fail-closed) — it fails on the oldYamlParsepath (observed leak:... invalid value: string "s3cr3t_TOKEN_VALUE" ...) and passes on the fix; plusmalformed_secrets_error_reports_location(still locatable). Confirmed clean with evidence: secret leakage elsewhere — the only secret sink is the value map;main.rsredacts values, and theMissingField/Iopaths surface only the path, never content. Source mutation / data-loss — structurally impossible: there is nofs::write/fs::remove/fs::create/File::create/OpenOptionsanywhere in the crate; P1 reads source and writes nothing (import-entitiesis in-memory only), so re-runs are trivially idempotent and the HA source is never touched. Path traversal — CLI takes a--config-dir/--storagedir and joins fixed filenames (secrets.yaml,core.entity_registry, …); no user-controlled path component, no../absolute escape beyond the user's own privileges. Panic-on-input — probed duplicate-key, bad-indent, tab/control-char, multi-doc, non-mapping-root, unterminated-flow,!inputblueprint tags, deep nesting, anchors: every malformed/typed/truncated input errors, never panics (all production code is panic-free; everyunwrap/expectis#[cfg(test)]). Fail-closed versioning — unknown storageminor_versionhard-errors (no silent fallback to an older parser). Injection — no SQL/shell/path interpolation; the tool emits diagnostics only and persists nothing in P1.homecore-migrate19 → 21 tests (--no-default-features), 0 failed. Behaviour otherwise unchanged; Python deterministic proof PASS, hash unchanged (homecore-migrateis off the signal proof path).homecore-recordersecurity review (ADR-132 surfaces) — two real bounding fixes; SQL-injection & NaN-index dimensions confirmed clean with evidence. Beyond-SOTA review of the HA-compat state recorder (DB persistence + history + ruvector semantic search), the crux being its DB-backed SQL-injection surface. Findings + fixes: (1) Memory-DoS — unboundedget_state_history. The history query carried noLIMIT, so a wide[since, until]window over a high-frequency entity (a per-second sensor ≈ 86k rows/day) would load an unbounded row set into a single in-memoryVec. Added a hardLIMIT MAX_HISTORY_ROWS(1,000,000 — generous enough never to truncate a realistic history graph, bounded enough to cap the worst case); the sibling search paths were alreadyk-bounded. (2) Disk-DoS / documented-but-missingpurge. The README + HA-compat table advertisedRecorder::purge(older_than)as a capability, but no such method existed — i.e. no retention path at all → unbounded disk growth. Implemented a transactionalpurgethat deletesstates+eventsstrictly older than the cutoff (exclusive boundary — idempotent, no off-by-one; a row at the cutoff instant is kept) and garbage-collects orphanedstate_attributesblobs (a dedup-shared blob is dropped only once its last referencing state is gone); all three deletes run in one transaction so a mid-purge failure rolls back cleanly (no states-deleted-but-events-kept corruption). Confirmed clean with evidence: SQL injection — every query indb.rsuses bound?parameters (noformat!/string-concat of user data into SQL); the loneformat!builds the LIKE pattern, which is itself bound as a parameter withESCAPE '\\'and metacharacter escaping. Pinned: a state value'; DROP TABLE states; --is stored/queried literally (table survives), and a%/_in a search query matches literally, not as a wildcard. NaN-index poisoning (the calibration/vitals/geo class) — structurally impossible here: embeddings are SHA-256 →i32→f32(ani32cast tof32is always finite, never NaN/Inf), with an all-zero-digest norm guard; probed empty-index search, empty-string query, andk=0— all returnOk(0), no panic. Fail-closed write path — a removal event yieldsOk(None), semantic-index failure is logged not propagated (best-effort, never blocks the durable SQLite write), andEntityIdparsing failures fall back rather than panic. 6 new pinning tests (SQL-injection literal-storage, LIKE-metacharacter literalness, historyLIMIT, purge exclusive-boundary, purge attribute-GC-keeps-shared, purge old-events):homecore-recorder19 → 25 (--no-default-features) / 25 → 31 (--features ruvector), 0 failed; the purge-boundary test is a true pin (fails deleting 2 rows under an inclusive cutoff, passes deleting 1 under the exclusive cutoff). Behaviour otherwise unchanged; Python deterministic proof unchanged (recorder is off the signal proof path).
Added
- ADR-175: int8 quantization of the WiFlow-STD "half" pose model — MEASURED fp32-vs-int8 accuracy/size trade-off (honest negative). Sub-deliverable 8.2 of the benchmark/optimization milestone, and the reading of the SOTA brief's "one untested edge lever" (QAT-int8 on the 843,834-param half model that strictly dominates the published 2.23M model). A new committed script
v2/crates/wifi-densepose-train/scripts/quantize_half_int8.pyquantizeshalf_best.pthto int8 two ways and scores both with the same upstreamcalculate_pck/calculate_mpjpethat produced the fp32 sweep numbers, under one locked normalization (ADR-173 torso-diameter PCK — neck idx2→pelvis idx12,use_torso_norm=True, the standard MM-Fi/GraphPose-Fi convention), on the same seed-42 file-level 70/15/15 test split (52,560 NaN-free / 54,000 full windows). MEASURED on ruvultra (RTX 5080, torch 2.11.0+cu128, fbgemm; clean test, torso-PCK): fp32 = 96.62% PCK@20 / 99.47% PCK@50 / 0.008981 MPJPE / 3.351 MB (fp32-CPU reproduces fp32-GPU to 4 dp, so the int8 deltas are pure quantization, not CPU/GPU drift); int8 static PTQ = 40.98% PCK@20 (−55.64 pp), 1.046 MB — naive static QDQ collapses on this model (the brief's 2.23M "sweet spot" does NOT transfer to the 843k half model at the tight @20 threshold); int8 QAT (3-epoch FX fake-quant fine-tune from half_best) = 67.48% PCK@20 (−29.15 pp) / 98.69% PCK@50 (−0.78 pp), 1.043 MB. Verdict (honest no): int8 is not a win at the strict PCK@20 edge target — QAT recovers a large share of the PTQ collapse and is near-lossless at the loose PCK@50 (coarse localization survives int8, fine does not), but a 3.2× size win at −29 pp PCK@20 is a bad trade when the half model already fits edge flash at fp32 → keep fp32/fp16 on the edge for now. Disclosed gap: the QAT fake-quant val PCK@20 reached 83.45% but the converted int8 model scores 67.48% — a real ~16 ppconvert_fxgap (fbgemm int8 kernels ≠ straight-through estimate, esp. the axial-attention einsum/softmax); we report the converted-int8 number, not the fake-quant proxy. MEASURED: every table number + the PTQ collapse + the QAT partial recovery + the conversion gap. CLAIMED/not done: ONNX/TFLite export, on-edge-SoC latency/energy (int8 measured on x86 fbgemm — size transfers, latency does NOT), mixed-precision keeping attention fp32, longer/better-tuned QAT. Honest limitations: single in-domain eval split (no cross-environment split), x86-int8 not edge-SoC-int8, lightly-tuned QAT. Additive only — no production Rust or signal-pipeline change; Python deterministic proof unchanged (f8e76f21…46f7a, bit-exact — off the signal proof path). - Metric-locked PCK/MPJPE accuracy harness — resolves the PCK-definition ambiguity (
wifi-densepose-train, needs ADR slot 173). The SOTA brief (docs/research/sota-nn-train-benchmark-brief.md§1, §3.1, §4) found the single biggest threat to any "beyond-SOTA" claim is metric ambiguity: three PCK@20 figures (96.09% WiFlow-STD image-normalized, 81.63% AetherArena torso-PCK, 61.1% GraphPose-Fi standard PCK) cannot be lined up because each silently uses a different normalization — the project was retracted twice over this (a withdrawn "92.9%" used absolute pixels, not torso). Newsrc/accuracy.rsmakes the normalizer explicit, selectable, and carried with every reported number: aPckNormalizationenum (TorsoDiameter= standard MM-Fi/GraphPose-Fi hip↔hip;BoundingBoxDiagonal= looser WiFlow-STD image-normalized;AbsolutePixels(threshold)= the retracted convention, included so historical numbers are reproducible and clearly labeled non-comparable); one canonicalpck_at(pred, gt, vis, k, normalization)reusing themetrics_coregeometric primitives (hip distance, bbox diagonal — no duplicate kernel);mpjpe(pred, gt, vis)(2D/3D, mm); and a self-describingPoseAccuracy { pck_at: BTreeMap<u8,f32>, mpjpe, normalization, n_keypoints, n_frames }returned byaccuracy_report(frames, ks, normalization)so an unlabeled PCK number is structurally impossible. 17 hand-computed deterministic tests (no GPU, no datasets) prove the harness arithmetic: perfect→PCK=1.0/MPJPE=0; all-just-outside→0.0; half-in-half-out→0.5; the key proof that identical predictions score 0.50 (torso) / 1.00 (bbox) / 0.75 (abs) under the three normalizations (the ambiguity is real and the definitions are distinct); MPJPE 2D/3D fixtures; and graceful degenerate handling (zero torso, empty frames, NaN coords — no panic, never a false-perfect). This is measurement infrastructure, not an accuracy claim — the tests prove the harness is correct, not that any model is good.wifi-densepose-trainlib 191→206,test_metrics12→14, 0 failed. Python deterministic proof unchanged (off the signal proof path). - CI bench-regression guard (
.github/workflows/bench-regression.yml) — wires the v2/ criterion benches into CI as a real, hard-failing COMPILE-VERIFY gate + an informational fast-run; caught + fixed one already-bit-rotted bench (benchmark/optimization milestone sub-deliverable 8.3; needs ADR slot 174). The v2/ workspace ships 26 criterion benches across 18 crates (e.g.nvsim/pipeline_throughput,wifi-densepose-ruvector/{ann,sketch,fusion}_bench,wifi-densepose-signal/{signal,dsp_perf,features,calibration,aether_prefilter,cir}_bench,wifi-densepose-mat/detection_bench,wifi-densepose-nn/{inference,native_conv,onnx}_bench,wifi-densepose-engine/engine_cycle, …) but, because benches are not part ofcargo test, nothing in CI compiled them — so they silently rot when a public API they call changes. Proof this matters (MEASURED): running the new gate on the current tree immediately caughtwifi-densepose-mat/detection_benchfailing to compile (E0063: missing field last_rssi in initializer of SensorPosition— the struct gained a field, the bench was never updated); fixed in this change (last_rssi: None, the simulated-zone convention) and re-verified (cargo bench -p wifi-densepose-mat --no-default-features --bench detection_bench --no-run→Finished, Executable produced). HONEST SCOPE — what gates vs what is informational: (1)bench-compile(HARD GATE) runscargo bench --workspace --no-default-features --no-run(compile + link every default-feature bench, no measurement) plus a--features circompile of the gatedcir_bench— a deterministic, real regression guard against bench bit-rot; (2)bench-fast-run(INFORMATIONAL,continue-on-error: true, NEVER gates) runs a curated pure-CPU subset (nvsim/pipeline_throughput,ruvector/{sketch,fusion}_bench) in criterion quick-mode (1s warm-up / 2s measure / 10 samples), targeted per---bench(the crates' libtest lib targets reject criterion flags), and uploads the logs as an artifact. No timing-regression gate, by design and stated in the workflow header: wall-clock on shared GitHub runners varies 2-3x run-to-run, so a hard threshold or a cross-runnercriterion --baselinecompare would manufacture false failures; that becomes honest only on a frequency-pinned self-hosted runner (documented as the re-add condition). Thecrv-gatedruvector/crv_benchis deliberately NOT compiled by the gate because its crates.io depruvector-crv 0.1.1currently fails to build on stable (upstream E0308 in its ownstage_iii.rs) — noted in-workflow with the re-add condition. Checkout issubmodules: recursive(the workspace path-depsvendor/rufield) and installs the Tauri/GTK dev libs likeci.yml's rust-tests job (a--workspacebench link pulls the whole graph). MEASURED locally (Windows,--no-default-features):nvsim,wifi-densepose-ruvector(sketch/fusion/ann),wifi-densepose-signal/cir_bench,wifi-densepose-mat/detection_bench(post-fix),wifi-densepose-vitals/vitals_bench, andruview-swarm/swarm_benchall compile + the fast subset runs (sample baseline:nvsim pipeline_run/d1/256≈ 55 µs,d16/1024≈ 315 µs;ruvector sketch_hamming≈ 3-7 ns vsfloat_l2≈ 63-371 ns). The full--workspace--no-runcould not be fully validated on Windows (Tauri-desktopneeds GTK,candle-corefails on MSVC,swarm_benchLTO-links OOM under parallel pressure) — those are Windows-env artifacts that build in the Linux CI runner (each affected bench was confirmed to compile standalone here). No baseline JSON is committed (a cross-runner baseline would be dishonest). Python deterministic proof unchanged (f8e76f21…46f7a, bit-exact — off the signal proof path). - RuField
rufield-viewerlive-ingest mode — closes the RuView↔RuField visual loop (ADR-262 surfaces). The dashboard gains--source live --upstream <RuView-URL>: it consumes RuView's/ws/fieldSSE (falling back to polling/api/field), verifies every event's ed25519 provenance receipt on ingest (is_fusable) — forged/tampered events are flagged ✗ and never fused into trusted inferences — and renders real RuViewFieldEvents through the same room-state/privacy-badge/fusion-graph/receipt path the synthetic mode uses (wire-compatible by construction: both sides userufield_core::FieldEventserde). Strict banner honesty: a singleBannerStateshowsSYNTHETIC/LIVE — <upstream>/DISCONNECTED — <upstream> unreachable, mutually exclusive — never SYNTHETIC while showing live data or vice versa; live mode returns 409 on/api/runrather than fabricate a synthetic run, and starts DISCONNECTED until first verified contact. Default stays synthetic. 26 tests / 0 failed.ruvnet/rufieldcrates/rufield-viewer;vendor/rufieldsubmodule bumped. - ADR-262 P3 — live RuField surface: RuView's running sensing-server now speaks RuField on
/api/field+/ws/field. Wires the P1wifi-densepose-rufieldbridge into the livewifi-densepose-sensing-server(the bridge is the only added coupling, ADR-262 §5.4). A newsrc/rufield_surface.rsmodule (kept out of the 8k-linemain.rs) holds aFieldSurfacewith a dedicated ed25519Signer, a bounded ring buffer of recent signed events (FIELD_RING_CAPACITY = 64), and the/ws/fieldbroadcast topic; it exposesGET /api/field(latest signedFieldEvents + signer pubkey + adev_signing_keyflag) andGET /ws/field(per-cycle stream, mirroring/ws/sensing), plus a standalonerouter()for isolated testing. Tap: at the ESP32 governed-trust cycle (main.rsobserve_cycle~:5886/SensingUpdatebuild ~:5938),emit_rufield_eventjoins the cycle's realSensingUpdate(features/classification/signal_field) with the engine's recordedeffective_class/demotedtrust state into aSensingSnapshotand surfaces a signedFieldEvent— existing endpoints (/ws/sensingetc.) are unchanged; this is purely additive. Signer (defers the P2 key decision, §8 Q1): a standalone dev/sensing key fromWDP_RUFIELD_SIGNING_SEED(64-hex or ≥32-byte value), else a deterministic dev default with a loggedWARN— reusing thecog-ha-matterEd25519 key is the deferred P2 call, so P3 does not pre-empt it. Egress privacy (fail-closed):network_egress_allowedis stricter thanDefaultPrivacyGuardfor an unattended live surface — only P1/P2 leave the box; P0 (raw) and P3/P4/P5 are held edge-local, so aDerived → P4/P5cycle never surfaces; no-presence cycles emit no phantom event. P3 acceptance gates (tests/rufield_surface_test.rs, 4 integration viatower::oneshot+ 4 module unit, 0 failed): a well-formed signed event (Modality::WifiCsi, P2 not P1,is_fusableed25519-verified, real timestamp); empty cycle → no phantom; privacy-safety — an injectedDerivedtrust never surfaces; a mixed stream surfaces only egress-safe events. Honest scope (ADR-262 §0/§6): real plumbing on a live endpoint, NOT accuracy — single-link CSI with its existing caveats (no validated room-coordinate accuracy —field_localize), a dedicated dev signing key pending the P2 ownership decision, no accuracy claim. The win is narrowly: "RuView's live sensing now speaks RuField on/ws/field." - ADR-262 P1 —
wifi-densepose-rufieldanti-corruption bridge: RuView WiFi-CSI sensing → signed RuFieldFieldEvents. A new v2 workspace member (the single coupling point between RuView and the standalone RuField MFS spec, ADR-262 §5.4) that path-deps thevendor/rufieldsubmodule crates (rufield-core/-provenance/-privacy/-fusion— pure-Rust,--no-default-features-buildable: serde/sha2/ed25519/toml only, no tch/openblas/ndarray/candle) and no RuView internal crate. The bridge takes owned primitives —SensingSnapshotmirrors the/ws/sensingSensingUpdate(features + classification + signal_field) joined with theTrustedOutputtrust state (trust_class/demoted/identity_bound) — andsnapshot_to_field_event()emits one signedFieldEvent(Modality::WifiCsi, axis[Frequency]): a realFieldTensorfrom the feature scalars with the realtimestamp_ns; anObservationwhoserange_m/motion_vector/space_cellare derived from the strongest signal-field peak when present (elseNone— coordinates are never fabricated, per thefield_localizecaveat) andconfidencefrom the classification; a realProvenanceRef(sha256 over the tensor bytes,synthetic=false) ed25519-signed sorufield_provenance::is_fusablepasses. The §3.3 privacy mapping is the critical correctness item, implemented asmap_privacy()mapping RuView's class onto RuField P0–P5 by information content, NEVER by byte value and fail-closed: RuViewDerived(byte1, which sorts belowAnonymousbyte2) carries an identity embedding → maps to P4 (or P5 if identity-bound), never P1 (the single most dangerous mapping mistake);Raw → P0,Anonymous → P2,Restricted → P2; a governed-enginedemotedcycle floors the egress class to ≥ P2 with raw suppressed. P1 acceptance gates (15 tests / 0 failed — 5 unit + 9 integration + 1 doc): round-trip (SensingSnapshot → FieldEvent →serde→equal),is_fusable(verified ed25519 receipt),RuFieldFusion::ingestaccept +infer()runs, privacy-safety (gate_privacy_safety_derived_never_maps_to_low_privacy—Derived → P4/P5, never P1; a table test over every RuView class; fail-closed demotion), and determinism (same snapshot + same signer seed → byte-identical event). Honest scope: this is P1 plumbing — a tested conversion + a safe privacy mapping. It is not wired into the live server (that is P3) and makes no accuracy claim (RuField v0.1 is synthetic; RuView's single-link CSI carries its own caveats). CI: therust-testsworkflow checkout gainssubmodules: recursiveso the path-deps resolve. Python deterministic proof unchanged (off the signal proof path). - ADR-262 (Proposed): RuField MFS ↔ RuView integration — a live
SensingServerAdapter, a privacy/provenance bridge, MAPPED not papered-over. Researched integration design for wiring RuField into RuView. Recommends: a thinwifi-densepose-rufieldbridge crate (anti-corruption layer, path-deps on thevendor/rufieldsubmodule — thevendor/rvcsipattern, since rufield crates are unpublished); a liveSensingServerAdapterthat taps the realSensingUpdateemit site joined withTrustedOutputtrust state and emits one signedFieldEvent/cycle (the file-basedCsiReplayAdapterstays for offline replay); vertical fusion composition (ruvsense fuses within WiFi → onewifi_csievent → rufield-fusion graph fuses across modalities above it); and one canonical privacy/provenance model (RuVieweffective_classis source-of-truth, mapped to RuField P0–P5 at egress; reuse the existingcog-ha-matterSHA-256+Ed25519 chain for theProvenanceReceipt). Key honest finding: RuView has two privacy enums + three witness mechanisms across two hash algorithms that do not map 1:1 onto P0–P5, and a real trap — RuView'sDerivedprivacy byte (1) sorts belowAnonymous(2) yet carries identity embeddings, so the bridge must map by information content (Derived → P4/P5), never by byte value, or it would leak identity as low-privacy P1. 4 independently-shippable phases, each with a test gate (round-trip /is_fusable/ privacy-monotonicity / ed25519-verify). Honest scope: this is plumbing architecture, not accuracy — RuField v0.1 is synthetic and RuView's only real-CSI path is unlabeled replay; the ADR claims only architecture, gated by round-trip/monotonicity/signature tests. - RuField
CsiReplayAdapter— first real (non-synthetic) WiFi-CSI adapter (ADR-260 §17). RuField now ingests real captured WiFi CSI instead of only the synthetic simulator. Newrufield-adapters::csi_replayparses RuView's.csi.jsonlrecording format ({timestamp, subcarriers[]}), normalizes each frame to aFieldTensor(WifiCsi, real amplitudes + realtimestamp_ns), establishes a per-subcarrier Welford empty-room baseline viacalibrate(), derives a physically-grounded CSI-variance motion/presence proxy (normalized MAD vs baseline → P2 motion/presence, else P1), and emitsFieldEvents with a real sha256 + ed25519 provenance receipt (synthetic=false). Measured on 199 real captured frames: 184 presence-proxy / 69 motion-proxy → fed throughRuFieldFusion→ 182 fused inferences (115 breathing, 67 person_present) from real signal. 12 tests (9 unit + 3 integration over real-CSI fixtures), deterministic (byte-identical stream per file). Honest caveats (stated everywhere): it's replay from file, not live hardware; recordings are unlabeled, so the motion/presence output is a proxy, NOT validated accuracy (no pose, no accuracy numbers); live streaming + labeled validation remain roadmap; mmWave/thermal stay synthetic. The win is "RuField ingests real WiFi CSI and produces fused events from it."ruvnet/rufieldcrates/rufield-adapters;vendor/rufieldsubmodule bumped. - RuField
rufield-viewerweb dashboard — completes ADR-260 §27.9 (all §27 criteria 1–10 now PASS). A read-only Axum + vanilla-JS dashboard (no build step —cargo run -p rufield-viewer) that streams the deterministic SyntheticSim→fusion camera-free room-intelligence demo: live room-state inferences with confidence, a scrolling event log where every event carries its modality + a colour-coded P0–P5 privacy badge, the fusion graph (supporting=green / contradicting=red per inference), and a click-to-open provenance-receipt modal (sha256 + ed25519 signer + verified ✓ / fusable ✓) — behind a permanent, undismissableSYNTHETIC — simulated sensors, no hardwarebanner. Endpoints/·/app.js·/health·/api/run(full deterministic JSON) ·/events(SSE). 12 new tests. Honest scope: a read-only SYNTHETIC demo viewer, not a device-management console — fleet/real-adapter management is a separate later milestone. Lives inruvnet/rufield(crates/rufield-viewer, repo now 7 crates / 72 tests);vendor/rufieldsubmodule bumped to include it. - ADR-261: RuVector graph-ANN index — a real HNSW baseline + a SymphonyQG-style quantized variant, MEASURED (honest negative). Closes the ADR-156 §5 #1 gap: the SymphonyQG (SIGMOD 2025) 3.5–17× QPS-over-HNSW claim was CLAIMED-only because no HNSW baseline existed to compare against. This adds one. New pure-Rust,
--no-default-features-buildable modules inwifi-densepose-ruvector:hnsw.rs(a correct float HNSW — Malkov & Yashunin: multi-layer NSW graph,ef_construction/ef_search, Algorithm-4 neighbour selection, seeded-deterministic level assignment via SplitMix64, L2 + cosine, full degenerate-case guards),hnsw_quantized.rs(the SymphonyQG-style variant — the same graph traversed by a cheap 1-bit Hamming score over the RaBitQ Pass-2 rotated sign code, then exact-float rerank),ann_measure.rs+benches/ann_bench.rs(one shared deterministic planted-cluster fixture; theann_bench_reporttest is the source of truth). MEASURED (dim=128, N=10k, K=10,--release): float HNSW = ~25× QPS over linear scan at recall ≥0.99 (the baseline this gap needed; recall@10 correctness gate ≥0.95 holds, L2 + cosine). Honest negative: the 1-bit quantized traversal is too coarse to beat float HNSW at equal recall at this scale — its best recall is 0.738, never reaching the ≥0.90 equal-recall point, so there is no QPS win over float HNSW; the 3.5–17× is not reproduced by our 1-bit construction here. The recall gate also caught a real index-out-of-bounds bug in the insert path (disclosed in ADR-261 §4). Caveat: this is our HNSW + our 1-bit quant, not SymphonyQG's exact system — it tests the direction of the claim, with the expected crossover at large N + a multi-bit traversal code. We did not tune to manufacture a speedup. +20 tests (ruvector lib 131→151, 0 failed). ADR-156 §5 #1 / §8 backlog: CLAIMED → MEASURED-direction-tested. Python deterministic proof unchanged (off the signal proof path). - ADR-261 Milestone-2: multi-bit quantized HNSW traversal + large-N scaling study — MEASURED (honest negative). Extends ADR-261's quantized index from 1-bit to
b-bit-per-dimension (b ∈ {1,2,4}, 16/32/64 B/node) over the Pass-2 rotated coordinates, and runs a deterministic scaling study (N ∈ {10k, 100k, 250k}) to test M1's prediction of a large-N crossover. Result: no crossover at any measured (N, b), and the trend refutes the prediction. At N=10k more bits lift the equal-recall QPS ratio (0.19×→0.46×→0.48×) and let b≥2 reach the 0.90 recall bar 1-bit missed — but quant stays slower than float HNSW at equal recall; at N=100k/250k quant recall collapses (b=4: 1.000→0.788→0.624, never ≥0.90) while float holds ≥0.92 (denser graph → low-bit codes can't separate near-neighbours, beam goes off-path faster than the float-distance saving repays). Caveat: our HNSW + our per-node multi-bit code, not SymphonyQG's RaBitQ-fused graph — refutes the direction at ≤250k, not their million-scale numbers. ruvector lib 151→156 (+5 tests;scaling_report#[ignore]produced the table). A published negative with the mechanism explained. ADR-261 §11. - ADR-260: RuField MFS — the open specification for camera-free multimodal field sensing. A common event / tensor / calibration / privacy / provenance model that sits above WiFi CSI/CIR/BFLD, UWB, BLE Channel Sounding, mmWave radar, ultrasound, subsonic, infrared, and future quantum sensors (each modality emits a normalized
FieldEvent→FieldTensor→FusionGraph→PrivacyClass→ProvenanceReceipt). Published as a standalone reporuvnet/rufieldand vendored here as thevendor/rufieldsubmodule (thevendor/rvcsipattern — not av2/workspace member). The v0.1 reference stack is a self-contained 6-crate Rust workspace (rufield-core,-provenance[sha256 + ed25519],-privacy[P0–P5 guard],-adapters[deterministicSyntheticSimacross wifi_csi/mmwave_radar/infrared_thermal],-fusion[graph + TOML weighted-Bayes rules → 7 room-state inferences],-bench[deterministic runner + the §31 acceptance test]). 60 tests / 0 failed, clippy-clean. §27 acceptance criteria 1–8 and 10 PASS; the live dashboard (9) is deferred. All benchmark metrics are SYNTHETIC (scored against the simulator's own ground truth — presence/breathing/bed_exit/room_transition F1 = 1.000, nocturnal_scratch 0.923 reported honestly, p95 latency ~0.01 ms, provenance coverage 100%, 0 privacy violations) — they prove the pipeline recovers known truth, not field accuracy; real hardware adapters (ESP32 CSI, mmWave, thermal IR) are a documented roadmap item, none validated in v0.1. The Python deterministic proof is unchanged (rufield is off the signal-processing proof path).
Security
homecore-assistvoice/intent pipeline security review — one real unbounded-utterance DoS fixed (fail-closed length bound), pinned by fails-on-old tests; command-injection / ReDoS / NaN-poisoning / intent-confusion dimensions confirmed clean with evidence (ADR-133). Beyond-SOTA review of the HA-compat Assist pipeline (utterance → recognizer → intent → handler → action, plus theRufloRunner) — the untrusted-input → action path, un-covered by the ADR-154–159 sweep. One real finding fixed. HC-ASSIST-01 (unbounded-utterance DoS, LOW): bothRegexIntentRecognizer::recognizeand the semanticrecognize_scoredaccepted utterances of unbounded length from untrusted callers (voice transcripts / the WebSocketassistcommand) and ranto_lowercase()(a full clone) + a per-registered-pattern scan (and, in the semantic path, full tokenisation + feature-hash embedding) before any bound — an allocation/CPU amplification on attacker-controlled input. Theregexcrate is linear-time (no catastrophic backtracking), so this was a throughput/memory DoS, not a hang. Fixed by a namedMAX_UTTERANCE_BYTES = 4096(far above any real spoken command) checked at both recognizer boundaries before any allocation/scan; an over-length utterance fails closed toOk(None)(no intent, no action), identical to an unrecognised phrase, so it can never be coerced into firing a handler. Legitimate commands unaffected. Pinned byover_length_utterance_fails_closed(an over-length utterance that contains a valid command resolves toNone— would have matched on old code) andover_length_utterance_fails_closed_semantic. Dimensions confirmed clean (with evidence, no invented issues): (1) command/argument injection — there is no subprocess surface: theRufloRunnerhas exactly two impls,NoopRunner(no process) andLocalRunner(runs the local recognizer, no process); nostd::process/tokio::process/Command/.spawn()on any process exists in the crate (spawnis astarted: boollifecycle flag), andRufloRunnerOpts.{script_path,env}are inert data never consumed — the livenode ruflo-agent.jsrunner is genuinely data-gated/future per the doc-comments. Additionally theentity_idcapture class[a-z_][a-z0-9_ .]*excludes every shell/SQL metacharacter, so even when an injection-shaped utterance resolves (the regex is not exact-anchored) the captured slot is a clean token — sanitisation by construction (pinned byshell_metachars_never_survive_into_a_resolved_slot,runner_opts_are_inert_no_process_spawned,pipeline_injection_shaped_utterance_carries_no_metachars_to_service). (2) ReDoS —regex 1.12.3(nofancy-regexin the tree) is a linear-time finite automaton; a classic(a+)+$shape on adversarial input completes in bounded time (pathological_backtracking_pattern_completes_in_bounded_time). (3) NaN-poisoning — embeddings are structurally finite (FNV feature-hash + guarded L2 normalise, no external float input, no unguarded division), so a crafted utterance cannot inject NaN/Inf into the cosine k-NN; cosine vs the zero vector is a finite0.0; empty-indexmax_byreturnsNone(no panic); the NaN-safepartial_cmp().unwrap_or(Equal)is already in place (embeddings_are_structurally_finite,cosine_with_zero_vector_is_finite_not_nan,empty_utterance_against_empty_index_no_panic_no_match). (4) intent confusion / fail-closed — an unrecognised utterance returnsnot_understood()(no service call), a recognised intent with no registered handler also returnsnot_understood(), semantic below-threshold/empty-index falls back to regex; no default high-privilege intent, no fail-open (pipeline_injection_shaped_utterance_fires_no_handlerevidence + existing pipeline tests). (5) panic-on-input — nounwrap/expect/index reachable from a crafted utterance (the oneexemplars[id]index uses anidfromenumerate()over the append-only Vec).cargo test -p homecore-assist --no-default-features: 29→36 passed, 0 failed (+7); default/semantic: 39→48, 0 failed (+9). Workspace green; Python deterministic proof unchanged (homecore-assist is off the signal proof path). Review notes appended to ADR-133.homecore-automationsecurity review — two real DoS findings fixed (template unbounded-expansion + delay panic-on-config), each pinned by a fails-on-old test; condition-bypass / fail-closed / action-authz dimensions confirmed clean (ADR-129 §8a). Beyond-SOTA review of the HA-compat automation engine (the execution/eval surface: triggers → conditions → actions, with user-config Jinja2 templates), un-covered by the ADR-154–159 sweep. HC-SEC-01 (template DoS, HIGH): atemplate:condition /value_templateis user config and was rendered with MiniJinja's defaults — no instruction budget, no output cap. A single nested-loop condition rendered a 100 MB string in ~11 s on one render call (measured) — the bfld-class unbounded expansion (MiniJinja's per-callrange()10k cap does not stop nesting). Fixed by enabling MiniJinja'sfuelfeature +set_fuel(Some(1_000_000))(the attack now fails fast ~90 ms with "engine ran out of fuel") and a 64 KiB source-length cap; legitimate templates unaffected. HC-SEC-02 (panic-on-config DoS, MEDIUM):Action::Delay/WaitForTriggerfed the user float straight intoDuration::from_secs_f64, which panics on negative/NaN/inf/overflow — all reachable from a crafted or typo'd YAML (delay: {seconds: -1},.nan,.inf,1e308), aborting the spawned run task (measured panic). Fixed by asafe_duration_from_secsguard that saturates (NaN/±inf/negative →0, matching HA's lenient "non-positive delay = no delay"; huge → clamped to ~100 yr). Dimensions probed clean (evidence in ADR-129 §8a): condition eval is fail-closed (template-render error →false; un-parseablechoosebranch condition → branch skipped, never silently passing); run-modes are bounded (Single/Restart/Queued/max:N— a self-triggering automation does not livelock, ADR-162 tests); templates are read-only sandboxed (no service-call/state-set global exposed to template scope, so a template cannot escalate to an action); nounwrap/expect/index panic reachable from a crafted config in the eval/exec path beyond the fixedfrom_secs_f64. Fails-on-old verified by reverting each fix in isolation (delay tests panic; template nested-loop test runs unbounded >60 s; oversized-source test fails).cargo test -p homecore-automation --no-default-features: 40 → 54 passed, 0 failed (+14: 4 template-DoS, 1 no-regression render, 5 delay/wait + safe-duration unit). Workspace green; Python deterministic proof unchanged (homecore-automation is off the signal proof path).cog-ha-matterwitness/manifest crypto review — engine-class signed-digest collision confirmed ABSENT (length-prefixing already correct); domain-separation tag ADDED +verify_strictHARDENED; key-handling & verify-before-trust confirmed clean (ADR-116 §2.2). Beyond-SOTA crypto+security review of the Cognitum/HA-Matter bridge's SHA-256 + Ed25519 witness chain — the exact signing chain ADR-262 P2 proposes to reuse — un-covered by the ADR-154–159 sweep. Top-priority check: the siblingwifi-densepose-enginebug class (unframed boundary-to-boundary concatenation of operator-influenceable strings into a signed/hashed digest). Result reported honestly: that bug class is ABSENT here —witness::canonical_bytesalready length-prefixes the two variable-length operator-influenceable fields (kind_len:u32-be ‖ kind,payload_len:u32-be ‖ payload) over fixed-widthprev_hash[32] ‖ seq:u64-be ‖ ts:u64-be, an injective encoding (proven pre-existing bycanonical_bytes_length_prefixing_prevents_ambiguity), andwitness_signing::sign_event/verify_signaturesign/verify the identical bytes the hash chain commits to (no separate unframed concatenation). The manifestbinary_signature(Ed25519 over the fixed 64-hex-charbinary_sha256) is signed at build time by the Makefile, not in-crate, and over a single fixed-length value — no in-crate manifest-signing concatenation surface. Two real hardening gaps fixed, the first pinned by fails-on-old tests:- CHM-WIT-01 (missing domain-separation tag, LOW) — ADDED. The engine review's prescribed fix is "domain-tag + length-prefix"; the length-prefix half was present, the domain tag was absent. The witness SHA-256 preimage / Ed25519 message carried no tag distinguishing it from any other signing context that shares key infrastructure — notably the manifest
binary_signature, the very chain ADR-262 P2 reuses. Fix: prepend a versioned, NUL-terminatedWITNESS_DOMAIN_TAG = b"cog-ha-matter/witness-event/v1\x00"tocanonical_bytes(the doc-comment already anticipated a leading version migration). Cross-protocol separation now holds: a witness signature can never be replayed as a message for another Ed25519 context. Witness-bytes change by design (prior on-disk witness hashes/signatures invalidated, like the engine fix) — verified safe: no in-repo crate consumes cog-ha-matter's witness bytes/signatures programmatically (all references are doc-comment mentions; the crate is self-contained, nouse cog_ha_matter::anywhere). Pinned bycanonical_bytes_is_domain_separated,canonical_bytes_starts_with_domain_tag_then_prev_hash,witness_preimage_cannot_collide_with_a_bare_manifest_digest(witness.rs) andsignature_commits_to_domain_tag_not_bare_fields(witness_signing.rs — a signature over the un-tagged field concatenation must NOT verify); the domain-separation guard FAILED on the reverted un-tagged encoding ("canonical message is not domain-separated"). - CHM-WIT-02 (permissive Ed25519 verification, LOW) — HARDENED to
verify_strict. For a tamper-evident audit chain the signature is the attestation, soverify_signaturenow usesVerifyingKey::verify_strict(rejects non-canonical encodings + small-order public keys per RFC 8032) instead of the permissiveVerifier::verify— giving auditors the "one canonical signature per event" property they rely on when comparing/deduplicating signed records. Not a forgery fix (the public key is caller-pinned, never parsed from the event), reported at true LOW severity. Guarded byverify_uses_strict_path_and_pins_caller_key. - Dimensions confirmed clean (with evidence, no invented issues): (1) verify-before-trust + key-pinning —
verify_signaturetakes the verifying key as a caller-supplied parameter (the Seed's known key), never reads a key from the event/manifest, so a forged event carrying its own key cannot self-attest;WitnessChain::read_jsonlre-derives and re-checks everythis_hashon load (tampered bundle →HashMismatch) and runs a chain-levelverify()catching reordered/spliced events (existingverify_rejects_*,jsonl_parser_rejects_tampered_payload,read_jsonl_chain_verify_catches_reordered_events). (2) key handling — the crate never generates, stores, logs, or serializes a signing key:sign_eventtakes&SigningKeyby reference, the manifest struct has no key field, and the only key material in-crate is the test-only fixed seed (clearly documented "DO NOT use in production"); production keys come from the Seed's secure key store (out of scope, ADR-116 §key-management). No hardcoded/default/predictable production key, no key in the manifest, no world-readable key path (the crate does no key file I/O). (3) determinism/canonicalization —canonical_bytesis pure positional bytes (no HashMap iteration, no float formatting); Ed25519 is deterministic (pinned bysignature_is_deterministic_for_same_event_and_key); the JSONL wire form is hand-rolled with alphabetically-locked field order (jsonl_field_order_is_alphabetical_for_byte_stability) and the mdns TXT records aresort()-ed for byte-stable advertisement — no iteration-order or float-format nondeterminism feeds any hash/signature. (4) fail-closed parsing / DoS —from_jsonl_line/from_hex/hex_decodereturn structured errors (never panic) on wrong length, non-hex, missing field, odd-length payload, or hash mismatch (jsonl_parser_rejects_non_hex_hash,hex_decode_rejects_odd_length, …);main.rsreads no untrusted files/paths (clap args only;--print-manifestemits a static template) — no path/injection surface. (5) de-magic — the witness/signing byte layout is already expressed as named widths; no bare security-relevant literals worth extracting beyond the new namedWITNESS_DOMAIN_TAG.cog-ha-matter --no-default-features: 64→68 tests, 0 failed (+3 domain-tag witness, +1 signing-layer domain-commit, +1 strict-verify key-pin; one pre-existing test renamed to assert the tag). Workspace green; Python deterministic proof unchanged (f8e76f21…46f7a, bit-exact — cog-ha-matter is off the signal proof path). Review notes appended to ADR-116 §2.2.
- CHM-WIT-01 (missing domain-separation tag, LOW) — ADDED. The engine review's prescribed fix is "domain-tag + length-prefix"; the length-prefix half was present, the domain tag was absent. The witness SHA-256 preimage / Ed25519 message carried no tag distinguishing it from any other signing context that shares key infrastructure — notably the manifest
homecore-api(HA-wire-compat REST + WebSocket) beyond-SOTA security review —GET /api/auth-gate gap FIXED + WS event-stream lag-DoS robustness FIXED; auth/traversal/injection/info-leak dimensions confirmed clean (ADR-161 / ADR-130). Network-facing review of the HA-wire-compat API layer (remote attack surface), not covered by the ADR-154–159 sweep — same scrutiny the siblingwifi-densepose-engineand-bfldreviews got. Two real bugs fixed, each pinned by a fails-on-old test.- HC-API-AUTH-01 (auth-gate gap, LOW) —
GET /api/was unauthenticated; FIXED. Every sibling REST route (/api/config,/api/states,/api/services, …) callsBearerAuth::from_headersfirst, butrest::api_roottook no headers and unconditionally returned200 {"message":"API running."}. HA'sAPIStatusViewinheritsrequires_auth = True, so an unauthenticated/wrong-token request to/api/must be 401 — HA clients use this status route as a token-validation probe, and a 200 both told a bad-token client its token was good and let an unauthenticated party confirm a live endpoint. Severity is LOW (the body is a static string — no entity/state data leaks), reported at true severity, not inflated. Fix:api_rootnow validates the bearer like its siblings. Pinned byapi_root_rejects_missing_bearer+api_root_rejects_wrong_bearer(both 200→assert-401 on old code) and guarded byapi_root_accepts_correct_bearer. - HC-WS-LAG-01 (DoS-adjacent silent failure, LOW) —
subscribe_eventskilled the event stream on a broadcast lag; FIXED. The per-subscription task matchedErr(_) => breakon bothbroadcast::Receiver::recv()arms, butLagged(n)(a slow consumer falling >4,096 events —EVENT_CHANNEL_CAPACITY— behind) is recoverable: the bus doc itself says "Lagged receivers must re-sync", and HA's WS contract keeps the subscription alive across a lag. The old code treated the first lag as fatal, so after an event burst the client's stream went permanently silent with no error frame — a self-inflicted event-delivery DoS under load. Fix:Lagged(_) => continue(skip the dropped window, re-sync),Closed => break, on both the system and domain arms. Pinned bysubscription_survives_broadcast_lag(subscribes, floods 6,000 filtered events past the 4,096 capacity to force aLagged, then asserts a subsequent subscribed event is still delivered — 5s-timeout panic on old code). - Dimensions confirmed clean (with evidence, no invented issues): (1) AuthN/AuthZ — all 7 other REST handlers (
get_config/get_states/get_state/set_state/delete_state/get_services/call_service) gate onBearerAuth::from_headers→LongLivedTokenStore::is_validbefore any work; the WS handshake validates theauthtoken against the same store before entering the command loop and the privileged commands are unreachable pre-auth_ok(HC-WS-01, already fixed). Token compare is aHashSet::contains(content-independent timing, not the byte-==oracle ADR-157 §B4 fixed in hardware) — no timing-oracle finding. No route skips the gate, no result-ignored check, no default/empty token accepted (is_validrejects empty internally;from_envis non-dev). (2) Path traversal — no route maps user input to a filesystem path (state lives in an in-memoryDashMap);:entity_idis funneled throughEntityId::parse, a strict[a-z0-9_]+\.[a-z0-9_]+ASCII allowlist that rejects..,/,\, and absolute paths. No traversal surface exists. (3) Injection — no SQL, no shell/subprocess, noformat!-into-response;call_service/set_statebodies are typedserde_json::Valuepassed to the in-process service registry (matches HA). (4) Info-leak —ApiErrormaps to fixed status + a{message}derived only from typed variants;call_service'sServiceError::HandlerFailed(String)is integration-controlled (mirrors HA surfacing the handler error), not framework internals/paths/stack-traces (no ADR-080-class leak). (5) CORS is an explicit allowlist (allow_credentials(false), HC-05 already fixed), notpermissive(). (6) De-magic — no bare security-relevant literals in this crate worth extracting (EVENT_CHANNEL_CAPACITYalready named inhomecore; CORS dev-default ports are documented).homecore-api --no-default-features: 25→29 tests, 0 failed (+2 api-root auth, +1 api-root accept-guard, +1 WS lag-survival); workspace green; Python deterministic proof unchanged (homecore-api is off the signal proof path). Review notes appended to ADR-161.
- HC-API-AUTH-01 (auth-gate gap, LOW) —
wifi-densepose-calibrationper-room calibration review — NaN-poisoning fail-closed gap FIXED + file/path & receipt surfaces confirmed clean (ADR-151). Beyond-SOTA correctness+security review of the ADR-151baseline → enroll → extract → train → bankpipeline (the appliance-deployed per-room specialist core), un-covered by the ADR-154–159 sweep. One real numerical-robustness bug fixed.Features::from_series— the live-inference and training feature path — computedmean/variance/motionover the raw scalar series with no non-finite guard, so a singleNaN/±infsample (a corrupt CSI frame) producedmean=NaN, variance=NaNand an all-NaNprototype embedding. Baked into a persistedPresenceSpecialist::threshold/empty_meanat train time, thatNaNsilently disabled presence detection for the life of the bank (everyf.variance > NaNand|mean − NaN|comparison is false → presence always reads absent, confidence 0), with no error raised — the exact "produce NaN that poisons a specialist / silently accept garbage" failure, and an asymmetry vs the meticulously NaN-guardedgeometry_embedding.rs. Fix at the production boundary: filter non-finite samples before any statistic (a corrupt frame counts as no frame); a wholly-non-finite series degrades to the newFeatures::ZERO, exactly like the empty series. Value-identical for all-finite input —full_loop.rsand every existingextracttest pass unchanged. Pinned by two fails-on-old tests (non_finite_samples_do_not_poison_features,all_non_finite_series_is_zero, both FAILED pre-fix). Dimensions confirmed clean (with evidence, no invented issues): (1) file/path handling — the crate does zero file/path I/O (nostd::fs/Path/File/read/writeanywhere insrc/; only in-memoryserde_json), so path-traversal / unbounded-read / artifact-path concerns do not exist at the crate boundary — they live in thewifi-densepose-cliconsumer (room.rs), out of this crate's scope; (2) untrusted-load —SpecialistBank::from_jsonparse-validates shape via serde (malformed →CalibrationError::Serde), and per ADR-151 invariant (B) banks are local-first, never network-received; (3) receipt/hash integrity — the crate emits no hash/receipt/witness/signature (noCalibrationReceiptanalogue), so the engine's unframed-concatenation bug class is structurally absent — nothing to mis-frame; (4) other numerical paths already robust —geometry_embedding.rssanitizes every input + sweeps to finite (verified by itsadversarial_inputs_never_produce_nantest); presence/restlessness/anomaly divisions are all.max(1e-3)-guarded;autocorr_dominantguardsr0 ≤ 1e-6,n < 16, empty bands;SpecialistBank::trainrejects empty anchors; anomaly requires ≥2 anchors. De-magicked the bare specialist threshold literals (breathing 0.25 / heartbeat 0.3 default min-scores, anomaly 2.0× spread / >0.5 label cutoff) into named documented consts, value-identical, pinned bydefault_min_score_constants_match_prior_literals+anomaly_constants_match_prior_literals.wifi-densepose-calibration --no-default-features: 58→62 unit tests (+2 NaN fail-closed, +2 de-magic pins) + 1 full-loop integration, 0 failed. Python deterministic proof unchanged (f8e76f21…46f7a, bit-exact — calibration is off the signal proof path). Review notes appended to ADR-151 §6.wifi-densepose-enginegoverned-trust review — witness domain-separation gap FIXED + privacy monotonicity confirmed clean (ADR-137 / ADR-141 / ADR-032). Beyond-SOTA correctness+security review of the security-critical composition root (the cycle enforcing RuView's privacy guarantees), not covered by the ADR-154–159 sweep. One real witness-integrity bug fixed.witness_ofconcatenatedmodel_version,calibration_version, andprivacy_decisionboundary-to-boundary and left the variable-length evidence list without a count, so a string straddling a field boundary collided with a different trust decision — e.g. a per-room adapter id (ADR-150 §3.4, operator-influenceable) absorbing the leading bytes of the calibration epoch (model="…cal:00a",cal="b") yields the same witness asmodel="…",cal="cal:00ab". Two distinct privacy-relevant input tuples → one witness defeats the ADR-137 §2.7 "any privacy-relevant delta → different witness" tamper/drift audit. Fix: domain-tag the BLAKE3 hash (ruview.engine.witness.v1), write an explicit evidence count, and length-prefix every field (8-byte LE length ‖ bytes) — unambiguous framing regardless of contents. Witness-layout change by design (prior witness bytes invalidated); downstream consumers (engine_bridge, rufield) assert only witness relationships (assert_ne/assert_eqacross runs), never absolute bytes, so nothing breaks. Pinned by two fails-on-old tests:witness_distinguishes_model_calibration_boundary,witness_distinguishes_evidence_model_boundary. Dimensions confirmed clean (with evidence, no invented issues): (1) privacy monotonicity —effective_classis recomputed each cycle from the active mode's floor with at most a single-stepdemote_one(clamped atRestricted), no cross-cycle state, proven over all 5 modes byforced_contradiction_never_relaxes_class(forced contradiction only ever raises the class byte; clean cycle == base); (2) fail-closed — empty cycle errors with no degenerate output (empty_cycle_fails_closed), single-node boundary characterized (single_node_cycle_is_well_formed), NaN coupling →max(0.0)→absent edge→at-risk (more restrictive); (3) witness determinism — no HashMap iteration / float formatting feeds the hash; (4) mesh_guard (ADR-032) — partition-risk → demotion path verified, thresholds already named documented fields. De-magicked the engine-construction literals (coherence accept gate, ADR-143 SLAM discovery + static-anchor thresholds) into named documented consts, value-identical, pinned byengine_constants_match_prior_values.wifi-densepose-engine --no-default-features: 27→33 tests, 0 failed (+2 witness, +1 monotonicity property, +2 fail-closed boundary, +1 de-magic pin). Python deterministic proof unchanged (f8e76f21…46f7a, bit-exact — the engine is off the signal proof path). Review notes appended to ADR-137 (witness) and ADR-141 (monotonicity).- ADR-141 BFLD privacy-bypass closed —
process_to_framenow routes the payload throughPrivacyGate(wifi-densepose-bfld).BfldPipeline::process_to_framestamped the emittedBfldFrameheader with the activePrivacyClassbut serialized the caller-suppliedBfldPayloadunchanged viaBfldFrame::from_payload. A frame labeledAnonymous(2) orRestricted(3) therefore carried the full identity-leakycompressed_angle_matrix(the beamforming-angle identity surface) + amplitude/phase proxies +csi_delta— exactly the sectionsPrivacyGate::demoteis documented and tested (privacy_gate_demote.rs) to strip at those classes. Because aNetworkSinkaccepts class ≥Derived(1), such a frame would publish the identity surface across the node boundary despite its restrictive class byte; the class byte lied about payload content. Fix: after building the frame at the active class, applyPrivacyGate::demoteto the same class — a no-op class transition that strips the sections that class forbids (research classesRaw/Derivedkeep the full payload). Pinned by three fails-on-old tests inpipeline_to_frame.rs(…_at_anonymous_strips_identity_leaky_sections,…_in_privacy_mode_strips_amplitude_and_phase— both FAILED pre-fix;…_at_derived_preserves_full_payloadguards against over-stripping). Grade: privacy-bypass FIXED + regression-pinned. - ADR-157 Milestone-1 B4 - constant-time HMAC sync-beacon tag compare (
wifi-densepose-hardware).AuthenticatedBeacon::verifycompared the 8-byte HMAC-SHA256 tag withself.hmac_tag == expected, which short-circuits on the first differing byte and leaks, through verification latency, how many leading bytes an attacker's forged tag matched - a byte-by-byte tag-recovery oracle (~256*N trials instead of 256^N). Replaced with a hand-rolled branch-freeconstant_time_tag_eq(XOR-accumulate every byte difference into a singleu8, no early exit,#[inline(never)]+core::hint::black_boxto stop the optimizer reintroducing a short-circuit or a non-constant-timememcmp). No new dependency - ADR-157 had deferred this only to avoid adding thesubtlecrate; a fixed 8-byte compare needs none. Grade MEASURED (constant-time construction; micro-timing on a noisy host is a smoke check only, gated#[ignore]). Pinned bytag_compare_is_constant_time_shape(equal/first-differ/last-differ/all-differ/length-mismatch + an end-to-endverify()last-byte tamper), proven to fail on a last-byte-skipping constant-time bug. ADR-157 §8 B4 -> RESOLVED. - ADR-080 open HIGH findings closed on the Rust
wifi-densepose-sensing-serverboundary (ADR-164 G11). The QE sweep's three HIGH findings — XFF-spoofing bypass, leaked stack traces, JWT-in-URL (CWE-598) — were logged against the Python v1 API and never re-verified against the shipped Rust sensing-server; the HOMECORE/M7 sweep (ADR-161) coveredhomecore-server, not this crate.- #2 leaked internal errors (the one live exposure) — FIXED. Six handlers in
main.rsserialized the internal errorDisplaystraight into the JSON response body:edge_registry_endpointreturned a panickedspawn_blockingJoinError("task … panicked") in a500, plus the raw upstream error in a503;delete_model/delete_recording/start_recordingreturnedstd::io::Errorstrings (OS detail / path);calibration_start/calibration_stopreturned theFieldModelerror chain. Newerror_responsemodule logs the full detail server-side only (with a correlation id) and returns a generic body ({"error":"internal_error","correlation_id":…}) — nopanicked, no file paths, no Debug chain. 5 module tests (a leak-substring guard proven to fail on the reverted old body) + the existing handler suite. - #1 XFF-spoofing bypass — VERIFIED ABSENT, regression-pinned. The sensing-server has no XFF-trusting control to bypass: there is no IP-based rate-limiter or IP-allowlist, and neither
bearer_auth(token-only) norhost_validation(Host-header only) readsX-Forwarded-For/X-Forwarded-Host(noforwarded/peer_addr/client_ipanywhere in the crate). Added regression tests proving a spoofedX-Forwarded-Fornever flips an auth decision and a spoofedX-Forwarded-Hostnever bypasses the Host allowlist. - #3 JWT-in-URL (CWE-598) — VERIFIED ABSENT, regression-pinned.
require_bearerreads the token only from theAuthorizationheader; the WebSocket handlers take no token query param and the soleQueryextractor (EdgeRegistryParams) is a non-secretrefreshflag. Added a regression proving?token=/?access_token=in the URL never authenticates while the header path still does.
- #2 leaked internal errors (the one live exposure) — FIXED. Six handlers in
Fixed
wifi-densepose-geonumerical-robustness audit —parse_hgtdegenerate-input panic FIXED +haversineantipodal NaN FIXED; pole-singularity & pointcloud NaN-state-poisoning confirmed clean (ADR-154-class sweep). Targeted numerical-robustness audit ofwifi-densepose-geo+wifi-densepose-pointcloud, hunting the proven non-finite-input-poisons-persistent-state class. Two real bugs ingeo, each pinned by a fails-on-old test. (1)terrain.rs::parse_hgtusize-underflow panic —side = sqrt(n_samples); for an empty / sub-2x2 bufferside ≤ 1, so1.0 / (side - 1)underflowsusize(panic "attempt to subtract with overflow" in debug; wraps to a huge value in release → garbage/infcell_size_degthat then poisons everyElevationGrid::getlookup). A truncated SRTM download, a 404 HTML body, or an empty response all reachparse_hgt— nowbail!s with a clear error whenside < 2. Pinned byparse_hgt_empty_data_errors_not_panics(panicked pre-fix) +parse_hgt_single_sample_errors(returned inf pre-fix) + aparse_hgt_minimal_2x2_is_finiteguard. (2)coord.rs::haversineasin-domain → NaN — for (near-)antipodal points floating rounding can pushh.sqrt()to1.0 + ~4e-16, andasin(>1)is NaN, silently breaking every downstream</>distance comparison (verified: pair(-44.4994,-178.95722)→(44.49939999,1.04278001)yieldsh=1.0000000000000004). Fixed by clamping into[0,1]beforeasin. Pinned byhaversine_near_antipodal_is_finite_not_nan(NaN pre-fix). The ±90° pole-singularity (cos(lat)=0division in the ENU transforms) is pinned as no-panic without changing the transform (value-identical for valid inputs).wifi-densepose-pointcloudis confirmed-robust — no bug, no manufactured finding: the only persistent auto-accumulating state (occupancyEMA, vitals) is fed exclusively from the integer-rssi/sqrt/atan2parser, which can only emit finite values, and the persistent state is provably self-healing even under an adversarial hand-builtCsiFramecarrying NaN/inf amplitudes+phases (motion_score=(NaN/100).min(1.0)→1.0; breathing path→0→clamp(5,40)→5.0; tomography EMA uses only integer rssi). Pinned bynonfinite_frame_does_not_poison_persistent_state(injects 40 poisoned frames, asserts occupancy/vitals stay finite + the pipeline recovers) and three degenerate-voxel-fusion no-panic tests (empty/single/all-coincident).wifi-densepose-geo --no-default-features: 9→15 lib (+6), 8 integration unchanged;wifi-densepose-pointcloud: 18→22 (+4); 0 failed; workspace green; Python proof unchanged (f8e76f21…46f7a, bit-exact — both crates off the signal proof path).- Vitals IIR filters self-heal after a non-finite CSI frame — a single NaN/inf no longer permanently kills breathing & heart-rate extraction (
wifi-densepose-vitals, safety; ADR-021 / ADR-158 §A1). The 2nd-order resonator inbreathing::BreathingExtractor::bandpass_filterandheartrate::HeartRateExtractor::bandpass_filterlatches each outputy[n]into the filter state (y1/y2). A non-finite input — one NaN/inf amplitude residual from a corrupt CSI frame — produced a NaNoutputthat was written into the state. The existingextract()is_finite()guard correctly dropped that single sample from history, but never sanitized the poisoned filter state, so every subsequent output stayed NaN, was rejected too, and the sliding-window history never refilled: the extractor went silently dead (returningNoneforever) untilreset(). On the vitals alert path this is a safety-relevant denial of service — one bad frame and breathing and heart-rate monitoring stop, with no error surfaced. Fix: whenbandpass_filtercomputes a non-finiteoutputit now resets the IIR state to default and returns0.0, so the resonator recovers on the next clean frame (the0.0is still dropped by the caller's finite-check — no spurious sample enters history). Same class as the calibration NaN bug (ADR-154 §3) and the firmware vitals fixes (#998/#996/#987): the prior hardening guarded the history boundary but not the filter-state boundary. Pinned bybreathing::tests::nan_frame_does_not_permanently_poison_filter,breathing::tests::inf_mid_stream_does_not_freeze_history, andheartrate::tests::nan_frame_does_not_permanently_poison_filter(all three FAIL on the pre-fix code, verified by reverting). Also de-magicked the safety-critical HR physiological plausibility band into namedHR_PLAUSIBLE_MIN_BPM/HR_PLAUSIBLE_MAX_BPMconsts (value-identical 40/180 BPM, pinned byplausibility_band_constants_pinned) and added a fabricated-vital negative (pure_noise_is_never_reported_valid— broadband noise never yields a clinicallyValidHR).wifi-densepose-vitals --no-default-features: 55→60 lib tests, 0 failed; workspace green; Python proof unchanged (vitals is off the deterministic proof's signal path). - BFLD MQTT
zone_activitypayload now JSON-escapes the zone name (wifi-densepose-bfld).mqtt_topics::render_eventsemitted the zone payload asformat!("\"{zone}\"")with no escaping, whileha_discovery.rsalready escapes operator-controlled strings. A zone name containing a"or\produced malformed/injectable JSON on the Home-Assistant state topic (e.g. zonea"b→ payload"a"b"). Added ajson_string_literalescaper mirroringha_discovery::push_str_fieldand applied it to the zone payload — value-identical for normal zone names (living_room, …). Pinned byzone_payload_escapes_json_metacharacters(FAILED pre-fix; round-trips throughserde_json); the existingzone_payload_is_json_string_with_quotesstill passes unchanged. - ESP32 vitals:
n_personsover-counted (reported 4 for one person) + presence flag flickered at close range (#998, #996). Two firmware logic bugs infirmware/esp32-csi-node/main/edge_processing.c, both robustness/logic fixes — not validated-accuracy claims (true count/PCK vs labelled ground truth stays hardware/data-gated on the COM9 ESP32-S3).- #998 over-count — root cause + fix.
update_multi_person_vitals()split the top-K subcarriers intotop_k_count/2groups and marked every groupactiveunconditionally, so one body's multipath always reported the fullEDGE_MAX_PERSONS(=4). New pure, host-testablecount_distinct_persons()gates each candidate group: (1) energy gate — a group's phase variance must be ≥EDGE_PERSON_MIN_ENERGY_RATIO(0.35) × the strongest group's, so weak multipath echoes don't count; (2) spatial dedup — groups whose representative subcarriers sit withinEDGE_PERSON_MIN_SC_SEP(4) of each other are the same body. Aperson_count_debounce()then requires the gated count to holdEDGE_PERSON_PERSIST_FRAMES(3) consecutive frames before it's emitted, so a single noisy frame can't promote a phantom. The strongest group always counts (a present body yields ≥1). All thresholds are named, documented constants inedge_processing.h. - #996 presence flicker — root cause + fix. Presence was a bare
score > thresholdcompare on a noisypresence_score(field-observed 2.6–26.7 frame-to-frame for one stationary person), so the boolean chattered at the boundary while the score clearly indicated a person. New purepresence_flag_update()is a Schmitt trigger + clear-debounce: assert abovethreshold, hold in the dead band down tothreshold × EDGE_PRESENCE_HYST_RATIO(0.5), and only clear after the score stays below the low threshold forEDGE_PRESENCE_CLEAR_FRAMES(5) consecutive frames. The score itself is unchanged (and still emitted at packet offset 20 for consumer-side thresholding). Constants named/documented inedge_processing.h. - Tests:
firmware/esp32-csi-node/test/test_vitals_count_presence.c(host C99,make run_vitals) — 13 cases / 22 assertions, all passing under gcc 13-Wall -Wextra. Pins: single-strong-signature + multipath → count==1; two well-separated → count==2; two strong-but-adjacent → 1 (dedup); transient count spike rejected; sustained change accepted; dithering presence trace → stable flag (no flicker); genuine departure → clears within hold window. The named tuning constants are#included from the real header so the test and firmware can't disagree. Hardware-gated caveat: these pin the decision logic; the exact energy/separation/hysteresis values that best match a real room vs labelled occupancy remain on-device tuning (COM9 ESP32-S3 + ground truth).
- #998 over-count — root cause + fix.
- Observatory 3D figure never animated —
/ws/sensingomitted per-personposition/motion_score/pose(#1050). Thesensing_updateframe shippednodes/features/classification/signal_fieldand apersons[]carrying only image-spacekeypoints/bbox/zone; the Observatory'sFigurePool/PoseSystem(anddemo-data.js's own contract) animate each figure frompersons[i].position(room-world[x,y,z]),persons[i].motion_score(0..100), andpersons[i].pose, none of which the live stream emitted — so the figure sat static while signal metrics updated. Honest scope (Case 2 — no calibrated per-person localizer exists): a single ESP32 link does not produce calibrated room-coordinate localization or per-person skeletal pose, so the fix emits only what is truthfully derivable. Newfield_localizemodule reads the strongest peak(s) out of the frame's realsignal_fieldgrid (already built from measured subcarrier variances × measured motion-band power) and maps the peak cell to Observatory world coordinates with the exact_buildSignalFieldtransform (x=(ix−nx/2)·0.6,z=(iz−nz/2)·0.5,y=0), so the figure lands on the field hotspot it stands on.motion_scoreis the measuredmotion_band_powerpassed through (clamped 0..100);poseis set only from a real aggregatepostureestimate when one exists, elseNone(never a fabricated skeleton — per-person pose keypoints in room coordinates stay gated on the pose model + ADR-079 paired data). An empty / below-threshold field yieldspersons: [](no phantom person); a present person on a field with no resolvable peak keepsposition=[0,0,0](not invented coords) whilemotion_scorestays real.attach_field_positionsruns after the tracker step at all five broadcast sites. No UI change required — the Observatory already reads these fields and defaultspose→'standing'when absent. NewPersonDetection.position/motion_score/posefields added to both themain.rs-local andtypes.rsstructs. Pinned by 10 tests:field_localizepeak-extraction/coordinate-mapping/empty-field/separation unit tests +observatory_persons_field_position_tests(sensing_update_emits_persons_with_field_derived_positionfeeds a synthetic field with a known peak at cell (15,4) and asserts the emittedposition=[3.0, 0, −3.0]within tolerance;empty_room_yields_no_phantom_person;pose_is_real_when_posture_present_and_absent_otherwise;present_but_below_threshold_field_keeps_position_at_origin_not_fabricated).wifi-densepose-sensing-server --no-default-features: bin 441→451, 0 failed; workspace green; Python proof unchanged (off the deterministic proof path). - ADR-155 Milestone-1b — metric-definition unification, the §8 backlog subset (Goals A/B/C). Closed the two §8 metric-integrity items; every change pinned by a test, graded MEASURED. The audit (Goal A) also surfaced findings the §1 table under-counted — recorded honestly in ADR-155 §8.1, not hidden. Workspace stays green; Python proof unchanged (metrics are not on the deterministic proof's signal path).
- Goal B —
test_metrics.rsnow validates the production metric, not a reimplementation. The integration test previously asserted properties of its OWN localcompute_pck/compute_oks(a test that can't catch a canonical-impl bug — both could be wrong the same way). Hoisted the canonical core (pck_canonical/oks_canonical/canonical_torso_size/sigmas/bounding_box_diagonal) into a new un-gatedmetrics_coremodule so the single definition is reachable undercargo test --no-default-features(themetricsmodule istch-backend-gated);metricsre-exports it → still exactly ONE implementation. Rewrote the test to assert the productionpck_canonical/oks_canonicalequal hand-computed fixtures (canonical_pck_matches_hand_computed_fixture= 3/4 correct ⇒ 0.75; hip↔hip normalizer pin; zero-visible⇒0.0; OKS perfect⇒1.0; fake-Gold pin) plus a differential cross-check (test_kernel_agrees_with_canonical: an independent raw-threshold kernel must AGREE with canonical where torso==1.0).wifi-densepose-train --no-default-features: test_metrics 10→12, 0 failed. - Goal C — divergent live-server PCK/OKS relabelled so they're never conflated with canonical. Goal C named
training_api.rs:804(torso-HEIGHT PCK); the audit found that file is an orphan (notmod-declared, does not compile) and the real livebest_pck/best_okscome fromtrainer.rs— a raw, unnormalizedpck_at_thresholdand anarea=1.0fake-Goldoks_map(both MISSED by ADR-155 §1, both on the claim-inflating side, both serialized as bare "PCK@0.2"/"OKS"). Torso-height/raw math is load-bearing (pixel-space, different scale axis, nondarray/train dep), so the honest fix is relabel, not force-unify:training_api.rscompute_pck→compute_pck_torso_height+ field/log docs;trainer.rskernels documented raw/fake-Gold;main.rsprintspck_raw@0.2/oks_map(area=1.0 proxy). No wire-format field orpub-fn renames (no silent API break). Pinned bytorso_pck_is_labelled_distinctly_from_canonical+pck_at_threshold_is_raw_unnormalized_not_canonical.wifi-densepose-sensing-server --no-default-features: lib 450→451, 0 failed. True unification ontopck_canonical/oks_canonicalremains a tracked ADR-155 §8 item.
- Goal B —
- Pre-existing
SketchBank::topkheap inversion returned the FARTHEST sketches (found during ADR-156 §8 Pass-2 work). Then > kpartial-sort path inwifi-densepose-ruvector/src/sketch.rsusedBinaryHeap<Reverse<(dist,id)>>(a min-heap) but its eviction logic treated the peek as the max, so it kept the k farthest sketches and returned them as "nearest." The shipped unit tests only exercised then ≤ kfast path (≤ 3 entries), so the inversion shipped silently in ADR-084. Fixed to a plain max-heap. Pinned bytopk_heap_path_returns_nearest(farthest-first insertion exposes it) andtight_clusters_give_high_coverage_with_overfetch(measured 0.072 coverage on the old code — effectively random — vs >0.99 fixed). Every ADR-084 top-K coverage number depends on the fixed path. MEASURED, not a no-op. - ADR-154 Milestone-1 — cleared the P1 deferred backlog in
wifi-densepose-signal(§7.4 #1, #10; partial #9, #13). Each fix pinned by a regression test that fails on the old behaviour; every claim graded MEASURED / DATA-GATED; no fabricated thresholds. Python proof unchanged (f8e76f21…46f7a, bit-exact — the CIR ghost-tap guard is not on the deterministic proof path).- #1 (MEASURED metric / DATA-GATED threshold): circular phase variance.
cir.rs::phase_variancecomputed a linear sample variance over phase angles that wrap at ±π, so a tightly-clustered set straddling the branch cut reported spuriously HIGH dispersion — false-tripping the> TAUghost-tap guard on real, tightly-clustered CIR taps. Replaced with Mardia's circular variance V = 1 − R̄, bounded [0,1] and invariant to where the cluster sits on the circle. The old TAU-scaled threshold is meaningless on [0,1]; re-derived against a named constGHOST_TAP_CIRCULAR_VARIANCE_MAX = 0.99(fires only when R̄ ≤ 0.01 — essentially uniform phase). The metric is MEASURED; the threshold value is DATA-GATED (a clean single-path ramp also sweeps the circle, so V alone can't separate clean from unsanitized without labelled frames — the default is deliberately conservative, strictly more permissive at the wrap boundary than the buggy linear guard). Fails-on-old:phase_variance_circular_not_fooled_by_branch_cut(old linear variance > TAU on wrap-straddling phases while circular V≈0, guard no longer trips) +phase_variance_circular_is_bounded_and_extremal(V∈[0,1], V≈0 identical, V≈1 uniform). - #10 (MEASURED): Welford n=0/n=1 finiteness guard pinned. The shared
WelfordStats(field_model.rs)count < 2guards keepvariance/sample_variance/std_dev/z_scorefinite at the boundaries, but the n=0 case was untested (same family as the §4 divide-by-(n−1) trio). Addedwelford_finite_at_n0_and_n1— finite + documented-sentinel (0.0) at n=0/n=1. Fails-on-old proof: removing thesample_varianceguard makes the test panic with "attempt to subtract with overflow" at the(count − 1)underflow (guard restored). - #9, #13 (DATA-GATED): de-magicked thresholds + boundary tests (values UNCHANGED). Lifted the bare detection literals in
adversarial.rs(check/check_consistency: Gini 0.8, energy ratios 2.0/0.1, consistency 0.1·mean, score weights),coherence.rs::classify_drift(0.85, 10) andcoherence_gate.rsdefaults (0.85/0.5/200/3.0) into named, documented consts marked EMPIRICAL DEFAULT pending labelled calibration. Added characterization/boundary tests pinning each decision at/just-below/just-above its threshold (energy_ratio_high_boundary,energy_ratio_low_boundary,field_model_gini_boundary,consistency_active_fraction_boundary,classify_drift_*_boundary,*_consts_unchanged_from_literals) so a future labelled-data retune is a visible, tested change. The operating values were not changed; the de-magicking + tests are MEASURED, the values stay DATA-GATED.
- #1 (MEASURED metric / DATA-GATED threshold): circular phase variance.
- Multistatic fusion guard was too tight for real TDM hardware (#1031).
MultistaticConfig::default().guard_interval_uswas 5,000 µs (5 ms) with a comment claiming "well within the 50 ms TDMA cycle" — but on a real N-slot TDM schedule nodektransmits in slotk, so two nodes are separated by the slot offset, not clock jitter. A real 2-node mesh (slots 0/1) measured an 18,194 µs spread, so every real frame set exceeded the 5 ms guard andfuse()silently fell back to per-node sum/dedup — multistatic fusion never actually ran on hardware. Raised the default hard guard to 60 ms (a full 50 ms TDMA cycle + 20% jitter headroom, derived from the slot model and documented in the field doc) and the soft guard to 20 ms (just above the observed 18.2 ms 2-slot spread, so a normal cycle fuses cleanly with no privacy demotion). AddedMultistaticConfig::for_tdm_schedule(total_slots, slot_duration_us)to derive the guard from a deployment's exact schedule, and aWDP_TDM_SLOTS+WDP_TDM_SLOT_USenv seam in sensing-server. The honest per-node fallback remains for genuinely-mismatched frames — now the exception, not the default. Pinned byfuse_real_tdm_spread_18194us_fuses_with_default_guard(fails on the old 5 ms default) +configurable_guard_rejects_too_large_spread(guard still rejects a spread beyond one cycle). - Published HuggingFace model was unloadable — RVF format mismatch (#894). The
ProgressiveLoaderrejected the publishedruvnet/wifi-densepose-pretrainedmodel with the opaqueinvalid magic at offset 0: expected 0x52564653 (RVFS), got 0x77455735, then silently fell back to signal heuristics (the "10 persons for 1" garbage reporters saw). The HF repo shipsmodel.safetensors,model-q{2,4,8}.bin(magic0x77455735= "5WEw"), andmodel.rvf.jsonl— none carry the binary-RVF magic. Newmodel_formatmodule auto-detects RVFS / safetensors / HF-quant-bin / JSONL by magic+name, returns a typed actionableModelLoadError(lists accepted formats + the one-command convert path — never the opaque magic), and convertsmodel.safetensors/model.rvf.jsonl→ RVF in-memory so the published full-precision model now loads via--model. A--convert-model <in> --convert-out <out>CLI subcommand gives a one-command offline path; the silent heuristics fallback is now a loud, actionable error. Honest scope: the converter wires the format/load path (safetensors F32 tensors → RVF weight segment, manifest written, Layer A/B/C all succeed, weights round-trip) — it does not claim end-to-end pose accuracy, since the HF pose-decoder architecture differs from this crate's inference head (still data-gated in #894). Quantized.binblobs are rejected with a typed error pointing at the safetensors path. Pinned bysafetensors_converts_and_loads+hf_quant_classifies_to_actionable_error(both fail on the old opaque-magic path).
Changed
- ADR-157 Milestone-1 §5 #4 - native
wlanapi.dllmulti-BSSID throughput MEASURED on real hardware (wifi-densepose-wifiscan). The ADR's prior status ("asserted but NOT implemented; live scanner is the ~2 Hz netsh shim") is now stale:wlanapi_native.rsalready implements the realWlanOpenHandle->WlanEnumInterfaces->WlanGetNetworkBssList->WlanFreeMemory/WlanCloseHandleFFI andWlanApiScanneralready wires it native-first with a netsh fallback. This milestone measured it on this box (Intel Wi-Fi 7 BE201 320MHz, 2026-06-13): a newbenchmark_backend(backend, window)drives each backend over the same fixed 10 s wall-clock window so netsh is timed independently (the priorbenchmark()picked native-first and never measured netsh on a Windows box where native works). MEASURED: native 21.42 Hz vs netsh 3.84 Hz = 5.57x (mean 5.0 BSSIDs/scan, both paths); a separate native-only run measured 18.0 Hz. Native genuinely beats netsh - this is a real positive result, not a fabricated "10x". 50 back-to-back native scans completed 50/50 with no handle leak/degradation. Live-WLAN tests (measure_native_vs_netsh_throughput,native_scans_dont_leak_handles,measure_native_scan_rate) are#[ignore]for CI but were RUN here;native_scan_runs_real_ffi_on_windowsis a non-ignored schema-valid pin. ADR-157 §5 #4 + §8 -> MEASURED (was ACCEPTED-FUTURE / CLAIMED-unmeasured). - Mesh partition risk now demotes the privacy class and is witnessed (ADR-032). The dynamic min-cut guard's
at_risksignal was advisory-only (it fed the recalibration advisor). It now also contributes to the ADR-141 privacy demotion alongside fusion- and array-level contradictions: a mesh close to partitioning makes the fused belief less trustworthy, so the cycle emits at a more restricted class (monotonic — information only removed). Becauseeffective_classfeeds the BLAKE3 witness, a fragmenting array now shifts the witness — partition risk is auditable, not just logged. The mesh computation moved ahead of the demotion step inprocess_cycle; newmesh_guard_mut()exposes risk-threshold tuning. Test proves a forced-risk 3-node cycle demotes PrivateHome Anonymous→Restricted and shifts the witness vs a clean same-topology baseline (the only delta between the two cycles is the forced risk).
Added
- ADR-155 Milestone-2 — cleared the host-verifiable subset of the §8 P3 backlog in
wifi-densepose-train(+ the pure-Rustrf_encoder.rs/densepose.rsthe §3/§4 items named). Mirrors the ADR-154 M3 cleanup discipline. Honest enumeration first (grep, not the ADR's "~40" estimate): the actual non-tch train/nn surface is smaller — 7 de-magicked (const +*_consts_unchanged_from_literalspin == prior literal), 9 boundary/characterization tests, 1 added input guard (rf_encoder::LinearHead::try_new) + test, 2 doc-only fixes, 1 perf item bench-first → MEASURED-INCONCLUSIVE (not shipped). This is cleanup — no operating value or behaviour changed: each lifted literal is bit-identical to its prior value, each boundary test pins CURRENT behaviour. De-magicked:metrics_core.rs(VISIBILITY_THRESHOLD/MIN_REFERENCE_EXTENT/OKS_FALLBACK_SIGMA),ruview_metrics.rs(NUM_KEYPOINTS/VISIBILITY_THRESHOLD/PCK_THRESHOLD/MIN_BBOX_DIAG/MIN_DURATION_MINUTES),subcarrier.rs(6SPARSE_*consts),eval.rs(MIN_POSITIVE_MPJPE),domain.rs(LAYER_NORM_EPS),virtual_aug.rs(BOX_MULLER_U1_FLOOR/MIN_ROOM_SCALE),rf_encoder.rs(SOFTPLUS_LINEAR_THRESHOLD). §3rf_encoder.rs: added a pure-Rust fallibleLinearHead::try_new→ typedRfHeadErrorso untrusted/deserialized checkpoint weights can be shape-validated without thenew()panic (newunchanged; additive). §4 native-conv:densepose.rs::apply_conv_layer(pure-Rust naive loop) was benched (committedbenches/native_conv_bench.rs); a bit-identical range-clamped rewrite measured ~35% faster on padding-heavy small-channel maps but ~3% slower on channel-heavy maps, all inside a ±20% host-noise floor — MEASURED-INCONCLUSIVE, so NOT shipped (no fabricated number), characterized bynative_conv_matches_referenceand honestly deferred. Skipped honestly (not-real / already-handled):ablation.rs(NaN-sort + boundaries already fixed/tested in M1),signal_features.rs(consts already named, n=0 tested),mae.rs(no bare guard literals).wifi-densepose-train --no-default-features: 303 passed (was 288, +15), 0 failed;wifi-densepose-nn --no-default-featureslib: 38 (was 35, +3). Workspace--no-default-features: GREEN (single clean run). Python proof VERDICT: PASS, hashf8e76f21…46f7aUNCHANGED, bit-exact (asserted — the metrics path is off the deterministic signal proof path). Remaining §8 backlog stays deferred-not-dropped: GraphPose-Fi / ONNX-INT4 / CSI-JEPA (data/model-gated), ONNX read-lock (upstreamort-gated), tch-gated panic sites inproof.rs/trainer.rs/model.rs+metrics.rs*_v2dead-code (tch-gated — need a libtorch host). The non-tch-verifiable subset of §8 is now cleared. - ADR-154 Milestone-3 — cleared the §7.4 row #21–45 P3 backlog in
wifi-densepose-signal(the lumped "remaining clarity/doc/magic-constant/missing-boundary-test findings acrossruvsense/*,features.rs,motion.rs"). Honest enumeration first (grep, not the ADR's estimate): the lumped row was ~25 findings → 22 real, de-magicked across 11 modules; 6 boundary/characterization tests added; ~4 doc-only; the rest were already-handled or not-real and are reported as such (the "row #21–45" count was an estimate — there were not 25 distinct magic constants left after M0–M2). This is cleanup — no operating value or behaviour changed: every de-magicked literal becomes a named, documented EMPIRICAL-DEFAULT const that equals the prior literal exactly (each module ships a*_consts_unchanged_from_literalspin test), and every boundary test pins current behaviour so a future retune is a visible, tested change. Modules touched:motion.rs(#18, fusion weights/normalization/adaptive-threshold consts + 5 tests),gesture.rs(#12,euclidean_distancelength-mismatchdebug_assertdocumenting the silent-truncation contract + DTW n=0/m=0 boundary),longitudinal.rs(drift thresholds 7-day/2σ/3-day/7-day/EMA + day-6/7 + zero-vector cosine),cross_room.rs/multiband.rs/intention.rs/hampel.rs(division-guard epsilons + zero-norm/zero-variance/zero-MAD boundary +half_window==0error path),rf_slam.rs(NS_PER_DAY+ fixed-map defaults + zero-span guard),attractor_drift.rs(buffer/recent-window consts + documented the implicitrecent.len()≥1divide-safety +min_observationsoff-by-one boundary),coherence.rs(#9 completion — variance-floor + default-decay),calibration.rs(#2 —DEFAULT_MIN_FRAMESdeduped across 4 tier constructors + motion/subtract thresholds),fusion_quality.rs(contradiction penalty/bounds + n=0 identity),temporal_gesture.rs(confidence epsilon + quantization scale). A "magic" the agents flagged that was NOT real: anattractor_drift.rs:301"divide-by-zero" is unreachable (thecount < min_observationsguard guaranteesrecent.len()≥1) — documented + boundary-tested rather than guarded, per the no-behaviour-change rule. Signal crate lib--no-default-features: 476 passed, 0 failed, 1 ignored;--no-default-features --features cir: 476 passed, 0 failed (plain--features ciris unbuildable on this Windows host — the defaulteigenvaluefeature pullsopenblas-src, the same BLAS gate documented in M2 #8). Workspace--no-default-features: 3,275 / 0 failed (single clean run). Python proof VERDICT: PASS, hashf8e76f21…46f7aUNCHANGED, bit-exact (asserted explicitly — these modules are off the deterministic PSD/Doppler proof path, and the de-magicked consts are bit-identical regardless). This clears ADR-154's §7.4 deferred backlog to zero across M0–M3. - ADR-154 Milestone-2 — bench-first P2 perf subset + missing boundary tests (
wifi-densepose-signal, §7.4 #5/#6/#7/#8/#14/#16/#19/#20). PROOF discipline (ADR-154 §0): every perf item was benched before being touched (new committedbenches/dsp_perf_bench.rs, criterion, this Windows box); only the one item the bench proved hot was optimized, the rest are committed MEASURED-NULLs — a benched null is the proof the micro-opt was unnecessary, the §5.1 "already amortized" pattern. Every behaviour-changing edit is pinned bit-identical (or documented-tolerance). Signal crate lib--no-default-features: 447 passed, 0 failed, 1 ignored;--features cir: 447 passed, 0 failed.- #20 MEASURED-HOT, optimized (bit-identical).
compute_multi_subcarrier_spectrogramre-planned a freshFftPlannerfor every subcarrier (viacompute_spectrogram). Hoisted the plan + window out of the per-subcarrier loop (newcompute_spectrogram_with_plancore;compute_spectrogramdelegates, unchanged). 56-subcarrier: 467.88 µs → 254.75 µs = 1.84× (window 128); 627.27 µs → 448.39 µs = 1.40× (window 256). Bit-identical viamulti_subcarrier_hoisted_plan_bit_identical(f64::to_bitsof every value across all 4 window functions × {power,magnitude}). The §7.4 intro's predicted "most likely real win" — confirmed. - #5 / #6 / #7 MEASURED-NULL, left as-is.
node_attention_weights181 ns (2 nodes)…848 ns (8) — sub-µs, no hot-path alloc.tomography reconstruct(full 50-iter ISTA, 256 voxels) 47.5 µs (16 links) / 60.4 µs (32) — the 2 voxel buffers are already alloc-once +.fill-reused, negligible vs O(iters·links·voxels).pose_trackerKalman cycle 150 ns (17 keypoints) / 2.82 µs (170) — the "gain matrices" are fixed-size stack arrays, zero heap to reuse. No rewrite shipped; the committed benches prove each is not hot. - #8 MEASUREMENT-ONLY, BLAS-gated (number deferred, not fabricated). Correction to the finding:
extract_perturbationdoes not recompute the SVD (it projects against cachedfinalize_calibrationmodes); the real per-call eigendecomposition is theeigenvalue-featureestimate_occupancy(cov.eigh()on a 56×56 covariance). Theeigbench is committed butopenblas-srcwon't build on this Windows host ("Non-vcpkg builds are not supported on Windows" — the exact reason the project gate runs--no-default-features), so its µs cost must come from a Linux/BLAS box. Recorded, not estimated. Incremental SVD stays a sized future item. - #14 / #16 / #19 RESOLVED — tests added (no behaviour change).
fft_operator_within_tolerance_of_dense_canonical56pins the fullCiroutput of the opt-in FFT path within a documented relative tolerance of the dense path on the production canonical-56 config (τ ∈ {20,50,90} ns) — it changes the witness hash, so it must be provably close, not silently divergent.refinement_terminates_at_iteration_cap_when_not_converging(+ convergent companion) proves the LO-offset refinement terminates at exactlymax_iterationson a non-converging input (cap, not convergence, bounds the loop; internal…_countedrefactor returns the identical offsets).ratio_finite_at_and_below_1e_12_epsilonpins that the conjugate-product CSI-ratio (no division → no1e-12divide-guard needed) is finite + bit-exact at/below the epsilon boundary and at exact zero (where a naiveH_i/H_jratio is ±inf/NaN).
- #20 MEASURED-HOT, optimized (bit-identical).
- ADR-156 §11 Milestone-2: RaBitQ unbiased distance estimator — IMPLEMENTED & MEASURED (RESOLVED-NEGATIVE on the strict-K bar). Closes the §10.5 / §8 backlog "full RaBitQ residual-distance estimator (not just a uniform scalar code)" item — the real Gao & Long (SIGMOD 2024) contribution, not just sign bits. New
wifi-densepose-ruvector/src/estimator.rs:EstimatorSketchcarries the Pass-2 sign code (over the padded FHT lengthD = next_pow2(dim)) plus 8 B/vec side info (residual_norm+x_dot_o = ⟨x̄, o'⟩, 2× f32);DistanceEstimatorcomputes the unbiased estimate⟨o',q'⟩ ≈ ⟨x̄,q'⟩ / x_dot_o(the random rotation makes the 1-bit code's quantization error orthogonal-in-expectation to the query, paperO(1/√D)bound);EstimatorBank::topk_estimated_cosinereranks the candidate set by the estimate instead of raw Hamming. Zero-centroid simplification (c = 0) stated honestly — the paper-faithful per-cluster centroid path (from_embedding_centred/EstimatorBank::with_centroid) is also built so the simplification is a measured choice (no centroid coverage number is reported against the cosine ground truth, because cosine-of-residual ≠ cosine-of-raw would be a metric mismatch). Purely additive + backward-compatible — new types only; Pass-1Sketch/ Pass-2SketchBank/WireSketchwire format unchanged; all external callers (event_log.rs,signal/longitudinal.rs,sensing-server) use Pass-1 and are unaffected. MEASURED strict-K coverage (same fixture/seeds as §10: dim=128 N=2048 K=8, 64 clusters, noise=0.35, 128 queries, cosine ground truth): the estimator lifts the strictcandidate_k=Kbar 46.39% (Pass-2 sign) → 49.71% (estimator, cosine rerank) — a real +3.3 pp lift, still ~40 pp short of the ADR-084 ≥90% strict bar. At over-fetch the estimator beats sign (candidate_k=24: 95.12% vs 91.60%). Honest verdict — RESOLVED-NEGATIVE: the unbiased estimator does NOT clear the strict-K 90% bar on this distribution (the binding constraint is the 1-bit code's information ceiling, not estimator variance); the bar is still met only via the over-fetch "candidate set" pattern ADR-084 specifies, though the estimator reduces the over-fetch factor needed. A published negative, reported as such — no benchmark tuned to manufacture a pass. Unbiasedness pinned byestimator_unbiased_on_fixture(Monte-Carlo mean over 4000 rotation seeds → true inner product within tolerance); not-worse-than-sign pinned byestimator_rerank_not_worse_than_sign; determinism byestimator_is_deterministic. +12 tests in the crate (119→131). Workspace 3,228 / 0 failed (cargo test --workspace --no-default-features, 162 test binaries, single clean run), Python proof VERDICT: PASS (f8e76f21…46f7a, unchanged — estimator is not on the proof's signal path). Full numbers + reproduce commands in ADR-156 §11 / ADR-084 "Pass 2b". - ADR-156 §8 Milestone-1: RaBitQ Pass-2 randomized rotation + multi-bit experiment — IMPLEMENTED & MEASURED (RESOLVED-PARTIAL). Closes the §8 "Multi-bit / Extended RaBitQ" backlog item. New
wifi-densepose-ruvector/src/rotation.rs: a deterministic randomized orthogonal rotationR = H·D— Fast Hadamard Transform (O(d log d), in-place,1/√m-normalized so norm-preserving) + seeded ±1 sign flips (SplitMix64 from a storedu64seed; identical at index + query time). Chosen over a densed×dmatrix (O(d²), infeasible at the 65,535-d the wire format provisions for); pads tonext_pow2(d). Additive, backward-compatible API (Sketch::from_embedding_rotated,SketchBank::with_rotation+insert_embedding/topk_embedding/novelty_embedding); Pass-1 and the wire format are byte-for-byte unchanged. Newcoverage.rssingle-source-of-truth top-K coverage harness (anisotropic planted-cluster fixture, cosine ground truth) backs both a#[test]report and thesketch_benchcoverage table. MEASURED (dim=128 N=2048 K=8, 64 clusters, noise=0.35, 128 queries, seeded): at the strictcandidate_k=Kbar, rotation lifts coverage 36.13% → 46.39%; Pass-2 reaches the ADR-084 ≥90% bar at candidate_k=24 (~3× over-fetch); multi-bit Pass-3 reaches 54%/67%/74% at 2/3/4-bit (strict bar). Honest verdict: neither rotation nor ≤4-bit multi-bit clears the strict-K 90% bar on this distribution — the bar is met only via the over-fetch "candidate set" pattern ADR-084 specifies. No benchmark was tuned to manufacture a pass; the strict-bar gap is documented (ADR-156 §10, ADR-084 "Pass 2" section). +19 tests in the crate (100→119), workspace 3,225 / 0 failed, Python proof VERDICT: PASS (f8e76f21…, unchanged — sketch is not on the proof's signal path). - Beyond-SOTA
v2/crates/sweep (ADR-154–158) + full stub-implementation push — every claim MEASURED or graded. A 5-milestone review/optimize/secure/benchmark/validate sweep, then a verified-audit-driven push to replace every production stub with real, tested logic (no labels, no placeholders). Each fix is pinned by a test that fails on the old code; every number ships with a reproduce command. Workspace: 3,122 tests / 0 failed (cargo test --workspace --no-default-features), Python proof VERDICT: PASS (bit-exact).- ADR-154 Signal/DSP — revived a dead ADR-134 CIR coherence gate (canonical-56 vs ht20 mismatch meant it never ran in production: 8/8 Err → 8/8 Ok); NaN-bypass + window div0 guards; PSD FFT-planner cache (2.0–3.1×) + honored DTW band (2.4–4.1×).
- ADR-155 NN/Training — unified 7 divergent PCK/OKS metric definitions into one canonical torso-normalized source (fixed two claim-inflating bugs: zero-visible PCK 1.0→0.0, OKS fake-Gold); leak-free subject-disjoint MM-Fi split + injected-leak detector; rapid_adapt replaced fake gradients with real finite-difference; proof.rs gained a min-decrease margin + committed-hash requirement; zero-copy ORT input (1.48×).
- ADR-156 RuVector/Fusion — closed crafted-input DoS panics (triangulation/heartbeat); honest dimensionless GDOP = √(trace(G⁻¹)) replacing an RMSE mislabel; canonical wrapped angular distance; fuse() double-clone removed (~2.17× marshalling). SOTA graded: SymphonyQG (CLAIMED), multi-bit RaBitQ (near-term), GraphPose-Fi (data-gated).
- ADR-157 Hardware/Sensing —
Vec::remove(0)O(n²) sliding windows →VecDeque; breathing partial-weight renormalization; IIR low-sample-rate divergence clamp. Centerpiece: a MEASURED negative-results audit showing the layer (802.11bf model, parsers, calibration) was already hardened — cited file:line, NO-ACTION. - ADR-158 MAT/world-model — unified two divergent triage engines (the confidence-gated result was computed then discarded; gate==record now); killed survivor count-inflation (real RSSI localization + vitals-signature dedup, MEASURED 3→1); real ESP32/UDP/PCAP CSI ingest with honest typed
HardwareUnavailable/UnsupportedAdaptererrors for hardware-gated adapters (Intel5300/Atheros/PicoScenes — never fabricated CSI); real parabolic peak interpolation; real GDOP. - Soul Signature §3.6 matcher made real (
wifi-densepose-bfld, issue #1021). An external audit correctly found person-identification was spec-only behind a no-opNullOracle. Now a real per-channel weighted-cosine matcher +EnrolledMatcher: SoulMatchOracle(364 tests). MEASURED: same-person 1.0000 vs cross-person 0.8088; and the audit's own claim proven — on WiFi-only cardiac+respiratory channels alone two people are not separable (gap 0.0005). Named identity is honestly data-gated on the AETHER/body-resonance channel being fed by a real enrollment; no working-named-identity claim is made. - OccWorld real forward pass — replaced
Tensor::randnencoder/decoder stubs (which emitted trajectory priors from pure noise) with a real deterministic conv VQ-VAE forward pass (input-dependent, proven by tests that fail on the old randn) + aweights_trainedhonesty flag (false until a real checkpoint loads); pointcloudto_gaussian_splats9→2 passes (1.24× MEASURED). - Native multi-BSSID
wlanapi.dllFFI (wifi-densepose-wifiscan) — realWlanOpenHandle/WlanEnumInterfaces/WlanGetNetworkBssList, MEASURED 9.74 Hz on Windows (vs netsh ~2 Hz; no fabricated "10×"), typedUnsupportedoff-Windows. Real Matter 1.3 manual-pairing-code field-packing (canonical 34970112332, lossless decode) replacing a lossy-modulo placeholder. - HOMECORE assistant — real
LocalRunnerresponse path, real semantic intent recognizer (exact in-memory cosine k-NN; MEASURED 0.855 match / 0.106 no-match), real SQL state text-search — three always-empty stubs removed.
- ADR-152 WiFi-Pose SOTA 2026 intake — verified external benchmark + four Rust integrations. A 22-source adversarially-verified survey of the 2025–2026 WiFi-sensing SOTA, with every adopted number reproduced or graded before integration:
- WiFlow-STD (DY2434) reproduction (
benchmarks/wiflow-std/) — the external "97.25% PCK@20, 2.23M params" claim audited end-to-end: the shipped checkpoint is REFUTED (0.08% PCK@20 — wrong keypoint normalization, predates the published code), the released code does not run as published (6 documented defects, incl. an import that fails and an unreachable test phase), and the released dataset's final 13 files are corrupted (9,072 windows of NaN + float32-max garbage that NaN-poisons fp16 BatchNorm training). After repairing both, retraining with upstream defaults on an RTX 5080 reproduced 96.09% PCK@20 (full test) / 96.61% (corruption-free) — claims graded MEASURED-EQUIVALENT; params (2,225,042) and FLOPs (~0.055 G) verified exactly. Full forensics inbenchmarks/wiflow-std/RESULTS.md. GeometryEmbedding(ADR-152 §2.1.2,wifi-densepose-calibration) — 32-slot permutation-invariant, NaN-proof featurization of the §2.1.1NodeGeometryrecords (centroid/spread, measured-first pairwise distances, circular azimuth stats, covariance-eigenvalue geometric diversity, per-node flags), schema-versioned for the ADR-151 P6 LoRA heads; derivedSpecialistBank::geometry_embedding()accessor. The PerceptAlign "coordinate overfitting" defense, transplanted to per-room banks.- MAE pretraining recipe (ADR-152 §2.3,
wifi-densepose-train/src/mae.rs) —MaePretrainConfigpinning the UNSW-measured recipe (80% masking, (30,3) patches) with pure-Rust patchify/random-mask (exact counts, seed-deterministic, error-not-truncate divisibility, NaN rejection), property-tested; the consumption seam for the future ADR-150 ViT-Small encoder. WiFlowStdModelRust port (wifi-densepose-train/src/wiflow_std/) — tch-gated idiomatic port of the verified spatio-temporal-decoupled architecture (grouped causal TCN → asymmetric conv stack → dual axial attention); ungated param formula asserted equal to the reference 2,225,042; 15/17-keypoint variants share weights (enables the ADR-152 §2.2(b) ESP32 fine-tune).- RuVector vendor sync + §2.6 opportunity survey — vendor at
a083bd77f; graded ADOPT/EVALUATE/WATCH table; crates.io bumps applied (mincut/solver 2.0.6, attention 2.1.0, gnn 2.2.0; RUSTSEC #504 audit: no pinned crate affected); top WATCH: unpublishedruvector-graph-condensedifferentiable min-cut for trainable subcarrier grouping.
- WiFlow-STD (DY2434) reproduction (
- ADR-153 IEEE 802.11bf-2025 forward-compatibility protocol model (
wifi-densepose-hardware/src/ieee80211bf/) — typed WLAN-sensing procedures (measurement setup/instance/report, SBP, termination) withSpecProfileversion gates,SensingCapabilitiesnegotiation, and requiredConsentModegovernance metadata on every setup; deterministic session FSM with rejection/timeout paths;SensingTransportseam withSimTransportand anOpportunisticCsiBridgemapping live ESP32 CSI batches into standardized report shape (a future chipset adapter replaces the bridge without touching RuvSense consumers). Not a certified implementation — simulation-tested protocol surface; OTA binding lands when silicon does. 19 acceptance tests. - Dynamic min-cut mesh partition guard in the streaming engine (
mesh_guard). Maintains aruvector-mincutexact min-cut over the live mesh coupling graph (nodes = sensing nodes, coupling = product of fusion attention weights), surfacing per cycle: the global cut value (how close the array is to splitting — a structural measure per-node heuristics miss), the weak side (which specific nodes would partition: failure/jamming triage feeding ADR-032 posture), and an at-risk flag that counts as a structural event for the drift→recalibration advisor. Surfaced asTrustedOutput::mesh. Measured cost policy (criterion, 12-node mesh): weights are quantized (1/64; a nonzero coupling below one quantum saturates to quantum 1 so quantization never erases a live coupling — without the floor, balanced meshes of ≥ 65 nodes had every ~1/n coupling erased and sat permanently "at risk") and updates change-gated, so the steady-state cycle does zero graph work (~7.3 µs, ~23× cheaper than building); on any real change a full exact rebuild (~171 µs) is used because oneDynamicMinCutdelete+insert measured ~240 µs — the incremental machinery's overhead targets much larger graphs, so rebuild-on-change is the measured optimum at mesh scale (one-edge case −28% after the policy switch). Degenerate cases fail toward risk: a node with zero coupling is reported as already partitioned (cut 0). 9 mesh-guard tests + an engine-level wiring test; fullprocess_cyclewith the guard: ~33 µs for 4 nodes (50 ms budget). - Opt-in FFT operator for the CIR ISTA solver (8–14× measured). Φ is a sub-DFT, so each ISTA mat-vec can run as one length-G FFT (O(G log G)) instead of a dense O(K·G) product. New
CirConfig::fft_operator(default false — the dense path stays the bit-exact witness default; the FFT evaluates the same sums in a different order, so enabling it shifts float results and requires regenerating any pinned witness).FftOperator(rustfft, planned once at construction, scratch reused across the ISTA loop) dispatches insideista_solve; warm-start/Lipschitz stay dense at construction. Measured (criterion, same run): ht20 2.22 ms → 265 µs (8.4×), ht40 10.26 ms → 717 µs (14.3×); the real HE40 grid (K=484, G=1452) scales further. 3 new tests: FFT↔dense matvec equivalence to float tolerance (ht20 + he40 grids), end-to-end dominant-tap agreement on a single-path frame, and all default configs keep FFT off. Newcir_estimate_fftbench group. - Per-room adapter provenance + drift→recalibration advisor in the streaming engine. Closes the trust-chain gap where an ~11 KB per-room LoRA adapter (ADR-150 §3.4) could silently change inference without the witness noticing.
StreamingEngine::set_room_adapter(AdapterInfo)pins the adapter's content-derived id into provenancemodel_version(rfenc-v1+adapter:<id>) — and therefore into the BLAKE3 witness — so swapping or clearing adapter weights always shifts the witness (engine test proves base → adapter → other-adapter → cleared all witness differently, and cleared == base). NewRecalibrationAdvisorrecommends re-running the ADR-135 baseline / refitting the adapter on sustained low fusion coherence (streak threshold, default 60 cycles ≈ 3 s at 20 Hz) or an ADR-142 change-point; surfaced asTrustedOutput::recalibration_recommendedand recorded on the sensing-server'sEngineBridgealongside the witness. Bridge plumbing:EngineBridge::{set_room_adapter, clear_room_adapter}+ live-path test that the adapter id flows into the live witness. Scope note: this is the deployable provenance/trigger half of the "retrained model" roadmap item — fitting the adapter itself runs in the existing external calibration service (aether-arena/calibration/), and a trained RF-encoder checkpoint still does not exist in-tree. - RuView beyond-SOTA research series (
docs/research/ruview-beyond-sota/, 6 docs) — research-swarm output defining the beyond-SOTA bar and the path to it: system capability audit (role→crate maturity matrix, gap analysis, risk register), web-verified 2026 SOTA landscape per capability axis (incl. ratified IEEE 802.11bf-2025), 8-pillar target architecture on the ADR-136 contract spine (no rewrite), 6-layer benchmark/validation methodology (all 15 criterion bench targets inventoried; ADR-171 statistical protocol), and a determinism-safe optimization roadmap. Includes session validation evidence: 2,797 workspace tests / 0 failed, Python proof PASS (bit-exact), paired pre/post criterion runs.
Performance
- CIR estimator warm-start precompute — the diagonal Tikhonov preconditioner
diag(Φ^H Φ)+λIand its CSR matrix were rebuilt every frame although they depend only on Φ and λ (fixed atCirEstimator::new); now precomputed at construction (ruvsense/cir.rs). Bit-identical floats (summation order unchanged, witness chain unaffected). Measured:cir_estimate/he40−3.9% (p<0.01), multiband groups −1.2/−1.4%; smaller configs within container noise. - RF tomography solver hoisting — ISTA gradient buffer no longer allocated inside the 100-iteration loop, and the Frobenius Lipschitz bound moved from per-
reconstructto construction (ruvsense/tomography.rs). Bit-identical results.
Added
- Falsifiable occupancy benchmark (
wifi-densepose-train::occupancy_bench). Makes the presence/person-count "beyond SOTA" claim falsifiable in code instead of aspirational (the unfalsifiability gap from the beyond-SOTA system review). Grades predictions vs ground truth and gates a SOTA claim behind oneclaim_allowedinvariant requiring all of:DataProvenance::Measured(synthetic/mock is scorable but never claimable — anti-mock-contamination per the CLAUDE.md Kconfig-bug lesson), a leak-freeEvalSplit(refuses any split where a subject or environment id appears in both train and test — subject leakage / per-environment overfitting),n_test ≥ min, a non-degenerate test set (both truth classes represented: present-rate ≥min_positive_rateand ≥ 1 absent sample — an all-absent set plus an always-absent predictor cannot release a claim; vacuous F1 scores 0.0, never 1.0), presence-F1 bootstrap-CI lower bound (deterministic seeded splitmix64) clearing the threshold, and count MAE within threshold. The claim string is unreadable except through the gate (NO_CLAIMotherwise). What remains is data, not method: a frozen, SHA-pinned, subject/environment-disjoint measured replay set turns the claim into a passing/failing test. 12 tests cover each refusal path, including the point-above/CI-below case (claim withheld on the CI lower bound even when the point estimate clears the threshold). - Live trust path: sensing-server routes real frames through the governed
StreamingEngine(parallel governed path with partial output gating). Previously the live server ran only the bareMultistaticFuser(fused amplitudes, no trust control plane), while the privacy/provenance/witness engine (ADR-135..146) ran only on synthetic in-test frames — the gap called out in ADR-136 §8 and the beyond-SOTA system review. Newengine_bridgemodule drivesStreamingEngine::process_cyclefrom the server's liveNodeStatemap (reusing the existingNodeState → MultiBandCsiFrameconversion), lazily wiring each node as a WorldGraph sensor and bounding belief growth via the retention cap; every governed belief carries evidence + model + calibration + privacy decision and a deterministic witness. Honest scope: the engine runs alongside (not instead of) the bare fusion path that feeds the liveSensingUpdate. What its decision gates on the wire today: a cycle emitted at classRestricted(base mode or contradiction/mesh-risk demotion) suppresses the per-node raw amplitude vectors from the live publish — the same field mappingwifi-densepose-bfld's privacy gate applies atRestricted; gating the remaining derived outputs (person count, classification, signal field) is tracked as a follow-up. Trust state is no longer write-only: the latest witness, effective privacy class, demotion flag, recalibration recommendation, and an engine-error counter are readable onGET /api/v1/status, and engine errors are counted + rate-limit logged instead of silently swallowed (EngineBridge::observe_cycle). Addswifi-densepose-engine/-worldgraph/-bfld/-geodeps. Bridge tests cover witnessed belief with provenance, determinism, idempotent node registration, retention bound, privacy-mode propagation, trust-state recording, the error-counter path, and Restricted-class raw-output suppression.
Fixed
- Real HE20 CSI no longer silently dropped or replaced with simulated data (fixes #1009, #1004). Two ingest bugs caused real ESP32-C6 HE20 frames to be discarded or never received — the exact "real data silently lost" failure class the project fights. Each fix is pinned by a test that fails on the old code.
- #1009 §1b — HE20 baseline recorder trimmed 256 → 242 bins by sequential index (
wifi-densepose-signal/src/ruvsense/calibration.rs). ESP-IDF v5.5.2 delivers all 256 FFT bins for an HE20 frame;CalibrationConfig::he20()carriednum_active: 242, so the recorder (which has no HE20 tone map —extract_first_streamtakes the firstnum_activecolumns sequentially) kept bins 0..242 of the 256-bin grid. Those are the lower guard band + DC, not the 242 active tones, silently corrupting the empty-room baseline. Nownum_active: 256records every delivered bin, staying aligned 1:1 with the livedeviation()path. The exact-242 tone map deliberately stays only incir.rs(HE20_ACTIVE), where the Φ sensing matrix genuinely needs it. Testhe20_records_all_256_bins_not_trimmed_to_242asserts the finalized baseline covers all 256 bins (was 242). HE20 synthetic/bench fixtures updated to feed 256-bin frames (the real wire format). - #1009 §1a/§1c — already-fixed u8→u16
n_subcarrierstruncation, now regression-pinned. The ADR-018 wire format carriesn_subcarriersas u16 LE at bytes 6–7. A 256-bin HE20 frame (byte6=0x00, byte7=0x01) read as a single byte decodes to 0 subcarriers → every frame skipped (invisible until HE20: ESP32-S3's ≤192 bins fit in one byte). The CLI parser (wifi-densepose-cli/calibrate.rs) and the sensing-server template parser (wifi-densepose-sensing-serverparse_esp32_frame) were already corrected to u16 under #1005/ADR-110; added regression tests (parse_esp32_frame_he20_256_bins_not_truncated, CLItest_parse_csi_packet_he_su_256_bins) that fail on the old single-byte read so the truncation cannot silently return. - #1004 —
--source autolatched onsimulateforever, never binding UDP :5005 (wifi-densepose-sensing-server/src/main.rs). A one-shot boot probe resolved the source once; with no CSI flowing at boot (the normal firmware/server startup race) it served simulated poses for the whole process and ignored real CSI that arrived seconds later (the prior #937 fix hard-exited instead — equally wrong, the server could never pick up late-starting CSI). Newplan_source()state machine: inautomode always bind the UDP receiver and serve simulated data only until the first real frame, at which pointudp_receiver_taskpromotessource→esp32(mirroring the existingesp32 → esp32:offlinereversion ineffective_source());simulated_data_taskself-suspends once promoted so it never clobbers live CSI. Explicit--source simulatedstays a hard, UDP-free override for offline demos. 6 unit tests pin the resolution/promotion machine (auto_with_no_boot_source_still_binds_udp_and_simulates, etc.); the auto-binds-UDP assertion fails on the old behavior.
- #1009 §1b — HE20 baseline recorder trimmed 256 → 242 bins by sequential index (
wifi-densepose-matstandalone--no-default-featuresbuild (101 errors → 0).pub mod apiwas unconditional while its only dependency, serde, is optional behind theapifeature — so any build without default features failed with unresolved serde imports (masked in--workspaceruns by feature unification). Theapimodule and itscreate_router/AppStatere-export are now#[cfg(feature = "api")]-gated (with docsrs annotations). All feature combos compile: bare--no-default-features,--no-default-features --features api, and full default (177 tests pass).- WorldGraph no longer grows unboundedly under the live loop.
StreamingEngine::process_cycleappended oneSemanticStatebelief per cycle with no eviction — ~1.7M nodes/day at 20 Hz (identified indocs/research/ruview-beyond-sota/04-optimization-roadmap.md). AddedWorldGraph::prune_semantic_states(max)— deterministic eviction of the oldest beliefs by(valid_from_unix_ms, id), structural nodes (rooms/zones/sensors/anchors/tracks/events) never eligible — and wired it into the engine after each belief append (StreamingEngine::DEFAULT_SEMANTIC_RETENTION= 7,200 ≈ 6 min at 20 Hz; tunable viaset_semantic_retention). The WorldGraph holds current beliefs; durable history is the recorder's job, so no audit data is lost. 3 new tests (bounded growth end-to-end, oldest-only eviction, deterministic tie-break). - ESP32 edge heart rate no longer stuck at ~45 BPM / dropping wildly — #987. The on-device HR estimator (
edge_processing.c,0xC5110002) reported ~45 BPM regardless of true heart rate (Apple-Watch ground truth 87 BPM read as ~45) and swung frame-to-frame. Two root causes: (1) a hardcodedsample_rate = 10.0fthat became wrong after #985's self-ping raised the CSI callback rate to a variable ~13–19 Hz — BPM scales asassumed/actual × true, so 87 read ~45 and the reading swung as CSI yield fluctuated; (2) the zero-crossing estimator locked onto a breathing harmonic (a 0.25 Hz breathing fundamental puts its 3rd harmonic at ~0.74 Hz ≈ 44 BPM inside the HR band). Fix: measure the real sample rate from inter-frame timestamps (used for BPM conversion + biquad re-tuning on >15% drift); replace the HR zero-crossing with an autocorrelation estimator that rejects breathing harmonics (driven by a robust autocorr breathing period); median-13 smooth the output. Hardware A/B (fixed vs unmodified control board, bothedge_tier=2): control pegged 40–49 BPM; fixed reaches the true 88–91 BPM (vs 87 GT) and holds a stable physiological value (spread 59→0 for a steady subject). Known limitation: heavy subject motion still degrades the estimate (motion gating is a follow-up). - Person count no longer leaks up to 10 in heuristic mode — addresses #894.
field_bridge::occupancy_or_fallbackreturned the eigenvalue-basedFieldModel::estimate_occupancycount unbounded (its internal ceiling is 10), while the sibling estimators on the same single-link data — the perturbation-energy fallback right below it andscore_to_person_count— both cap at 3 ("1-3 for single ESP32"). On noisy / under-calibrated CSI the eigenvalue count inflated, producing the "10 persons reported when 1 present" symptom (seen when--modelfails to load and the server runs on heuristics). Bounded the eigenvalue path to the sharedMAX_SINGLE_LINK_OCCUPANCY(3) so every estimator on one link agrees; genuine higher counts come from the multistatic fusion path, not a single-link covariance estimate. - MQTT multi-node deployments now create one Home-Assistant device per node — closes #898. After the #872 MQTT wiring landed, the JSON→
VitalsSnapshotbridge hard-coded a singlenode_id(the MQTT client id) and the publisher used a singleOwnedDiscoveryBuilder, so every physical node collapsed into one device (identifiers:["wifi_densepose_wifi-densepose-1"]), contradicting the "one device per node" docs. The bridge now emits one snapshot per node in the sensing update'snodes[](each with its ownnode_id+ RSSI, falling back to a single aggregate snapshot for wifi/simulate sources), and the publisher derives a per-node builder (OwnedDiscoveryBuilder::for_node) that publishes discovery + availability lazily on first sight of eachnode_idand routes state to per-node topics — yielding N distinct HA devices with per-node availability/LWT. Unit-tested (distinct nodes → distinctwifi_densepose_<node>identifiers); 71 MQTT tests pass. - Person count no longer pinned to 1 — addresses #803. The aggregate occupancy reported by the sensing server was derived from
smoothed_person_score, an EMA-smoothed activity score (amplitude variance / motion / spectral energy). That score saturates near a single occupant — one moving person maxes it out — so it cannot discriminate occupancy count and stayed clamped at 1 across S3/C6 and the Python/Docker/Rust servers. Meanwhile the count-aware per-node estimates the ESP32 paths already compute (firmwaren_persons, and the DynamicMinCutcorr_persons) were stashed inNodeState::prev_person_countand then discarded by the aggregator (same dead-wiring class as #872). The aggregator now takesmax(activity_count, node_max)via a unit-testedaggregate_person_counthelper, so a node positively estimating 2–3 occupants is surfaced instead of overwritten. The fix can only ever raise the count when a node reports more people, so the single-occupant case is provably never inflated (regression-guarded by test). Second half: the pure-CSI per-node path itself clamped its own estimate — the DynamicMinCut occupancy (estimate_persons_from_correlation, 0–3) was mapped to a score viacorr_persons / 3.0, putting 2 people at 0.667, just under the 0.70 up-threshold ofscore_to_person_count, so the per-node count never climbed past 1 (sonode_maxwas also stuck at 1 for CSI-only nodes). Replaced it with a threshold-alignedcorr_persons_to_scoremapping (1→0.40, 2→0.74, 3→0.96) whose steady state round-trips back to the same count through the EMA + hysteresis, while still gating transient noise. A convergence test replays the exact EMA loop to prove min-cut=2 now reports 2 (and documents that the old/3.0mapping reported 1). Full multi-person accuracy still depends on the underlying estimator quality; this removes the two server-side clamps that masked it. 586 sensing-server tests pass. - MQTT publisher now actually runs (
--mqtt) — closes #872. The--mqtt*flags were defined only incli::Args(dead code, referenced nowhere) while the binary parses a separatemain::Argswith no mqtt fields, andmain.rsnever started themqtt::publisher — so MQTT/Home-Assistant integration was completely unwired (--mqtterrored as an unexpected argument, and even with the Docker image's--features mqttbuild the publisher never ran). Earlier attempts chased a Docker rebuild; the real cause was disconnected code. Extracted the flags into a sharedcli::MqttArgs(#[command(flatten)]into both structs), spawn the publisher on--mqtt, and bridge the JSON sensing broadcast into the typedVitalsSnapshotstream with a defensiveserde_json::Valuemapping. Verified end-to-end againstmosquitto: 20 HA auto-discovery entities + live state (presence/person-count/…). 577 (default) / 580 (--features mqtt) tests pass. - Mass Casualty triage never reports a survivor with a heartbeat as Deceased (safety) — PR #926. Both triage paths in
wifi-densepose-mat—TriageCalculator::calculate(combine_assessments(Absent, None) ⇒ Deceased) and the detection pathEnsembleClassifier::determine_triage(!has_breathing && !has_movement ⇒ Deceased) — ignored theheartbeatfield. A survivor with a detectable pulse but no sensed breathing/movement (respiratory arrest — the most time-critical savable state, Immediate/Red) was therefore reported Deceased (Black) and deprioritized for rescue. The domain path was in fact only reachable because a heartbeat madehas_vitals()true, so every "Deceased" was a live person. Both paths now escalate to Immediate when a heartbeat is present; total absence of breathing, movement and heartbeat is unchanged (domain →Unknown, ensemble →Deceased). 2 safety regression tests; full MAT suite (177) green. - Per-node Home-Assistant devices now report each node's own presence/motion — PR #918. After the one-device-per-node fan-out landed, the MQTT bridge still applied the room-level aggregate
classificationto every node, so in a multi-node deployment a node watching an empty corner inherited another node's "present" (andmotion_level: "absent"was mis-mapped to full motion). Each node in the broadcastnodes[]already carries its ownclassification; the bridge now reads it per node (extracted into a testablevitals_snapshots_from_sensing_json), keeping vitals + person count room-level. 4 unit tests. --modelgives an actionable diagnostic instead of a cryptic magic error — PR #919 (refs #894). Passing a HuggingFaceruvnet/wifi-densepose-pretrainedfile (model.safetensors/model-q4.bin/model.rvf.jsonl) to--modelproducedinvalid magic at offset 0: … got 0x77455735, then a silent fall back to heuristics. The load-failure path now detects the format (safetensors / quantized blob / JSONL manifest) and explains that those files are a different format and encoder architecture than the RVF binary container the progressive loader expects, pointing to #894. Purediagnose_model_load_error+ 4 tests.--export-rvfno longer silently produces a placeholder model — PR #920. The--export-rvfhandler ran before--train/--pretrainand unconditionally wrote placeholder sine-wave weights, so the documented--train … --export-rvf <path>workflow short-circuited to a fake model and never trained (while printing "exported successfully"). It now emits the placeholder container-format demo only standalone (with a clear warning), and falls through to real training when--train/--pretrainis set; docs point to--save-rvffor the real model. 3 guard tests.
Added
- ADR-151 per-room calibration & specialist training — full
baseline → enroll → extract → trainpipeline (newwifi-densepose-calibrationcrate). "Teach the room before you teach the model": a local-first pipeline that turns a few minutes of clean human anchors — layered on the ADR-135 empty-room baseline — into a versioned bank of small, room-calibrated specialists for presence, posture, breathing, heartbeat, restlessness, and anomaly. Stages: guided enrollment with an adaptive quality gate (event-sourcedEnrollmentSession, re-prompts bad anchors); feature extraction (autocorrelation periodicity in breathing/HR bands + variance/motion); six small specialists (learned threshold / nearest-prototype / band-limited periodicity / novelty); aSpecialistBankwith baseline-drift STALE invalidation; and aMixtureOfSpecialistsruntime with presence short-circuit + anomaly veto + confidence gating. Specialists are statistical heads today (runnable + hardware-validated); the frozen ADR-150 HF RF Foundation Encoder backbone is the documented upgrade path.- CLI:
enroll/train-room/room-status/room-watch, plus the Stage-1calibrate-serveHTTP API (CORS-enabled:POST /start,GET /status,POST /stop,GET /result,GET /baselines,GET /health) and a firewall-freescripts/csi-udp-relay.pyfor local Windows ESP32 testing without admin. - Multistatic fusion (ADR-029):
MultiNodeMixturefuses several co-located nodes (each with its own room-calibrated bank) into one room state — presence OR'd across nodes, posture/breathing/heartbeat from the highest-confidence node, a single implausible node vetoes the room's vitals. Driven viaroom-watch --node-bank N:path(repeatable), which groups live frames bynode_idand fuses. Same-room only; cross-room is federation (ADR-105). - Validated on live ESP32-S3 (COM8,
edge_tier=0raw CSI): baseline capture (120 frames → 52-subcarrier baseline); the real parser → feature-extraction → mixture runtime detecting breathing (~16–31 BPM); and the multistatic ingest grouping/fusing by node-id end-to-end. Full multi-anchor enrollment accuracy requires the operator to perform the poses; true 2-node fusion + phase-based breathing + RVF/HNSW storage are noted follow-ups. 54 tests pass (35 calibration + 19 CLI).
- CLI:
- WiFi-CSI pose: efficiency frontier + per-room calibration service (ADR-150 §3.2–3.6). Two beyond-SOTA results on the MM-Fi benchmark, plus the deployment mechanism that resolves real-world generalization:
- Efficiency frontier — a 75 K-param model beats published SOTA (74.3% vs MultiFormer 72.25% torso-PCK@20); every config from
microup is Pareto-dominant (smaller and more accurate than prior work). Shipped a deployable int4 edge model (~20 KB, verified 74.08%, 0.135 ms single-thread CPU) — published atruvnet/wifi-densepose-mmfi-pose/edge. Seedocs/benchmarks/wifi-pose-efficiency-frontier.md. - Generalization solved by few-shot calibration — zero-shot cross-subject (~64%) and cross-environment (~10%) are not closeable by algorithms (CORAL, DANN, instance-norm, contrastive foundation-pretraining all tested, all failed) or by more training subjects (saturates ~64%). But ~100–200 labeled in-room samples recover SOTA-level pose: cross-subject 64→76%, cross-environment 10→73% (60% from just 5 samples) — deployable as a ~11 KB per-room LoRA adapter on a frozen shared base. Full empirical chain in ADR-150 §3.2–3.6.
- Calibration service (complete, both model paths, cross-language verified) —
aether-arena/calibration/:calibrate.py(transformer model,.npzadapter) +infer.py(verified 3.09%→74.29% on an unseen MM-Fi room), andcog_calibrate.pywhich fits afc1.a/fc1.b/fc2.a/fc2.bsafetensors adapter for the deployed cog conv+MLP model (pose_v1.safetensors). Consumed by the Rust product engine:InferenceEngine::with_adapter()+cog-pose-estimation run --config <cfg> --adapter <room.safetensors>. Self-contained regression tests for both Python producers (test_calibration.py,test_cog_calibration.py) plus a cross-language Rust integration test that loads a realcog_calibrate.py-generated adapter fixture and asserts it activates + changes engine output. All green.
- Efficiency frontier — a 75 K-param model beats published SOTA (74.3% vs MultiFormer 72.25% torso-PCK@20); every config from
- Windows workspace build + test now green (cross-platform fixes).
wifi-densepose-worldmodelimportedtokio::net::UnixStreamunconditionally, socargo build/test --workspacefailed to compile on Windows (E0432) — now the OccWorld Unix-socket bridge is#[cfg(unix)]-gated with a clear non-unix fallback. Andwifi-densepose-bfld'sreadme_quickstart_uses_canonical_public_apitest checked a multi-linepipeline\n .processneedle that never matched on a CRLF checkout — now normalizes line endings. Result: 2,682 workspace tests pass / 0 fail on Windows (the pre-merge gate was previously unrunnable there). ruview-swarmcrate (ADR-148) — drone swarm control system with hierarchical-mesh topology, Raft consensus, MAPPO multi-agent reinforcement learning, and CSI sensing integration. 14 modules: topology (Raft/Gossip/Mesh), formation control (virtual-structure/leader-follower/Reynolds flocking), RRT-APF path planning, auction+FNN task allocation, MARL actor + PPO training loop, security (MAVLink v2 HMAC-SHA256 signing, UWB anti-spoofing, geofencing, Remote ID, FHSS anti-jamming), 10-state fail-safe machine, and SwarmOrchestrator. ITAR-gated coordination features (USML Category VIII(h)(12)) behinditar-unrestrictedfeature.- Ruflo integration for
ruview-swarm— feature-gated (ruflo) AI-agent capability layer connecting to the claude-flow daemon: AgentDB mission memory (memory_store/memory_search), HNSW pattern learning (agentdb_pattern-store/-search), AIDefence MAVLink message scanning, and SONA intelligence trajectory hooks.RufloBackendtrait withHttpRufloBackend(JSON-RPC 2.0) andMockRufloBackendimplementations.
Performance
ruview-swarmbenchmarks (criterion, release): MARL actor inference 3.3 µs, RRT-APF planning 0.043 ms, multi-view CSI fusion 58.5 ns, 3-view localization 1.732 m (beats Wi2SAR 5 m SOTA baseline), 4-drone SAR coverage 223 s for 400×400 m (under 240 s target).
Added
- ADR-147 — OccWorld world model integration (
wifi-densepose-worldmodelv0.3.0 published to crates.io). 15-frame trajectory prediction at 209 ms / 3.37 GB VRAM on RTX 5080. Phase 3 domain adapterscripts/ruview_occ_dataset.py(RuViewOccDataset) converts WorldGraph snapshots to OccWorld tensors with indoor class remapping + zero ego-poses (validated). Phase 5 retraining pipelinescripts/occworld_retrain.py— VQVAE + transformer fine-tuning on RuView occupancy snapshots. See ADR-147 · benchmark proof.
Added
- ADR-125 (APPLE-FABRIC) — RuView ↔ Apple Home native HAP bridge proposal + reference impl (issue #796). New ADR-125 lays out a three-phase plan to expose RuView as a discoverable HomeKit accessory on the LAN so a HomePod (as Home Hub) sees presence / vitals / BFLD-derived events natively — zero Home-Assistant intermediary. Two architectural decisions resolved in the ADR per design review: (1) one HAP bridge with N child accessories (single pairing, matches Hue/Eve pattern), and (2) identity-risk mapping is semantic, not probabilistic —
identity_risk_scoreand Soul-Signature match probability never cross the HAP boundary; instead three thresholded events are exposed (Unknown Presence,Unexpected Occupancy,Unrecognized Activity Pattern) so RuView reads as calm-tech ambient awareness, not surveillance UX. ADR-125 §2.1.a reference impl ships now:scripts/hap-test-sensor.py(HAP-1.1 bridge advertised over mDNS, paired with operator's iPhone) +scripts/c6-presence-watcher.py(parses ESP32RV_FEATURE_STATE_MAGIC = 0xC5110006UDP packets with IEEE CRC32 validation, hysteresis, and a Python port ofwifi-densepose-bfld::PrivacyClassthat enforces ADR-125 §2.1.d invariant I1 at the HomeKit edge — onlyAnonymous(2) andRestricted(3) frames may cross;Raw/Derivedare refused with exit code 2 and the cited ADR clause). Validated end-to-end on real hardware (no mocks): ESP32-C6 onruv.net→ UDP/5005 → mac-mini watcher → BFLD gate → HAP bridge → iPhone Home app showsUnknown Presencelive characteristic flip. Empirical: 50-51 valid CRC-passing feature_state packets per 10 s window from the live C6; zero CRC errors. P2 (Rust-native HAP via thehapcrate, replaces the Python sidecar) and P3 (Matter Controller oncematter-rsstabilizes) follow.
Security
-
ESP32 OTA upload now fails closed when no PSK is provisioned (#596 audit finding — critical, breaking change for unprovisioned nodes).
ota_check_auth()previously returnedtruewhens_ota_psk[0] == '\0', so a freshly-flashed node would accept attacker-controlled firmware over plain HTTP on port 8032 from any host on the WiFi. No Secure Boot V2, no signed-image verification — a single LAN call could brick or backdoor a node. The fix rejects every OTA upload until a PSK is written to NVS (the OTA HTTP server still starts so operators can runprovision.py --ota-psk <hex>over USB-CDC without reflashing). Operators affected: any deployment that relied on the unauthenticated OTA endpoint working out of the box now needs to provision a PSK before subsequent OTA pushes will succeed. Boot-timeESP_LOGWmakes the new posture visible. -
Bearer-token auth accepts the scheme case-insensitively (RFC 6750) — PR #929.
require_bearerparsed theAuthorizationheader with a case-sensitivestrip_prefix("Bearer "), so a correctRUVIEW_API_TOKENsent asAuthorization: bearer <token>(orBEARER, or with extra whitespace) was rejected with a confusing 401 — needless friction when enabling auth. The scheme is now matched witheq_ignore_ascii_case(per RFC 6750 §2.1 / RFC 7235 §2.1); the token compare is unchanged — still exact and constant-time (ct_eq) — so a wrong token or a non-Bearer scheme (Basic …) still returns 401. Audited the surrounding code while here:ct_eqcorrectly rejects length mismatch (no prefix-auth bypass) and the middleware fails closed. Newaccepts_case_insensitive_bearer_schemetest. -
Path-traversal vulnerabilities patched in five sensing-server endpoints (closes #615 — critical). New
wifi_densepose_sensing_server::path_safety::safe_id()enforces[A-Za-z0-9._-]only (no leading., max 64 chars) before any user-controlled identifier reaches aformat!()building a filesystem path. Applied at:POST /api/v1/recording/start(recording.rs—session_name)GET /api/v1/recording/download/:id(recording.rs—id)DELETE /api/v1/recording/delete/:id(recording.rs—id)POST /api/v1/models/load(model_manager.rs—model_id)training_api.rsload_recording_frames(dataset_ids)
Pre-fix, unauthenticated callers could read
../../etc/passwd-style paths, write arbitrary JSONL files, load attacker-controlled.rvfmodel files, or delete arbitrary files the server process could touch. 9 unit tests inpath_safety::testsexercise the rejection envelope (empty, too-long, path separators, parent-dir traversal, null byte, whitespace/specials, non-ASCII).
Fixed
-
WebSocket
/ws/sensingnow reportsesp32:offlinewhen ESP32 hardware goes stale (closes #618).broadcast_tick_taskwas re-emitting the cachedlatest_updatewith a frozensource: "esp32"field forever after the hardware lost power or network. The REST/healthendpoint already calledeffective_source()(which returns"esp32:offline"afterESP32_OFFLINE_TIMEOUT= 5 s with no UDP frames), but the WS broadcast path was the one consumer that didn't. Result: the UI's "LIVE — ESP32 HARDWARE Connected" banner stayed green long after the hardware went away, andvital_signs/features/classificationre-broadcasted the last-seen values indefinitely. Fix: clone the cachedlatest_updateper tick, overwritesourcewiths.effective_source(), then serialize and broadcast. UI can now switch to an offline state on the same 5-second budget the REST surface uses. -
Proof replay (
archive/v1/data/proof/verify.py) is now cross-platform deterministic (closes #560). Three changes together: (1)features_to_bytes()nownp.round(.., HASH_QUANTIZATION_DECIMALS=6)s each feature array before packing as little-endian f64, collapsing ULP-level drift from scipy.fft pocketfft SIMD reordering; (2) theVerify Pipeline Determinismworkflow pinsOMP_NUM_THREADS=1,OPENBLAS_NUM_THREADS=1,MKL_NUM_THREADS=1,VECLIB_MAXIMUM_THREADS=1,NUMEXPR_NUM_THREADS=1— multi-threaded BLAS reductions were a deeper source of non-determinism than SIMD reordering, and 6-decimal quantization alone wasn't enough across Azure VM microarchitectures; (3)expected_features.sha256regenerated under the new conditions. CI now passes the determinism check (same hash across consecutive runs on canonical Linux x86_64 CI runner:667eb054c44ac510342665bf9c93d608868a8ead948ae8774b2796ebce6f8fe7).scripts/probe-fft-platform.pyupdated to mirrorHASH_QUANTIZATION_DECIMALS=6for cross-machine spot-checks. -
archive/v1/src/services/pose_service.py:223calls the right method onPhaseSanitizer(closes #612). The call wasself.phase_sanitizer.sanitize(phase_data), butPhaseSanitizer's full-pipeline entry point is namedsanitize_phase()(unwrap_phase+remove_outliers+smooth_phasechained, seearchive/v1/src/core/phase_sanitizer.py:266). The shortersanitizename doesn't exist on the class, so any path that reached this branch raisedAttributeErrorand crashed the pose service mid-frame. -
adaptive_classifier.rs:94no longer panics on NaN feature values (closes #611).sorted.sort_by(|a, b| a.partial_cmp(b).unwrap())returnedNoneand panicked whenever a singleNaNreached the classifier from real ESP32 hardware (silent DSP div-by-zero, empty buffer). One bad frame killed the entire sensing-server process. Swapped forunwrap_or(Ordering::Equal), matching the pattern the same file already used at lines 149-150 and 155. Per-frame hot path; this was a real production crash vector. -
Completed the #611 NaN-panic audit across the sensing-server crate (follow-up to #613). The original audit grepped for the literal
partial_cmp(b).unwrap()and missed seven additional production sites that use comparator variants (partial_cmp(b.1).unwrap(),partial_cmp(&variances[b]).unwrap()). All share the same crash class — a singleNaNin CSI-derived state panics the whole sensing-server. Fixed:adaptive_classifier.rs:205—AdaptiveModel::classify()argmax over softmax probs. Same per-frame hot path as #611; NaN flows through normalise → logits → softmax and still reaches this site even after the #613 IQR fix.adaptive_classifier.rs:480, 500— training-loop argmax intrain()(training/per-class accuracy reporting).main.rs:2446, 2449andcsi.rs:602, 605— variance-based source/sink selection incount_persons_mincut. The outerunwrap_or((0, &0))only catches an empty iterator; it cannot rescue a comparator panic.
Remaining
partial_cmp(...).unwrap()sites in the workspace are all inside#[cfg(test)]/#[test]blocks (spectrogram.rs:269,depth.rs:234,connectivity.rs:477,vital_signs.rs:737) where inputs are controlled. -
ui/utils/pose-renderer.jsno longer divides by zero when two render frames land in the sameperformance.now()tick (issue #519 Bug 2).deltaTimeis nowMath.max(currentTime - lastFrameTime, 1)before the1000 / deltaTimedivision, capping displayed FPS at 1000 — far above any real render rate, but finite so the EMAaverageFps = averageFps * 0.9 + fps * 0.1no longer poisons itself toInfinityon a single zero-dt tick.
Removed
- Stub crates
wifi-densepose-api,wifi-densepose-db,wifi-densepose-config(closes #578). Each was a single-line doc-comment placeholder with an empty[dependencies]section and zero references from any source file orCargo.toml. The names were reserved early for an envisioned REST/database/config split that never materialised; the functionality they would provide is covered today bywifi-densepose-sensing-server(Axum REST/WS), per-crate config + CLI args, and the project's real-time-only (no-persistent-state) posture. Removing them from the workspace preventscargofrom listing dead crates and shipping empty published artifacts. If any of these names is needed in the future, they can be reintroduced with a real implementation.
Added
- BFLD — Beamforming Feedback Layer for Detection (ADR-118 umbrella + ADR-119 frame format + ADR-120 privacy class + ADR-121 identity risk scoring + ADR-122 RuView HA/Matter exposure + ADR-123 capture path, #787). New crate
wifi-densepose-bfld(v2/crates/wifi-densepose-bfld/) — the privacy-gated WiFi sensing layer that detects when RF data crosses from "ambient sensing" into "identity record" and structurally prevents identity-correlated data from leaving the node. Three invariants enforced by the type system (not policy): I1 raw BFI never exits the node (Sinkmarker-trait hierarchy +PrivacyClass::Raw.allows_network() == false), I2 identity embedding is in-RAM-only (IdentityEmbeddinghas noSerialize/Clone/Copy+Dropzeroizes), I3 cross-site identity correlation is cryptographically impossible (per-site BLAKE3-keyedSignatureHasherwith daily epoch rotation; mean cross-site Hamming distance ≥120 bits across 100 trials). Ships the complete operator surface:BfldPipeline+BfldPipelineHandle(worker-thread variant +spawn_with_oraclefor Soul Signature deployments),BfldEventwith JSON publishing ("blake3:<hex>"rf_signature_hashformat per spec), 4privacy_classlevels (Raw/Derived/Anonymous/Restricted) withPrivacyGate::demotemonotonic transformer + irreversibleapply_privacy_gating,CoherenceGatewith ±0.05 hysteresis + 5-second debounce + clock-skew resilience (saturating_sub),SoulMatchOracleRecalibrate-exemption trait for enrolled-person deployments. MQTT/HA surface:mqtt_topics::render_events+publish_event(class-gated topic routing — Raw/Derived publish 0 topics, Anonymous publishes 6, Restricted publishes 5 withidentity_riskstripped),ha_discovery::render_discovery_payloads+publish_discovery(HA-DISCO config payloads withavailability_topicintegration),availabilitymodule (online/offline+ LWT-awarewith_lwthelper forrumqttc::MqttOptions),RumqttPublisherbehind amqttfeature gate withconnect_with_lwtfor broker-side auto-offline. 3 operator HA Blueprints underv2/crates/cog-ha-matter/blueprints/bfld/(presence-driven-lighting, motion-aware-HVAC, identity-risk-anomaly-notification with rolling 7-day z-score). Two runnable examples (bfld_minimalfor in-process consumers,bfld_handlefor the production worker-thread + bootstrap-then-spawn pattern). GitHub Actions CI workflow (.github/workflows/bfld-mqtt-integration.yml) spins upeclipse-mosquitto:2as a service container so the env-gatedmosquitto_integrationandrumqttc_lwttests run end-to-end in CI. Performance:BfldFrame::to_bytes()measured at 320,255 frames/sec debug (6.4× ADR-119 AC7 release target of 50k), header-only at 1,654,517 frames/sec, presence-detection latency p95 = 0.9µs (~1,000,000× under ADR-119 AC2's 1s target), 9.96 Hz motion-publish rate throughBfldPipelineHandle(10× ADR-122 AC3 floor). Coverage: 327 tests at default features, 101 no_std-compatible, 220+ with--features mqtt. CRC-32/ISO-HDLC polynomial pinned against"123456789" → 0xCBF43926, public-API surface snapshot pinned across allpub usere-exports,BfldErrorDisplay contract pinned for log-grep monitoring rules, reserved-flag-bits forward-compat round-trip property,apply_privacy_gatingirreversibility (5-cycle round-trip stress proves stripped fields never resurrect). Companion research dossier indocs/research/BFLD/(11 files, 13,544 words). 49-iter implementation chain from scaffold (feat/adr-118/p1,c965e3e6c) through current head with per-iter progress comments on issue #787. Try it:cargo run -p wifi-densepose-bfld --example bfld_handle. - SENSE-BRIDGE — rvagent MCP server + ruvector npm + ruflo integration (ADR-124, #787). New npm package
@ruvnet/rvagent(tools/ruview-mcp/) — a dual-transport Model Context Protocol server that bridges the RuView WiFi-DensePose sensing stack to AI agents (Claude Code, Cursor, ruflo swarms). 6 of 20 ADR-124 §4.1 tools wired in this initial release:ruview.presence.now(occupancy),ruview.vitals.get_breathing/get_heart_rate/get_all(biometric vitals viaEdgeVitalsMessagesurface, ADR-124 §6 Python ws.py:74-88 parity),ruview.bfld.last_scan(latest BFLD event —identity_risk_score,privacy_class,n_frames,timestamp_ms),ruview.bfld.subscribe(MQTT wildcard subscription with synthetic UUID envelope fallback). Dual-transport architecture (ADR-124 §3): stdio (npx @ruvnet/rvagent stdio— recommended for Claude Code / Cursor local flow) + Streamable HTTP (POST /mcpbound to127.0.0.1:3001by default — for remote ruflo swarms across the Tailscale fleet). Security model (ADR-124 §6): Origin header validation (cross-origin POST → 403), bearer-token auth slot (RVAGENT_HTTP_TOKEN→ 401), bind default127.0.0.1per MCP spec requirement. Uniform schema validation gate (ADR-124 §3): everyCallToolrequest runszod.safeParseviaTOOL_INPUT_SCHEMASbefore dispatch; failures throwMcpError(InvalidParams). Full Zod schema barrel (ADR-124 §4.1 + §4.1a):src/schemas/tools.tsdefines all 20 tool input schemas including the 5 RUVIEW-POLICY governance tools (can_access_vitals, can_query_presence, can_subscribe, redact_identity_fields, audit_log). Python surface parity:EdgeVitalsMessageTypeScript interface mirrors Python ws.py:74-88; ADR-124 §6 parity table drives the field names. 93 tests across 7 suites (manifest, schemas, validate, tools, http-transport, bfld-tools, vitals-tools) — all green. Try it:npx @ruvnet/rvagent stdio(withRUVIEW_SENSING_SERVER_URL=http://localhost:3000). - Home Assistant + Matter integration (ADR-115). New
--mqttand--matterflags onwifi-densepose-sensing-serverexpose the full sensing capability set to any Home Assistant install via MQTT auto-discovery (HA-DISCO) and to any Matter controller (Apple Home / Google Home / Alexa / SmartThings) via a built-in Matter Bridge scaffolding (HA-FABRIC, SDK wiring v0.7.1). Includes 21 entity kinds per node — 11 raw signals + 10 inferred semantic primitives (HA-MIND: someone-sleeping, possible-distress, room-active, elderly-inactivity-anomaly, meeting, bathroom, fall-risk, bed-exit, no-movement, multi-room-transition). The semantic primitives run server-side so--privacy-modestrips HR/BR/pose values from the wire while still publishing the inferred states — the architectural win for healthcare and AAL deployments. Ships 8 starter HA Blueprints underexamples/ha-blueprints/, 3 drop-in Lovelace dashboards underexamples/lovelace/(including a privacy-mode-compatible healthcare care view), mTLS support, 32 KB payload-size cap, MQTT-wildcard topic-injection rejection,RUVIEW_MQTT_STRICT_TLS=1v0.8.0 upgrade path. 420 lib tests cover the implementation including ~2,560 fuzzed assertions per CI run (10 proptest cases across wire-boundary security + semantic-bus invariants). Plus mosquitto-backed integration tests in.github/workflows/mqtt-integration.yml, criterion benchmarks beating every ADR target by 1.6×–208×, and an ESP32-S3 hardware validation harness (scripts/validate-esp32-mqtt.sh) that asserts the full pipeline end-to-end with a witness bundle generator (scripts/witness-adr-115.sh) that self-verifies. Seedocs/releases/v0.7.0-mqtt-matter.md,docs/integrations/home-assistant.md,docs/integrations/semantic-primitives-metrics.md,docs/integrations/benchmarks.md,docs/adr/ADR-115-home-assistant-integration.md, tracking issue #776, PR #778. Matter SDK wiring (P8b) and CSA-certification path (P10) deferred to v0.7.1+ per ADR §9.10. Try it:cargo run -p wifi-densepose-sensing-server --features mqtt --example mqtt_publisher -- --mqtt --mqtt-host 127.0.0.1. - ESP32-C6 firmware target with Wi-Fi 6 / 802.15.4 / TWT / LP-core support (ADR-110, #762).
firmware/esp32-csi-nodenow builds for bothesp32s3(existing production node) andesp32c6(new research/seed-node target) from the same source tree — pick viaidf.py set-target esp32c6and ESP-IDF auto-applies the newsdkconfig.defaults.esp32c6overlay. Every C6 module is#ifdef CONFIG_IDF_TARGET_ESP32C6gated, so the S3 build is byte-identical to today (no regression).- Wi-Fi 6 HE-LTF subcarrier tagging —
csi_collector.cnow readsrx_ctrl.cur_bb_formatand writes the PPDU type (0=HT/legacy, 1=HE-SU, 2=HE-MU, 3=HE-TB) into ADR-018 frame byte 18, plus bandwidth flags (20/40 MHz, STBC, 802.15.4-sync-valid) into byte 19. Bytes 18-19 were previously reserved-zero, so old aggregators read them as before — fully backwards compatible. Magic stays0xC5110001. Default on viaCONFIG_CSI_FRAME_HE_TAGGING. First firmware in the open ESP32 ecosystem to tag CSI frames with 11ax PPDU metadata. - 802.15.4 mesh time-sync — new
c6_timesync.{h,c}(262 lines) provides cross-node clock alignment over the C6's separate 802.15.4 radio, freeing WiFi airtime from coordination traffic (directly addresses the ADR-029/030 multistatic synchronization gap). Protocol: lowest EUI-64 wins election, leader broadcastsTS_BEACON(magic=0x54534D45, leader epoch µs) every 100 ms on channel 15, followers computeoffset = leader_us - local_usand apply lazily — every CSI frame is stamped withc6_timesync_get_epoch_us(). Target alignment ±100 µs. Default on viaCONFIG_C6_TIMESYNC_ENABLE. Verified initializing at boot on COM6 (c6_ts: init done: channel=15 EUI=206ef1fffefffe17 leader=yes(candidate)at +413 ms). - TWT (Target Wake Time) — new
c6_twt.{h,c}(223 lines) wrapsesp_wifi_sta_itwt_setupfromesp_wifi_he.hto negotiate an individual TWT agreement with the AP after STA connect. Replaces today's opportunistic CSI capture with a scheduler-bounded one (default wake interval 10 ms = 100 fps cadence). Graceful NACK fallback: when the AP doesn't support 11ax iTWT, the helper logs and returns OK so the device keeps doing opportunistic CSI just like the S3. Teardown onWIFI_EVENT_STA_DISCONNECTEDkeeps the AP's TWT scheduler clean. Gated onSOC_WIFI_HE_SUPPORT(auto-set on C6/C5 chips). - LP-core wake-on-motion hibernation — new
c6_lp_core.{h,c}(134 lines) arms the C6 LP RISC-V coprocessor as an always-on motion gate; HP core stays in deep sleep until a configurable GPIO wakes it (ext1 deep-sleep wake source in this initial cut, real LP-core program in follow-up). Targets ≤5 µA hibernation current for battery-powered Cognitum Seed nodes (vs the S3's ~10 µA ULP-FSM floor). Opt-in viaCONFIG_C6_LP_CORE_ENABLE(default off — only enabled on nodes flashed for battery-powered seed duty). - Build matrix: S3 stays
partitions_display.csv(8 MB + display + WASM), C6 usespartitions_4mb.csv(4 MB single OTA, no display, no WASM3, no LCD). C6 final binary 1003 KB (46% partition slack), 9 % smaller than S3 production. Free heap 310 KiB at boot, app_main reached in 343 ms, 802.15.4 stack up in another 70 ms. - Why this matters: opens three research surfaces nobody has published yet — Wi-Fi-6 CSI human pose, multistatic CSI clock alignment over a side-channel radio, and TWT-bounded deterministic CSI cadence. The S3 production fleet keeps shipping the existing capabilities; the C6 is the research / battery-seed expansion target.
- Docs: ADR-110 (186 lines, Status=Accepted), tracking issue ruvnet/RuView#762 with per-phase progress comments, README hardware table + Quick-Start Option 2b,
docs/user-guide.mdfull ESP32-C6 section (build, flash, provision, multi-room time-sync, battery seed mode), full empirical record indocs/WITNESS-LOG-110.mdwith verified / claimed / bugs-fixed / bugs-found sections. - Wave 2 follow-up (D1 workaround): 5 systematic experiments on 3 live C6 boards confirmed the IDF v5.4 802.15.4 RX path is unfixable from user code (TX works 100 %, RX delivers 0 frames; coex/channel/OpenThread/manual-rearm all ruled out). Pivoted to ESP-NOW for the cross-node sync transport —
main/c6_sync_espnow.{h,c}is the same TS_BEACON protocol over WiFi peer-to-peer, sameget_epoch_us / is_valid / is_leaderAPI surface. 120 s single-board soak: 1151 transmits, 0 failures (0.00 %), 9.6 tx/s sustained, no crash or reset. The 802.15.4 path stays in source as documented-broken (D1) for when the IDF driver gets fixed. - Host-side dual-pipeline decoder for ADR-018 byte 18-19 (ADR-110 protocol closure):
- Rust (
v2/crates/wifi-densepose-hardware): newPpduTypeenum (HtLegacy/HeSu/HeMu/HeTb/Unknown) andAdr018Flagsstruct (bw40/stbc/ldpc/ieee802154_sync_valid) onCsiMetadata. 6 new deterministic unit tests; 122/122 hardware-crate tests pass. - Python (
archive/v1/src/hardware/csi_extractor.py):HEADER_FMTextended from<IBBHIIBB2xto<IBBHIIBBBB; new metadata fields (ppdu_type,he_capable,bw40,stbc,ldpc,ieee802154_sync_valid). 5 newTestAdr110ByteEncodingcases; 11/11 parser tests pass. - Both decoders match the firmware encoder bit-for-bit. Pre-ADR-110 firmware sends zeros that round-trip as
HtLegacy+ default flags — fully backwards compatible.
- Rust (
- Security fix (
scripts/redact-secrets.py+generate-witness-bundle.sh): the Python proof step was echoing.envcontents into the bundledverification-output.logvia Pydantic validation errors. Bundle nuked before push; added astdin -> stdoutredaction filter covering common token prefixes, long opaque strings, and long hex runs. Verified zero leaks on rebuild. - Wave 3 — firmware v0.6.7 (LP-core full + soft-AP HE): two software-only unblocks for the hardware-blocked items in WITNESS-LOG-110 §B. (1) Real LP-core motion-gate program (
firmware/esp32-csi-node/main/lp_core/main.c+ integration inc6_lp_core.c). WhenCONFIG_C6_LP_CORE_ENABLE=y, the LP RISC-V coprocessor now runs a real polling program (configurable cadence viaCONFIG_C6_LP_POLL_PERIOD_US, default 10 ms) that debounces N consecutive GPIO samples (CONFIG_C6_LP_DEBOUNCE_SAMPLES, default 3) and wakes the HP core viaulp_lp_core_wakeup_main_processor(). HP entry usesesp_sleep_enable_ulp_wakeup+ESP_SLEEP_WAKEUP_ULP. Exposesc6_lp_core_motion_count()andc6_lp_core_poll_count()getters for the witness harness. Replaces the v0.6.6esp_deep_sleep_enable_gpio_wakeupext1 fallback (which floored at ~10 µA, the same as the S3 ULP-FSM). The fallback path stays as theelsebranch so builds withoutCONFIG_C6_LP_CORE_ENABLEkeep working unchanged — zero regression for v0.6.6-era fleets. Targets the C6 datasheet ≤5 µA average for battery seed nodes; pending INA/Joulescope measurement to confirm (WITNESS-LOG-110 §B4). (2) Wi-Fi 6 soft-AP with TWT Responder=1 (c6_softap_he.{h,c}+main.cAP+STA mode switch). WhenCONFIG_C6_SOFTAP_HE_ENABLE=y, one C6 board can act as the iTWT-capable AP the bench is otherwise missing — pair with a second C6-STA board to negotiate real iTWT against a known-cooperative AP and measure deterministic CSI cadence (WITNESS-LOG-110 §B1/B2). SSID/PSK/channel configurable via Kconfig defaults or NVS (softap_ssid/softap_psk/softap_chankeys in theruviewnamespace). Default off so existing nodes are unaffected. Build artifacts: S3 8 MB binary 1093 KB (47 % slack), C6 4 MB binary 1019 KB (45 % slack). Tag:v0.6.7-esp32. - Wave 4 — firmware v0.6.8 (ESP-NOW mesh offset smoother):
c6_sync_espnow.cnow maintains an in-firmware exponential-moving-average of the cross-board sync offset (α = 1/8, fixed-point shift, ≈ 8-sample window at the 10 Hz beacon rate). New getterc6_sync_espnow_get_offset_us_smoothed().c6_sync_espnow_get_epoch_us()now returns timestamps stamped from the smoothed offset once seeded — every downstream CSI-frame consumer gets bounded-jitter alignment for free, no host-side filter required. Measured on the bench: 5-min two-board soak (WITNESS-LOG-110 §A0.10) drops raw offset stdev 411.5 µs → smoothed 104.1 µs (3.95× suppression on stdev, 4.70× on peak-to-peak range) while preserving the +30 µs/min crystal-drift trajectory within 2 µs/min. The ADR-110 §2.4 ≤100 µs multistatic alignment target that v0.6.6 designed is now empirically measured, not just stated. Cross-board beacon match rate 99.56% over 5 min, 0 TX failures. Binary cost: +32 bytes (one int64, one bool, one getter). Diag log addssmoothed=…field. Tag:v0.6.8-esp32. Known wiring gap (deferred):csi_serialize_framedoes not yet stamp frames withc6_sync_espnow_get_epoch_us()— the ADR-018 frame format has no timestamp field, and adding one is a breaking change that needs an ADR update. Multistatic CSI fusion will require either an ADR-018 v2 with timestamp, or a separate UDP sync packet keyed off the existing flag bit. Tracked in WITNESS-LOG-110 §A0.11. - Wave 5 — firmware v0.6.9 + v0.7.0 + host wiring (loop iter 8 → iter 26): closes the §A0.11 gap and lights up the substrate end-to-end across firmware → host → JSON broadcast. Firmware: (a) v0.6.9-esp32 —
csi_collector.cemits a 32-byte UDP sync packet (magic0xC511A110, distinct from CSI frame magic0xC5110001) everyCONFIG_C6_SYNC_EVERY_N_FRAMES(default 20) CSI frames, carryingnode_id,local_us, mesh-alignedepoch_us(from the Wave 4 smoothed offset), and the CSI sequence high-water for host-side pairing. Same UDP socket as CSI; host dispatches by leading magic. Operator-tunable cadence via the new Kconfig knob — N=1 (10 Hz) for tight multistatic, N=200 (~20 s) for low-power seeds. Live-verified on COM9+COM12 (§A0.12): follower reportslocal − epoch = 1 163 565 µs, matches the §A0.10 boot-delta measurement within 285 µs of WiFi MAC TX jitter. (b) v0.7.0-esp32 —csi_collector.c:221ADR-018 byte 19 bit 4 ("cross-node sync valid") now ORs inc6_sync_espnow_is_valid()so frames from sync'd ESP-NOW nodes correctly advertise sync (previously only sourced from the broken 802.15.4 path — false-negative bug, §A0.13). Side effect: S3 boards now also set the bit sincec6_sync_espnowis cross-target. Host decoders + 25 unit tests: PythonSyncPacketParser+SyncPacketdataclass withapply_to_local/mesh_aligned_us_for_sequence/local_minus_epoch_us(10 tests inTestSyncPacketParser); Rustwifi_densepose_hardware::SyncPacket+SyncPacketFlags+SYNC_PACKET_MAGICre-exported from the crate root with identical API surface (15 tests insync_packet::tests). Cross-language conformance gate (loop iter 21): the same 32-byte canonical hex10a111c509010600f26db70100000000c5aca501000000001400000000000000is pinned in both test suites; if either decoder drifts from the wire, exactly one named test fires and points at the moved side. Sensing-server wiring:udp_receiver_taskmagic-dispatches0xC511A110and stores per-nodelatest_sync: Option<SyncPacket>+latest_sync_at: Option<Instant>onNodeState. New helpers:NodeState::mesh_aligned_us(local_us),NodeState::mesh_aligned_us_for_csi_frame(sequence)(uses the per-node measured fps EMA with 5-sample warmup + 9 s staleness gate),NodeState::observe_csi_frame_arrival(now)(feedsupdate_csi_fps_emaα=1/8, called once per accepted CSI frame). 4 fps-EMA tests + 3 NodeSyncSnapshot serialization tests on the binary target. Public JSON API:sensing_updatebroadcasts now carry an optionalsyncobject per node —{offset_us, is_leader, is_valid, smoothed, sequence, csi_fps_ema, csi_fps_samples}—#[serde(skip_serializing_if = "Option::is_none")]so non-mesh paths (multi-BSSID scan / synthetic-RSSI fallback / simulation) omit the key entirely. Existing pre-v0.7.0 UI clients ignore it cleanly. Documented indocs/user-guide.md"Per-node mesh sync (ADR-110)" section with field table, UI rendering rules, and the timestamp-recovery recipe. Branch-coordination:docs/ADR-110-BRANCH-STATE.mdmaps which files each ofadr-110-esp32c6vsfeat/adr-115-ha-mqtt-mattertouches (regions are disjoint, merges should be clean line-merges). Verification baselines: full v2 cargo workspace at 1437 tests passing (no regression across 17 crate batches), fullwifi-densepose-hardwarecrate at 137 tests. ADR-110 §B substrate is now end-to-end visible to UI clients and ready for ADR-029/030 multistatic CSI fusion consumption.
- Wi-Fi 6 HE-LTF subcarrier tagging —
- Real-time CSI introspection / low-latency tap on
wifi-densepose-sensing-server(ADR-099). Newwifi_densepose_sensing_server::introspectionmodule wires midstream'stemporal-attractor(Lyapunov + regime classification) andtemporal-compare(DTW pattern matching) as a parallel tap alongside RuView's existing event pipeline — no replacement, no behaviour change to the existing/ws/sensingfan-out orwifi-densepose-signalDSP. Two new endpoints (off by default, enabled via--introspection):GET /ws/introspection— newline-delimited JSON snapshots streamed at the CSI frame rate. Each snapshot carriesframe_count,regime(Idle / Periodic / Transient / Chaotic / Unknown),lyapunov_exponent,attractor_dim,attractor_confidence,regime_changed(boolean — flips on the first frame after a regime transition), andtop_k_similarity[](highest-scoring signature matches against a per-deployment library).GET /api/v1/introspection/snapshot— single-shot JSON snapshot, auth-gated whenRUVIEW_API_TOKENis set. Per-frameupdate()budget measured at 0.041 ms p99 on the I5 bench (~24× under ADR-099 D4's 1 ms target). Shape-match latency on a 1-D mean-amplitude L1 stand-in: 5 frames (3.20× ratio vs the 16-frame event-path floor). ADR-099 D8 honestly amended — the aspirational 10× bar is contingent on ADR-208 Phase 2 multi-dim NPU embeddings; this release ships the tap off-by-default while the foundation lands. 8 lib tests + 5 latency/regression tests (tests/introspection_latency.rs, including a 200-frame noise warm-up → 10-frame motion-ramp signature benchmark).
- Opt-in bearer-token auth on
wifi-densepose-sensing-server's/api/v1/*HTTP surface (closes #443). Newwifi_densepose_sensing_server::bearer_authmodule: when theRUVIEW_API_TOKENenv var is set, every request whose path begins with/api/v1/must carry anAuthorization: Bearer <token>header (constant-time compared) or the server responds401 Unauthorized. When the variable is unset or empty the middleware is a no-op — the long-standing LAN-only deployment posture is preserved, so this is a binary deployment-time switch with no default behaviour change./health*,/ws/sensing, and the/ui/*static mount are intentionally never gated (orchestrator probes + local browsers). Startup logs which mode is active and warns when auth is on with a0.0.0.0bind. 8 unit tests on the middleware (lib test count 191 → 199). Resolves the security audit raised in #443.
Changed
- Docker image: build-time guard for the UI assets, plus a CI workflow that
rebuilds and pushes on every change (closes #520, #514).
docker/Dockerfile.rustnowRUNs a guard afterCOPY ui/that fails the build if any ofindex.html/observatory.html/pose-fusion.html/viz.html/ theobservatory//pose-fusion//components//services/directories are missing, so a stale image can never be silently produced again. New.github/workflows/sensing-server-docker.ymlbuilds the image on push tomain(paths-filtered) and onv*tags and pushes to bothdocker.io/ruvnet/wifi-denseposeandghcr.io/ruvnet/wifi-denseposewithlatest+vX.Y.Z+sha-<short>tags, then smoke-tests the published artifact:/health,/api/v1/info, the observatory + pose-fusion UI assets, and theRUVIEW_API_TOKENauth path (no token → 401, wrong → 401, correct → 200). UsesDOCKERHUB_USERNAME/DOCKERHUB_TOKENrepo secrets for the Docker Hub push; ghcr.io uses the workflow'sGITHUB_TOKEN. - rvCSI moved to its own repo and is now vendored as a submodule. The 9
rvcsi-*crates (rvcsi-core/-dsp/-events/-adapter-file/-adapter-nexmon/-ruvector/-runtime/-node/-cli— added inline in #542) now live ingithub.com/ruvnet/rvcsi: published to crates.io asrvcsi-* 0.3.x, to npm as@ruv/rvcsi, with a Claude Code plugin marketplace and a RuView-style README. RuView vendors it undervendor/rvcsi(alongsidevendor/ruvector/vendor/midstream/vendor/sublinear-time-solver) and no longer carries inline copies inv2/crates/; consumers depend on the published crates (or the submodule'scrates/rvcsi-*paths).v2/Cargo.toml,CLAUDE.md, and the README docs table updated accordingly. The ADRs (ADR-095, ADR-096), PRD, and DDD model stay indocs/here as the design record of the incubation.
Fixed
- README: corrected the camera-supervised pose-accuracy claim. The README stated
"92.9% PCK@20" for camera-supervised training; that figure does not appear in
ADR-079 and is ~2.6× the ADR's own success target (>35% PCK@20). ADR-079 phases
P7 (data collection), P8 (training + evaluation on real paired data) and P9
(cross-room LoRA) are still
Pending, so no measured camera-supervised PCK@20 has been published. README now states the proxy-supervised baseline (≈2.5%) and the ADR-079 target (35%+), and notes the eval phases are pending. Surfaced by the PowerPlatePulse training-pipeline audit (2026-05-11); 6 remaining audit findings tracked in the PR. - rvCSI
BaselineDriftDetector: drift thresholds are now scale-relative, not absolute. The detector comparedmean_amplitudeagainst its EWMA baseline with absolute thresholds (anomaly_threshold = 1.0,drift_threshold = 0.15) — fine for the synthetic unit tests (amplitudes ≈ 1.0), but raw ESP32 CSI isint8I/Q with amplitudes up to ~128, so the window-to-window RMS distance is routinely 5–50 ≫ 1.0 andAnomalyDetectedfired on ~96 % of windows (319/331 on a real node-1 capture). Drift is now‖current − baseline‖₂ / ‖baseline‖₂(a fraction, with anepsfloor for a degenerate near-zero baseline), so one tuning works across raw-int8ESP32,int16-scaled Nexmon, and baseline-subtracted streams alike —AnomalyDetecteddrops to 40/331 on the same data, the existing detector tests still pass, and abaseline_drift_is_scale_invariant_no_anomaly_stormregression test was added. ADR-095 D13 / ADR-096 §2.1, §5 updated. Surfaced by an end-to-end test against real ESP32 CSI (a 7,000-frame node-1 capture; transcoder atscripts/esp32_jsonl_to_rvcsi.py).
Added
- rvCSI — edge RF sensing runtime (design + first implementation). New subsystem rvCSI: a Rust-first / TypeScript-accessible / hardware-abstracted edge RF sensing runtime that normalizes WiFi CSI from Nexmon, ESP32, Intel, Atheros, file and replay sources into one validated
CsiFrameschema, runs reusable DSP, emits typed confidence-scored events, and bridges to RuVector RF memory, an MCP tool server and a TS SDK.- Design docs:
docs/prd/rvcsi-platform-prd.md(purpose, users, success criteria, FR1–FR10, NFRs, system architecture, data model);docs/adr/ADR-095-rvcsi-edge-rf-sensing-platform.md(the 15 architectural decisions: Rust core, C-at-the-boundary, TS SDK via napi-rs, normalized schema, validate-before-FFI, CSI-as-temporal-delta, RuVector as RF memory, replayability, detection≠decision, local-first, read-first/write-gated MCP, mandatory quality scoring, versioned calibration, plugin adapters);docs/adr/ADR-096-rvcsi-ffi-crate-layout.md(crate topology, the napi-c shim record format & contract, the napi-rs Node surface, build/test invariants);docs/ddd/rvcsi-domain-model.md(7 bounded contexts: Capture, Validation, Signal, Calibration, Event, Memory, Agent — with aggregates, invariants, context map and domain services). Indexed indocs/adr/README.mdanddocs/ddd/README.md. - Crates (9 new
v2/crates/rvcsi-*workspace members):rvcsi-core(normalizedCsiFrame/CsiWindow/CsiEventschema,AdapterProfile,CsiSourceplugin trait, id newtypes +IdGenerator,RvcsiError, thevalidate_framepipeline + quality scoring;forbid(unsafe_code));rvcsi-adapter-nexmon— the napi-c seam:native/rvcsi_nexmon_shim.{c,h}(the only C in the runtime — allocation-free, bounds-checked, ABI1.1), compiled viabuild.rs+cc, handling two byte formats — the compact self-describing "rvCSI Nexmon record", and the real nexmon_csi UDP payload (the 18-bytemagic 0x1111 · rssi · fctl · src_mac · seq · core/stream · chanspec · chip_verheader +nsubint16 I/Q samples, the modern BCM43455c0/4358/4366c0 export read by CSIKit/csireader.py), with a Broadcom d11ac chanspec decoder (channel/bandwidth/band) — plus a pure-Rust libpcap reader (classic.pcap, all byte-order/timestamp-resolution magics, Ethernet/raw-IPv4/Linux-SLL link types) and a Nexmon-chip / Raspberry-Pi-model registry (NexmonChip/RaspberryPiModel— including the Raspberry Pi 5 (CYW43455/BCM43455c0, same wireless as the Pi 4 — 20/40/80 MHz, 2.4+5 GHz, 64/128/256 subcarriers), the Pi 3B+/4/400, and the Pi Zero 2 W (BCM43436b0);nexmon_adapter_profile/raspberry_pi_profilebuild the per-chipAdapterProfile;chip_verwords auto-resolve to a chip). Wrapped by a documentedffimodule and twoCsiSources:NexmonAdapter(record buffers) andNexmonPcapAdapter(real nexmon_csi UDP inside atcpdump -i wlan0 dst port 5500 -w csi.pcapcapture — the pcap timestamp stamps each frame; the chip is auto-detected fromchip_ver, overridable via.with_pi_model(Pi5)/.with_chip(...)).rvcsi-dsp(DC removal, phase unwrap, smoothing, Hampel/MAD filter, sliding variance, baseline subtraction, motion-energy/presence/confidence features, heuristic breathing-band estimate, non-destructiveSignalPipeline);rvcsi-events(WindowBuffer, theEventDetectortrait + presence/motion/quality/baseline-drift state machines,EventPipeline; the baseline-drift detector uses scale-relative thresholds — drift as a fraction of the baseline's RMS magnitude — so one tuning works across raw-int8ESP32,int16-scaled Nexmon, and baseline-subtracted streams alike);rvcsi-adapter-file(the.rvcsiJSONL capture format,FileRecorder,FileReplayAdapterdeterministic replay);rvcsi-ruvector(deterministic window/event embeddings,cosine_similarity, theRfMemoryStoretrait,InMemoryRfMemory+JsonlRfMemory— a standin until the production RuVector binding);rvcsi-runtime(the no-FFI composition layer:CaptureRuntime=CsiSource+validate_frame+SignalPipeline+EventPipeline, plus one-shot helperssummarize_capture/decode_nexmon_records/decode_nexmon_pcap/summarize_nexmon_pcap/events_from_capture/export_capture_to_rf_memory);rvcsi-node— the napi-rs seam (a["cdylib","rlib"]Node addon,build.rsrunsnapi_build::setup(); thin#[napi]wrappers overrvcsi-runtime—nexmonDecodeRecords/nexmonDecodePcap(with optionalchip)/inspectNexmonPcap/decodeChanspec/nexmonChipName/nexmonProfile/nexmonChips/inspectCaptureFile/eventsFromCaptureFile/exportCaptureToRfMemory+ anRvcsiRuntimestreaming class; everything that crosses to JS is a validated/normalized struct serialized to JSON);rvcsi-cli(thervcsibinary:record(Nexmon-dump or--source nexmon-pcap [--chip pi5]→.rvcsi),inspect,inspect-nexmon,nexmon-chips,decode-chanspec,replay,stream,events,health,calibratev0-baseline,export ruvector). Plus the@ruv/rvcsinpm package (package.json/index.js/index.d.ts/README/__test__) alongsidervcsi-node— a curated JS surface that parses the addon's JSON into plainCsiFrame/CsiWindow/CsiEvent/SourceHealth/CaptureSummary/NexmonPcapSummary/DecodedChanspecobjects, with a lazy native-addon load. - Tests: 169 across the rvcsi crates (core 29, dsp 28, events 19 — incl. a baseline-drift scale-invariance regression, adapter-file 20 + 1 doctest, adapter-nexmon 28 — round-tripping through the C shim and synthetic libpcap files, incl. Pi 5 / chip-detection, ruvector 20 + 1 doctest, runtime 13, cli 10), 0 failures; all rvcsi crates build together and are clippy-clean (
rvcsi-nodeunderdeny(clippy::all));forbid(unsafe_code)everywhere exceptrvcsi-adapter-nexmon(FFI, everyunsafeblock documented). Also exercised end-to-end against a real 7,000-frame ESP32 node-1 capture (transcoded withscripts/esp32_jsonl_to_rvcsi.py— the stand-in for the not-yet-shippedrecord --source esp32-jsonl):rvcsi inspect/replay/calibrate/eventsall run on real hardware data. Not yet wired in: live radio capture,rvcsi-adapter-esp32(live serial/UDP ESP32 source), the WebSocket daemon (rvcsi-daemon), the MCP tool server (rvcsi-mcp), and the legacy nexmon packed-float CSI export — follow-ups on top of these crates.
- Design docs:
wifi-densepose-train:signal_featuresmodule — wireswifi-densepose-signalinto the training pipeline.wifi-densepose-signalwas previously a phantom dependency ofwifi-densepose-train(listed inCargo.toml, never imported). Newwifi_densepose_train::signal_features::extract_signal_features(andCsiSample::signal_features()) run a windowed CSI observation's centre frame throughwifi_densepose_signal::features::FeatureExtractor, producing a fixed-length (FEATURE_LEN = 12) amplitude/phase/PSD feature vector — the hook for a future vitals / multi-task supervision head (breathing- and heart-rate-band power are read off the PSD summary). The vector is produced on demand and not yet fed back into the loss. Surfaced by the 2026-05-11 training-pipeline audit (findings #1 "vitals features absent from training" and #2 "wifi-densepose-signalghost dep").wifi-densepose-train:TrainingConfigsubcarrier-layout presets + a real-loader integration test. NewTrainingConfig::for_subcarriers(native, target)plus named presetsht40_192()(≈192-sc ESP32 HT40 → 56) andmultiband_168()(168-sc ADR-078 multi-band mesh → 56), so non-MM-Fi CSI shapes are first-class instead of requiring manualnative_subcarriers/num_subcarriersoverrides; field docs now list the supported source counts and the multi-NIC mapping. Newtests/test_real_loader.rsround-trips synthetic CSI through.npyfiles →MmFiDataset::discover/get(including the subcarrier-interpolation branch and the empty-root case) — exercising the on-disk loader path the deterministicverify-trainingproof intentionally bypasses. Addresses training-pipeline audit findings #6 (56-sc/1-NIC config default) and #7 (multi-band mesh not in config); the #4 concern ("proof uses synthetic data") is reframed — the proof should use a reproducible source, and this test covers the real loader it skips.
Fixed
- HuggingFace
MODEL_CARD.md: marked the PIR/BME280 environmental-sensor ground-truth path as planned, not implemented (training-pipeline audit finding #3) — the card presented PIR/BME280 weak-label fine-tuning as a current capability; there is no env-sensor ingestion in the training pipeline today. - README: corrected the camera-supervised pose-accuracy claim (audit finding #5; see PR #535) — "92.9% PCK@20" → the ADR-079 target (35%+; proxy baseline 35.3%), noting P7/P8/P9 are pending.
Added
-
RollingP95adaptive feature normalizer (v2/crates/wifi-densepose-sensing-server) — Streaming P95 estimator (600-sample / ~30 s sliding window) that self-calibrates feature normalization to whatever distribution the deployment produces. Replaces fixed-scale denominators (variance/300,motion/250,spectral/500) which saturated when live ESP32 values exceeded those limits, collapsing dynamic range to zero. Cold-start (<60 samples) falls back to the legacy denominators so day-0 behaviour is preserved. Deployment-neutral: no hardcoded values. (ADR-044 §5.2) -
dedup_factorruntime configuration API (v2/crates/wifi-densepose-sensing-server) — Exposes the multi-node person-count deduplication divisor at runtime via REST:GET /api/v1/config/dedup-factor— read current value.POST /api/v1/config/dedup-factor— set value (clamped 1.0–10.0, persisted).POST /api/v1/config/ground-truth— auto-tunesdedup_factorfrom a known person count ({"count": N}); derives optimal divisor from current node-sum. Config is persisted todata/config.jsonand reloaded on restart. (ADR-044 §5.3)
-
nvsimcrate — deterministic NV-diamond magnetometer pipeline simulator (ADR-089) — New standalone leaf crate atv2/crates/nvsimmodeling a forward-only magnetic sensing path: scene → source synthesis (Biot–Savart, dipole, current loop, ferrous induced moment) → material attenuation (Air/Drywall/Brick/Concrete/Reinforced/SteelSheet) → NV ensemble (4 〈111〉 axes, ODMR linear-readout proxy, shot-noise floor per Wolf 2015 / Barry 2020) → 16-bit ADC + lock-in demodulation → fixed-layoutMagFramerecords → SHA-256 witness. Six-pass build perdocs/research/quantum-sensing/15-nvsim-implementation-plan.md. 50 tests, ~4.5 M samples/s on x86_64 (4500× the Cortex-A53 1 kHz acceptance gate), pinned reference witnesscc8de9b01b0ff5bd97a6c17848a3f156c174ea7589d0888164a441584ec593b4for byte-equivalence regression. WASM-ready by construction (zerostd::time/fs/env/process/thread); builds cleanly forwasm32-unknown-unknown. ADR-090 (Proposed, conditional) tracks the optional Lindblad/Hamiltonian extension if AC magnetometry, MW power saturation, hyperfine spectroscopy, or pulsed protocols become required.
Fixed
- WebSocket broadcast handler now handles Lagged events gracefully and sends periodic ping keepalives to prevent dashboard disconnects —
handle_ws_clientandhandle_ws_pose_clientinwifi-densepose-sensing-serverwere treatingRecvError::Laggedas a fatal error, causing instant disconnect when clients fell behind the 256-frame broadcast buffer at 10 Hz ingest. Clients would reconnect, immediately lag again, and rapid-cycle every 2–4 s.Laggednow continues (drops missed frames, logs debug) rather than breaking. Added 30 s ping keepalive on the sensing handler to prevent proxy idle timeouts. - Ghost skeletons in live UI with multi-node ESP32 setups (#420, ADR-082) —
tracker_bridge::tracker_to_person_detectionsdocumented itself as filtering tois_alive()tracks but in fact passed every non-Terminated track to the WebSocket stream.Losttracks — kept insidereid_windowfor re-identification but not currently observed — were rendering as phantom skeletons, accumulating to 22-24 with 3 nodes × 10 Hz CSI whileestimated_personscorrectly reported 1. AddedPoseTracker::confirmed_tracks()(Tentative + Active only) and rewired the bridge to use it. Lost tracks remain in the tracker for re-ID; they just no longer ship to the UI. Regression test:test_lost_tracks_excluded_from_bridge_output. - Rust workspace build with
--no-default-featureson Windows (#366, #415) —wifi-densepose-mat,wifi-densepose-sensing-server, andwifi-densepose-trainall depended onwifi-densepose-signalwith default features enabled, which pulledndarray-linalg→openblas-src→ vcpkg/system-BLAS through the entire workspace.--no-default-featuresat the workspace root then could not opt out of BLAS, breakingcargo build/cargo teston Windows without vcpkg. All three consumers now declarewifi-densepose-signal = { ..., default-features = false }, socargo test --workspace --no-default-featuresbuilds cleanly without vcpkg/openblas. Validated: 1,538 tests pass, 0 fail, 8 ignored. signaltesttest_estimate_occupancy_noise_onlyfailed withouteigenvalue— The test unwrapped theNotCalibratedstub returned when the BLAS-backedestimate_occupancyis compiled out. Gated with#[cfg(feature = "eigenvalue")]so it only runs when the real implementation is available.
[v0.6.2-esp32] — 2026-04-20
Firmware release cutting ADR-081 and the Timer Svc stack fix discovered during
on-hardware validation. Cut from main at commit pointing to this entry.
Tested on ESP32-S3 (QFN56 rev v0.2, MAC 3c:0f:02:e9:b5:f8), 30 s continuous
run: no crashes, 149 rv_feature_state_t emissions (~5 Hz), medium/slow ticks
firing cleanly, HEALTH mesh packets sent.
Fixed
- Firmware: Timer Svc stack overflow on ADR-081 fast loop —
emit_feature_state()runs inside the FreeRTOS Timer Svc task via the fast-loop callback; it callsstream_sendernetwork I/O which pushes past the ESP-IDF 2 KiB default timer stack and panics ~1 s after boot. BumpedCONFIG_FREERTOS_TIMER_TASK_STACK_DEPTHto 8 KiB insdkconfig.defaults,sdkconfig.defaults.template, andsdkconfig.defaults.4mb. Follow-up (tracked separately): move heavy work out of the timer daemon into a dedicated worker task. - Firmware:
adaptive_controller.cimplicit declaration (#404) —fast_loop_cbcalledemit_feature_state()before its static definition, triggering-Werror=implicit-function-declaration. Added a forward declaration above the first use.
Changed
- CI: firmware build matrix (8MB + 4MB) —
firmware-ci.ymlnow matrix-builds both the default 8MB (sdkconfig.defaults) and 4MB SuperMini (sdkconfig.defaults.4mb) variants, uploading distinct artifacts and producing variant-named release binaries (esp32-csi-node.bin/esp32-csi-node-4mb.bin,partition-table.bin/partition-table-4mb.bin).
Added
- ADR-081: Adaptive CSI Mesh Firmware Kernel — New 5-layer architecture
(Radio Abstraction Layer / Adaptive Controller / Mesh Sensing Plane /
On-device Feature Extraction / Rust handoff) that reframes the existing
ESP32 firmware modules as components of a chipset-agnostic kernel. ADR
in
docs/adr/ADR-081-adaptive-csi-mesh-firmware-kernel.md. Goal: swap one radio family for another without changing the Rust signal / ruvector / train / mat crates. - Firmware: radio abstraction vtable (
rv_radio_ops_t) — Newfirmware/esp32-csi-node/main/rv_radio_ops.{h}defines the chipset-agnostic ops (init, set_channel, set_mode, set_csi_enabled, set_capture_profile, get_health), profile enum (RV_PROFILE_PASSIVE_LOW_RATE/ACTIVE_PROBE/RESP_HIGH_SENS/FAST_MOTION/CALIBRATION), and health snapshot struct.rv_radio_ops_esp32.cprovides the ESP32 binding wrappingcsi_collector+esp_wifi_*. A second binding (mock or alternate chipset) is the portability acceptance test for ADR-081. - Firmware:
rv_feature_state_tpacket (magic0xC5110006) — New 60-byte compact per-node sensing state (packed, verified by_Static_assert) infirmware/esp32-csi-node/main/rv_feature_state.h: motion, presence, respiration BPM/conf, heartbeat BPM/conf, anomaly score, env-shift score, node coherence, quality flags, IEEE CRC32. Replaces raw ADR-018 CSI as the default upstream stream (~99.7% bandwidth reduction: 300 B/s at 5 Hz vs. ~100 KB/s raw). - Firmware: mock radio ops binding for QEMU — New
firmware/esp32-csi-node/main/rv_radio_ops_mock.c, compiled only whenCONFIG_CSI_MOCK_ENABLED. Satisfies ADR-081's portability acceptance test: a secondrv_radio_ops_tbinding compiles and runs against the same controller + mesh-plane code as the ESP32 binding. - Firmware: feature-state emitter wired into controller fast loop —
adaptive_controller.cnow emits one 60-byterv_feature_state_tper fast tick (default 200 ms → 5 Hz), pulling from the latest edge vitals and controller observation. This is the first end-to-end Layer 4/5 path for ADR-081. - Firmware:
csi_collector_get_pkt_yield_per_sec()/_get_send_fail_count()accessors — Expose the CSI callback rate and UDP send-failure counter so the ESP32 radio ops binding can populaterv_radio_health_t.pkt_yield_per_secand.send_fail_count, closing the adaptive controller's observation loop. - Firmware: host-side unit test suite for ADR-081 pure logic — New
firmware/esp32-csi-node/tests/host/(Makefile + 2 test files + shimesp_err.h). Exercisesadaptive_controller_decide()(9 test cases: degraded gate on pkt-yield collapse + coherence loss, anomaly > motion, motion → SENSE_ACTIVE, aggressive cadence, stable presence → RESP_HIGH_SENS, empty-room default, hysteresis, NULL safety) andrv_feature_state_*helpers (size assertion, IEEE CRC32 known vectors, determinism, receiver-side verification). 33/33 assertions pass. Benchmarks: decide() 3.2 ns/call, CRC32(56 B) 614 ns/pkt (87 MB/s), full finalize() 616 ns/call. Pure functionadaptive_controller_decide()extracted toadaptive_controller_decide.cso the firmware build and the host tests share a single source-of-truth implementation. - Scripts:
validate_qemu_output.pyADR-081 checks — Validator (invoked by ADR-061scripts/qemu-esp32s3-test.shin CI) gains three checks for adaptive controller boot line, mock radio ops registration, and slow-loop heartbeat, so QEMU runs regression-gate Layer 1/2 presence. - Firmware: ADR-081 Layer 3 mesh sensing plane — New
firmware/esp32-csi-node/main/rv_mesh.{h,c}defines 4 node roles (Anchor / Observer / Fusion relay / Coordinator), 7 on-wire message types (TIME_SYNC, ROLE_ASSIGN, CHANNEL_PLAN, CALIBRATION_START, FEATURE_DELTA, HEALTH, ANOMALY_ALERT), 3 authorization classes (None / HMAC-SHA256-session / Ed25519-batch),rv_node_status_t(28 B),rv_anomaly_alert_t(28 B),rv_time_sync_t,rv_role_assign_t,rv_channel_plan_t,rv_calibration_start_t. Pure-C encoder/decoder (rv_mesh_encode()/rv_mesh_decode()) with 16-byte envelope + payload + IEEE CRC32 trailer; convenience encoders for each message type. Controller now emitsHEALTHevery slow-loop tick (30 s default) andANOMALY_ALERTon state transitions to ALERT or DEGRADED. Host tests:test_rv_meshexercises 27 assertions covering roundtrip, bad magic, truncation, CRC flipping, oversize payload rejection, and encode+decode throughput (1.0 μs/roundtrip on host). - Rust: ADR-081 Layer 1/3 mirror module — New
crates/wifi-densepose-hardware/src/radio_ops.rsmirrors the firmware-siderv_radio_ops_tvtable as the RustRadioOpstrait (init, set_channel, set_mode, set_csi_enabled, set_capture_profile, get_health) and providesMockRadiofor offline testing. Also mirrors therv_mesh.htypes (MeshHeader,NodeStatus,AnomalyAlert,MeshRole,MeshMsgType,AuthClass) and ships byte-identicalcrc32_ieee(),decode_mesh(),decode_node_status(),decode_anomaly_alert(), andencode_health(). Exported fromlib.rs. 8 unit tests pass;crc32_matches_firmware_vectorsverifies parity with the firmware-side test vectors (0xCBF43926for"123456789",0xD202EF8Dfor single-byte zero), andmesh_constants_match_firmwareassertsMESH_MAGIC,MESH_VERSION,MESH_HEADER_SIZE, andMESH_MAX_PAYLOADmatchrv_mesh.hbyte-for-byte. Satisfies ADR-081's portability acceptance test: signal/ruvector/train/mat crates are untouched. - Firmware: adaptive controller — New
firmware/esp32-csi-node/main/adaptive_controller.{c,h}implements the three-loop closed-loop control specified by ADR-081: fast (~200 ms) for cadence and active probing, medium (~1 s) for channel selection and role transitions, slow (~30 s) for baseline recalibration. Pureadaptive_controller_decide()policy function is exposed in the header for offline unit testing. Default policy is conservative (enable_channel_switchandenable_role_changeoff); Kconfig surface added under "Adaptive Controller (ADR-081)".
Fixed
- Firmware: SPI flash cache crash under high CSI callback pressure (RuView#396, #397) — ESP32-S3 nodes crashed in
cache_ll_l1_resume_icache/wDev_ProcessFiqafter ~2400 callbacks when the promiscuous filter admitted DATA frames at 100–500 Hz. Fixed by narrowing the filter mask toWIFI_PROMIS_FILTER_MASK_MGMT(~10 Hz beacons), adding a 50 Hz early callback rate gate (CSI_MIN_PROCESS_INTERVAL_US) that drops excess callbacks before any processing work, and enablingCONFIG_ESP_WIFI_EXTRA_IRAM_OPT=yas defense-in-depth. Stability validated with a 4-min-per-node soak. - Firmware:
filter_mac/node_idclobber by WiFi driver init (#232, #375, #385, #386, #390, #397) —g_nvs_configcan be corrupted duringwifi_init_sta()on some devices (confirmed on80:b5:4e:c1:be:b8), revertingnode_idto the Kconfig default and producing garbage MAC-filter reads in the CSI callback (100–500 Hz). Newcsi_collector_set_node_id()API called fromapp_main()beforewifi_init_sta()captures both fields into module-local statics (s_node_id,s_filter_mac,s_filter_mac_set).csi_collector_init()now runs a canary that distinguishes "early≠g_nvs_config" (corruption confirmed) from a no-op match. All CSI runtime paths use the defensive copies exclusively. - Firmware:
edge_processingsample rate mismatch (#397) —estimate_bpm_zero_crossing()was called with a hard-codedsample_rate = 20.0f, but MGMT-only promiscuous delivers ~10 Hz. Breathing and heart-rate reports were 2× too high. Corrected to10.0fwith an explicit comment tying it to the callback rate. provision.pyesptool command form (#391, #397) — ESP-IDF v5.4 bundlesesptool 4.10.0, which only acceptswrite_flash(underscore). Standalonepip install esptoolv5.x accepts both forms but preferswrite-flash. #391 switched towrite-flashwhich broke the documented ESP-IDF Python venv flow; #397 reverts towrite_flash(works with both esptool 4.x and 5.x) with an inline comment warning future maintainers not to "re-fix" it.provision.pyesptool v5 dry-run hint (#391) — Stalewrite_flash(underscore) syntax in the dry-run manual-flash hint now useswrite-flash(hyphenated) for esptool >= 5.x. The primary flash command was already correct.provision.pysilent NVS wipe (#391) — The script replaces the entirecsi_cfgNVS namespace on every run, so partial invocations were silently erasing WiFi credentials and causingRetrying WiFi connection (10/10)in the field. Now refuses to run without--ssid,--password, and--target-ipunless--force-partialis passed.--force-partialprints a warning listing which keys will be wiped.- Firmware: defensive
node_idcapture (#232, #375, #385, #386, #390) — Users on multi-node deployments reportednode_idreverting to the Kconfig default (1) in UDP frames and in thecsi_collectorinit log, despite NVS loading the correct value. The root cause (memory corruption ofg_nvs_config) has not been definitively isolated, but the UDP frame header is now tamper-proof:csi_collector_init()capturesg_nvs_config.node_idinto a module-locals_node_idonce, andcsi_serialize_frame()plus all other consumers (edge_processing.c,wasm_runtime.c,display_ui.c,swarm_bridge_init) read it via the newcsi_collector_get_node_id()accessor. A canary logsWARNifg_nvs_config.node_iddiverges froms_node_idat end-of-init, helping isolate the upstream corruption path. Validated on attached ESP32-S3 (COM8): NVSnode_id=2propagates through boot log, capture log, init log, and byte[4] of every UDP frame.
Docs
- CHANGELOG catch-up (#367) — Added missing entries for v0.5.5, v0.6.0, and v0.7.0 releases.
[v0.7.0] — 2026-04-06
Model release (no new firmware binary). Firmware remains at v0.6.0-esp32.
Added
- Camera ground-truth training pipeline (ADR-079) — End-to-end supervised WiFlow pose training using MediaPipe + real ESP32 CSI.
scripts/collect-ground-truth.py— MediaPipe PoseLandmarker webcam capture (17 COCO keypoints, 30fps), synchronized with CSI recording over nanosecond timestamps.scripts/align-ground-truth.js— Time-aligns camera keypoints with 20-frame CSI windows by binary search, confidence-weighted averaging.scripts/train-wiflow-supervised.js— 3-phase curriculum training (contrastive → supervised SmoothL1 → bone/temporal refinement) with 4 scale presets (lite/small/medium/full).scripts/eval-wiflow.js— PCK@10/20/50, MPJPE, per-joint breakdown, baseline proxy mode.scripts/record-csi-udp.py— Lightweight ESP32 CSI UDP recorder (no Rust build required).
- ruvector optimizations (O6-O10) — Subcarrier selection (70→35, 50% reduction), attention-weighted subcarriers, Stoer-Wagner min-cut person separation, multi-SPSA gradient estimation, Mac M4 Pro training via Tailscale.
- Scalable WiFlow presets —
lite(189K params, ~19 min) throughfull(7.7M params, ~8 hrs) to match dataset size. - Pre-trained WiFlow v1 model — 92.9% PCK@20, 974 KB, 186,946 params. Published to HuggingFace under
wiflow-v1/.
Validated
- 92.9% PCK@20 pose accuracy from a 5-minute data collection session with one $9 ESP32-S3 and one laptop webcam.
- Training pipeline validated on real paired data: 345 samples, 19 min training, eval loss 0.082, bone constraint 0.008.
[v0.6.0-esp32] — 2026-04-03
Added
- Pre-trained CSI sensing weights published — First official pre-trained models on HuggingFace.
model.safetensors(48 KB),model-q4.bin(8 KB 4-bit),model-q2.bin(4 KB),presence-head.json, per-node LoRA adapters. - 17 sensing applications — Sleep monitor, apnea detector, stress monitor, gait analyzer, RF tomography, passive radar, material classifier, through-wall detector, device fingerprint, and more. Each as a standalone
scripts/*.js. - ADRs 069-078 — 10 new architecture decisions covering Cognitum Seed integration, self-supervised pretraining, ruvllm pipeline, WiFlow architecture, channel hopping, SNN, MinCut person separation, CNN spectrograms, novel RF applications, multi-frequency mesh.
- Kalman tracker (PR #341 by @taylorjdawson) — temporal smoothing of pose keypoints.
Fixed
- Security fix merged via PR #310.
Performance
- Presence detection: 100% accuracy on 60,630 overnight samples. (Retracted — that recording was single-class (one sleeping person, 6,062/6,063 frames "present"), so a constant "yes" scores ~99.98%. Superseded by the honest 82.3% held-out temporal-triplet metric; see #882. Kept here as the in-place public record.)
- Inference: 0.008 ms per sample, 164K embeddings/sec.
- Contrastive self-supervised training: 51.6% improvement over baseline.
[v0.5.5-esp32] — 2026-04-03
Added
- WiFlow SOTA architecture (ADR-072) — TCN + axial attention pose decoder, 1.8M params, 881 KB at 4-bit. 17 COCO keypoints from CSI amplitude only (no phase).
- Multi-frequency mesh scanning (ADR-073) — ESP32 nodes hop across channels 1/3/5/6/9/11 at 200ms dwell. Neighbor WiFi networks used as passive radar illuminators. Null subcarriers reduced from 19% to 16%.
- Spiking neural network (ADR-074) — STDP online learning, adapts to new rooms in <30s with no labels, 16-160x less compute than batch training.
- MinCut person counting (ADR-075) — Stoer-Wagner min-cut on subcarrier correlation graph. Fixes #348 (was always reporting 4 people).
- CNN spectrogram embeddings (ADR-076) — Treat 64×20 CSI as an image, produce 128-dim environment fingerprints (0.95+ same-room similarity).
- Graph transformer fusion — Multi-node CSI fusion via GATv2 attention (replaces naive averaging).
- Camera-free pose training pipeline — Trains 17-keypoint model from 10 sensor signals with no camera required.
Fixed
- #348 person counting — MinCut correctly counts 1-4 people (24/24 validation windows).
[v0.5.4-esp32] — 2026-04-02
Added
- ADR-069: ESP32 CSI → Cognitum Seed RVF ingest pipeline — Live-validated pipeline connecting ESP32-S3 CSI sensing to Cognitum Seed (Pi Zero 2 W) edge intelligence appliance. 339 vectors ingested, 100% kNN validation, SHA-256 witness chain verified.
- Feature vector packet (magic 0xC5110003) — New 48-byte packet with 8 normalized dimensions (presence, motion, breathing, heart rate, phase variance, person count, fall, RSSI) sent at 1 Hz alongside vitals.
scripts/seed_csi_bridge.py— Python bridge: UDP listener → HTTPS ingest with bearer token auth,--validate(kNN + PIR ground truth),--stats,--compactmodes, hash-based vector IDs, NaN/inf rejection, source IP filtering, retry logic.- Arena Physica research — 26 research documents in
docs/research/covering Maxwell's equations in WiFi sensing, Arena Physica Studio analysis, SOTA WiFi sensing 2025-2026, GOAP implementation plan for ESP32 + Pi Zero. - Cognitum Seed MCP integration — 114-tool MCP proxy enables AI assistants to query sensing state, vectors, witness chain, and device status directly.
Fixed
- Compressed frame magic collision — Reassigned compressed frame magic from
0xC5110003to0xC5110005to free0xC5110003for feature vectors. - Uninitialized
s_top_k[0]read — Guarded variance computation againsts_top_k_count == 0insend_feature_vector(). - Presence score normalization — Bridge now divides by 15.0 instead of clamping, preserving dynamic range for raw values 1.41-14.92.
- Stale magic references — Updated ADR-039, DDD model to reflect
0xC5110005for compressed frames.
Security
- Credential exposure remediation — Removed hardcoded WiFi passwords and bearer tokens from source files. Added NVS binary/CSV patterns to
.gitignore. Environment variable fallback for bearer token. - NaN/Inf injection prevention — Bridge validates all feature dimensions are finite before Seed ingest.
- UDP source filtering —
--allowed-sourcesargument restricts packet acceptance to known ESP32 IPs.
Changed
- Wire format table now includes 6 magic numbers:
0xC5110001(raw),0xC5110002(vitals),0xC5110003(features),0xC5110004(WASM events),0xC5110005(compressed),0xC5110006(fused vitals).
[v0.5.3-esp32] — 2026-03-30
Added
- Cross-node RSSI-weighted feature fusion — Multiple ESP32 nodes fuse CSI features using RSSI-based weighting. Closer node gets higher weight. Reduces variance noise by 29%, keypoint jitter by 72%.
- DynamicMinCut person separation — Uses
ruvector_mincut::DynamicMinCuton the subcarrier temporal correlation graph to detect independent motion clusters. Replaces variance-based heuristic for multi-person counting. - RSSI-based position tracking — Skeleton position driven by RSSI differential between nodes. Walk between ESP32s and the skeleton follows you.
- Per-node state pipeline (ADR-068) — Each ESP32 node gets independent
HashMap<u8, NodeState>with frame history, classification, vitals, and person count. Fixes #249 (the #1 user-reported issue). - RuVector Phase 1-3 integration — Subcarrier importance weighting, temporal keypoint smoothing (EMA), coherence gating, skeleton kinematic constraints (Jakobsen relaxation), compressed pose history.
- Client-side lerp smoothing — UI keypoints interpolate between frames (alpha=0.15) for fluid skeleton movement.
- Multi-node mesh tests — 8 integration tests covering 1-255 node configurations.
wifi_denseposePython package —from wifi_densepose import WiFiDensePosenow works (#314).
Fixed
- Watchdog crash on busy LANs (#321) — Batch-limited edge_dsp to 4 frames before 20ms yield. Fixed idle-path busy-spin (
pdMS_TO_TICKS(5)==0). - No detection from edge vitals (#323) — Server now generates
sensing_updatefrom Tier 2+ vitals packets. - RSSI byte offset mismatch (#332) — Server parsed RSSI from wrong byte (was reading sequence counter).
- Stack overflow risk — Moved 4KB of BPM scratch buffers from stack to static storage.
- Stale node memory leak —
node_statesHashMap evicts nodes inactive >60s. - Unsafe raw pointer removed — Replaced with safe
.clone()for adaptive model borrow. - Firmware CI — Upgraded to IDF v5.4, replaced
xxdwithod(#327). - Person count double-counting — Multi-node aggregation changed from
sumtomax. - Skeleton jitter — Removed tick-based noise, dampened procedural animation, recalibrated feature scaling for real ESP32 data.
Changed
- Motion-responsive skeleton: arm swing (0-80px) driven by CSI variance, leg kick (0-50px) by motion_band_power, vertical bob when walking.
- Person count thresholds recalibrated for real ESP32 hardware (1→2 at 0.70, EMA alpha 0.04).
- Vital sign filtering: larger median window (31), faster EMA (0.05), looser HR jump filter (15 BPM).
- Vendored ruvector updated to v2.1.0-40 (316 commits ahead).
Benchmarks (2-node mesh, COM6 + COM9, 30s)
| Metric | Baseline | v0.5.3 | Improvement |
|---|---|---|---|
| Variance noise | 109.4 | 77.6 | -29% |
| Feature stability | std=154.1 | std=105.4 | -32% |
| Keypoint jitter | std=4.5px | std=1.3px | -72% |
| Confidence | 0.643 | 0.686 | +7% |
| Presence accuracy | 93.4% | 94.6% | +1.3pp |
Verified
- Real hardware: COM6 (node 1) + COM9 (node 2) on ruv.net WiFi
- All 284 Rust tests pass, 352 signal crate tests pass
- Firmware builds clean at 843 KB
- QEMU CI: 11/11 jobs green
[v0.5.2-esp32] — 2026-03-28
Fixed
- RSSI byte offset in frame parser (#332)
- Per-node state pipeline for multi-node sensing (#249)
- Firmware CI upgraded to IDF v5.4 (#327)
[v0.5.1-esp32] — 2026-03-27
Fixed
- Watchdog crash on busy LANs (#321)
- No detection from edge vitals (#323)
wifi_denseposePython package import (#314)- Pre-compiled firmware binaries added to release
[v0.5.0-esp32] — 2026-03-15
Added
- 60 GHz mmWave sensor fusion (ADR-063) — Auto-detects Seeed MR60BHA2 (60 GHz, HR/BR/presence) and HLK-LD2410 (24 GHz, presence/distance) on UART at boot. Probes 115200 then 256000 baud, registers device capabilities, starts background parser.
- 48-byte fused vitals packet (magic
0xC5110004) — Kalman-style fusion: mmWave 80% + CSI 20% when both available. Automatic fallback to standard 32-byte CSI-only packet. - Server-side fusion bridge (
scripts/mmwave_fusion_bridge.py) — Reads two serial ports simultaneously for dual-sensor setups where mmWave runs on a separate ESP32. - Multimodal ambient intelligence roadmap (ADR-064) — 25+ applications from fall detection to sleep monitoring to RF tomography.
Verified
- Real hardware: ESP32-S3 (COM7) WiFi CSI + ESP32-C6/MR60BHA2 (COM4) 60 GHz mmWave running concurrently. HR=75 bpm, BR=25/min at 52 cm range. All 11 QEMU CI jobs green.
[v0.4.3-esp32] — 2026-03-15
Fixed
- Fall detection false positives (#263) — Default threshold raised from 2.0 to 15.0 rad/s²; normal walking (2-5 rad/s²) no longer triggers alerts. Added 3-consecutive-frame debounce and 5-second cooldown between alerts. Verified on real ESP32-S3 hardware: 0 false alerts in 60s / 1,300+ live WiFi CSI frames.
- Kconfig default mismatch —
CONFIG_EDGE_FALL_THRESHKconfig default was still 2000 (=2.0) whilenvs_config.cfallback was updated to 15.0. Fixed Kconfig to 15000. Caught by real hardware testing — mock data did not reproduce. - provision.py NVS generator API change —
esp_idf_nvs_partition_genpackage changed itsgenerate()signature; switched to subprocess-first invocation for cross-version compatibility. - QEMU CI pipeline (11 jobs) — Fixed all failures: fuzz test
esp_timerstubs, QEMUlibgcryptdependency, NVS matrix generator, IDF containerpippath, flash image padding, validation WARN handling, swarmip/cargomissing.
Added
- 4MB flash support (#265) —
partitions_4mb.csvandsdkconfig.defaults.4mbfor ESP32-S3 boards with 4MB flash (e.g. SuperMini). Dual OTA slots, 1.856 MB each. Thanks to @sebbu for the community workaround that confirmed feasibility. --strictflag forvalidate_qemu_output.py— WARNs now pass by default in CI (no real WiFi in QEMU); use--strictto fail on warnings.
Unreleased
Added
- QEMU ESP32-S3 testing platform (ADR-061) — 9-layer firmware testing without hardware
- Mock CSI generator with 10 physics-based scenarios (empty room, walking, fall, multi-person, etc.)
- Single-node QEMU runner with 16-check UART validation
- Multi-node TDM mesh simulation (TAP networking, 2-6 nodes)
- GDB remote debugging with VS Code integration
- Code coverage via gcov/lcov + apptrace
- Fuzz testing (3 libFuzzer targets + ASAN/UBSAN)
- NVS provisioning matrix (14 configs)
- Snapshot-based regression testing (sub-second VM restore)
- Chaos testing with fault injection + health monitoring
- QEMU Swarm Configurator (ADR-062) — YAML-driven multi-ESP32 test orchestration
- 4 topologies: star, mesh, line, ring
- 3 node roles: sensor, coordinator, gateway
- 9 swarm-level assertions (boot, crashes, TDM, frame rate, fall detection, etc.)
- 7 presets: smoke (2n/15s), standard (3n/60s), ci-matrix, large-mesh, line-relay, ring-fault, heterogeneous
- Health oracle with cross-node validation
- QEMU installer (
install-qemu.sh) — auto-detects OS, installs deps, builds Espressif QEMU fork - Unified QEMU CLI (
qemu-cli.sh) — single entry point for all 11 QEMU test commands - CI:
firmware-qemu.ymlworkflow with QEMU test matrix, fuzz testing, NVS validation, and swarm test jobs - User guide: QEMU testing and swarm configurator section with plain-language walkthrough
Fixed
-
Firmware now boots in QEMU: WiFi/UDP/OTA/display guards for mock CSI mode
-
9 bugs in mock_csi.c (LFSR bias, MAC filter init, scenario loop, overflow burst timing)
-
23 bugs from ADR-061 deep review (inject_fault.py writes, CI cache, snapshot log corruption, etc.)
-
16 bugs from ADR-062 deep review (log filename mismatch, SLIRP port collision, heap false positives, etc.)
-
All scripts:
--helpflags, prerequisite checks with install hints, standardized exit codes -
Sensing server UI API completion (ADR-043) — 14 fully-functional REST endpoints for model management, CSI recording, and training control
- Model CRUD:
GET /api/v1/models,GET /api/v1/models/active,POST /api/v1/models/load,POST /api/v1/models/unload,DELETE /api/v1/models/:id,GET /api/v1/models/lora/profiles,POST /api/v1/models/lora/activate - CSI recording:
GET /api/v1/recording/list,POST /api/v1/recording/start,POST /api/v1/recording/stop,DELETE /api/v1/recording/:id - Training control:
GET /api/v1/train/status,POST /api/v1/train/start,POST /api/v1/train/stop - Recording writes CSI frames to
.jsonlfiles via tokio background task - Model/recording directories scanned at startup, state managed via
Arc<RwLock<AppStateInner>>
- Model CRUD:
-
ADR-044: Provisioning tool enhancements — 5-phase plan for complete NVS coverage (7 missing keys), JSON config files, mesh presets, read-back/verify, and auto-detect
-
25 real mobile tests replacing
it.todo()placeholders — 205 assertions covering components, services, stores, hooks, screens, and utils -
Project MERIDIAN (ADR-027) — Cross-environment domain generalization for WiFi pose estimation (1,858 lines, 72 tests)
HardwareNormalizer— Catmull-Rom cubic interpolation resamples any hardware CSI to canonical 56 subcarriers; z-score + phase sanitizationDomainFactorizer+GradientReversalLayer— adversarial disentanglement of pose-relevant vs environment-specific featuresGeometryEncoder+FilmLayer— Fourier positional encoding + DeepSets + FiLM for zero-shot deployment given AP positionsVirtualDomainAugmentor— synthetic environment diversity (room scale, wall material, scatterers, noise) for 4x training augmentationRapidAdaptation— 10-second unsupervised calibration via contrastive test-time training + LoRA adaptersCrossDomainEvaluator— 6-metric evaluation protocol (MPJPE in-domain/cross-domain/few-shot/cross-hardware, domain gap ratio, adaptation speedup)
-
ADR-027: Cross-Environment Domain Generalization — 10 SOTA citations (PerceptAlign, X-Fi ICLR 2025, AM-FM, DGSense, CVPR 2024)
-
Cross-platform RSSI adapters — macOS CoreWLAN (
MacosCoreWlanScanner) and Linuxiw(LinuxIwScanner) Rust adapters with#[cfg(target_os)]gating -
macOS CoreWLAN Python sensing adapter with Swift helper (
mac_wifi.swift) -
macOS synthetic BSSID generation (FNV-1a hash) for Sonoma 14.4+ BSSID redaction
-
Linux
iw dev <iface> scanparser with freq-to-channel conversion andscan dump(no-root) mode -
ADR-025: macOS CoreWLAN WiFi Sensing (ORCA)
Fixed
- sendto ENOMEM crash (Issue #127) — CSI callbacks in promiscuous mode exhaust lwIP pbuf pool causing guru meditation crash. Fixed with 50 Hz rate limiter in
csi_collector.cand 100 ms ENOMEM backoff instream_sender.c. Hardware-verified on ESP32-S3 (200+ callbacks, zero crashes) - Provisioning script missing TDM/edge flags (Issue #130) — Added
--tdm-slot,--tdm-total,--edge-tier,--pres-thresh,--fall-thresh,--vital-win,--vital-int,--subk-counttoprovision.py - WebSocket "RECONNECTING" on Dashboard/Live Demo —
sensingService.start()now called on app init inapp.jsso WebSocket connects immediately instead of waiting for Sensing tab visit - Mobile WebSocket port —
ws.service.tsbuildWsUrl()uses same-origin port instead of hardcoded port 3001 - Mobile Jest config —
testPathIgnorePatternsno longer silently ignores the entire test directory - Removed synthetic byte counters from Python
MacosWifiCollector— now reportstx_bytes=0, rx_bytes=0instead of fake incrementing values
3.0.0 - 2026-03-01
Major release: AETHER contrastive embedding model, Docker Hub images, and comprehensive UI overhaul.
Added — AETHER Contrastive Embedding Model (ADR-024)
- Project AETHER — self-supervised contrastive learning for WiFi CSI fingerprinting, similarity search, and anomaly detection (
9bbe956) embedding.rsmodule:ProjectionHead,InfoNceLoss,CsiAugmenter,FingerprintIndex,PoseEncoder,EmbeddingExtractor(909 lines, zero external ML dependencies)- SimCLR-style pretraining with 5 physically-motivated augmentations (temporal jitter, subcarrier masking, Gaussian noise, phase rotation, amplitude scaling)
- CLI flags:
--pretrain,--pretrain-epochs,--embed,--build-index <type> - Four HNSW-compatible fingerprint index types:
env_fingerprint,activity_pattern,temporal_baseline,person_track - Cross-modal
PoseEncoderfor WiFi-to-camera embedding alignment - VICReg regularization for embedding collapse prevention
- 53K total parameters (55 KB at INT8) — fits on ESP32
Added — Docker & Deployment
- Published Docker Hub images:
ruvnet/wifi-densepose:latest(132 MB Rust) andruvnet/wifi-densepose:python(569 MB) (add9f19) - Multi-stage Dockerfile for Rust sensing server with RuVector crates
docker-compose.ymlorchestrating both Rust and Python services- RVF model export via
--export-rvfand load via--load-rvfCLI flags
Added — Documentation
- 33 use cases across 4 vertical tiers: Everyday, Specialized, Robotics & Industrial, Extreme (
0afd9c5) - "Why WiFi Wins" comparison table (WiFi vs camera vs LIDAR vs wearable vs PIR)
- Mermaid architecture diagrams: end-to-end pipeline, signal processing detail, deployment topology (
50f0fc9) - Models & Training section with RuVector crate links (GitHub + crates.io), SONA component table (
965a1cc) - RVF container section with deployment targets table (ESP32 0.7 MB to server 50+ MB)
- Collapsible README sections for improved navigation (
478d964,99ec980,0ebd6be) - Installation and Quick Start moved above Table of Contents (
50acbf7) - CSI hardware requirement notice (
528b394)
Fixed
- UI auto-detects server port from page origin — no more hardcoded
localhost:8080; works on any port (Docker :3000, native :8080, custom) (3b72f35, closes #55) - Docker port mismatch — server now binds 3000/3001 inside container as documented (
44b9c30) - Added
/ws/sensingWebSocket route to the HTTP server so UI only needs one port - Fixed README API endpoint references:
/api/v1/health→/health,/api/v1/sensing→/api/v1/sensing/latest - Multi-person tracking limit corrected: configurable default 10, no hard software cap (
e2ce250)
2.0.0 - 2026-02-28
Major release: complete Rust sensing server, full DensePose training pipeline, RuVector v2.0.4 integration, ESP32-S3 firmware, and 6 security hardening patches.
Added — Rust Sensing Server
- Full DensePose-compatible REST API served by Axum (
d956c30)GET /health— server healthGET /api/v1/sensing/latest— live CSI sensing dataGET /api/v1/vital-signs— breathing rate (6-30 BPM) and heartbeat (40-120 BPM)GET /api/v1/pose/current— 17 COCO keypoints derived from WiFi signal fieldGET /api/v1/info— server build and feature infoGET /api/v1/model/info— RVF model container metadataws://host/ws/sensing— real-time WebSocket stream
- Three data sources:
--source esp32(UDP CSI),--source windows(netsh RSSI),--source simulated(deterministic reference) - Auto-detection: server probes ESP32 UDP and Windows WiFi, falls back to simulated
- Three.js visualization UI with 3D body skeleton, signal heatmap, phase plot, Doppler bars, vital signs panel
- Static UI serving via
--ui-pathflag - Throughput: 9,520–11,665 frames/sec (release build)
Added — ADR-021: Vital Sign Detection
VitalSignDetectorwith breathing (6-30 BPM) and heartbeat (40-120 BPM) extraction from CSI fluctuations (1192de9)- FFT-based spectral analysis with configurable band-pass filters
- Confidence scoring based on spectral peak prominence
- REST endpoint
/api/v1/vital-signswith real-time JSON output
Added — ADR-023: DensePose Training Pipeline (Phases 1-8)
wifi-densepose-traincrate with complete 8-phase pipeline (fc409df,ec98e40,fce1271)- Phase 1:
DataPipelinewith MM-Fi and Wi-Pose dataset loaders - Phase 2:
CsiToPoseTransformer— 4-head cross-attention + 2-layer GCN on COCO skeleton - Phase 3: 6-term composite loss (MSE, bone length, symmetry, joint angle, temporal, confidence)
- Phase 4:
DynamicPersonMatchervia ruvector-mincut (O(n^1.5 log n) Hungarian assignment) - Phase 5:
SonaAdapter— MicroLoRA rank-4 with EWC++ memory preservation - Phase 6:
SparseInference— progressive 3-layer model loading (A: essential, B: refinement, C: full) - Phase 7:
RvfContainer— single-file model packaging with segment-based binary format - Phase 8: End-to-end training with cosine-annealing LR, early stopping, checkpoint saving
- Phase 1:
- CLI:
--train,--dataset,--epochs,--save-rvf,--load-rvf,--export-rvf - Benchmark: ~11,665 fps inference, 229 tests passing
Added — ADR-016: RuVector Training Integration (all 5 crates)
ruvector-mincut→DynamicPersonMatcherinmetrics.rs+ subcarrier selection (81ad09d,a7dd31c)ruvector-attn-mincut→ antenna attention inmodel.rs+ noise-gated spectrogramruvector-temporal-tensor→CompressedCsiBufferindataset.rs+ compressed breathing/heartbeatruvector-solver→ sparse subcarrier interpolation (114→56) + Fresnel triangulationruvector-attention→ spatial attention inmodel.rs+ attention-weighted BVP- Vendored all 11 RuVector crates under
vendor/ruvector/(d803bfe)
Added — ADR-017: RuVector Signal & MAT Integration (7 integration points)
gate_spectrogram()— attention-gated noise suppression (18170d7)attention_weighted_bvp()— sensitivity-weighted velocity profilesmincut_subcarrier_partition()— dynamic sensitive/insensitive subcarrier splitsolve_fresnel_geometry()— TX-body-RX distance estimationCompressedBreathingBuffer+CompressedHeartbeatSpectrogramBreathingDetector+HeartbeatDetector(MAT crate, real FFT + micro-Doppler)- Feature-gated behind
cfg(feature = "ruvector")(ab2453e)
Added — ADR-018: ESP32-S3 Firmware & Live CSI Pipeline
- ESP32-S3 firmware with FreeRTOS CSI extraction (
92a5182) - ADR-018 binary frame format:
[0xAD, 0x18, len_hi, len_lo, payload] - Rust
Esp32Aggregatorreceiving UDP frames on port 5005 bridge.rsconverting I/Q pairs to amplitude/phase vectors- NVS provisioning for WiFi credentials
- Pre-built binary quick start documentation (
696a726)
Added — ADR-014: SOTA Signal Processing
- 6 algorithms, 83 tests (
fcb93cc)- Hampel filter (median + MAD, resistant to 50% contamination)
- Conjugate multiplication (reference-antenna ratio, cancels common-mode noise)
- Phase sanitization (unwrap + linear detrend, removes CFO/SFO)
- Fresnel zone geometry (TX-body-RX distance from first-principles physics)
- Body Velocity Profile (micro-Doppler extraction, 5.7x speedup)
- Attention-gated spectrogram (learned noise suppression)
Added — ADR-015: Public Dataset Training Strategy
- MM-Fi and Wi-Pose dataset specifications with download links (
4babb32,5dc2f66) - Verified dataset dimensions, sampling rates, and annotation formats
- Cross-dataset evaluation protocol
Added — WiFi-Mat Disaster Detection Module
- Multi-AP triangulation for through-wall survivor detection (
a17b630,6b20ff0) - Triage classification (breathing, heartbeat, motion)
- Domain events:
survivor_detected,survivor_updated,alert_created - WebSocket broadcast at
/ws/mat/stream
Added — Infrastructure
- Guided 7-step interactive installer with 8 hardware profiles (
8583f3e) - Comprehensive build guide for Linux, macOS, Windows, Docker, ESP32 (
45f8a0d) - 12 Architecture Decision Records (ADR-001 through ADR-012) (
337dd96)
Added — UI & Visualization
- Sensing-only UI mode with Gaussian splat visualization (
b7e0f07) - Three.js 3D body model (17 joints, 16 limbs) with signal-viz components
- Tabs: Dashboard, Hardware, Live Demo, Sensing, Architecture, Performance, Applications
- WebSocket client with automatic reconnection and exponential backoff
Added — Rust Signal Processing Crate
- Complete Rust port of WiFi-DensePose with modular workspace (
6ed69a3)wifi-densepose-signal— CSI processing, phase sanitization, feature extractionwifi-densepose-core— shared types and configurationwifi-densepose-nn— neural network inference (DensePose head, RCNN)wifi-densepose-hardware— ESP32 aggregator, hardware interfaceswifi-densepose-config— configuration management
- Comprehensive benchmarks and validation tests (
3ccb301)
Added — Python Sensing Pipeline
WindowsWifiCollector— RSSI collection vianetsh wlan show networksRssiFeatureExtractor— variance, spectral bands (motion 0.5-4 Hz, breathing 0.1-0.5 Hz), change pointsPresenceClassifier— rule-based 3-state classification (ABSENT / PRESENT_STILL / ACTIVE)- Cross-receiver agreement scoring for multi-AP confidence boosting
- WebSocket sensing server (
ws_server.py) broadcasting JSON at 2 Hz - Deterministic CSI proof bundles for reproducible verification (
archive/v1/data/proof/) - Commodity sensing unit tests (
b391638)
Changed
- Rust hardware adapters now return explicit errors instead of silent empty data (
6e0e539)
Fixed
- Review fixes for end-to-end training pipeline (
45f0304) - Dockerfile paths updated from
src/toarchive/v1/src/(7872987) - IoT profile installer instructions updated for aggregator CLI (
f460097) process.envreference removed from browser ES module (e320bc9)
Performance
- 5.7x Doppler extraction speedup via optimized FFT windowing (
32c75c8) - Single 2.1 MB static binary, zero Python dependencies for Rust server
Security
- Fix SQL injection in status command and migrations (
f9d125d) - Fix XSS vulnerabilities in UI components (
5db55fd) - Fix command injection in statusline.cjs (
4cb01fd) - Fix path traversal vulnerabilities (
896c4fc) - Fix insecure WebSocket connections — enforce wss:// on non-localhost (
ac094d4) - Fix GitHub Actions shell injection (
ab2e7b4) - Fix 10 additional vulnerabilities, remove 12 dead code instances (
7afdad0)
1.1.0 - 2025-06-07
Added
- Complete Python WiFi-DensePose system with CSI data extraction and router interface
- CSI processing and phase sanitization modules
- Batch processing for CSI data in
CSIProcessorandPhaseSanitizer - Hardware, pose, and stream services for WiFi-DensePose API
- Comprehensive CSS styles for UI components and dark mode support
- API and Deployment documentation
Fixed
- Badge links for PyPI and Docker in README
- Async engine creation poolclass specification
1.0.0 - 2024-12-01
Added
- Initial release of WiFi-DensePose
- Real-time WiFi-based human pose estimation using Channel State Information (CSI)
- DensePose neural network integration for body surface mapping
- RESTful API with comprehensive endpoint coverage
- WebSocket streaming for real-time pose data
- Multi-person tracking with configurable capacity (default 10, up to 50+)
- Fall detection and activity recognition
- Domain configurations: healthcare, fitness, smart home, security
- CLI interface for server management and configuration
- Hardware abstraction layer for multiple WiFi chipsets
- Phase sanitization and signal processing pipeline
- Authentication and rate limiting
- Background task management
- Cross-platform support (Linux, macOS, Windows)
Documentation
- User guide and API reference
- Deployment and troubleshooting guides
- Hardware setup and calibration instructions
- Performance benchmarks
- Contributing guidelines