Commit Graph

813 Commits

Author SHA1 Message Date
ruv 96ccfa58fb bench: ship int4 edge artifact + CPU latency
Published deployable int4-QAT micro (verified 74.08%, ~20KB) at
ruvnet/wifi-densepose-mmfi-pose/edge. Runs 0.135ms single-thread x86 CPU
(no GPU) - real-time pose without an accelerator. ARM on-device validation
pending fleet availability.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-05-31 01:30:29 -04:00
ruv 92d433523d bench: deployed quantized accuracy + QAT for micro edge model
int8 PTQ lossless (74.70%, 73.5KB); int4 naive PTQ drops below SOTA
(70.21%) but QAT recovers to 74.46% (36.7KB) - still beats MultiFormer.
A SOTA-beating WiFi-pose model genuinely runs in ~37KB int4 (QAT) /
73KB int8. Distillation negative noted.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-05-31 01:23:30 -04:00
ruv d64323c2d6 bench: add quantized footprint — SOTA-beating WiFi pose in 37KB int4
micro (74.87%, beats MultiFormer 72.25%) = 36.7KB int4 / 73.5KB int8;
nano (~72%) = 19.5KB int4. Distillation tested, no gain (direct training
wins). A SOTA-beating pose model fits on the sensing node itself.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-05-31 01:16:16 -04:00
ruv 9c64d90054 bench: WiFi-CSI pose efficiency frontier — 75K-param model beats SOTA
Swept model size on MM-Fi random_split: every config from micro (75,237
params, 0.22ms, 74.30%) up beats MultiFormer (72.25%); nano (40K, 0.13ms)
within 0.5pt. Pareto-dominant (smaller AND more accurate than prior SOTA).
Orthogonal to the data-bound accuracy frontier (ADR-150).

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-05-31 01:10:33 -04:00
ruv 5d1fb48eb5 docs(adr-150): empirical cross-subject findings — pose-contrastive pretrain refuted
Measured all near-term levers on the official MM-Fi cross-subject split:
- mixup+TTA+ensemble = best at 64.92% (+0.9 over doc 64.04)
- pose-contrastive foundation pretrain: estimated +5..+12, MEASURED -2.3
  (SupCon loss pinned at ln(B) across K/BS/seeds -> same-pose CSI is not
  contrastively alignable across subjects)
- instance-norm+SpecAugment -4.6; CORAL/DANN ~0

Conclusion: the 18-pt in-domain<->cross-subject gap is fundamental subject
shift, not algorithmic. Promotes multi-subject data collection to the primary
lever; recommends re-scoping ADR-150 phase 1 around capture.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-05-31 00:33:43 -04:00
ruv b4cb1384de docs(readme): honest re-benchmark of ESP32 presence model (retract single-class 100%)
v1 '100% presence accuracy' was on a single-class overnight recording
(6062/6063 'present'). Replaced with v2 encoder's honest label-free
held-out temporal-triplet accuracy (66.4% raw -> 82.3% trained).
Models published to HF; tracking ruvnet/RuView#882.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-05-30 23:52:11 -04:00
ruv 66e917ea86 bench: HOMECORE vs Home Assistant — measured perf + capability matrix
Head-to-head on the wire-compatible HA API surface:
- Cold start 0.55s vs 9.7s (18x), idle RSS 10.1MB vs 359MB (35x),
  binary 4.7MB vs 610MB image (130x), throughput 1599 vs 716 rps.
- Honest caveats: latency endpoints differ (auth /api/states vs
  unauth /manifest.json); HA wins integration breadth + UI maturity.
- Repro harnesses in aether-arena/staging/.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-05-30 23:41:15 -04:00
ruv 7738370b18 docs(readme): link SOTA MM-Fi pose model (82.69% torso-PCK@20) on HF
Published ruvnet/wifi-densepose-mmfi-pose — beats MultiFormer (72.25%)
and CSI2Pose (68.41%) on matched MM-Fi random_split torso-PCK@20.
Tracking: ruvnet/RuView#880

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-05-30 23:32:12 -04:00
ruv 7bad51aca6 publish: best MM-Fi benchmark set (in-domain 83.59, x-subject 64.0, x-env 17.5 CORAL)
Append best witness rows to ledger (seq 2-4) + update HF Space leaderboard banner.
In-domain 83.59% torso-PCK@20 (graph+ensemble+TTA) supersedes the 81.63 single-model entry,
+11.34 over MultiFormer 72.25. Cross-subject 64.04% (official split). Cross-environment 17.51%
(CORAL domain alignment, the cross-room DG win). Gist + issue #876 updated with frontier map.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-05-30 22:22:53 -04:00
ruv eb3509e9ab reframe(aether-arena): vendor-neutral industry benchmark, RuView is one entrant 2026-05-30 19:59:10 -04:00
ruv 046b2564b8 feat(aether-arena): publish RuView MM-Fi SOTA result + ADR-150 RF Foundation Encoder
- Ledger witness row (seq 1, Gold): RuView CSI-Transformer 81.63% torso-PCK@20 on
  MM-Fi random_split, exceeding MultiFormer 72.25% (CSI2Pose 68.41%) — protocol- and
  metric-matched, self-corrected from inflated 91.86% bbox. Hash-chained, verifiable.
- HF Space updated with the controlled SOTA claim + caveat (cross-subject is the frontier).
- Proof/replay/witness gist: gist.github.com/ruvnet/af2fbc1c7674dddf09c15509b3c7f785
- Tracking issue #876 (result + Generalization Track roadmap).
- ADR-150: RuView RF Foundation Encoder — pose-preserving, subject/room/device-invariant
  SSL embedding (masked CSI + pose-contrast-across-subjects + coherence head); the
  principled attack on the cross-subject frontier. DANN failed; this is the corrected design.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-05-30 19:55:58 -04:00
ruv 4f7ab8e4f0 docs(aether-arena): v0 infrastructure complete — Space live, harness gate passing (M8) 2026-05-30 17:15:08 -04:00
ruv de6715d958 fix(aether-arena): move HF Space to gradio 5.9.1 (4.44.1 jinja2 cache bug) 2026-05-30 17:14:21 -04:00
ruv c1c04441e9 fix(aether-arena): Space launch on 0.0.0.0:7860 2026-05-30 17:10:17 -04:00
ruv 5284591770 fix(aether-arena): pin huggingface_hub 0.25.2 for gradio 4.44.1 Space 2026-05-30 17:07:08 -04:00
ruv 3f93fcd4ea fix(aether-arena): pin HF Space to python 3.12 (gradio pydub pyaudioop 3.13 removal) 2026-05-30 17:03:14 -04:00
ruv 644b4ba816 docs(aether-arena): mark M6 HF Space deployed 2026-05-30 17:02:03 -04:00
ruv 9359bf5d04 feat(aether-arena): HF Space (Gradio) v0 — deployed to ruvnet/aether-arena (M6)
Public face of the benchmark: empty-board leaderboard from the witness ledger,
chain-integrity display, submit/verify/about tabs. Presentation layer per ADR-149
§2.2 (heavy scoring stays in the pinned RuView harness / CI).
Live: https://huggingface.co/spaces/ruvnet/aether-arena

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-05-30 17:01:10 -04:00
ruv 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>
2026-05-30 16:59:11 -04:00
ruv 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>
2026-05-30 16:47:22 -04:00
ruv 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>
v1451
2026-05-29 20:52:51 -04:00
ruv da40503a9e docs(adr-147): add real CSI benchmark — 208ms median, 3.98GB VRAM, 72 frames/sec
Real data: archive/v1 CSI proof dataset (seed=42, 3rx, 56sc, 100Hz, 1000 frames)
Pipeline: CSI amplitude → presence → ENU position → voxels → OccWorld inference
20 inference windows, no mocks.

Co-Authored-By: claude-flow <ruv@ruv.net>
v1450 v1449
2026-05-29 19:56:28 -04:00
ruv bb7de84cb4 docs: add Phase 3+5 scripts to user guide and README world model row
- User guide: full retrain workflow (record → vqvae → transformer → serve)
  with checkpoint path usage
- README: note fine-tune capability in world model capability row

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-05-29 19:50:21 -04:00
ruv cd1c391afc feat(worldmodel): ADR-147 Phase 3+5 — RuViewOccDataset domain adapter + retraining pipeline
Phase 3 — scripts/ruview_occ_dataset.py:
- RuViewOccDataset: WorldGraph JSON snapshots → OccWorld (F,H,W,D) tensors
- Indoor class remapping: person→7, floor→9, wall→11, furniture→16, free→17
- Zero ego-poses (fixed indoor sensor, no ego-motion)
- record_snapshot() helper for training data accumulation
- Validated: 5 windows, (16,200,200,16) tensor, person+floor voxels confirmed

Phase 5 — scripts/occworld_retrain.py:
- record: stream WorldGraph snapshots from sensing server REST API
- vqvae: fine-tune VQVAE tokenizer on RuView occupancy (200 epochs, AdamW)
- transformer: fine-tune autoregressive transformer with frozen VQVAE

wifi-densepose-worldmodel v0.3.0 published to crates.io

Co-Authored-By: claude-flow <ruv@ruv.net>
v1448 v1447
2026-05-29 18:46:56 -04:00
ruv 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>
2026-05-29 18:43:35 -04:00
rUv 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>
v1444
2026-05-29 16:53:51 -04:00
rUv 2cc9f8acb3 Merge pull request #853 from ruvnet/feat/adr-136-146-streaming-engine
RuView Streaming Engine (ADR-135..146): auditable environmental intelligence
v0.3.0-streaming-engine
2026-05-29 09:42:46 -04:00
ruv 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>
2026-05-29 09:26:38 -04:00
ruv c60a55ca6e docs: RuView streaming-engine v0.3.0 release notes (intro + usage)
Introduction (auditable environmental intelligence / trust throughline), what's
new per ADR-135..146, quick-start usage for StreamingEngine, the 4 validated
acceptance paths, ~6.35us/cycle benchmark, build/test, and honest status.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-05-29 08:46:12 -04:00
ruv 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>
2026-05-29 08:42:46 -04:00
ruv 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>
2026-05-29 08:37:28 -04:00
ruv 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>
2026-05-29 08:35:40 -04:00
ruv 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>
2026-05-29 08:31:05 -04:00
ruv 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>
2026-05-29 08:21:48 -04:00
ruv f2e9e2f2bd docs(adr): add Implementation Status & Integration to ADR-136..146
Weaves the three framing points into every ADR in the series:
- skeleton/scaffolding (data contracts + trust/privacy/audit machinery +
  algorithms; real, tested, compiling) that existing sensing code plugs into
- Built (tested building block) vs Integration glue (not yet on the live 20 Hz
  path) — per-ADR, with commit + issue references
- trust throughline (traceable evidence, sensor agreement, calibration
  provenance, auditable privacy)
ADR-136 §8 carries the full series framing; 137-146 carry per-ADR status.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-05-29 08:09:23 -04:00
ruv 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>
2026-05-28 23:41:25 -04:00
ruv 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>
2026-05-28 23:38:43 -04:00
ruv 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>
2026-05-28 23:35:30 -04:00
ruv 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>
2026-05-28 23:29:14 -04:00
ruv 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>
2026-05-28 23:26:28 -04:00
ruv 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>
2026-05-28 23:23:01 -04:00
ruv 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>
2026-05-28 23:17:53 -04:00
ruv 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>
2026-05-28 23:14:29 -04:00
ruv 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>
2026-05-28 23:09:06 -04:00
ruv 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>
2026-05-28 23:01:46 -04:00
ruv 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>
2026-05-28 22:54:48 -04:00
ruv 24d68dfa72 docs(adr): ADR-136..146 RuView streaming engine series
Foundational umbrella (136) + fusion/linkgroup/worldgraph/semantic-state/
privacy-control-plane/evolution/rf-slam/uwb/eval/rf-encoder (137-146).
Mapped against existing wifi-densepose-*/homecore-* crates; no ruview_* rename.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-05-28 22:43:08 -04:00
ruv 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>
2026-05-28 21:08:28 -04:00
ruv 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>
2026-05-28 18:57:08 -04:00
rUv 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>
v1428
2026-05-28 16:24:37 -04:00