chore(v2): zero-warnings hygiene — clear 13 build warnings across 4 crates
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 <ruv@ruv.net>
This commit is contained in:
parent
1a17cc5b06
commit
0d6c20c278
|
|
@ -355,7 +355,7 @@ pub async fn list_serial_ports() -> Result<Vec<SerialPortInfo>, String> {
|
||||||
fn list_serial_ports_fallback() -> Result<Vec<SerialPortInfo>, String> {
|
fn list_serial_ports_fallback() -> Result<Vec<SerialPortInfo>, String> {
|
||||||
tracing::info!("Using fallback serial port listing");
|
tracing::info!("Using fallback serial port listing");
|
||||||
|
|
||||||
let mut result = Vec::new();
|
let result = Vec::new();
|
||||||
|
|
||||||
// List /dev/cu.usb* devices on macOS
|
// List /dev/cu.usb* devices on macOS
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
|
|
|
||||||
|
|
@ -188,6 +188,8 @@ Thread.sleep(forTimeInterval: 3)"#,
|
||||||
bail!("macOS camera capture requires GUI session with camera permission")
|
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<Frame> {
|
fn decode_jpeg_to_rgb(path: &PathBuf, _width: u32, _height: u32) -> Result<Frame> {
|
||||||
let data = std::fs::read(path)?;
|
let data = std::fs::read(path)?;
|
||||||
let _ = std::fs::remove_file(path);
|
let _ = std::fs::remove_file(path);
|
||||||
|
|
|
||||||
|
|
@ -261,9 +261,15 @@ pub enum ClockGateDecision {
|
||||||
/// Both terms pass: node admitted at full weight.
|
/// Both terms pass: node admitted at full weight.
|
||||||
Admit,
|
Admit,
|
||||||
/// Phase OK but clock degraded: evidence-only, NO environment/model update.
|
/// 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.
|
/// 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
|
/// Clock-quality gate: combines the phase [`CoherenceGate`] with clock
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,7 @@
|
||||||
use crate::mqtt::discovery::EntityKind;
|
use crate::mqtt::discovery::EntityKind;
|
||||||
|
|
||||||
use super::clusters::{
|
use super::clusters::{
|
||||||
matter_mapping, MatterClusterMapping, DEVICE_TYPE_AGGREGATOR,
|
matter_mapping, DEVICE_TYPE_AGGREGATOR,
|
||||||
DEVICE_TYPE_BRIDGED_NODE,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/// One endpoint on the Matter device tree.
|
/// One endpoint on the Matter device tree.
|
||||||
|
|
@ -107,7 +106,7 @@ pub fn build_bridge_tree(nodes: &[(String, String, Vec<EntityKind>)]) -> BridgeT
|
||||||
|
|
||||||
let ep_id = next_endpoint;
|
let ep_id = next_endpoint;
|
||||||
next_endpoint += 1;
|
next_endpoint += 1;
|
||||||
let mut ep = Endpoint {
|
let ep = Endpoint {
|
||||||
endpoint_id: ep_id,
|
endpoint_id: ep_id,
|
||||||
device_type: m.device_type,
|
device_type: m.device_type,
|
||||||
label: format!("{:?}", entity),
|
label: format!("{:?}", entity),
|
||||||
|
|
|
||||||
|
|
@ -145,6 +145,8 @@ pub fn matter_mapping(entity: EntityKind) -> Option<MatterClusterMapping> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// True iff the entity has a Matter exposure on a current spec cluster.
|
/// 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 {
|
pub fn entity_on_matter(entity: EntityKind) -> bool {
|
||||||
matter_mapping(entity).is_some()
|
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,
|
/// Compute the next available endpoint ID for a node-scoped entity,
|
||||||
/// given a starting offset (the bridge's first child endpoint). Used
|
/// given a starting offset (the bridge's first child endpoint). Used
|
||||||
/// by the publisher to assign per-primitive endpoints deterministically.
|
/// 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 {
|
pub fn next_endpoint(base: u16, primitive_index: u16) -> u16 {
|
||||||
base.saturating_add(primitive_index)
|
base.saturating_add(primitive_index)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
//! vector `(passcode=20202021, discriminator=3840)` encodes to the
|
//! vector `(passcode=20202021, discriminator=3840)` encodes to the
|
||||||
//! Matter-published `34970112332`.
|
//! 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`
|
/// Inputs to setup-code generation. `passcode` and `discriminator`
|
||||||
/// are usually random at first start and persisted in the
|
/// are usually random at first start and persisted in the
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue