Skip to content

feat: happiness scoring + ESP32 swarm with Cognitum Seed#285

Merged
ruvnet merged 2 commits intomainfrom
feat/adr-065-happiness-seed-bridge
Mar 20, 2026
Merged

feat: happiness scoring + ESP32 swarm with Cognitum Seed#285
ruvnet merged 2 commits intomainfrom
feat/adr-065-happiness-seed-bridge

Conversation

@ruvnet
Copy link
Owner

@ruvnet ruvnet commented Mar 20, 2026

Summary

  • ADR-065: Hotel guest happiness scoring from WiFi CSI — gait speed, stride regularity, breathing calm, posture, dwell time combined into 8-dim vector for Cognitum Seed ingestion
  • ADR-066: ESP32 swarm with Cognitum Seed as coordinator — node registration, heartbeats, cross-zone analytics, witness chain audit trail
  • Happiness WASM module (exo_happiness_score.rs): 11 tests, ESP32-optimized (halved buffers, event decimation, sqrtf eliminated)
  • Ghost hunter standalone WASM (ghost_hunter.rs): 5.7 KB binary, feature-gated pipeline
  • Swarm bridge firmware (swarm_bridge.c): FreeRTOS task, HTTP client with Bearer auth, Seed ingest format
  • RuView Live updated: --mode happiness dashboard + --seed bridge
  • Hello world firmware: capability discovery for 4MB ESP32-S3 variant
  • Examples: seed_query.py CLI, provision_swarm.sh, vector schema

Verified live on hardware

Check Result
ESP32-S3 (COM5, 4MB flash) Firmware compiled, flashed, running
WiFi Connected to RedCloverWifi, IP 10.1.10.168
CSI ~100 fps on channel 3, Tier 2 DSP on Core 1
Swarm bridge Registered node 1 with Seed (id=1000000)
Seed ingestion Vectors flowing, epoch 455, witness chain 1108
RuView happiness mode Live dashboard, happiness score 0.50 (neutral/empty room)
Rust tests 542/542 pass
WASM build Clean compile for wasm32-unknown-unknown

Test plan

  • cargo test --features std --lib — 542 tests pass (11 happiness module)
  • WASM cdylib builds clean for wasm32-unknown-unknown
  • ESP32 firmware compiles for both 4MB and 8MB flash variants
  • Live flash + boot on ESP32-S3 COM5 — CSI streaming, swarm bridge active
  • Seed vector count growing, witness chain extending
  • RuView happiness mode runs against live ESP32 + Seed
  • seed_query.py status/witness/report commands work against live Seed
  • Multi-node swarm test (requires additional ESP32 hardware)

🤖 Generated with claude-flow

ruvnet added 2 commits March 20, 2026 18:32
…rdinator

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>
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>
@ruvnet ruvnet merged commit 2b8a7cc into main Mar 20, 2026
11 of 13 checks passed
@AntwerpDesignsIonity
Copy link

AntwerpDesignsIonity commented Mar 20, 2026 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants