wifi-densepose/v2/crates/wifi-densepose-wasm-edge/src
rUv cafbeb1e81
fix(wasm-edge): sanitize non-finite host floats at the WASM↔host frame boundary (#1102)
Closing beyond-SOTA security review of wifi-densepose-wasm-edge (ADR-040,
~70 edge modules). The two WASM↔host boundaries (lib.rs::on_frame/on_timer
and bin/ghost_hunter.rs::on_frame) read raw IEEE-754 f32 from the csi_get_*
imports with no finiteness check — the crate had zero is_finite/is_nan
guards and its clamp helpers propagate NaN. A single non-finite host value
latches NaN into long-lived per-module accumulators (EMA / Welford / phasor
sums / anomaly baselines), after which detectors fail degraded (stuck gate
state, silently-disabled checks) — silent corruption, not a crash.

Add sanitize_host_f32() (non-finite -> 0.0, core-only for no_std) applied at
every host_get_* float read: one chokepoint covering all downstream modules,
mirroring the existing M-01 negative-n_subcarriers boundary clamp. LOW /
defense-in-depth (the Tier-2 DSP firmware supplies the imports, a semi-trusted
boundary).

Pinned by boundary_tests::{sanitize_passes_finite_values_through,
sanitize_maps_non_finite_to_zero,
coherence_monitor_nan_latches_without_sanitize_but_not_with} — the last
asserts on the current CoherenceMonitor that a raw NaN frame latches the
smoothed score while the sanitized path stays finite.

Other review dimensions attested clean with evidence (see CHANGELOG): no
hot-path panics (all unwrap/expect are test-only or std-gated RVF builder),
all bounds min()-clamped, all index-by-cast const-bounded or guarded, no
leaking closures (no move||/forget/leak), no secrets.

Verified: host `cargo test --features std,medical-experimental` 672 passed /
0 failed (+3 new tests); all three wasm32-unknown-unknown release artifacts
build clean (lib default no_std/panic=abort, ghost_hunter standalone-bin,
medical-experimental); Python proof VERDICT PASS, hash unchanged.
2026-06-15 13:06:46 -04:00
..
bin fix(wasm-edge): sanitize non-finite host floats at the WASM↔host frame boundary (#1102) 2026-06-15 13:06:46 -04:00
adversarial.rs chore(repo): rename rust-port/wifi-densepose-rs → v2/ (flatten to one level) (#427) 2026-04-25 21:28:13 -04:00
ais_behavioral_profiler.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
ais_prompt_shield.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
aut_psycho_symbolic.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
aut_self_healing_mesh.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
bld_elevator_count.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
bld_energy_audit.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
bld_hvac_presence.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
bld_lighting_zones.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
bld_meeting_room.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
coherence.rs chore(repo): rename rust-port/wifi-densepose-rs → v2/ (flatten to one level) (#427) 2026-04-25 21:28:13 -04:00
exo_breathing_sync.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
exo_dream_stage.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
exo_emotion_detect.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
exo_gesture_language.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
exo_ghost_hunter.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
exo_happiness_score.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
exo_hyperbolic_space.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
exo_music_conductor.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
exo_plant_growth.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
exo_rain_detect.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
exo_time_crystal.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
gesture.rs chore(repo): rename rust-port/wifi-densepose-rs → v2/ (flatten to one level) (#427) 2026-04-25 21:28:13 -04:00
ind_clean_room.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
ind_confined_space.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
ind_forklift_proximity.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
ind_livestock_monitor.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
ind_structural_vibration.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
intrusion.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
lib.rs fix(wasm-edge): sanitize non-finite host floats at the WASM↔host frame boundary (#1102) 2026-06-15 13:06:46 -04:00
lrn_anomaly_attractor.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
lrn_dtw_gesture_learn.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
lrn_ewc_lifelong.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
lrn_meta_adapt.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
med_cardiac_arrhythmia.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
med_gait_analysis.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
med_respiratory_distress.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
med_seizure_detect.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
med_sleep_apnea.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
occupancy.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
pipeline_all.rs feat(wasm-edge): unified EdgePipeline wiring all ~64 edge skills (ADR-160) 2026-06-13 00:20:29 -04:00
qnt_interference_search.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
qnt_quantum_coherence.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
ret_customer_flow.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
ret_dwell_heatmap.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
ret_queue_length.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
ret_shelf_engagement.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
ret_table_turnover.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
rvf.rs chore(repo): rename rust-port/wifi-densepose-rs → v2/ (flatten to one level) (#427) 2026-04-25 21:28:13 -04:00
sec_loitering.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
sec_panic_motion.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
sec_perimeter_breach.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
sec_tailgating.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
sec_weapon_detect.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
sig_coherence_gate.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
sig_flash_attention.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
sig_mincut_person_match.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
sig_optimal_transport.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
sig_sparse_recovery.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
sig_temporal_compress.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
skill_registry.rs feat(wasm-edge): unified EdgePipeline wiring all ~64 edge skills (ADR-160) 2026-06-13 00:20:29 -04:00
spt_micro_hnsw.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
spt_pagerank_influence.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
spt_spiking_tracker.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
tmp_goap_autonomy.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
tmp_pattern_sequence.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
tmp_temporal_logic_guard.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00
vendor_common.rs chore(repo): rename rust-port/wifi-densepose-rs → v2/ (flatten to one level) (#427) 2026-04-25 21:28:13 -04:00
vital_trend.rs feat(wasm-edge): honest labeling + static-mut soundness for edge skills (ADR-160) 2026-06-12 00:01:04 -04:00