Skip to content

fix: multistatic canonicalization + csi_fps burst inflation + control-packet starvation (#1170, #1180, #1183) - #1193

Merged
ruvnet merged 1 commit into
mainfrom
fix/issues-1170-1180-1183
Jun 27, 2026
Merged

fix: multistatic canonicalization + csi_fps burst inflation + control-packet starvation (#1170, #1180, #1183)#1193
ruvnet merged 1 commit into
mainfrom
fix/issues-1170-1180-1183

Conversation

@ruvnet

@ruvnet ruvnet commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Fixes three issues anchored at 7831f294, all verified with tests.

#1170 — Multistatic fusion DimensionMismatch flood (High)

The live bridge built a struct named CanonicalCsiFrame from raw per-node amplitudes (HT20≈64 / HT40≈128/192 bins) without resampling, so MultistaticFuser::fuse tripped DimensionMismatch every cycle, silently fell back to per-node sum/dedup, and spun total_engine_errors unbounded on any mixed mesh.

  • hardware_norm.rs: add HardwareNormalizer::resample_to_canonical (resample-only, no z-score — preserves the amplitude scale the person-score relies on).
  • multistatic_bridge.rs: canonicalize every node onto the 56-tone grid before fusion.

#1180csi_fps_ema inflated 40–840× (Medium)

update_csi_fps_ema only rejected dt ≤ 0 / ≥ 1 s, so 36 µs UDP-burst deltas (~27 kHz) polluted the EMA.

  • main.rs: add MIN_PLAUSIBLE_CSI_DT_SEC = 0.005 floor; observe_csi_frame_arrival keeps its anchor across sub-floor bursts so the next real gap measures true cadence.

#1183stream_sender ENOMEM backoff starves control packets (High)

The global backoff (CSI flood at weak RSSI) suppressed the ≤48 B/≤1 Hz feature_state/HEALTH/sync packets too.

  • stream_sender.{c,h}: add stream_sender_send_priority() (bypasses the gate, quiet on ENOMEM, never touches the streak); route feature_state/HEALTH/anomaly/sync through it.
  • Fix the misleading "HEALTH sent" log (now sent/FAILED from the real return).

Verification

  • wifi-densepose-signal: 501 passed, 0 failed
  • wifi-densepose-sensing-server: 677 passed, 0 failed (4 new tests + retargeted engine_bridge::observe_cycle_counts_engine_errorsTimestampMismatch, since canonicalization removed the old dimension error)
  • ESP32 firmware: builds clean (ESP-IDF v5.4)

🤖 Generated with claude-flow

…acket starvation (#1170, #1180, #1183)

#1170 — live multistatic bridge fed raw, un-canonicalized per-node CSI
(64/128/192 bins) to MultistaticFuser, tripping DimensionMismatch every
cycle and silently disabling fusion on mixed HT20/HT40 meshes. Add
HardwareNormalizer::resample_to_canonical (resample-only, no z-score) and
canonicalize every node frame onto the 56-tone grid before fusion.

#1180 — update_csi_fps_ema only rejected dt<=0 or >=1s, so sub-ms UDP-burst
arrivals (36us -> ~27kHz) inflated csi_fps_ema 40-840x. Add a 5ms plausibility
floor and stop re-anchoring observe_csi_frame_arrival on burst deltas.

#1183 — global ENOMEM backoff (CSI flood) starved <=48B/<=1Hz control packets.
Add stream_sender_send_priority() bypassing the backoff gate without touching
the streak; route feature_state/HEALTH/sync through it. Fix the misleading
"HEALTH sent" log that printed even on rv_mesh_send failure.

Verified: signal 501, sensing-server 677 tests (0 failed); firmware builds clean.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01AgpTcBLRJ32hUsKWxDXf36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant