From 7d15e9fb4a1cd9811ff05c4e86a4ceb2c1ccb808 Mon Sep 17 00:00:00 2001 From: ruv Date: Wed, 16 Sep 2026 11:53:26 -0400 Subject: [PATCH] fix(calibration): register calibrated-presence-evidence schema via field_bridge The new schema constant was defined and asserted as a raw string literal directly in main.rs, which the semconv registry test scans and requires every "ruview.*" literal there to be a registered attribute/event. This isn't a tracing event, though -- it's a wire-schema tag structurally identical to CALIBRATION_MODEL_RECEIPT_SCHEMA, which already lives in field_bridge.rs specifically to stay out of that scan. Move the new constant there and reference it by identifier from main.rs, matching the existing precedent instead of hand-editing the generated semconv registry. Co-Authored-By: claude-flow --- .../wifi-densepose-sensing-server/src/field_bridge.rs | 5 +++++ v2/crates/wifi-densepose-sensing-server/src/main.rs | 7 ++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/v2/crates/wifi-densepose-sensing-server/src/field_bridge.rs b/v2/crates/wifi-densepose-sensing-server/src/field_bridge.rs index 98a1d40d3..889a7c229 100644 --- a/v2/crates/wifi-densepose-sensing-server/src/field_bridge.rs +++ b/v2/crates/wifi-densepose-sensing-server/src/field_bridge.rs @@ -19,6 +19,11 @@ use super::score_to_person_count; pub const CALIBRATION_MODEL_RECEIPT_SCHEMA: &str = "ruview.calibration.field-model-receipt.v1"; +/// Versioned schema for per-frame calibrated occupancy evidence bound to a +/// model receipt, published on the sensing stream. +pub const CALIBRATED_PRESENCE_EVIDENCE_SCHEMA: &str = + "ruview.calibration.calibrated-presence-evidence.v2"; + /// Length-only canonicalizer for calibration frames (issue #1170 pattern, /// shared with `multistatic_bridge`). Raw ESP32 amplitudes arrive at the /// hardware's native width (HT20 ≈ 64, HT40 ≈ 128/192); the FieldModel is diff --git a/v2/crates/wifi-densepose-sensing-server/src/main.rs b/v2/crates/wifi-densepose-sensing-server/src/main.rs index f318ca525..5279be312 100644 --- a/v2/crates/wifi-densepose-sensing-server/src/main.rs +++ b/v2/crates/wifi-densepose-sensing-server/src/main.rs @@ -419,9 +419,6 @@ struct CalibratedPresenceEvidence { person_count: usize, } -const CALIBRATED_PRESENCE_EVIDENCE_SCHEMA: &str = - "ruview.calibration.calibrated-presence-evidence.v2"; - /// Sensing update broadcast to WebSocket clients #[derive(Debug, Clone, Serialize, Deserialize)] struct SensingUpdate { @@ -2360,7 +2357,7 @@ impl AppStateInner { observed_at_unix_ms.saturating_mul(1_000), )?; Some(CalibratedPresenceEvidence { - schema: CALIBRATED_PRESENCE_EVIDENCE_SCHEMA.to_string(), + schema: field_bridge::CALIBRATED_PRESENCE_EVIDENCE_SCHEMA.to_string(), boot_epoch: receipt.boot_epoch.clone(), session_id: receipt.session_id.clone(), model_id: receipt.model_id.clone(), @@ -2722,7 +2719,7 @@ mod calibration_expiry_tests { assert_eq!( evidence.schema, - "ruview.calibration.calibrated-presence-evidence.v2" + field_bridge::CALIBRATED_PRESENCE_EVIDENCE_SCHEMA ); assert_eq!(evidence.boot_epoch, state.calibration_boot_epoch); assert_eq!(evidence.session_id, "cal-session-test");