From 0d6c20c2782781a28b1e10ad3b875f0740cc2c1c Mon Sep 17 00:00:00 2001 From: ruv Date: Fri, 12 Jun 2026 08:44:42 -0400 Subject: [PATCH 1/2] =?UTF-8?q?chore(v2):=20zero-warnings=20hygiene=20?= =?UTF-8?q?=E2=80=94=20clear=2013=20build=20warnings=20across=204=20crates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed unused Matter imports (sensing-server bridge/commissioning), dropped needless mut (bridge, desktop discovery), documented ClockGateDecision variant fields (ruvector coherence), and marked deferred-P2/platform-only helpers #[allow(dead_code)] with honest notes (entity_on_matter/next_endpoint = Matter-publisher API deferred per ADR-159 §A5; decode_jpeg_to_rgb = macOS-only). Behavior-neutral; touched-crate tests green. Remaining 1 warning is a benign Windows .pdb filename collision inherent to the Tauri lib+bin desktop crate (renaming the bin would break Tauri bundling — won't-fix for a cosmetic warning). Co-Authored-By: claude-flow --- .../wifi-densepose-desktop/src/commands/discovery.rs | 2 +- v2/crates/wifi-densepose-pointcloud/src/camera.rs | 2 ++ .../wifi-densepose-ruvector/src/viewpoint/coherence.rs | 10 ++++++++-- .../wifi-densepose-sensing-server/src/matter/bridge.rs | 5 ++--- .../src/matter/clusters.rs | 4 ++++ .../src/matter/commissioning.rs | 2 +- 6 files changed, 18 insertions(+), 7 deletions(-) diff --git a/v2/crates/wifi-densepose-desktop/src/commands/discovery.rs b/v2/crates/wifi-densepose-desktop/src/commands/discovery.rs index 4608590e..892ac66b 100644 --- a/v2/crates/wifi-densepose-desktop/src/commands/discovery.rs +++ b/v2/crates/wifi-densepose-desktop/src/commands/discovery.rs @@ -355,7 +355,7 @@ pub async fn list_serial_ports() -> Result, String> { fn list_serial_ports_fallback() -> Result, String> { tracing::info!("Using fallback serial port listing"); - let mut result = Vec::new(); + let result = Vec::new(); // List /dev/cu.usb* devices on macOS #[cfg(target_os = "macos")] diff --git a/v2/crates/wifi-densepose-pointcloud/src/camera.rs b/v2/crates/wifi-densepose-pointcloud/src/camera.rs index 1ee83fac..ff150772 100644 --- a/v2/crates/wifi-densepose-pointcloud/src/camera.rs +++ b/v2/crates/wifi-densepose-pointcloud/src/camera.rs @@ -188,6 +188,8 @@ Thread.sleep(forTimeInterval: 3)"#, bail!("macOS camera capture requires GUI session with camera permission") } +// Used only by the macOS capture path above; dead on other targets. +#[allow(dead_code)] fn decode_jpeg_to_rgb(path: &PathBuf, _width: u32, _height: u32) -> Result { let data = std::fs::read(path)?; let _ = std::fs::remove_file(path); diff --git a/v2/crates/wifi-densepose-ruvector/src/viewpoint/coherence.rs b/v2/crates/wifi-densepose-ruvector/src/viewpoint/coherence.rs index 1c05bdbf..3543ed78 100644 --- a/v2/crates/wifi-densepose-ruvector/src/viewpoint/coherence.rs +++ b/v2/crates/wifi-densepose-ruvector/src/viewpoint/coherence.rs @@ -261,9 +261,15 @@ pub enum ClockGateDecision { /// Both terms pass: node admitted at full weight. Admit, /// Phase OK but clock degraded: evidence-only, NO environment/model update. - MonitorOnly { clock_quality: f32 }, + MonitorOnly { + /// Combined clock-quality score in [0, 1] (dispersion × age terms). + clock_quality: f32, + }, /// Either term fails hard: node excluded this cycle. - Reject { reason: ClockRejectReason }, + Reject { + /// Which hard term failed (phase, dispersion, or age). + reason: ClockRejectReason, + }, } /// Clock-quality gate: combines the phase [`CoherenceGate`] with clock diff --git a/v2/crates/wifi-densepose-sensing-server/src/matter/bridge.rs b/v2/crates/wifi-densepose-sensing-server/src/matter/bridge.rs index c6b86308..778b28f2 100644 --- a/v2/crates/wifi-densepose-sensing-server/src/matter/bridge.rs +++ b/v2/crates/wifi-densepose-sensing-server/src/matter/bridge.rs @@ -23,8 +23,7 @@ use crate::mqtt::discovery::EntityKind; use super::clusters::{ - matter_mapping, MatterClusterMapping, DEVICE_TYPE_AGGREGATOR, - DEVICE_TYPE_BRIDGED_NODE, + matter_mapping, DEVICE_TYPE_AGGREGATOR, }; /// One endpoint on the Matter device tree. @@ -107,7 +106,7 @@ pub fn build_bridge_tree(nodes: &[(String, String, Vec)]) -> BridgeT let ep_id = next_endpoint; next_endpoint += 1; - let mut ep = Endpoint { + let ep = Endpoint { endpoint_id: ep_id, device_type: m.device_type, label: format!("{:?}", entity), diff --git a/v2/crates/wifi-densepose-sensing-server/src/matter/clusters.rs b/v2/crates/wifi-densepose-sensing-server/src/matter/clusters.rs index f5153871..51331b45 100644 --- a/v2/crates/wifi-densepose-sensing-server/src/matter/clusters.rs +++ b/v2/crates/wifi-densepose-sensing-server/src/matter/clusters.rs @@ -145,6 +145,8 @@ pub fn matter_mapping(entity: EntityKind) -> Option { } /// True iff the entity has a Matter exposure on a current spec cluster. +// P2 Matter-publisher API surface; real Matter exposure is deferred (ADR-159 §A5). +#[allow(dead_code)] pub fn entity_on_matter(entity: EntityKind) -> bool { matter_mapping(entity).is_some() } @@ -152,6 +154,8 @@ pub fn entity_on_matter(entity: EntityKind) -> bool { /// Compute the next available endpoint ID for a node-scoped entity, /// given a starting offset (the bridge's first child endpoint). Used /// by the publisher to assign per-primitive endpoints deterministically. +// P2 Matter-publisher API surface; real Matter exposure is deferred (ADR-159 §A5). +#[allow(dead_code)] pub fn next_endpoint(base: u16, primitive_index: u16) -> u16 { base.saturating_add(primitive_index) } diff --git a/v2/crates/wifi-densepose-sensing-server/src/matter/commissioning.rs b/v2/crates/wifi-densepose-sensing-server/src/matter/commissioning.rs index 6f57b057..2886810a 100644 --- a/v2/crates/wifi-densepose-sensing-server/src/matter/commissioning.rs +++ b/v2/crates/wifi-densepose-sensing-server/src/matter/commissioning.rs @@ -40,7 +40,7 @@ //! vector `(passcode=20202021, discriminator=3840)` encodes to the //! Matter-published `34970112332`. -use super::super::matter::clusters::VENDOR_ATTR_PERSON_COUNT as _; // re-export-only guard + // re-export-only guard /// Inputs to setup-code generation. `passcode` and `discriminator` /// are usually random at first start and persisted in the From d4170ad159c0bbae0dfc9dca04c0533e52673dc9 Mon Sep 17 00:00:00 2001 From: ruv Date: Fri, 12 Jun 2026 08:56:26 -0400 Subject: [PATCH 2/2] fix: revert config-dependent cargo-fix changes (kept only always-safe edits) cargo fix ran under --no-default-features and removed an import/mut that are 'unused' ONLY in the minimal build but genuinely USED in CI's full build (error[E0596]: cannot borrow result as mutable in desktop discovery.rs). Those are false-positive warnings in the minimal config. Reverted bridge.rs/ commissioning.rs/discovery.rs to origin/main; kept the always-safe edits (dead-code #[allow] notes + ClockGateDecision doc fields + camera macOS-only allow). Full-features build of all four crates: Finished, 0 errors. Co-Authored-By: claude-flow --- v2/crates/wifi-densepose-desktop/src/commands/discovery.rs | 2 +- v2/crates/wifi-densepose-sensing-server/src/matter/bridge.rs | 5 +++-- .../src/matter/commissioning.rs | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/v2/crates/wifi-densepose-desktop/src/commands/discovery.rs b/v2/crates/wifi-densepose-desktop/src/commands/discovery.rs index 892ac66b..4608590e 100644 --- a/v2/crates/wifi-densepose-desktop/src/commands/discovery.rs +++ b/v2/crates/wifi-densepose-desktop/src/commands/discovery.rs @@ -355,7 +355,7 @@ pub async fn list_serial_ports() -> Result, String> { fn list_serial_ports_fallback() -> Result, String> { tracing::info!("Using fallback serial port listing"); - let result = Vec::new(); + let mut result = Vec::new(); // List /dev/cu.usb* devices on macOS #[cfg(target_os = "macos")] diff --git a/v2/crates/wifi-densepose-sensing-server/src/matter/bridge.rs b/v2/crates/wifi-densepose-sensing-server/src/matter/bridge.rs index 778b28f2..c6b86308 100644 --- a/v2/crates/wifi-densepose-sensing-server/src/matter/bridge.rs +++ b/v2/crates/wifi-densepose-sensing-server/src/matter/bridge.rs @@ -23,7 +23,8 @@ use crate::mqtt::discovery::EntityKind; use super::clusters::{ - matter_mapping, DEVICE_TYPE_AGGREGATOR, + matter_mapping, MatterClusterMapping, DEVICE_TYPE_AGGREGATOR, + DEVICE_TYPE_BRIDGED_NODE, }; /// One endpoint on the Matter device tree. @@ -106,7 +107,7 @@ pub fn build_bridge_tree(nodes: &[(String, String, Vec)]) -> BridgeT let ep_id = next_endpoint; next_endpoint += 1; - let ep = Endpoint { + let mut ep = Endpoint { endpoint_id: ep_id, device_type: m.device_type, label: format!("{:?}", entity), diff --git a/v2/crates/wifi-densepose-sensing-server/src/matter/commissioning.rs b/v2/crates/wifi-densepose-sensing-server/src/matter/commissioning.rs index 2886810a..6f57b057 100644 --- a/v2/crates/wifi-densepose-sensing-server/src/matter/commissioning.rs +++ b/v2/crates/wifi-densepose-sensing-server/src/matter/commissioning.rs @@ -40,7 +40,7 @@ //! vector `(passcode=20202021, discriminator=3840)` encodes to the //! Matter-published `34970112332`. - // re-export-only guard +use super::super::matter::clusters::VENDOR_ATTR_PERSON_COUNT as _; // re-export-only guard /// Inputs to setup-code generation. `passcode` and `discriminator` /// are usually random at first start and persisted in the