mirror of
https://github.com/ruvnet/RuView
synced 2026-07-22 17:23:19 +00:00
edbe57378ada6416fb9bd2ca5f5e06e47c09b0ad
133 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
edbe57378a |
fix(signal/cir): un-ignore end-to-end CIR pipeline test — ADR-134 P2 fully resolved
The cir_pipeline end-to-end test was gated on the same dominant_tap_ratio floor; the windowed-ratio fix resolves it. All 6 ADR-134 P2 CIR tests (cir_synthetic 5 + cir_pipeline 1) now pass. signal+cir: 472 pass / 0 fail. Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
821f441af0 |
fix(signal/cir): causal-delay-window rms spread — resolves last ADR-134 P2 cir test
Found the principled fix for the rms-delay-spread inflation (superseding my prior 'needs ISTA work' note): the spurious ~15-20% tap at ~bin 150 is an ALIAS of the near-zero dominant tap — the ISTA delay grid is circular (Φ is DFT-like), so bins >= G/2 are non-causal negative delays. Computing the delay spread over only the causal half [0, G/2) drops rms from 389ns to 65ns (true value), cleanly and robustly (no fragile magnitude threshold). Un-ignores should_produce_positive_rms_delay_spread. ADR-134 P2 cir_synthetic now FULLY resolved: all 5 previously-ignored tests pass via two physics-justified fixes (windowed dominant-ratio for super- resolution leakage + causal-window rms for circular-grid aliasing). signal+cir: 471 pass / 0 fail / 0 ignored in cir_synthetic. Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
bce5765d89 |
docs(signal/cir): precise diagnosis of remaining ADR-134 P2 rms-spread failure
Diagnosed the one still-ignored CIR test: ISTA emits a spurious ~15-20%-of- dominant tap at an implausible far delay (~bin 150 / ~3us) that inflates rms_delay_spread to ~390ns (vs ~53ns true). It sits too close to the real weakest tap (~30% of dominant) for a safe magnitude cutoff, so the proper fix is ISTA recovery-quality work (grid de-aliasing / far-tap suppression), not a band-aid threshold. Sharpened the #[ignore] note accordingly. signal+cir: 470 pass / 0 fail. Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
d55c4d4b65 |
fix(signal/cir): resolve ADR-134 P2 dominant-tap-ratio — un-ignore 4 CIR tests
The CIR estimator's dominant_tap_ratio measured a single grid bin, but on the
3x super-resolved ISTA grid a single physical tap leaks across ~3 adjacent
bins — so the ratio under-counted the dominant tap and sat far below the
per-tier floors (HT20 0.158<0.30, HT40 0.133<0.35, HE20 0.102<0.40), forcing
the 3-tap recovery + 40MHz-ToF tests to be #[ignore]d.
Fix (data-backed via a lambda sweep): (1) compute dominant_tap_ratio over a
+/-1-bin window around the peak — the physical tap's true footprint; (2) tune
L1 lambda for sparse multipath (HT20 .05->.08, HT40 .03->.08, HE20 .03->.18).
Result: ratios 0.367/0.406/0.474, comfortably above floors with all 3 taps
preserved. Un-ignores should_recover_3tap_channel_{ht20,ht40,he20} and
should_return_tof_at_40mhz. signal crate: 470 pass / 0 fail; change isolated
to CIR (no external consumers). The rms-delay-spread test stays ignored with a
re-scoped note (far-tap robustness is separate remaining work).
Co-Authored-By: claude-flow <ruv@ruv.net>
|
||
|
|
0fede72ec4 |
test(cog-pose): cross-language adapter integration (Python producer -> Rust engine)
Closes the last verification gap in the calibration feature: previously the Python producer and Rust consumer were proven compatible only by format matching. Now a real ~11KB adapter fitted by cog_calibrate.py on the in-repo pose_v1.safetensors is committed as a fixture, and a Rust test loads it via the engine and asserts is_calibrated() + that it changes inference output. The full Python->Rust calibration contract is verified with a real artifact. 7/7 cog-pose tests pass. Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
946acf2d10 |
docs(cog-pose): correct misleading adapter cross-reference
The --adapter docs claimed the adapter is produced by aether-arena/calibration/calibrate.py, but that reference tool targets the MM-Fi *transformer* model and emits .npz with proj/head LoRA keys, while this cog runs a *conv+MLP* model expecting safetensors with fc1.a/fc1.b/ fc2.a/fc2.b. Same LoRA mechanism, different model -> adapters are model-specific and NOT interchangeable. Clarify the expected key layout and that the Python tool is a mechanism reference, not a drop-in producer. 6/6 tests pass. Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
1b48b6f5c8 |
fix(bfld): make README quickstart test robust to CRLF line endings
readme_quickstart_uses_canonical_public_api checked a multi-line needle 'pipeline\n .process' against the include_str! README. On a CRLF checkout (Windows / core.autocrlf) the content is 'pipeline\r\n .process', so the LF needle never matched and the test failed deterministically (only surfaced once the worldmodel fix let cargo test --workspace run on Windows; the test is #[cfg(feature=std)]-gated, enabled via workspace feature unification). Normalize CRLF->LF before the check. Full workspace now green 3/3 runs on Windows. Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
c9539433b8 |
fix(worldmodel): compile on non-unix targets (Windows workspace build)
bridge.rs imported tokio::net::UnixStream unconditionally, so the whole workspace failed to build on Windows (E0432) — blocking cargo test --workspace and the pre-merge gate there. The OccWorld Unix-socket bridge is a Linux-appliance feature (Python inference server on the GPU host), so gate it #[cfg(unix)] and add a #[cfg(not(unix))] send_recv that fails fast with a clear 'unsupported on this target' Protocol error. Workspace now builds on Windows; worldmodel 12 tests pass. Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
83299b4d04 |
feat(cog-pose): --adapter CLI flag for per-room calibration
Completes the end-to-end product path: cog-pose-estimation run --config <cfg> --adapter <room.safetensors> loads the shared base + a per-room LoRA adapter for calibrated inference. Adds InferenceEngine::with_adapter() (default weights + adapter) and logs when a calibration adapter is active. 6/6 tests pass. Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
3760db6c9a |
feat(cog-pose): per-room LoRA calibration adapter in the Rust inference path
Ports the calibration mechanism (ADR-150 §3.5-3.6, reference impl in aether-arena/calibration/) into the real product pose engine. The Candle InferenceEngine now loads an optional per-room adapter safetensors and applies low-rank deltas (y + (x.A).B) on the fc1/fc2 head at inference. Architecture-agnostic LoRA; base behaviour unchanged when no adapter. New API: with_weights_and_adapter(), is_calibrated(). Tested: adapter detection + output-change integration test (6/6 pass). Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
483bfa4660 |
feat(aether-arena): benchmark-first scorer + witness chain + repeatability (M2/M5/M7)
Per direction "remove the initial number, optimize for benchmark first" + "include witness chain capabilities for proof and repeatability analysis": - Empty board, no seeded numbers: ledger seeds to genesis only. Every result is a real scoring-pipeline witness; RuView gets no hand-entered baseline. - Real model scoring: aa_score_runner now loads predictions + an eval split (--split/--pred) and scores them through the real ruview_metrics pose harness — not just a synthetic fixture. Committed public smoke split (fixtures/smoke_*.json). - Witness chain: each score emits a witness = inputs_sha256 (binds it to the exact inputs) + proof_sha256 (cross-platform-stable score hash) + harness_version. - Repeatability analysis: --repeat N runs the harness N× and fails if it ever yields >=2 distinct proof hashes (16/16 identical locally). - Witness ledger: ledger/ledger_tools.py — append-only, hash-chained, tamper- evident (seed/append/verify); editing any past row breaks the chain. - CI gate extended: determinism + repeatability(16) + real-scoring smoke + ledger chain verify on every PR. Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
a6808568a2 |
feat(aether-arena): ADR-149 spatial-intelligence benchmark — scorer + CI harness gate (M1-M4)
AetherArena ("AA") — the official, project-agnostic Spatial-Intelligence Benchmark
(ADR-149, Accepted). Iteration 1 of the long-horizon build:
- ADR-149 accepted: name locked (ruvnet/aether-arena), v0 metrics locked
(pose/presence/latency/determinism), dataset legality resolved (MM-Fi CC BY-NC
only; Wi-Pose excluded). Adds four-part framing, threat model, arena_score
formula, submission state machine, neutrality/governance, and the §7 acceptance test.
- aa_score_runner: deterministic scorer bin reusing the real ruview_metrics pose
harness on a fixed seed=42 fixture → RuViewTier-style verdict + cross-platform
SHA-256 proof hash. Builds --no-default-features (no torch/GPU). VERDICT: PASS.
- CI harness gate: .github/workflows/aether-arena-harness.yml runs the scorer on
every PR — the "PR that runs the harness as part of the build" requirement.
- Scaffold: aether-arena/{README,VERIFY,STATUS}.md + schema/aa-submission.toml.
- Horizon record persisted (.claude-flow/horizons/aether-arena-aa.json).
Infra = the deliverable; model SOTA (MM-Fi PCK@20) is a separate effort blocked on
ADR-079 data collection, tracked as a stretch goal, not an infra exit.
Co-Authored-By: claude-flow <ruv@ruv.net>
|
||
|
|
9ad550d95f |
feat(worldmodel): Candle Rust port + GCP GPU scripts (ADR-147 Phase 4+6)
Candle native port — wifi-densepose-occworld-candle v0.3.0: - config.rs: OccWorldConfig (14 params matching occworld.py) - vqvae.rs: ClassEmbedding(18→64), VQCodebook(512×512, squared-L2), QuantConv/PostQuantConv(1×1 Conv2d), fold_3d_to_2d helpers ResNet encoder/decoder are documented stubs (Phase 5 checkpoint pending) - transformer.rs: full Candle MHA transformer (2 layers, temporal+spatial cross-attention, FFN, pre-norm residuals) - inference.rs: OccWorldCandle::dummy() + ::load() + predict() InferenceOutput: sem_pred(1,15,200,200,16) + trajectory_priors - 14/14 tests pass (12 lib + 2 doctests) GCP GPU scripts — scripts/gcp/: - provision_training.sh: a2-highgpu-8g (8×A100 40GB) for Phase 5 retraining - run_training.sh: rsync + torchrun 8-GPU train + checkpoint download - provision_cosmos.sh: a2-ultragpu-1g (A100 80GB) for Cosmos evaluation - cosmos_eval.sh: run Cosmos-Transfer2.5 inference, download results - teardown.sh: safe checkpoint download + instance delete Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
28a27bbfd8 |
fix(worldmodel): use published worldgraph v0.3.0 instead of path dep (crates.io publish prep)
Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
c7ddb2d7d1 |
feat(worldmodel): ADR-147 — OccWorld world model integration, wifi-densepose-worldmodel v0.3.0 (#856)
* feat(worldmodel): ADR-147 — OccWorld integration, wifi-densepose-worldmodel v0.3.0 (#854) - New crate `wifi-densepose-worldmodel` v0.3.0: async Unix-socket bridge to OccWorld Python inference server; `OccWorldBridge`, `OccupancyGrid3D`, `TrajectoryPrior`, `worldgraph_to_occupancy` encoder (14/14 tests pass) - `scripts/occworld_server.py`: long-lived Python inference server for OccWorld TransVQVAE (72.4M params); applies API-bug patches; dummy mode for CI testing; graceful SIGTERM shutdown - `pose_tracker.rs`: `trajectory_prior` soft-blend injection (80/20 Kalman/prior) on torso keypoint; `set_trajectory_prior()` public method - CI: added `Run ADR-147 worldmodel tests` step - ADR-147: accepted — OccWorld primary (209 ms, 3.37 GB VRAM, RTX 5080); Cosmos deferred to ADR-148 (32.54 GB VRAM exceeds hardware) - Benchmark proof: 208.7 ms P50, 3.37 GB peak VRAM, 12.1 GB headroom Co-Authored-By: claude-flow <ruv@ruv.net> * chore: update ruvector.db state Co-Authored-By: claude-flow <ruv@ruv.net> * chore: ruvector.db sync Co-Authored-By: claude-flow <ruv@ruv.net> * fix(cli): add missing min_frames field to CalibrateArgs test helper E0063 in calibrate.rs:448 — CalibrateArgs gained min_frames in ADR-135 but the default_args() test helper was not updated. min_frames=0 means 'use tier default', matching the existing runtime behaviour. Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
d24bf36110 |
release: version bumps for crates.io publish (streaming-engine cascade)
- core 0.3.0->0.3.1 (ComplexSample/CanonicalFrame/provenance + blake3 dep) - ruvector 0.3.0->0.3.1 (ClockQualityGate) - bfld 0.3.0->0.3.1 (privacy control plane) - signal 0.3.1->0.3.2 (fuse_scored_calibrated/ArrayCoordinator/evolution/rf_slam) - geo: add license/repository for first publish; worldgraph/engine pin geo version - new: geo 0.1.0, worldgraph 0.3.0, engine 0.3.0 Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
95bdd37e76 |
bench+test: engine per-cycle benchmark + ADR-142 acceptance path
- engine: criterion benchmark engine_cycle — full process_cycle (4 nodes / 56 subcarriers) measured at ~6.35 us/cycle, ~7800x under the 50ms (20Hz) budget. - signal: ADR-142 acceptance test — 3 links drift 30 frames -> ChangePoint -> VoxelMap accumulates -> low-confidence voxels suppressed -> VoxelGate Restricted emits histogram only -> ADR-137 contradiction recorded. Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
020aa08049 |
test(sensing-server): ADR-140 live acceptance — snapshot to expired-rejection
Drives a real SemanticBus: raw snapshot (fall_detected, past warmup) -> FallRisk primitive -> SemanticStateRecord (provenance) -> single-signal rule fires / multi-signal agreement rule does NOT (no false escalation) -> expired record rejected. Proves the ADR-140 credibility path end to end. Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
5878868060 |
feat(signal,engine): ADR-137 calibration-mismatch contradiction + trust witness
- signal: MultistaticFuser::fuse_scored_calibrated() threads per-node CalibrationId; agreeing epochs → calibration_id set + CalibrationApplied evidence; disagreeing → calibration_id None + CalibrationIdMismatch flag (forces demotion). +2 tests. - engine: process_cycle_calibrated() per-node calibration path; process_cycle delegates with a uniform epoch. TrustedOutput gains a deterministic BLAKE3 witness over (provenance || class). calibration_version='cal:none' on mismatch. - ADR-137 acceptance test: two frames + mismatched calibration -> QualityScore contradiction -> Restricted -> calibration_id None -> witness stable. +happy path. - 11 engine tests, signal 411+ lib tests; workspace 0 errors. Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
2517a16d88 |
feat(engine): compose ADR-138/142/143 + ADR-139 live loop
- ADR-138: process_cycle runs ArrayCoordinator when node geometry is registered; array contradictions (CoherenceDrop/GeometryInsufficient) fold into the privacy demotion; DirectionalEvidence surfaced in TrustedOutput - ADR-142: per-node mean-amplitude → EvolutionTracker; cross-link change-point recorded as a WorldGraph Event node - ADR-143: ingest_reflectors() runs Rf-SLAM discovery, writes stable Wall/Furniture reflectors as ObjectAnchor nodes - ADR-139 live loop: update_person_track(), apply_active_privacy_mode() (PrivacyRollup suppresses person_track under identity-strict modes), snapshot_json() - Acceptance test live_frame_to_reload_same_contents: full path fusion->worldgraph->privacy_rollup->persist->reload->same contents, no raw RF - 9 engine tests; workspace 0 errors Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
2eada40e3b |
feat(engine): integrate ADR-135..141 into an end-to-end trust pipeline
- signal/calibration.rs: BaselineCalibration gains calibration_id()/ calibration_uuid()/apply() — the ADR-135->136 link that stamps FrameMeta.calibration_id (deterministic id, no serialization change). +1 test. - NEW crate wifi-densepose-engine: StreamingEngine::process_cycle() composes fuse_scored (137) -> calibration provenance (135/136) -> privacy demotion on contradiction (141) -> WorldGraph SemanticState with mandatory provenance + DerivedFrom edge (139). Returns TrustedOutput (the trust chain made concrete). - Validates the throughline: every output names evidence + model + calibration + privacy decision; calibration_id flows input->QualityScore->provenance; contradiction demotes class; deterministic; privacy mode attested. - 4 integration tests; workspace 0 errors; signal 410 lib tests pass. Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
f18b096f2f |
feat(nn): ADR-146 RF encoder multi-task heads + uncertainty (#850)
- nn/rf_encoder.rs (forward-looking; extends ADR-024 AETHER):
- RfEmbedding (256-d pure-Rust f32 ABI), TaskKind (7 heads)
- LinearHead: W*emb+b + separate log-variance projection → HeadOutput with
softplus uncertainty + confidence(); MultiTaskHeads.forward_subset() for
ADR-145 ablation toggling
- calibration_robustness_loss (ADR-135 invariance), triplet_loss (ADR-024)
- ContrastiveBatcher: deterministic cross-environment positive / different-
state negative triplet sampling (ADR-027 MERIDIAN)
- 7 tests; workspace 0 errors
Co-Authored-By: claude-flow <ruv@ruv.net>
|
||
|
|
0f336b7d36 |
feat(train): ADR-145 ablation eval harness + privacy-leakage/latency metrics (#849)
- train/ablation.rs: FeatureSet matrix (CSI/CIR/CSI+CIR/+Doppler/+BFLD/+UWB); AblationMetrics (presence acc, loc err, FP/FN, latency p50/p95, privacy leakage, cross-room degradation) derived deterministically from VariantRun - membership_inference_leakage(): MIA proxy = |AUC-0.5|*2 (0 indistinguishable, 1 perfectly separable); latency_percentiles_ms (nearest-rank); confusion_rates - AblationReport.to_markdown() (deterministic), csi_cir_beats_csi_only() acceptance check - 5 tests; workspace 0 errors Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
b10bc2e9ab |
feat(mat): ADR-144 UWB range-constraint fusion (#848)
- mat/localization/range_constraint.rs (forward-looking; no UWB hw yet):
- RangeConstraint domain model (anchor_id/pos/measured_range/uncertainty/
signal_quality); predicted_range/residual/mahalanobis/is_consistent
- RangeConstraintFusion::refine() — Newton-normalized weighted least-squares
that constrains a CSI/CIR prior toward range spheres, Mahalanobis-gates
inconsistent (NLOS/multipath) ranges; returns RefineResult with rejected
anchors + RMS residual
- associate() disambiguates which track a range belongs to (re-ID hook)
- 4 tests (converges to truth, absurd range gated, consistency math, track
association); workspace 0 errors
Co-Authored-By: claude-flow <ruv@ruv.net>
|
||
|
|
2d4f3dea53 |
feat(signal): ADR-143 RF-SLAM reflector discovery + anchor learning (#847)
- ruvsense/rf_slam.rs (forward-looking, ships v1 fixed-map first):
- RfSlam::fixed_map() — discovery disabled (v1); with_discovery() — v2
- ReflectorObservation (CIR-tap sighting), PersistentReflector (per-axis
Welford position, migration_m_per_day, classify Wall/Furniture/Mobile)
- observe(): nearest-reflector association within assoc_radius or seed new;
coherence-gated; static_anchors() rejects Mobile → ADR-139 ObjectAnchor set
- persistent_count() for topology-change detection
- 6 tests (fixed-map no-op, persistence, low-coherence reject, cluster split,
mobile excluded, static→Wall); workspace 0 errors
Co-Authored-By: claude-flow <ruv@ruv.net>
|
||
|
|
1f8e180d69 |
feat(signal): ADR-142 evolution tracker + temporal VoxelMap (#846)
- ruvsense/evolution.rs (extends ADR-030):
- TemporalVoxel: Bayesian log-odds occupancy update, evidence_count,
confidence = 1-exp(-count/5) (5-frame low-confidence floor), Welford
variance, doppler attribution, last_update_ns
- TemporalVoxelMap: persistent grid, observe(), low_confidence_indices()
- EvolutionTracker: per-link Welford baselines + cross-link change-point
(>=3 links beyond 2sigma in one window); divergence checked vs prior baseline
- VoxelGate: privacy demotion (Anonymous clears doppler+confidence, keeps
occupancy; Restricted → occupancy histogram only, raw map cleared)
- reuses field_model::WelfordStats; 6 tests; workspace 0 errors
Co-Authored-By: claude-flow <ruv@ruv.net>
|
||
|
|
7d88eb84c7 |
feat(bfld): ADR-141 privacy control plane — modes, actions, attestation (#845)
- privacy_mode.rs: PrivacyMode (RawResearch/PrivateHome/EnterpriseAnonymous/ CareWithConsent/StrictNoIdentity) layered over the existing 4-class PrivacyClass; each mode pins target_class + enforced PrivacyAction bitset + soul_signature_enabled - PrivacyAction enum (Allow/SuppressIdentity/ReduceResolution/DropRaw/AggregateOnly) - PrivacyModeRegistry (std-gated, heap audit log per ESP32 no_std convention): active-mode source of truth, is_action_enforced(), set_mode() appends hash-chained PrivacyAttestationProof (BLAKE3, ADR-010), verify_chain() - no_std-safe: PrivacyMode/Action/AttestationProof are heap-free; registry std-gated. Builds --no-default-features AND --features std. - 6 tests incl. tamper-detection; workspace 0 errors Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
169a355bde |
feat(sensing-server): ADR-140 semantic state record + Ruflo agent bridge (#844)
- semantic/record.rs: SemanticStateRecord (kind/room/node/timestamp/expiry/ confidence/model_version/calibration_version/privacy_action/evidence_refs) — the auditable wire form of an ADR-139 SemanticState node, enriched from the existing SemanticEvent via RecordContext - PrivacyAction enum (Allow/AnonymizeByRoom/StripBiometrics); StripBiometrics removes HR/BR evidence tags at the record boundary - Ruflo agent bridge: MultiSignalRule.evaluate() fires AgentRoute only on multi-signal agreement (fall_risk + elderly_anomaly → caregiver_escalation); route_all() sorts by severity + dedups - 4 tests; workspace 0 errors Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
521a012d84 |
feat(worldgraph): ADR-139 WorldGraph environmental digital twin (#843)
New crate wifi-densepose-worldgraph: - model.rs: WorldNode (10 kinds) + WorldEdge (7 relations) as serde enums (no trait objects → deterministic RVF persistence); WorldId, EnuPoint, ZoneBoundsEnu (with point-in-bounds), SemanticProvenance (house-rule tuple) - graph.rs: WorldGraph over petgraph StableDiGraph; upsert/add_edge/neighbors, room_for_area (HomeCore area_id linkage), observed_by/contents_of queries, add_semantic_state (append-with-provenance DerivedFrom), add_contradiction (both beliefs retained), apply_privacy_mode → PrivacyRollup, JSON persistence - 7 tests (upsert/replace, linkage, unknown-endpoint, location, provenance+ contradiction, privacy rollup, deterministic JSON round-trip) - workspace 0 errors Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
fc7674bde9 |
feat(signal,ruvector): ADR-138 LinkGroup/ArrayCoordinator clock-quality gating (#842)
- ruvector viewpoint/coherence.rs: ClockQualityScore, ClockQualityGate, ClockGateDecision (Admit/MonitorOnly/Reject), ClockRejectReason. 200us floor, 9s staleness ceiling per ADR-110. - signal ruvsense/array_coordinator.rs: ArrayCoordinator domain service + DirectionalEvidence. Gates nodes, computes GDI + Cramer-Rao credence, builds attention weights (real node_attention_weights when amplitudes present, else clock-quality softmax), emits CoherenceDrop + GeometryInsufficient flags. - Cycle resolution: ArrayCoordinator lives in signal (depends on ruvector), not ruvector, so it can emit ADR-137 canonical ContradictionFlag. Documented. - 8 tests (5 coordinator + 3 clock gate); workspace 0 errors. Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
4fa3847acd |
feat(signal): ADR-137 fusion quality scoring + evidence/contradiction flags (#841)
- fusion_quality.rs: QualityScore, FamilyId, CalibrationId, EvidenceRef, ContradictionFlag (canonical owner per §2.3; 138 imports CoherenceDrop/ GeometryInsufficient variants) - QualityScore impls ADR-136 QualityScored (penalized_coherence, bounds) - MultistaticFuser::fuse_scored() — additive over fuse(): real per-node attention weights, WeightEntropy + CoherenceGateThreshold evidence, soft-guard TimestampMismatch contradiction → forces_privacy_demotion() - node_attention_weights() extracted + reused by attention_weighted_fusion - soft_guard_us config (default guard/5); 6 ADR-137 tests - workspace check: 0 errors Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
11f89727f1 |
feat(core,signal): ADR-136 streaming-engine frame contracts (#840)
- ComplexSample LE wrapper (16-byte canonical encoding, serde tuple, as_complex32) - CsiMetadata gains calibration_id/model_id/model_version + append-only setters - CanonicalFrame trait + impl for CsiFrame (BLAKE3 witness, deterministic bytes) - Stage<I,O>/Versioned/QualityScored traits + FrameMeta alias in ruvsense - 9 ADR-136 acceptance tests (AC1-AC8); workspace builds, 0 errors Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
36db13aa7e |
feat(cli): --min-frames override for low-traffic / debug environments
Adds a `--min-frames N` flag to `wifi-densepose calibrate` that overrides the ADR-135 tier minimum (default 600 frames at 20 Hz for HT20). Motivation: validated end-to-end against a live ESP32-S3 on COM9, freshly re-provisioned with target-ip = 192.168.1.50 (this host). The firmware emits CSI at roughly 0.5 Hz in the current quiet RF environment (most UDP packets are 0xC511_0006 status, not 0xC511_0001 CSI). Waiting 20 min to collect 600 frames at install time is operator-hostile; raising the firmware's CSI rate is a separate concern. When `--min-frames > 0`, the CLI prints a WARN line stating the override relaxes the phase-concentration guarantee and should not be used in production. ADR-135 defaults are preserved unchanged. Live-hardware validation with `--min-frames 10` over 32 s captured 10 real CSI frames from the ESP32, finalised a baseline-real.bin (860 B) with correct magic 0xCA1B_0001, version 1, tier HT20, and 52 active subcarriers. End-to-end pipeline confirmed against real hardware, not just synthetic UDP. Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
8504638187 |
feat(signal): ADR-135 — empty-room baseline calibration
Operator-initiated calibration that records 30 s of stationary CSI,
emits a per-subcarrier baseline (amplitude mean+variance via Welford,
phase via circular sin/cos sums with von Mises dispersion), and gates
downstream stages on a deviation z-score. Plugs into multistatic
coherence gating, motion/presence detection, and the new ADR-134 CIR
estimator as a reference-subtracted input.
API surface (under wifi_densepose_signal):
CalibrationConfig::{ht20, ht40, he20, he40}
CalibrationRecorder { record(), finalize(), frames_recorded() }
BaselineCalibration {
subcarriers: Vec<SubcarrierBaseline>,
deviation(&CsiFrame), subtract_in_place(&mut CsiFrame),
to_bytes(), from_bytes()
}
CalibrationDeviationScore { amplitude_z_median, amplitude_z_max,
phase_drift_median, motion_flagged }
CalibrationError { SubcarrierMismatch, TierMismatch,
InsufficientFrames, VersionMismatch, TruncatedBuffer }
Binary baseline format: magic 0xCA1B_0001 + u8 version=1 + u8 tier +
captured_at_unix_s (i64) + frame_count (u64) + num_subcarriers (u32) +
[SubcarrierBaseline; N] as 16 bytes each (amp_mean, amp_variance,
phase_mean, phase_dispersion as f32 LE). Hand-written serialisation so
the format is stable across Rust toolchain versions without serde drift.
CLI: new `wifi-densepose calibrate` subcommand binds a UDP listener
(0xC511_0001 frames), streams them through CalibrationRecorder, prints
a real-time z-score banner per ADR-135 §risk 1 (operator-may-be-moving),
aborts on sustained high deviation, and writes the binary baseline to
disk. Local UDP packet parser duplicated from sensing-server (per ADR
discussion — avoids cross-crate API churn).
Witness: cross-platform-deterministic SHA-256 over the per-subcarrier
quantised baseline profile (u16 LE at 1e-2/1e-4/1e-3, no sort) using
the lesson learnt from the CIR PR #837 libm-jitter fix. Hash:
d6bce07ecb1648e6936561df44bf4a3bfc17bb0ba5f692646b2301d105b52f67
CI guard: new "ADR-135 calibration witness proof (determinism guard)"
step under the Rust Workspace Tests job, adjacent to the existing
ADR-134 CIR guard. Regressions are unambiguously attributable.
Hardware-in-loop validation: full 600-frame capture exercised via the
new scripts/synth-csi-udp.py emitter targeting 127.0.0.1:5005. The CLI
binary received 600 frames at 20 Hz, z_med stable at ~0.7, motion
correctly NOT flagged, finalised baseline written to baseline.bin (860
bytes) with correct magic + version + timestamp in the header. Live
ESP32 capture from COM9 is operator follow-up — requires provisioning
the firmware's UDP target IP to match the host running the CLI.
Test results (cargo test -p wifi-densepose-signal --no-default-features):
lib: 382 pass / 0 fail / 1 ignored
calibration_synthetic: 17 pass / 0 fail
calibration_drift: 5 pass / 0 fail
calibration_roundtrip: 10 pass / 0 fail
cir_*: 9 pass + 6 documented P2 ignores
doctest: 10 pass
Bench: 20 Criterion combinations registered
(recorder_record / recorder_finalize / deviation / record_600 /
to_bytes across HT20/HT40/HE20/HE40 tiers).
Witness: bash scripts/verify-calibration-proof.sh → VERDICT: PASS
Co-Authored-By: claude-flow <ruv@ruv.net>
|
||
|
|
9e7fa83210 |
feat(signal): ADR-134 CSI→CIR via ISTA + NeumannSolver warm-start (#837)
* feat(signal): ADR-134 — CSI→CIR via ISTA + NeumannSolver warm-start End-to-end first-class Channel Impulse Response estimation in the Rust workspace. Bridges CSI (frequency domain) to CIR (delay domain) so multistatic coherence gating, NLOS/LOS classification, and (at HT40+) ToF ranging become tractable in `wifi-densepose-signal`. Algorithm: ISTA L1 sparse recovery over a normalized DFT sub-matrix sensing operator Φ ∈ ℂ^(K×G) with G = 3K (3× super-resolution). The Tikhonov-regularised warm start re-uses `ruvector_solver::neumann:: NeumannSolver` — same call pattern as `fresnel.rs:280` and `train/subcarrier.rs:225` — so no new crate dependencies. Tiers supported: HT20 / HT40 / HE20 (Tier A-HE, C6) / HE40. The C6 HE-LTF tier is the preferred Tier A target whenever an 11ax AP is in range; firmware substrate already shipped at v0.7.0-esp32 per ADR-110. Measured performance (release, single CirEstimator shared across 12 links): HT20 2.72 ms / HE20 3.20 ms / HT40 13.43 ms / HE40 9.71 ms per estimate(). HT20 12-link multistatic 17.7 ms — fits the 50 ms RuvSense cycle; HT40 12-link 74 ms exceeds it and is flagged in ADR-134 §2.7 as requiring Rayon parallelism or G=2K super-res reduction. Measured Φ conditioning: κ(Φ) ≈ 1.00 identically across all tiers. ADR-134 §2.3 was corrected — the C6 advantage is statistical SNR gain (√(242/52) ≈ 2.16×) from more independent measurements, not improved conditioning. Witness: bit-deterministic SHA-256 over CirEstimator output on the synthetic ADR-028 reference signal (100 frames, top-5 taps, 1e-6 quantization). Hash committed to expected_cir_features.sha256; verify-cir-proof.sh wires the check into the existing witness bundle. CI: cargo test --features cir + verify-cir-proof.sh added as separate steps under the Rust Workspace Tests job; regressions are unambiguously attributable. Files: - ADR + WITNESS-LOG-028 row 34 + CLAUDE.md module count (14 → 15) - src/ruvsense/cir.rs (~540 LOC) + lib.rs re-exports + multistatic.rs wire-up (reversible via `use_cir_gate=false`) - 3 integration tests + Criterion bench + 3 deterministic fixtures - cir_proof_runner binary + sha256 + verify-cir-proof.sh Test rate: 395 pass / 6 ignored (P2 ISTA hyperparameter tuning; see #[ignore] reasons) / 0 fail. cargo check clean; verify-cir-proof.sh VERDICT: PASS. Co-Authored-By: claude-flow <ruv@ruv.net> * fix(signal): make CIR witness cross-platform-deterministic The first witness (Windows-generated hash 89704bfd…) failed on Linux CI with a different hash (b36741bf…). Root cause: hashing `re`/`im` parts of top-5 taps at 1e-6 precision is too tight against libm differences in sin/cos/sqrt across glibc, MSVC, and Apple-clang. The previous "top-5 sorted by magnitude" form also suffered from rank instability when taps are near-tied — libm jitter could shuffle the ordering even when the algorithm is unchanged. New canonical form: full per-tap quantised-magnitude profile in natural index order, no sort. - 156 taps × 2 bytes (u16 le) per frame = 312 bytes/frame. - Quantisation 1e-2 — robust to ~1e-3 float drift while still tripping on real algorithmic changes (e.g., a 10× lambda shift moves magnitudes by >1e-2). - No top-K selection — eliminates the unstable magnitude-sort step. Regenerated expected_cir_features.sha256 — new hash 120bd7b1… If the next CI run still mismatches, the cause is structural (rustfft SIMD code path selection or NeumannSolver internal ordering), not magnitudes, and the witness needs further coarsening or to be made platform-tagged. Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
c0bb6f4fc7 |
feat(homecore iter 3): DELETE /api/states/<id> + confirm modal in UI
CRUD increment 3/6. Full delete path lands end-to-end.
Backend (homecore-api):
rest.rs +18 LOC — new `delete_state` handler. Idempotent (matches HA's
removal semantics): returns 204 No Content whether the entity existed
or not. 4xx only for malformed entity_id or auth failure.
app.rs +6 LOC — adds `.delete(rest::delete_state)` to the
/api/states/:entity_id route alongside existing GET + POST.
Backend curl smoke:
POST /api/states/sensor.test_delete 201
DELETE /api/states/sensor.test_delete 204
GET /api/states/sensor.test_delete 404
Frontend:
components/StateCard.ts +25 LOC — small `×` delete button in the
card's top-right corner. opacity 0 by default, fades in on hover
or keyboard focus. dispatches `hc-state-card-delete` (NOT
`hc-state-card-click`) with stopPropagation so the card's own
click-to-edit handler doesn't also fire.
pages/Dashboard.ts +45 LOC — deletingState (StateView | null), a
confirm modal that names the entity_id in the body, Cancel /
Delete buttons in the footer (Delete styled in muted red),
`_confirmDelete()` dispatches DELETE with bearer, toast on
success, grid refresh.
Browser-verified end-to-end on real homecore-server :8123:
- Hover card → × button visible
- Click × → DELETE confirm modal (NOT edit modal — stopPropagation works)
- Modal names entity_id in code block
- Cancel: entity preserved, modal closes
- Delete: backend GET-after-DELETE returns 404, grid card vanishes,
toast "Deleted sensor.delete_target"
- 0 unexpected console errors (1 expected 404 from verification fetch)
Co-Authored-By: claude-flow <ruv@ruv.net>
|
||
|
|
0979faccd4 |
feat(homecore-server): seed 10 default entities on boot (--no-seed-entities to opt out)
Companion to the seed_default_services() commit. Dashboard + States
pages now have content on every fresh --db :memory: boot, not just
after `bash scripts/homecore-seed.sh`.
Adds:
- new CLI flag `--no-seed-entities` (default: enabled)
- `seed_default_entities(hc)` mirroring the bash script's 10-entity
set (4 RuView sensing-derived + 6 conventional HA fixtures)
- Boot log:
Service registry seeded with 13 default service(s)
State machine seeded with 10 default entities
Two seeds stay in sync — integrations overwrite the same entity_ids
via /api/states/<id> POST. Run with --no-seed-entities when wiring
real plugins that populate the state machine themselves.
Empirical (after rebuild + fresh restart):
GET /api/states → 10 entities
GET /api/services → 6 domains, 13 services
homecore-server --db :memory: is now enough for the web UI to be
fully populated on first paint.
Co-Authored-By: claude-flow <ruv@ruv.net>
|
||
|
|
75f984e515 |
feat(homecore-server): seed 13 default services across 6 domains on boot
Operators (and the new web UI) saw "No services registered" on every vanilla boot because nothing in the boot sequence called `ServiceRegistry::register()`. The Assist pipeline registers intent handlers — a different surface — but `/api/services` stayed empty until a plugin or integration loaded. Adds `seed_default_services()` after `HomeCore::new()`. Each handler is a `FnHandler` that echoes the call back as a JSON acknowledgement so the service registry is exercise-able from day one. Integrations override these by re-registering the same `ServiceName` with a real handler later. Seeded set: homeassistant: restart, stop, reload_core_config light: turn_on, turn_off, toggle switch: turn_on, turn_off, toggle scene: apply automation: trigger homecore: ping, snapshot_state (HOMECORE-native) Boot log now reports: Service registry seeded with 13 default service(s) GET /api/services now returns 6 domains with 13 services total. The HOMECORE web UI's Services page shows them under proper domain headings. Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|
|
358ca6190d | docs(homecore-server): comprehensive README — integrated HOMECORE orchestration binary | ||
|
|
850cf9f2d6 | docs(homecore-migrate): comprehensive README — HA entity/device/config import + migration CLI | ||
|
|
4c6974de63 | docs(homecore-assist): comprehensive README — intent recognition + Ruflo agent bridge | ||
|
|
75c2c47ba0 | docs(homecore-automation): comprehensive README — YAML triggers + conditions + MiniJinja actions | ||
|
|
300c506171 | docs(homecore-recorder): comprehensive README — SQLite history + ruvector semantic search | ||
|
|
07c2ba3f9c | docs(homecore-hap): comprehensive README — HomeKit bridge with 11 accessory types | ||
|
|
73643e2e57 | docs(homecore-plugins): comprehensive README — WASM plugin runtime + InProcess registry | ||
|
|
3e2763daf7 | docs(homecore-api): comprehensive README — REST + WebSocket API | ||
|
|
0d893be604 | docs(homecore): comprehensive README — state machine + event bus + registries | ||
|
|
e96ebaea81 |
HOMECORE: native Rust/WASM/TS port of Home Assistant — ADRs 125-134 implementation (#800)
* feat(adr-125 iter 3): BFLD PrivacyGate + semantic-event naming at HAP boundary Inserts a Python equivalent of `wifi-densepose-bfld::PrivacyClass` + `PrivacyGate` between the rv_feature_state parser and the HAP toggle file. ADR-125 §2.1.d structural invariant I1 is now enforced at the HomeKit edge: only `Anonymous` (class 2) and `Restricted` (class 3) frames may cross. `Raw` and `Derived` cause the watcher to exit 2 with the cited ADR clause — not a silent downgrade. Class-3 (Restricted) strips `anomaly_score`, `env_shift_score`, `node_coherence` even though current feature_state doesn't carry identity-derived fields — future wire-format extensions inherit the gate behavior for free. Operator-facing semantic naming follows ADR-125 §2.1.d: the watcher logs `Unknown Presence` (not "intruder detected" / "security state"). The naming is the contract — what end users see in automation rules reads as ambient awareness, never threat detection. Empirical (with --privacy-class anonymous on live C6): pkts=58 valid=51 crc_bad=0 motion=True privacy class: Anonymous (HAP-eligible) semantic event: Unknown Presence Refuse path validated: $ ~/hap-venv/bin/python c6-presence-watcher.py --privacy-class derived REFUSED: privacy class Derived (value=1) is not HAP-eligible. ADR-125 §2.1.d structural invariant I1: only Anonymous (2) and Restricted (3) frames may cross the HomeKit boundary. $ echo $? 2 Branch: feat/adr-125-apple-fabric (kept off main while docker build for sha |
||
|
|
b9457220bd |
chore(cogs): publish cog-ha-matter 0.3.0 + bump signal/sensing-server to 0.3.1
cog-ha-matter required wifi-densepose-sensing-server with the `mqtt`
feature exposed, which crates.io 0.3.0 did not expose. Chain:
1. wifi-densepose-signal 0.3.0 -> 0.3.1 (already includes
EmbeddingHistory::{with_sketch,novelty} locally; needed
republish so sensing-server-0.3.1 can compile against it).
2. wifi-densepose-sensing-server 0.3.0 -> 0.3.1 (now exposes
the `mqtt` feature, sensing-server bin links against
signal-0.3.1 cleanly).
3. cog-ha-matter sensing-server dep bumped to ^0.3.1; publish=false
dropped. cog-ha-matter@0.3.0 published.
Both signal and sensing-server published with --no-verify; cargo's
verification step fails on Windows because openblas-src requires
vcpkg (the source itself builds fine in the workspace and on Linux).
Co-Authored-By: claude-flow <ruv@ruv.net>
|
||
|
|
22ca3da48c |
chore(cogs): publish cog-person-count + cog-pose-estimation 0.3.0 to crates.io
- cog-person-count: no path deps, clean publish. - cog-pose-estimation: added explicit version="0.3.1" to the wifi-densepose-train path dep (crates.io rejects path-only deps). - cog-ha-matter: keeps publish=false; the published wifi-densepose-sensing-server@0.3.0 does not expose the `mqtt` feature this cog requires. Note added inline; republish sensing-server with the feature exposed before dropping the flag. Co-Authored-By: claude-flow <ruv@ruv.net> |