Commit graph

342 commits

Author SHA1 Message Date
ruv
c63cf2ee77 feat: GCloud GPU training pipeline + data collection + benchmarking
- gcloud-train.sh: L4/A100/H100 VM provisioning, Rust build, training
  with --cuda, artifact download, auto-cleanup ($0.80-$8.50/hr)
- training-config-sweep.json: 10 hyperparameter configs (LR, batch,
  backbone, windows, loss weights, warmup)
- collect-training-data.py: UDP listener for 2-node ESP32 CSI recording
  to .csi.jsonl with interactive/batch labeling and manifest generation
- benchmark-model.py: ONNX latency/throughput/PCK/FLOPs profiling with
  multi-model sweep comparison

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-02 22:04:57 -04:00
ruv
9a2bc1839a feat: HuggingFace model publishing pipeline + model card
- publish-huggingface.sh: retrieves HF token from GCloud Secrets,
  uploads models to ruvnet/wifi-densepose-pretrained
- publish-huggingface.py: Python alternative with --dry-run support
- docs/huggingface/MODEL_CARD.md: beginner-friendly model card with
  WiFi sensing explanation, quick start code, hardware BOM, and citation

GCloud Secret: HUGGINGFACE_API_KEY in project cognitum-20260110

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-02 22:04:16 -04:00
ruv
77a2e7e4e9 docs: add Cognitum Seed pretraining tutorial (530 lines)
Some checks are pending
Continuous Deployment / Post-deployment Monitoring (push) Blocked by required conditions
Continuous Deployment / Notify Deployment Status (push) Blocked by required conditions
Continuous Integration / Tests (push) Waiting to run
Continuous Integration / Tests-1 (push) Waiting to run
Continuous Integration / Tests-2 (push) Waiting to run
Continuous Integration / Code Quality & Security (push) Waiting to run
Continuous Integration / Performance Tests (push) Blocked by required conditions
Continuous Integration / Docker Build & Test (push) Blocked by required conditions
Continuous Integration / API Documentation (push) Blocked by required conditions
Continuous Integration / Notify (push) Blocked by required conditions
Firmware CI / Build ESP32-S3 Firmware (push) Waiting to run
Firmware QEMU Tests (ADR-061) / Swarm Test (ADR-062) (push) Blocked by required conditions
Firmware QEMU Tests (ADR-061) / Build Espressif QEMU (push) Waiting to run
Firmware QEMU Tests (ADR-061) / QEMU Test (boundary-max) (push) Blocked by required conditions
Firmware QEMU Tests (ADR-061) / QEMU Test (boundary-min) (push) Blocked by required conditions
Firmware QEMU Tests (ADR-061) / QEMU Test (default) (push) Blocked by required conditions
Firmware QEMU Tests (ADR-061) / QEMU Test (edge-tier0) (push) Blocked by required conditions
Firmware QEMU Tests (ADR-061) / QEMU Test (edge-tier1) (push) Blocked by required conditions
Firmware QEMU Tests (ADR-061) / QEMU Test (full-adr060) (push) Blocked by required conditions
Firmware QEMU Tests (ADR-061) / QEMU Test (tdm-3node) (push) Blocked by required conditions
Firmware QEMU Tests (ADR-061) / Fuzz Testing (ADR-061 Layer 6) (push) Waiting to run
Firmware QEMU Tests (ADR-061) / NVS Matrix Generation (push) Waiting to run
Security Scanning / Static Application Security Testing (push) Waiting to run
Security Scanning / Dependency Vulnerability Scan (push) Waiting to run
Security Scanning / Container Security Scan (push) Waiting to run
Security Scanning / Infrastructure Security Scan (push) Waiting to run
Security Scanning / Secret Scanning (push) Waiting to run
Security Scanning / License Compliance Scan (push) Waiting to run
Security Scanning / Security Policy Compliance (push) Waiting to run
Security Scanning / Security Report (push) Blocked by required conditions
Step-by-step guide covering hardware setup, Seed pairing, 2-node ESP32
provisioning, bridge operation, 6-scenario data collection protocol,
feature vector explanation, kNN queries, troubleshooting, and next steps.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-02 20:49:05 -04:00
ruv
b46b789e9e feat: ADR-070 self-supervised pretraining from live ESP32 CSI + Seed
4-phase pipeline: data collection (2 nodes), contrastive pretraining,
downstream heads (presence/count/activity/vitals), package & distribute.
Validated: 118 features from 2 nodes in 60s, witness chain intact.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-02 20:42:37 -04:00
ruv
6464023780 docs: update README banner — Alpha → Beta, remove fixed issues
- #249 (multi-node person counting) fixed by ADR-068 in v0.5.3
- #318 (training plateau) resolved
- Add #348 (n_persons overcount) as current known issue
- Add Cognitum Seed link for spatial resolution improvement

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-02 20:34:52 -04:00
rUv
7b12b36889
feat: ADR-069 ESP32 CSI → Cognitum Seed RVF pipeline (v0.5.4-esp32)
feat: ADR-069 ESP32 CSI → Cognitum Seed RVF pipeline (v0.5.4-esp32)
2026-04-02 19:55:12 -04:00
ruv
27d17431c5 docs: update README and user guide with Cognitum Seed integration
- Add ESP32 + Cognitum Seed as recommended hardware option ($27 BOM)
- Add v0.5.4-esp32 to firmware release table
- Add Cognitum Seed setup section to user guide with bridge usage,
  feature vector dimensions, and architecture diagram
- Update table of contents

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-02 19:48:01 -04:00
ruv
a4bd2308b7 feat: ADR-069 ESP32 CSI → Cognitum Seed RVF pipeline (v0.5.4-esp32)
Hardware-validated pipeline connecting ESP32-S3 CSI sensing to Cognitum
Seed (Pi Zero 2 W) edge intelligence appliance via 8-dim feature vectors.

Firmware:
- New 48-byte feature vector packet (magic 0xC5110003) at 1 Hz with
  normalized presence, motion, breathing, heart rate, phase variance,
  person count, fall detection, and RSSI
- Compressed frame magic reassigned 0xC5110003 → 0xC5110005
- Guard against uninitialized s_top_k read when count=0

Bridge (scripts/seed_csi_bridge.py):
- UDP→HTTPS ingest with bearer token, hash-based vector IDs
- --validate (kNN), --stats, --compact, --allowed-sources modes
- NaN/inf rejection, retry logic, SEED_TOKEN env var support

Validated on live hardware:
- 941 vectors ingested, 100% kNN exact match
- Witness chain SHA-256 verified (1,325 entries)
- 1,463 Rust tests passed, Python proof VERDICT: PASS

Research: 26 docs covering Arena Physica, Maxwell's equations in WiFi
sensing, SOTA survey 2025-2026, GOAP implementation plan

Security: removed hardcoded credentials, added NVS patterns to
.gitignore, source IP filtering, NaN validation

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-02 19:32:18 -04:00
rUv
3733e54aef
feat: cross-node fusion + DynamicMinCut + RSSI tracking (v0.5.3)
Some checks failed
Continuous Integration / Tests-2 (push) Has been cancelled
Firmware CI / Build ESP32-S3 Firmware (push) Has been cancelled
Firmware QEMU Tests (ADR-061) / Build Espressif QEMU (push) Has been cancelled
Firmware QEMU Tests (ADR-061) / Fuzz Testing (ADR-061 Layer 6) (push) Has been cancelled
Firmware QEMU Tests (ADR-061) / NVS Matrix Generation (push) Has been cancelled
Security Scanning / Static Application Security Testing (push) Has been cancelled
Security Scanning / Dependency Vulnerability Scan (push) Has been cancelled
Security Scanning / Container Security Scan (push) Has been cancelled
Security Scanning / Infrastructure Security Scan (push) Has been cancelled
Security Scanning / Secret Scanning (push) Has been cancelled
Security Scanning / License Compliance Scan (push) Has been cancelled
Security Scanning / Security Policy Compliance (push) Has been cancelled
Continuous Deployment / Deploy to Staging (push) Has been cancelled
Continuous Deployment / Deploy to Production (push) Has been cancelled
Continuous Deployment / Rollback Deployment (push) Has been cancelled
Continuous Deployment / Post-deployment Monitoring (push) Has been cancelled
Continuous Deployment / Notify Deployment Status (push) Has been cancelled
Continuous Integration / Performance Tests (push) Has been cancelled
Continuous Integration / Docker Build & Test (push) Has been cancelled
Continuous Integration / API Documentation (push) Has been cancelled
Continuous Integration / Notify (push) Has been cancelled
Firmware QEMU Tests (ADR-061) / QEMU Test (boundary-max) (push) Has been cancelled
Firmware QEMU Tests (ADR-061) / QEMU Test (boundary-min) (push) Has been cancelled
Firmware QEMU Tests (ADR-061) / QEMU Test (default) (push) Has been cancelled
Firmware QEMU Tests (ADR-061) / QEMU Test (edge-tier0) (push) Has been cancelled
Firmware QEMU Tests (ADR-061) / QEMU Test (edge-tier1) (push) Has been cancelled
Firmware QEMU Tests (ADR-061) / QEMU Test (full-adr060) (push) Has been cancelled
Firmware QEMU Tests (ADR-061) / QEMU Test (tdm-3node) (push) Has been cancelled
Firmware QEMU Tests (ADR-061) / Swarm Test (ADR-062) (push) Has been cancelled
Security Scanning / Security Report (push) Has been cancelled
* feat(server): cross-node RSSI-weighted feature fusion + benchmarks

Adds fuse_multi_node_features() that combines CSI features across all
active ESP32 nodes using RSSI-based weighting (closer node = higher weight).

Benchmark results (2 ESP32 nodes, 30s, ~1500 frames):

  Metric               | Baseline | Fusion  | Improvement
  ---------------------|----------|---------|------------
  Variance mean        |    109.4 |    77.6 | -29% noise
  Variance std         |    154.1 |   105.4 | -32% stability
  Confidence           |    0.643 |   0.686 | +7%
  Keypoint spread std  |      4.5 |     1.3 | -72% jitter
  Presence ratio       |   93.4%  |  94.6%  | +1.3pp

Person count still fluctuates near threshold — tracked as known issue.

Verified on real hardware: COM6 (node 1) + COM9 (node 2) on ruv.net.

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix(ui): add client-side lerp smoothing to pose renderer

Keypoints now interpolate between frames (alpha=0.25) instead of
jumping directly to new positions. This eliminates visual jitter
that persists even with server-side EMA smoothing, because the
renderer was drawing every WebSocket frame at full rate.

Applied to skeleton, keypoints, and dense body rendering paths.

Co-Authored-By: claude-flow <ruv@ruv.net>

* feat: DynamicMinCut person separation + UI lerp smoothing

- Added ruvector-mincut dependency to sensing server
- Replaced variance-based person scoring with actual graph min-cut on
  subcarrier temporal correlation matrix (Pearson correlation edges,
  DynamicMinCut exact max-flow)
- Recalibrated feature scaling for real ESP32 data ranges
- UI: client-side lerp interpolation (alpha=0.25) on keypoint positions
- Dampened procedural animation (noise, stride, extremity jitter)
- Person count thresholds retuned for mincut ratio

Co-Authored-By: claude-flow <ruv@ruv.net>

* docs: update CHANGELOG with v0.5.1-v0.5.3 releases

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-30 21:55:44 -04:00
rUv
cd84c35f8f
feat: cross-node RSSI-weighted feature fusion (benchmarked)
Some checks are pending
Continuous Deployment / Post-deployment Monitoring (push) Blocked by required conditions
Continuous Deployment / Notify Deployment Status (push) Blocked by required conditions
Continuous Integration / Code Quality & Security (push) Waiting to run
Continuous Integration / Tests (push) Waiting to run
Continuous Integration / Tests-1 (push) Waiting to run
Continuous Integration / Tests-2 (push) Waiting to run
Continuous Integration / Performance Tests (push) Blocked by required conditions
Continuous Integration / Docker Build & Test (push) Blocked by required conditions
Continuous Integration / API Documentation (push) Blocked by required conditions
Continuous Integration / Notify (push) Blocked by required conditions
Firmware CI / Build ESP32-S3 Firmware (push) Waiting to run
Firmware QEMU Tests (ADR-061) / Build Espressif QEMU (push) Waiting to run
Firmware QEMU Tests (ADR-061) / QEMU Test (boundary-max) (push) Blocked by required conditions
Firmware QEMU Tests (ADR-061) / QEMU Test (boundary-min) (push) Blocked by required conditions
Firmware QEMU Tests (ADR-061) / QEMU Test (default) (push) Blocked by required conditions
Firmware QEMU Tests (ADR-061) / QEMU Test (edge-tier0) (push) Blocked by required conditions
Firmware QEMU Tests (ADR-061) / QEMU Test (edge-tier1) (push) Blocked by required conditions
Firmware QEMU Tests (ADR-061) / QEMU Test (full-adr060) (push) Blocked by required conditions
Firmware QEMU Tests (ADR-061) / QEMU Test (tdm-3node) (push) Blocked by required conditions
Firmware QEMU Tests (ADR-061) / Fuzz Testing (ADR-061 Layer 6) (push) Waiting to run
Firmware QEMU Tests (ADR-061) / NVS Matrix Generation (push) Waiting to run
Firmware QEMU Tests (ADR-061) / Swarm Test (ADR-062) (push) Blocked by required conditions
Security Scanning / Static Application Security Testing (push) Waiting to run
Security Scanning / Dependency Vulnerability Scan (push) Waiting to run
Security Scanning / Container Security Scan (push) Waiting to run
Security Scanning / Infrastructure Security Scan (push) Waiting to run
Security Scanning / Secret Scanning (push) Waiting to run
Security Scanning / License Compliance Scan (push) Waiting to run
Security Scanning / Security Policy Compliance (push) Waiting to run
Security Scanning / Security Report (push) Blocked by required conditions
Adds fuse_multi_node_features() that combines CSI features across all
active ESP32 nodes using RSSI-based weighting (closer node = higher weight).

Benchmark results (2 ESP32 nodes, 30s, ~1500 frames):

  Metric               | Baseline | Fusion  | Improvement
  ---------------------|----------|---------|------------
  Variance mean        |    109.4 |    77.6 | -29% noise
  Variance std         |    154.1 |   105.4 | -32% stability
  Confidence           |    0.643 |   0.686 | +7%
  Keypoint spread std  |      4.5 |     1.3 | -72% jitter
  Presence ratio       |   93.4%  |  94.6%  | +1.3pp

Person count still fluctuates near threshold — tracked as known issue.

Verified on real hardware: COM6 (node 1) + COM9 (node 2) on ruv.net.
2026-03-30 15:48:33 -04:00
rUv
dd45160cc5
fix: skeleton jitter + person count stability (hardware-verified)
* chore: update vendored ruvector to latest main (v2.1.0-40)

Was at v2.0.5-172 (f8f2c600a), now at v2.1.0-40 (050c3fe6f).
316 commits with new crates: ruvector-coherence, sona, ruvector-core,
ruvector-gnn improvements, and security hardening.

Co-Authored-By: claude-flow <ruv@ruv.net>

* feat: RuVector Phases 2+3 — temporal smoothing, kinematic constraints, coherence gating

Phase 2 (sensing server):
- Temporal keypoint smoothing via EMA (alpha=0.3) with coherence-adaptive blending
- Coherence scoring: running variance of motion_energy over 20 frames
  - Low coherence → reduce alpha to 0.1 (trust measurements less)
- Per-node prev_keypoints for frame-to-frame smoothing
- Bone length clamping (±20%) in derive_single_person_pose

Phase 3 (signal crate):
- SkeletonConstraints: Jakobsen relaxation (3 iterations) on 12-bone
  COCO-17 kinematic tree — prevents impossible skeletons
- CompressedPoseHistory: two-tier storage (hot f32 + warm i16 quantized)
  for trajectory matching and re-ID
- 8 new tests for constraints + history

Vendored ruvector updated to v2.1.0-40 (latest main, 316 commits).
Workspace deps remain at v2.0.4 (crates.io) until v2.1.0 is published.

647 tests pass across both crates (0 failures).

Refs #296

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix(server): use max instead of sum for multi-node person aggregation

With nodes in the same room, each node sees the same people. Summing
per-node counts double-counted (2 nodes × 1 person = 2 persons).
Now uses max() so 2 nodes × 1 person = 1 person.

Verified on real hardware: COM6 (node 1) + COM9 (node 2) on ruv.net,
estimated_persons=1 with 1 person in room.

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix(server): reduce skeleton jitter + raise person count thresholds

- EMA alpha 0.3→0.15, low-coherence 0.1→0.05
- Remove tick-based noise (main jitter source)
- Breathing 5x slower, extremity jitter 3x smaller, stride 2x smaller
- Person count 1→2 threshold 0.65→0.80
- Aggregation sum→max for same-room nodes

Verified on COM6+COM9: 1 person stable.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-30 15:17:48 -04:00
rUv
5e5781b28a
feat: RuVector all phases — temporal smoothing + kinematic constraints + coherence
* chore: update vendored ruvector to latest main (v2.1.0-40)

Was at v2.0.5-172 (f8f2c600a), now at v2.1.0-40 (050c3fe6f).
316 commits with new crates: ruvector-coherence, sona, ruvector-core,
ruvector-gnn improvements, and security hardening.

Co-Authored-By: claude-flow <ruv@ruv.net>

* feat: RuVector Phases 2+3 — temporal smoothing, kinematic constraints, coherence gating

Phase 2 (sensing server):
- Temporal keypoint smoothing via EMA (alpha=0.3) with coherence-adaptive blending
- Coherence scoring: running variance of motion_energy over 20 frames
  - Low coherence → reduce alpha to 0.1 (trust measurements less)
- Per-node prev_keypoints for frame-to-frame smoothing
- Bone length clamping (±20%) in derive_single_person_pose

Phase 3 (signal crate):
- SkeletonConstraints: Jakobsen relaxation (3 iterations) on 12-bone
  COCO-17 kinematic tree — prevents impossible skeletons
- CompressedPoseHistory: two-tier storage (hot f32 + warm i16 quantized)
  for trajectory matching and re-ID
- 8 new tests for constraints + history

Vendored ruvector updated to v2.1.0-40 (latest main, 316 commits).
Workspace deps remain at v2.0.4 (crates.io) until v2.1.0 is published.

647 tests pass across both crates (0 failures).

Refs #296

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-30 14:23:21 -04:00
rUv
6f23e89909
fix: deep review optimizations — firmware + server
* feat(signal): subcarrier importance weighting via mincut partition (Phase 1)

Adds subcarrier_importance_weights() to ruvector signal crate — converts
mincut partition into per-subcarrier float weights (>1.0 for sensitive,
0.5 for insensitive subcarriers).

Sensing server now uses weighted mean/variance in extract_features_from_frame
instead of treating all 56 subcarriers equally. This emphasizes body-motion-
sensitive subcarriers and reduces noise from static multipath.

Expected: ~26% reduction in keypoint jitter (±15cm → ±11cm RMS).

284 tests pass (191 trainer + 51 lib + 18 vital_signs + 16 dataset + 8 multi_node).

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix(firmware): stack overflow risk + tick-rate independence (review findings)

Critical fixes from deep review:

1. **Stack overflow prevention**: Moved BPM scratch buffers (br_buf, hr_buf)
   from stack to static storage in both process_frame() and
   update_multi_person_vitals(). Combined stack was ~6.5-7.5 KB of 8 KB
   limit — now reduced by ~4 KB to safe margins.

2. **Tick-rate independence**: Post-batch yield now uses
   pdMS_TO_TICKS(20) with min-1 guard instead of raw vTaskDelay(2).
   Previously assumed 100Hz tick rate.

3. **EDGE_BATCH_LIMIT to header**: Moved from local const to
   edge_processing.h #define for configurability.

Firmware builds clean at 843 KB.

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix(server): stale node eviction, remove unsafe pointer (review findings)

Critical fixes from deep review:

1. **Stale node eviction**: node_states HashMap now evicts nodes with no
   frame for >60 seconds, every 100 ticks. Prevents unbounded memory
   growth and stale smoothing data when nodes are replaced.

2. **Remove unsafe raw pointer**: Replaced the unsafe raw pointer to
   adaptive_model (used to break borrow checker deadlock with
   node_states) with a safe .clone() before the mutable borrow.
   AdaptiveModel derives Clone so this is a clean copy.

284 tests pass, zero failures.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-30 13:31:07 -04:00
rUv
1dcf5d42eb
feat(signal): subcarrier importance weighting — RuVector Phase 1
Adds subcarrier_importance_weights() to ruvector signal crate — converts
mincut partition into per-subcarrier float weights (>1.0 for sensitive,
0.5 for insensitive subcarriers).

Sensing server now uses weighted mean/variance in extract_features_from_frame
instead of treating all 56 subcarriers equally. This emphasizes body-motion-
sensitive subcarriers and reduces noise from static multipath.

Expected: ~26% reduction in keypoint jitter (±15cm → ±11cm RMS).

284 tests pass (191 trainer + 51 lib + 18 vital_signs + 16 dataset + 8 multi_node).
2026-03-30 13:20:05 -04:00
rUv
9814d2bc62
fix(server): correct RSSI byte offset in frame parser (#332)
Some checks are pending
Continuous Deployment / Pre-deployment Checks (push) Waiting to run
Continuous Deployment / Deploy to Staging (push) Blocked by required conditions
Continuous Deployment / Deploy to Production (push) Blocked by required conditions
Continuous Deployment / Rollback Deployment (push) Blocked by required conditions
Continuous Deployment / Post-deployment Monitoring (push) Blocked by required conditions
Continuous Deployment / Notify Deployment Status (push) Blocked by required conditions
Continuous Integration / Code Quality & Security (push) Waiting to run
Continuous Integration / Tests (push) Waiting to run
Continuous Integration / Tests-1 (push) Waiting to run
Continuous Integration / Tests-2 (push) Waiting to run
Continuous Integration / Performance Tests (push) Blocked by required conditions
Continuous Integration / Docker Build & Test (push) Blocked by required conditions
Continuous Integration / API Documentation (push) Blocked by required conditions
Continuous Integration / Notify (push) Blocked by required conditions
Security Scanning / Static Application Security Testing (push) Waiting to run
Security Scanning / Dependency Vulnerability Scan (push) Waiting to run
Security Scanning / Container Security Scan (push) Waiting to run
Security Scanning / Infrastructure Security Scan (push) Waiting to run
Security Scanning / Secret Scanning (push) Waiting to run
Security Scanning / License Compliance Scan (push) Waiting to run
Security Scanning / Security Policy Compliance (push) Waiting to run
Security Scanning / Security Report (push) Blocked by required conditions
The server parsed rssi from buf[14] and noise_floor from buf[15], but
the firmware (csi_collector.c) packs them at buf[16] and buf[17]:

  Firmware:  n_subcarriers=u16(6-7) freq=u32(8-11) seq=u32(12-15) rssi=i8(16)
  Server:    n_subcarriers=u8(6)    freq=u16(8-9)  seq=u32(10-13) rssi=i8(14) ← WRONG

This caused RSSI to read the high byte of the sequence counter instead
of the actual signed RSSI value, producing positive values (e.g., +9)
instead of the correct negative values (e.g., -46 dBm).

Added inline documentation of the frame layout matching csi_collector.c.

Closes #332
2026-03-30 11:54:03 -04:00
ruv
7f02c87c6f test(server): add multi-node mesh integration tests (ADR-068)
Some checks failed
Continuous Deployment / Pre-deployment Checks (push) Has been cancelled
Continuous Integration / Code Quality & Security (push) Has been cancelled
Continuous Integration / Tests (push) Has been cancelled
Continuous Integration / Tests-1 (push) Has been cancelled
Continuous Integration / Tests-2 (push) Has been cancelled
Firmware CI / Build ESP32-S3 Firmware (push) Has been cancelled
Security Scanning / Static Application Security Testing (push) Has been cancelled
Security Scanning / Dependency Vulnerability Scan (push) Has been cancelled
Security Scanning / Container Security Scan (push) Has been cancelled
Security Scanning / Infrastructure Security Scan (push) Has been cancelled
Security Scanning / Secret Scanning (push) Has been cancelled
Security Scanning / License Compliance Scan (push) Has been cancelled
Security Scanning / Security Policy Compliance (push) Has been cancelled
Continuous Deployment / Deploy to Staging (push) Has been cancelled
Continuous Deployment / Deploy to Production (push) Has been cancelled
Continuous Deployment / Rollback Deployment (push) Has been cancelled
Continuous Deployment / Post-deployment Monitoring (push) Has been cancelled
Continuous Deployment / Notify Deployment Status (push) Has been cancelled
Continuous Integration / Performance Tests (push) Has been cancelled
Continuous Integration / Docker Build & Test (push) Has been cancelled
Continuous Integration / API Documentation (push) Has been cancelled
Continuous Integration / Notify (push) Has been cancelled
Security Scanning / Security Report (push) Has been cancelled
8 tests covering per-node state pipeline:
- Frame builder validity (CSI + vitals packet formats)
- Different nodes produce different I/Q patterns
- Multi-node UDP send (1/3/5/7/11 nodes)
- Mesh simulation with variable rates and node dropout
- Large mesh: 100 nodes x 10 frames = 1,000 frames
- Max scale: 255 unique node_ids

All 26 server tests pass (8 new + 18 existing vital signs).

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-28 11:06:57 -04:00
ruv
9a074bdf4f fix(ci): upgrade Firmware CI to IDF v5.4, replace xxd with od (#327)
- Container: espressif/idf:v5.2 → v5.4 (matches QEMU workflow)
- Replace xxd calls with od (xxd not available in IDF container)
- Add ota_data_initial.bin to artifact upload
- Extend artifact retention to 90 days

The xxd:not-found error was blocking all Firmware CI builds since the
container migration. This unblocks binary artifact generation for
release assets.

Closes #327

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-28 11:01:44 -04:00
rUv
3c02f6cfb0
feat(server): per-node state pipeline for multi-node sensing (#249)
Some checks failed
Continuous Deployment / Post-deployment Monitoring (push) Blocked by required conditions
Continuous Deployment / Notify Deployment Status (push) Blocked by required conditions
Continuous Integration / Code Quality & Security (push) Waiting to run
Continuous Integration / Tests (push) Waiting to run
Continuous Integration / Tests-1 (push) Waiting to run
Continuous Integration / Tests-2 (push) Waiting to run
Continuous Integration / Performance Tests (push) Blocked by required conditions
Continuous Integration / Docker Build & Test (push) Blocked by required conditions
Continuous Integration / API Documentation (push) Blocked by required conditions
Continuous Integration / Notify (push) Blocked by required conditions
Firmware CI / Build ESP32-S3 Firmware (push) Waiting to run
Security Scanning / Static Application Security Testing (push) Waiting to run
Security Scanning / Dependency Vulnerability Scan (push) Waiting to run
Security Scanning / Container Security Scan (push) Waiting to run
Security Scanning / Infrastructure Security Scan (push) Waiting to run
Security Scanning / Secret Scanning (push) Waiting to run
Security Scanning / License Compliance Scan (push) Waiting to run
Security Scanning / Security Policy Compliance (push) Waiting to run
Security Scanning / Security Report (push) Blocked by required conditions
Firmware QEMU Tests (ADR-061) / Build Espressif QEMU (push) Has been cancelled
Firmware QEMU Tests (ADR-061) / Fuzz Testing (ADR-061 Layer 6) (push) Has been cancelled
Firmware QEMU Tests (ADR-061) / NVS Matrix Generation (push) Has been cancelled
Firmware QEMU Tests (ADR-061) / QEMU Test (boundary-max) (push) Has been cancelled
Firmware QEMU Tests (ADR-061) / QEMU Test (boundary-min) (push) Has been cancelled
Firmware QEMU Tests (ADR-061) / QEMU Test (default) (push) Has been cancelled
Firmware QEMU Tests (ADR-061) / QEMU Test (edge-tier0) (push) Has been cancelled
Firmware QEMU Tests (ADR-061) / QEMU Test (edge-tier1) (push) Has been cancelled
Firmware QEMU Tests (ADR-061) / QEMU Test (full-adr060) (push) Has been cancelled
Firmware QEMU Tests (ADR-061) / QEMU Test (tdm-3node) (push) Has been cancelled
Firmware QEMU Tests (ADR-061) / Swarm Test (ADR-062) (push) Has been cancelled
* docs(adr): ADR-068 per-node state pipeline for multi-node sensing (#249)

Documents the architectural change from single shared state to per-node
HashMap<u8, NodeState> in the sensing server. Includes scaling analysis
(256 nodes < 13 MB), QEMU validation plan, and aggregation strategy.

Also links README hero image to the explainer video.

Co-Authored-By: claude-flow <ruv@ruv.net>

* feat(server): per-node state pipeline for multi-node sensing (ADR-068, #249)

Replaces the single shared state pipeline with per-node HashMap<u8, NodeState>.
Each ESP32 node now gets independent:
- frame_history (temporal analysis)
- smoothed_person_score / prev_person_count
- smoothed_motion / baseline / debounce state
- vital sign detector + smoothing buffers
- RSSI history

Multi-node aggregation:
- Person count = sum of per-node counts for active nodes (seen <10s)
- SensingUpdate.nodes includes all active nodes
- estimated_persons reflects cross-node aggregate

Single-node deployments behave identically (HashMap has one entry).
Simulated data path unchanged for backward compatibility.

Closes #249
Refs #237, #276, #282

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-27 17:52:51 -04:00
ruv
23dedecf0c docs(adr): ADR-068 per-node state pipeline for multi-node sensing (#249)
Documents the architectural change from single shared state to per-node
HashMap<u8, NodeState> in the sensing server. Includes scaling analysis
(256 nodes < 13 MB), QEMU validation plan, and aggregation strategy.

Also links README hero image to the explainer video.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-27 17:45:43 -04:00
ruv
c2e564a9f4 docs(readme): expand alpha notice with known limitations
List specific known issues (multi-node detection, training plateau,
no pre-trained weights, hardware compatibility) to set expectations
for new users.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-27 17:40:39 -04:00
rUv
40f19622af
fix(firmware,server): watchdog crash + no detection from edge vitals (#321, #323)
* fix(firmware,server): watchdog crash on busy LANs + no detection from edge vitals (#321, #323)

**Firmware (#321):** edge_dsp task now batch-limits frame processing to 4
frames before a 10ms yield. On corporate LANs with high CSI frame rates,
the previous 1-tick-per-frame yield wasn't enough to prevent IDLE1
starvation and task watchdog triggers.

**Sensing server (#323):** When ESP32 runs the edge DSP pipeline (Tier 2+),
it sends vitals packets (magic 0xC5110002) instead of raw CSI frames.
Previously, the server broadcast these as raw edge_vitals but never
generated a sensing_update, so the UI showed "connected" but "0 persons".
Now synthesizes a full sensing_update from vitals data including
classification, person count, and pose generation.

Closes #321
Closes #323

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix(firmware): address review findings — idle busy-spin and observability

- Fix pdMS_TO_TICKS(5)==0 at 100Hz causing busy-spin in idle path (use
  vTaskDelay(1) instead)
- Post-batch yield now 2 ticks (20ms) for genuinely longer pause
- Add s_ring_drops counter to ring_push for diagnosing frame drops
- Expose drop count in periodic vitals log line

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix(server): set breathing_band_power for skeleton animation from vitals

When presence is detected via edge vitals, set breathing_band_power to
0.5 so the UI's torso breathing animation works. Previously hardcoded
to 0.0 which made the skeleton appear static even when breathing rate
was being reported.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-27 17:31:06 -04:00
rUv
022499b2f5
fix: add wifi_densepose package for correct module import (#314)
The README Quick Start tells users to `pip install wifi-densepose` and then
`from wifi_densepose import WiFiDensePose`, but no `wifi_densepose` Python
package existed — only `v1/src`. This adds a top-level `wifi_densepose/`
package with a WiFiDensePose facade class matching the documented API, and
updates pyproject.toml to include it in the distribution.

Closes #314
2026-03-27 17:31:03 -04:00
rUv
e6068c5efe
Enhance README with Cognitum.One reference
Some checks failed
Continuous Deployment / Pre-deployment Checks (push) Has been cancelled
Continuous Integration / Code Quality & Security (push) Has been cancelled
Continuous Integration / Tests (push) Has been cancelled
Continuous Integration / Tests-1 (push) Has been cancelled
Continuous Integration / Tests-2 (push) Has been cancelled
Security Scanning / Dependency Vulnerability Scan (push) Has been cancelled
Security Scanning / Static Application Security Testing (push) Has been cancelled
Security Scanning / Container Security Scan (push) Has been cancelled
Security Scanning / Infrastructure Security Scan (push) Has been cancelled
Security Scanning / Secret Scanning (push) Has been cancelled
Security Scanning / License Compliance Scan (push) Has been cancelled
Security Scanning / Security Policy Compliance (push) Has been cancelled
Continuous Deployment / Deploy to Staging (push) Has been cancelled
Continuous Deployment / Deploy to Production (push) Has been cancelled
Continuous Deployment / Rollback Deployment (push) Has been cancelled
Continuous Deployment / Post-deployment Monitoring (push) Has been cancelled
Continuous Deployment / Notify Deployment Status (push) Has been cancelled
Continuous Integration / Performance Tests (push) Has been cancelled
Continuous Integration / Docker Build & Test (push) Has been cancelled
Continuous Integration / API Documentation (push) Has been cancelled
Continuous Integration / Notify (push) Has been cancelled
Security Scanning / Security Report (push) Has been cancelled
Updated project description to include Cognitum.One.
2026-03-25 21:21:58 -04:00
rUv
7a13877fa3
fix(sensing-server): detect ESP32 offline after 5s frame timeout (#300)
Some checks failed
Continuous Deployment / Pre-deployment Checks (push) Has been cancelled
Continuous Integration / Code Quality & Security (push) Has been cancelled
Continuous Integration / Tests (push) Has been cancelled
Continuous Integration / Tests-1 (push) Has been cancelled
Continuous Integration / Tests-2 (push) Has been cancelled
Security Scanning / License Compliance Scan (push) Has been cancelled
Security Scanning / Static Application Security Testing (push) Has been cancelled
Security Scanning / Dependency Vulnerability Scan (push) Has been cancelled
Security Scanning / Container Security Scan (push) Has been cancelled
Security Scanning / Infrastructure Security Scan (push) Has been cancelled
Security Scanning / Secret Scanning (push) Has been cancelled
Security Scanning / Security Policy Compliance (push) Has been cancelled
Continuous Deployment / Deploy to Staging (push) Has been cancelled
Continuous Deployment / Deploy to Production (push) Has been cancelled
Continuous Deployment / Rollback Deployment (push) Has been cancelled
Continuous Deployment / Post-deployment Monitoring (push) Has been cancelled
Continuous Deployment / Notify Deployment Status (push) Has been cancelled
Continuous Integration / Performance Tests (push) Has been cancelled
Continuous Integration / Docker Build & Test (push) Has been cancelled
Continuous Integration / API Documentation (push) Has been cancelled
Continuous Integration / Notify (push) Has been cancelled
Security Scanning / Security Report (push) Has been cancelled
The source field was set to "esp32" on the first UDP frame but never
reverted when frames stopped arriving. This caused the UI to show
"Real hardware connected" indefinitely after powering off all nodes.

Changes:
- Add last_esp32_frame timestamp to AppStateInner
- Add effective_source() method with 5-second timeout
- Source becomes "esp32:offline" when no frames received within 5s
- Health endpoint shows "degraded" instead of "healthy" when offline
- All 6 status/health/info API endpoints use effective_source()

Fixes #297

Co-authored-by: Reuven <cohen@ruv-mac-mini.local>
2026-03-24 08:00:18 -04:00
Reuven
6c98c98920 docs(adr): ADR-067 RuVector v2.0.5 upgrade + new crate adoption plan
Some checks are pending
Continuous Deployment / Pre-deployment Checks (push) Waiting to run
Continuous Deployment / Deploy to Staging (push) Blocked by required conditions
Continuous Deployment / Deploy to Production (push) Blocked by required conditions
Continuous Deployment / Rollback Deployment (push) Blocked by required conditions
Continuous Deployment / Post-deployment Monitoring (push) Blocked by required conditions
Continuous Deployment / Notify Deployment Status (push) Blocked by required conditions
Continuous Integration / Code Quality & Security (push) Waiting to run
Continuous Integration / Tests (push) Waiting to run
Continuous Integration / Tests-1 (push) Waiting to run
Continuous Integration / Tests-2 (push) Waiting to run
Continuous Integration / Performance Tests (push) Blocked by required conditions
Continuous Integration / Docker Build & Test (push) Blocked by required conditions
Continuous Integration / API Documentation (push) Blocked by required conditions
Continuous Integration / Notify (push) Blocked by required conditions
Security Scanning / Static Application Security Testing (push) Waiting to run
Security Scanning / Dependency Vulnerability Scan (push) Waiting to run
Security Scanning / Container Security Scan (push) Waiting to run
Security Scanning / Infrastructure Security Scan (push) Waiting to run
Security Scanning / Secret Scanning (push) Waiting to run
Security Scanning / License Compliance Scan (push) Waiting to run
Security Scanning / Security Policy Compliance (push) Waiting to run
Security Scanning / Security Report (push) Blocked by required conditions
4-phase plan to upgrade core ruvector dependencies and adopt new crates:
- Phase 1: Bump 5 core crates 2.0.4→2.0.5 (10-30% mincut perf, security fixes)
- Phase 2: Add ruvector-coherence for spectral multi-node CSI coherence
- Phase 3: Add SONA adaptive learning to replace manual logistic regression
- Phase 4: Evaluate ruvector-core ONNX embeddings for CSI pattern matching

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-23 21:51:43 -04:00
rUv
5f3c90bf1c
fix(sensing-server): add real hysteresis to person count estimation (#295)
The person-count heuristic was causing widespread flickering (#237, #249,
#280, #292) because:

1. Threshold 0.50 for 2-persons was too low — multipath reflections in
   small rooms easily exceeded it
2. No actual hysteresis despite the comment claiming asymmetric thresholds
3. EMA smoothing (α=0.15) was too responsive to transient spikes

Changes:
- Raise up-thresholds: 1→2 persons at 0.65 (was 0.50), 2→3 at 0.85 (was 0.80)
- Add true hysteresis with asymmetric down-thresholds: 2→1 at 0.45, 3→2 at 0.70
- Track prev_person_count in SensingState for state-aware transitions
- Increase EMA smoothing to α=0.10 (~2s time constant at 20 Hz)
- Update all 4 call sites (ESP32, Windows WiFi, multi-BSSID, simulated)

Fixes #292, #280, #237

Co-authored-by: Reuven <cohen@ruv-mac-mini.local>
2026-03-23 21:37:52 -04:00
ruv
4713a30402 docs: add README for happiness-vector example
Quick start guide, 8-dim vector schema, multi-node swarm setup,
Seed query tool usage, privacy considerations, and file index.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-20 18:51:05 -04:00
rUv
2b8a7cc458
feat: happiness scoring pipeline + ESP32 swarm with Cognitum Seed (#285)
* feat: happiness scoring pipeline with ESP32 swarm + Cognitum Seed coordinator

ADR-065: Hotel guest happiness scoring from WiFi CSI physiological proxies.
ADR-066: ESP32 swarm with Cognitum Seed as coordinator for multi-zone analytics.

Firmware:
- swarm_bridge.c/h: FreeRTOS task on Core 0, HTTP client with Bearer auth,
  registers with Seed, sends heartbeats (30s) and happiness vectors (5s)
- nvs_config: seed_url, seed_token, zone_name, swarm intervals
- provision.py: --seed-url, --seed-token, --zone CLI args
- esp32-hello-world: capability discovery firmware for 4MB ESP32-S3 variant

WASM edge modules:
- exo_happiness_score.rs: 8-dim happiness vector from gait speed, stride
  regularity, movement fluidity, breathing calm, posture, dwell time
  (events 690-694, 11 tests, ESP32-optimized buffers + event decimation)
- ghost_hunter.rs standalone binary: 5.7 KB WASM, feature-gated default pipeline

RuView Live:
- --mode happiness dashboard with bar visualization
- --seed flag for Cognitum Seed bridge (urllib, background POST)
- HappinessScorer + SeedBridge classes (stdlib only, no deps)

Examples:
- seed_query.py: CLI tool (status, search, witness, monitor, report)
- provision_swarm.sh: batch provisioning for multi-node deployment
- happiness_vector_schema.json: 8-dim vector format documentation

Verified live: ESP32 on COM5 (4MB flash) registered with Seed at 10.1.10.236,
vectors flowing, witness chain growing (epoch 455, chain 1108).

Co-Authored-By: claude-flow <ruv@ruv.net>

* ci: raise firmware binary size gate to 1100 KB for HTTP client stack

The swarm bridge (ADR-066) adds esp_http_client for Seed communication,
which pulls in the HTTP/TLS stack (~150 KB). Binary grew from ~978 KB to
~1077 KB. Raise the gate from 950 KB to 1100 KB. Still fits comfortably
in both 4MB (1856 KB OTA slot, 43% free) and 8MB flash variants.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-20 18:46:34 -04:00
ruv
8a84748a83 fix(firmware): use NVS node_id instead of Kconfig constant (#279)
CONFIG_CSI_NODE_ID (compile-time, always 1) was hardcoded in 6
places: CSI frame serialization, compressed frames, vitals packets,
WASM output packets, and display UI. NVS provisioning wrote the
correct node_id but it was never used at runtime.

Fixed all occurrences to use g_nvs_config.node_id:
- csi_collector.c: frame header + log message
- edge_processing.c: compressed frame + vitals packet
- wasm_runtime.c: WASM output packet
- display_ui.c: system info display

This means --node-id 0/1/2 provisioning now actually works for
multi-node mesh deployments.

Closes #279

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-16 15:12:45 -04:00
ruv
578d84c25e fix(ui): WebSocket protocol matches page protocol, not hostname (#272)
buildWsUrl() forced wss:// on non-localhost HTTP connections,
breaking LAN/Docker deployments at http://192.168.x.x:3000.
Now simply: https → wss, http → ws.

Closes #272

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-16 11:35:11 -04:00
ruv
7eba8c7286 feat: 10-in-1 medical vitals suite from single mmWave sensor
examples/medical/vitals_suite.py — all 10 capabilities:
1. Heart rate (continuous)
2. Breathing rate (continuous)
3. Blood pressure estimation (HRV-based)
4. HRV stress analysis (SDNN, RMSSD, pNN50)
5. Sleep stage classification (awake/light/deep/REM)
6. Apnea event detection (BR=0 for >10s, AHI scoring)
7. Cough detection (BR spike > 2.5x baseline)
8. Snoring detection (periodic high-amplitude BR)
9. Activity state (resting/active/exercising)
10. Meditation quality scorer (BR regularity + HR + HRV)

Uses Welford online stats, zero-crossing analysis, and
variability-based state classification. Single $15 sensor.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-15 18:05:42 -04:00
ruv
a7d417837f feat: RuView Live v2 — RuVector signal processing integration
Ported 5 RuVector/RuvSense algorithms from Rust to Python:
- WelfordStats (field_model.rs): online mean/variance/z-score
- VitalAnomalyDetector (vitals/anomaly.rs): Welford z-score apnea/tachy/brady
- LongitudinalTracker (ruvsense/longitudinal.rs): drift detection over time
- CoherenceScorer (ruvsense/coherence.rs): signal quality with decay
- HRVAnalyzer (vitals/heartrate.rs): SDNN, RMSSD, pNN50, LF/HF spectral

Live verified: detected HR anomaly (2.5sd drop) and BR drift (2.2sd rise)
from real mmWave + CSI data. Full session baselines tracked for 3 metrics.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-15 17:03:29 -04:00
ruv
4239dfa35a feat: RuView Live unified dashboard + improved examples README
ruview_live.py: single-file dashboard that auto-detects CSI and
mmWave sensors, displays fused vitals (HR, BR, BP, stress/HRV),
environment (light, RSSI, RF fingerprint), presence, and events.

Tested live: CSI 1000 frames/60s (17 Hz), light trending 7.4→6.0
lux, RSSI -57 to -72 dBm. Handles graceful degradation when
sensors are unavailable.

README: updated with unified dashboard as primary entry point,
hardware table with capabilities, expanded quick start.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-15 16:56:11 -04:00
ruv
24ea88cbe0 feat: 4 sensing examples — sleep apnea, stress, room environment
examples/sleep/apnea_screener.py — detects breathing cessation
events (>10s), computes AHI score, classifies OSA severity.

examples/stress/hrv_stress_monitor.py — real-time SDNN/RMSSD
from mmWave HR, stress level with visual bar.

examples/environment/room_monitor.py — dual-sensor (CSI + mmWave)
room awareness: occupancy, light, RF fingerprint, activity events.

examples/README.md — index with hardware table and quick start.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-15 16:50:04 -04:00
ruv
ef582b4429 docs: medical examples README + link from root README
- examples/medical/README.md: full guide for BP estimator,
  hardware requirements, sample output, accuracy table, AHA
  categories, disclaimer, RuView integration explanation
- README.md: added Medical Examples to documentation table

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-15 16:36:45 -04:00
ruv
8318f9c677 feat: contactless blood pressure estimation via mmWave HRV (examples/medical)
Reads real-time heart rate from MR60BHA2 60 GHz mmWave sensor and
estimates BP trends using HR/HRV correlation model:
- Mean HR → baseline SBP/DBP
- SDNN (HRV) → sympathetic/parasympathetic adjustment
- LF/HF spectral ratio → fine adjustment (with numpy)
- Optional calibration with a real BP reading

Verified on real hardware: 125/83 mmHg estimate from 35 HR samples
over 60 seconds at 84 bpm mean HR with 91ms SDNN.

NOT A MEDICAL DEVICE — research/wellness tracking only.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-15 16:24:47 -04:00
ruv
92a6986b79 docs: update all docs for v0.5.0-esp32 release
- README: v0.5.0 in release table, binary size 990/773 KB
- CHANGELOG: v0.5.0 entry with mmWave fusion, ADR-063/064
- User guide: v0.5.0 as recommended, binary size updated
- CLAUDE.md: supported hardware table, firmware build/release
  process, real-hardware-first testing policy

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-15 16:17:40 -04:00
rUv
66e2fa0835
feat: ADR-063/064 mmWave sensor fusion + multimodal ambient intelligence (#269)
* docs: ADR-063 mmWave sensor fusion with WiFi CSI

60 GHz mmWave radar (Seeed MR60BHA2, HLK-LD2410/LD2450) fusion
with WiFi CSI for dual-confirm fall detection, clinical-grade
vitals, and self-calibrating CSI pipeline.

Covers auto-detection, 6 supported sensors, Kalman fusion,
extended 48-byte vitals packet, RuVector/RuvSense integration
points, and 6-phase implementation plan.

Based on live hardware capture from ESP32-C6 + MR60BHA2 on COM4.

Co-Authored-By: claude-flow <ruv@ruv.net>

* feat(firmware): ADR-063 mmWave sensor fusion — full implementation

Phase 1-2 of ADR-063:

mmwave_sensor.c/h:
- MR60BHA2 UART parser (60 GHz: HR, BR, presence, distance)
- LD2410 UART parser (24 GHz: presence, distance)
- Auto-detection: probes UART for known frame headers at boot
- Mock generator for QEMU testing (synthetic HR 72±2, BR 16±1)
- Capability flag registration per sensor type

edge_processing.c/h:
- 48-byte fused vitals packet (magic 0xC5110004)
- Kalman-style fusion: mmWave 80% + CSI 20% when both available
- Automatic fallback to CSI-only 32-byte packet when no mmWave
- Dual presence flag (Bit3 = mmwave_present)

main.c:
- mmwave_sensor_init() called at boot with auto-detect
- Status logged in startup banner

Fuzz stubs updated for mmwave_sensor API.
Build verified: QEMU mock build passes.

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix(firmware): correct MR60BHA2 + LD2410 UART protocols (ADR-063)

MR60BHA2: SOF=0x01 (not 0x5359), XOR+NOT checksums on header and
data, frame types 0x0A14 (BR), 0x0A15 (HR), 0x0A16 (distance),
0x0F09 (presence). Based on Seeed Arduino library research.

LD2410: 256000 baud (not 115200), 0xAA report head marker,
target state byte at offset 2 (after data_type + head_marker).

Auto-detect: probes MR60 at 115200 first, then LD2410 at 256000.
Sets final baud rate after detection.

Co-Authored-By: claude-flow <ruv@ruv.net>

* feat: ADR-063 Phase 6 server-side mmWave + CSI fusion bridge

Python script reads both serial ports simultaneously:
- COM4 (ESP32-C6 + MR60BHA2): parses ESPHome debug output for HR, BR, presence, distance
- COM7 (ESP32-S3): reads CSI edge processing frames

Kalman-style fusion: mmWave 80% + CSI 20% for vitals, OR gate for presence.

Verified on real hardware: mmWave HR=75bpm, BR=25/min at 52cm range,
CSI frames flowing concurrently. Both sensors live for 30 seconds.

Co-Authored-By: claude-flow <ruv@ruv.net>

* docs: ADR-064 multimodal ambient intelligence roadmap

25+ applications across 4 tiers from practical to exotic:
- Tier 1 (build now): zero-FP fall detection, sleep monitoring,
  occupancy HVAC, baby breathing, bathroom safety
- Tier 2 (research): gait analysis, stress detection, gesture
  control, respiratory screening, multi-room activity
- Tier 3 (frontier): cardiac arrhythmia, RF tomography, sign
  language, cognitive load, swarm sensing
- Tier 4 (exotic): emotion contagion, lucid dreaming, plant
  monitoring, pet behavior

Priority matrix with effort estimates. All P0-P1 items work with
existing hardware (ESP32-S3 + MR60BHA2 + BH1750).

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix(ci): add ESP_ERR_NOT_FOUND to fuzz stubs

mmwave_sensor stub returns ESP_ERR_NOT_FOUND which wasn't
defined in the minimal esp_stubs.h for host-based fuzz testing.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-15 16:10:10 -04:00
ruv
7a97ffd8c7 docs: update README binary size and release table to v0.4.3.1
- Binary size: 947 KB → 978 KB (8MB) / 755 KB (4MB)
- Release table: v0.4.3 → v0.4.3.1 with watchdog fix (#266)

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-15 12:38:16 -04:00
ruv
2b3c3e4b45 docs: update user guide for v0.4.3.1 (release table, fall threshold, binary size)
- Release table: v0.4.3.1 as recommended, importance note updated
- fall_thresh default: 500→15000 with unit explanation
- Binary size: updated to 978 KB / 755 KB (was 777 KB)

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-15 12:27:31 -04:00
ruv
024d2583f0 fix(firmware): edge_dsp task watchdog starvation on Core 1 (#266)
process_frame() is CPU-intensive (biquad filters, Welford stats,
BPM estimation, multi-person vitals) and can run for several ms.
At priority 5, edge_dsp starves IDLE1 (priority 0) on Core 1,
triggering the task watchdog every 5 seconds.

Fix: vTaskDelay(1) after every frame to let IDLE1 reset the
watchdog. At 20 Hz CSI rate this adds ~1 ms per frame —
negligible for vitals extraction.

Verified on real ESP32-S3 with live WiFi CSI: 0 watchdog
triggers in 60 seconds (was triggering every 5s before fix).

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-15 12:06:54 -04:00
rUv
5b2aacd923
fix(firmware): fall detection, 4MB flash, QEMU CI (#263, #265)
* fix(firmware): fall detection false positives + 4MB flash support (#263, #265)

Issue #263: Default fall_thresh raised from 2.0 to 15.0 rad/s² — normal
walking produces accelerations of 2.5-5.0 which triggered constant false
"Fall Detected" alerts. Added consecutive-frame requirement (3 frames)
and 5-second cooldown debounce to prevent alert storms.

Issue #265: Added partitions_4mb.csv and sdkconfig.defaults.4mb for
ESP32-S3 boards with 4MB flash (e.g. SuperMini). OTA slots are 1.856MB
each, fitting the ~978KB firmware binary with room to spare.

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix(ci): repair all 3 QEMU workflow job failures

1. Fuzz Tests: add esp_timer_create_args_t, esp_timer_create(),
   esp_timer_start_periodic(), esp_timer_delete() stubs to
   esp_stubs.h — csi_collector.c uses these for channel hop timer.

2. QEMU Build: add libgcrypt20-dev to apt dependencies —
   Espressif QEMU's esp32_flash_enc.c includes <gcrypt.h>.
   Bump cache key v4→v5 to force rebuild with new dep.

3. NVS Matrix: switch to subprocess-first invocation of
   nvs_partition_gen to avoid 'str' has no attribute 'size' error
   from esp_idf_nvs_partition_gen API change. Falls back to
   direct import with both int and hex size args.

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix(ci): pip3 in IDF container + fix swarm QEMU artifact path

QEMU Test jobs: espressif/idf:v5.4 container has pip3, not pip.
Swarm Test: use /opt/qemu-esp32 (fixed path) instead of
${{ github.workspace }}/qemu-build which resolves incorrectly
inside Docker containers.

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix(ci): source IDF export.sh before pip install in container

espressif/idf:v5.4 container doesn't have pip/pip3 on PATH — it
lives inside the IDF Python venv which is only activated after
sourcing $IDF_PATH/export.sh.

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix(ci): pad QEMU flash image to 8MB with --fill-flash-size

QEMU rejects flash images that aren't exactly 2/4/8/16 MB.
esptool merge_bin produces a sparse image (~1.1 MB) by default.
Add --fill-flash-size 8MB to pad with 0xFF to the full 8 MB.

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix(ci): source IDF export before NVS matrix generation in QEMU tests

The generate_nvs_matrix.py script needs the IDF venv's python
(which has esp_idf_nvs_partition_gen installed) rather than the
system /usr/bin/python3 which doesn't have the package.

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix(ci): QEMU validation treats WARNs as OK + swarm IDF export

1. validate_qemu_output.py: WARNs exit 0 by default (no real WiFi
   hardware in QEMU = no CSI data = expected WARNs for frame/vitals
   checks). Add --strict flag to fail on warnings when needed.

2. Swarm Test: source IDF export.sh before running qemu_swarm.py
   so pip-installed pyyaml is on the Python path.

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix(ci): provision.py subprocess-first NVS gen + swarm IDF venv

provision.py had same 'str' has no attribute 'size' bug as the
NVS matrix generator — switch to subprocess-first approach.
Swarm test also needs IDF export for the swarm smoke test step.

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix(ci): handle missing 'ip' command in QEMU swarm orchestrator

The IDF container doesn't have iproute2 installed, so 'ip' binary
is missing. Add shutil.which() check to can_tap guard and catch
FileNotFoundError in _run_ip() for robustness.

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix(ci): skip Rust aggregator when cargo not available in swarm test

The IDF container doesn't have Rust installed. Check for cargo
with shutil.which() before attempting to spawn the aggregator,
falling back to aggregator-less mode (QEMU nodes still boot and
exercise the firmware pipeline).

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix(ci): treat swarm test WARNs as acceptable in CI

The max_boot_time_s assertion WARNs because QEMU doesn't produce
parseable boot time data. Exit code 1 (WARN) is acceptable in CI
without real hardware; only exit code 2+ (FAIL/FATAL) should fail.

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix(firmware): Kconfig EDGE_FALL_THRESH default 2000→15000

The nvs_config.c fallback (15.0f) was never reached because
Kconfig always defines CONFIG_EDGE_FALL_THRESH. The Kconfig
default was still 2000 (=2.0 rad/s²), causing false fall alerts
on real WiFi CSI data (7 alerts in 45s).

Fixed to 15000 (=15.0 rad/s²). Verified on real ESP32-S3 hardware
with live WiFi CSI: 0 false fall alerts in 60s / 1300+ frames.

Co-Authored-By: claude-flow <ruv@ruv.net>

* docs: update README, CHANGELOG, user guide for v0.4.3-esp32

- README: add v0.4.3 to release table, 4MB flash instructions,
  fix fall-thresh example (5000→15000)
- CHANGELOG: v0.4.3-esp32 entry with all fixes and additions
- User guide: 4MB flash section with esptool commands

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-15 11:49:29 -04:00
ruv
1d4af7c757 chore: add runtime artifacts to .gitignore and untrack them
Remove from index: daemon.pid, vectors.db, memory.db,
pending-insights.jsonl, session state, node_modules.
These are machine-specific runtime artifacts that should
never have been committed.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-14 13:44:27 -04:00
rUv
523be943b0
feat: QEMU ESP32-S3 testing platform + swarm configurator (ADR-061/062) (#260)
9-layer QEMU testing platform (ADR-061) and YAML-driven swarm
configurator (ADR-062) for ESP32-S3 firmware testing without hardware.

12 commits, 56 files, +9,500 lines. Tested on Windows with
Espressif QEMU 9.0.0 — firmware boots, mock CSI generates frames,
14/16 validation checks pass. 39 bugs found and fixed across
2 deep code reviews.

Closes #259

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-14 13:39:51 -04:00
ruv
a467dfed9f docs: ADR-061 QEMU ESP32-S3 firmware testing platform (9 layers)
Comprehensive QEMU emulation strategy for ESP32-S3 CSI node firmware:
- Layer 1: Mock CSI generator with 10 test scenarios
- Layer 2: QEMU runner + CI workflow with NVS matrix
- Layer 3: Multi-node mesh simulation (TAP networking)
- Layer 4: GDB remote debugging (zero-cost, no JTAG)
- Layer 5: Code coverage (gcov/lcov)
- Layer 6: Fuzz testing (libFuzzer for CSI parser, NVS, WASM)
- Layer 7: NVS provisioning matrix (14 configs)
- Layer 8: Snapshot & replay (<100ms restore)
- Layer 9: Chaos testing (9 fault injection scenarios)

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-13 09:02:09 -04:00
rUv
d793c1f49f
feat(firmware): --channel and --filter-mac provisioning (ADR-060)
- provision.py: add --channel (CSI channel override) and --filter-mac
  (AA:BB:CC:DD:EE:FF format) arguments with validation
- nvs_config: add csi_channel, filter_mac[6], filter_mac_set fields;
  read from NVS on boot
- csi_collector: auto-detect AP channel when no NVS override is set;
  filter CSI frames by source MAC when filter_mac is configured
- ADR-060 documents the design and rationale

Fixes #247, fixes #229
2026-03-13 08:27:08 -04:00
ruv
3457610c9f brand: rename DensePose to RuView in pose-fusion UI
Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-12 21:55:09 -04:00
ruv
e9d5ea3ad3 style: add spacing between tagline and demo links in README
Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-12 21:47:31 -04:00
ruv
9cefb32815 fix(demo): add radial gradient background to camera prompt overlay
Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-12 21:38:17 -04:00
ruv
a7c74e0c57 fix(demo): guard RuVector pipeline stats against undefined values
Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-12 21:32:02 -04:00