mirror of
https://github.com/ruvnet/RuView.git
synced 2026-08-31 04:25:54 +00:00
The layer that turns the certificate spine into a modality-agnostic perception substrate. Four crates, all deterministic and green independently (43 tests). ruview-hal (ADR-317): one abstraction mapping any modality (CSI/802.11bf/BLE/ UWB/mmWave/acoustic/camera/lidar/IMU/custom) to a canonical ontology Observation. SensorHal trait + two SYNTHETIC/L0 reference adapters; malformed input yields a degraded UNKNOWN observation, never a panic; synthetic can never alias measured. 8 tests. ruview-groundtruth (ADR-300): reference sensors as a formal VALIDATION plane (never an estimator input, enforced by the type boundary); modality-agnostic ReferenceSeries, deterministic cross-correlation alignment, AgreementReport with mandatory SessionScope, emitting per-context ruview-evidence records; Measured requires reference + coverage + reproducer. 15 tests. ruview-track (ADR-304): privacy-preserving persistent tracks (opaque person ids, coarse non-reversible features, no civil-identity binding); ambiguous detections stay tentative rather than misassigned; cross-zone hand-off. 8 tests. ruview-fusion (ADR-308): multiple HalObservations -> one probabilistic WorldState, uncertainty-aware (confidence-weighted, not naive averaging); irreconcilable conflict or insufficient coverage yields UNKNOWN, not a confident average. 9+ tests incl. irreconcilable_conflict_yields_unknown. Flips ADR-300/304/308/317 to implemented; registers the four crates as workspace members. SYNTHETIC/L0 throughout; no hardware/MEASURED claims. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_015TcKegTS7QqhWPC2L2SzaS
37 lines
1.4 KiB
Rust
37 lines
1.4 KiB
Rust
//! Boundary-validation errors (ADR-304).
|
|
//!
|
|
//! These cover *malformed input* only. Association **uncertainty** is never an
|
|
//! error: an ambiguous or unmatched detection is reported as a first-class
|
|
//! [`Association::Unknown`](crate::Association) outcome (ADR-297 rule 1), not a
|
|
//! `Result::Err`.
|
|
|
|
use ruview_ontology::IdError;
|
|
use thiserror::Error;
|
|
|
|
/// Reasons a detection or a manager operation is rejected at the boundary.
|
|
#[derive(Clone, Debug, PartialEq, Eq, Error)]
|
|
pub enum TrackError {
|
|
/// A position component was NaN or infinite.
|
|
#[error("position component is not finite")]
|
|
NonFinitePosition,
|
|
/// The coarse feature vector was empty.
|
|
#[error("coarse feature vector must not be empty")]
|
|
EmptyFeature,
|
|
/// The coarse feature vector exceeded [`MAX_FEATURE_DIM`](crate::MAX_FEATURE_DIM).
|
|
#[error("feature dimension {dim} exceeds maximum {max}")]
|
|
FeatureTooLarge {
|
|
/// Supplied dimension.
|
|
dim: usize,
|
|
/// Enforced maximum.
|
|
max: usize,
|
|
},
|
|
/// A minted pseudonym / track id failed ontology id validation. This is an
|
|
/// internal invariant (the manager mints `track_N`/`person_N`) and only
|
|
/// surfaces if the counter overflows the id-length bound.
|
|
#[error("invalid minted identifier: {0}")]
|
|
Id(#[from] IdError),
|
|
/// A referenced track id is not held by the manager.
|
|
#[error("unknown track id")]
|
|
UnknownTrack,
|
|
}
|