mirror of
https://github.com/ruvnet/RuView.git
synced 2026-10-22 06:32:35 -05:00
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 <ruv@ruv.net>
This commit is contained in:
1 parent
69106970dd
commit
7d15e9fb4a
2 files changed
+7
-5
No files matched your search
@@ -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
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in new issue
Block a user