feat: Rust sensing server with full DensePose-compatible API #40

Merged
ruvnet merged 6 commits from feat/rust-ruvector-sensing-ui into main 2026-03-01 10:37:23 +08:00
ruvnet commented 2026-03-01 10:31:00 +08:00 (Migrated from github.com)

Summary

  • New Rust binary (wifi-densepose-sensing-server): Single 2.1MB binary replaces Python FastAPI + WebSocket servers, serving all DensePose-compatible REST API endpoints, dual WebSocket streams, and static UI files
  • WiFi-derived pose estimation: 17 COCO keypoints generated from CSI/WiFi sensing data via derive_pose_from_sensing() with motion-driven animation
  • UI fully wired to Rust backend: All endpoints point to :8080, sensing-only mode removed, all tabs (Dashboard, Hardware, Live Demo, Sensing) initialize normally
  • Bug fixes: WebSocket path mismatch, clearPingInterval undefined method, browser ES module caching via Cache-Control headers

Endpoints Served by Rust Binary

Type Endpoint Description
REST /health/live, /health/ready, /health/version Health checks
REST /api/v1/info Server info + features
REST /api/v1/pose/current Current pose with 17 keypoints
REST /api/v1/pose/stats Detection statistics
REST /api/v1/pose/zones/summary Zone occupancy
REST /api/v1/stream/status Stream status
WS ws://:8080/api/v1/stream/pose Pose stream (pose_data format)
WS ws://:8765/ws/sensing Raw sensing stream
Static /ui/* UI files with no-cache headers

Data Sources (auto-detected)

  1. ESP32 CSI — UDP binary frames on :5005 (ADR-018 format)
  2. Windows WiFinetsh wlan show interfaces RSSI polling
  3. Simulation — Synthetic 56-subcarrier CSI with breathing/motion patterns

Test Results (9/9 PASS)

  PASS /health/live
  PASS /api/v1/info
  PASS /api/v1/pose/current
  PASS /api/v1/pose/stats
  PASS /api/v1/pose/zones/summary
  PASS /api/v1/stream/status
  PASS /health/version
  PASS WS pose stream (1 person, 17 keypoints, bbox {x,y,w,h})
  PASS WS sensing stream (sensing_update with tick + source)

Test plan

  • cargo build --release -p wifi-densepose-sensing-server compiles with zero warnings
  • sensing-server --source auto starts and auto-detects data source
  • All 7 REST endpoints return valid JSON
  • Pose WebSocket sends connection_established then continuous pose_data
  • Sensing WebSocket sends continuous sensing_update messages
  • Open http://localhost:8080/ui/index.html — Dashboard shows health data
  • Live Demo tab: click Start, skeleton renders with 17 keypoints
  • Sensing tab: Gaussian splat visualization shows signal field
  • No ERR_CONNECTION_REFUSED errors in browser console

🤖 Generated with claude-flow

## Summary - **New Rust binary** (`wifi-densepose-sensing-server`): Single 2.1MB binary replaces Python FastAPI + WebSocket servers, serving all DensePose-compatible REST API endpoints, dual WebSocket streams, and static UI files - **WiFi-derived pose estimation**: 17 COCO keypoints generated from CSI/WiFi sensing data via `derive_pose_from_sensing()` with motion-driven animation - **UI fully wired to Rust backend**: All endpoints point to `:8080`, sensing-only mode removed, all tabs (Dashboard, Hardware, Live Demo, Sensing) initialize normally - **Bug fixes**: WebSocket path mismatch, `clearPingInterval` undefined method, browser ES module caching via `Cache-Control` headers ## Endpoints Served by Rust Binary | Type | Endpoint | Description | |------|----------|-------------| | REST | `/health/live`, `/health/ready`, `/health/version` | Health checks | | REST | `/api/v1/info` | Server info + features | | REST | `/api/v1/pose/current` | Current pose with 17 keypoints | | REST | `/api/v1/pose/stats` | Detection statistics | | REST | `/api/v1/pose/zones/summary` | Zone occupancy | | REST | `/api/v1/stream/status` | Stream status | | WS | `ws://:8080/api/v1/stream/pose` | Pose stream (`pose_data` format) | | WS | `ws://:8765/ws/sensing` | Raw sensing stream | | Static | `/ui/*` | UI files with no-cache headers | ## Data Sources (auto-detected) 1. **ESP32 CSI** — UDP binary frames on `:5005` (ADR-018 format) 2. **Windows WiFi** — `netsh wlan show interfaces` RSSI polling 3. **Simulation** — Synthetic 56-subcarrier CSI with breathing/motion patterns ## Test Results (9/9 PASS) ``` PASS /health/live PASS /api/v1/info PASS /api/v1/pose/current PASS /api/v1/pose/stats PASS /api/v1/pose/zones/summary PASS /api/v1/stream/status PASS /health/version PASS WS pose stream (1 person, 17 keypoints, bbox {x,y,w,h}) PASS WS sensing stream (sensing_update with tick + source) ``` ## Test plan - [ ] `cargo build --release -p wifi-densepose-sensing-server` compiles with zero warnings - [ ] `sensing-server --source auto` starts and auto-detects data source - [ ] All 7 REST endpoints return valid JSON - [ ] Pose WebSocket sends `connection_established` then continuous `pose_data` - [ ] Sensing WebSocket sends continuous `sensing_update` messages - [ ] Open `http://localhost:8080/ui/index.html` — Dashboard shows health data - [ ] Live Demo tab: click Start, skeleton renders with 17 keypoints - [ ] Sensing tab: Gaussian splat visualization shows signal field - [ ] No `ERR_CONNECTION_REFUSED` errors in browser console 🤖 Generated with [claude-flow](https://github.com/ruvnet/claude-flow)
github-advanced-security[bot] (Migrated from github.com) reviewed 2026-03-01 10:32:17 +08:00
@@ -0,0 +60,4 @@
LABEL org.opencontainers.image.description="Enterprise-grade benchmarking suite for RuVector"
LABEL org.opencontainers.image.version="1.0.0"
LABEL org.opencontainers.image.vendor="RuVector Team"
LABEL org.opencontainers.image.source="https://github.com/ruvnet/ruvector"
github-advanced-security[bot] (Migrated from github.com) commented 2026-03-01 10:32:16 +08:00

Ensure that a user for the container has been created

Ensure that a user for the container has been created

Show more details

## Ensure that a user for the container has been created Ensure that a user for the container has been created [Show more details](https://github.com/ruvnet/wifi-densepose/security/code-scanning/4202)
@@ -0,0 +178,4 @@
EXPOSE 5432
# Use the default PostgreSQL entrypoint
CMD ["postgres"]
github-advanced-security[bot] (Migrated from github.com) commented 2026-03-01 10:32:16 +08:00

Ensure that a user for the container has been created

Ensure that a user for the container has been created

Show more details

## Ensure that a user for the container has been created Ensure that a user for the container has been created [Show more details](https://github.com/ruvnet/wifi-densepose/security/code-scanning/4210)
@@ -0,0 +196,4 @@
HEALTHCHECK --interval=5s --timeout=5s --start-period=10s --retries=5 \
CMD pg_isready -U $POSTGRES_USER -d $POSTGRES_DB || exit 1
EXPOSE 5432
github-advanced-security[bot] (Migrated from github.com) commented 2026-03-01 10:32:16 +08:00

Ensure that a user for the container has been created

Ensure that a user for the container has been created

Show more details

## Ensure that a user for the container has been created Ensure that a user for the container has been created [Show more details](https://github.com/ruvnet/wifi-densepose/security/code-scanning/4232)
@@ -0,0 +56,4 @@
ENV PATH="${CARGO_HOME}/bin:${PATH}"
# Default command runs tests
CMD ["cargo", "test", "--release", "--features", "pg_test"]
github-advanced-security[bot] (Migrated from github.com) commented 2026-03-01 10:32:16 +08:00

Ensure that HEALTHCHECK instructions have been added to container images

Ensure that HEALTHCHECK instructions have been added to container images

Show more details

## Ensure that HEALTHCHECK instructions have been added to container images Ensure that HEALTHCHECK instructions have been added to container images [Show more details](https://github.com/ruvnet/wifi-densepose/security/code-scanning/4196)
github-advanced-security[bot] (Migrated from github.com) commented 2026-03-01 10:32:16 +08:00

Ensure that a user for the container has been created

Ensure that a user for the container has been created

Show more details

## Ensure that a user for the container has been created Ensure that a user for the container has been created [Show more details](https://github.com/ruvnet/wifi-densepose/security/code-scanning/4197)
@@ -0,0 +21,4 @@
WORKDIR /app
# Default command
CMD ["cargo", "test", "--features", "pg_test"]
github-advanced-security[bot] (Migrated from github.com) commented 2026-03-01 10:32:16 +08:00

Ensure that HEALTHCHECK instructions have been added to container images

Ensure that HEALTHCHECK instructions have been added to container images

Show more details

## Ensure that HEALTHCHECK instructions have been added to container images Ensure that HEALTHCHECK instructions have been added to container images [Show more details](https://github.com/ruvnet/wifi-densepose/security/code-scanning/4211)
github-advanced-security[bot] (Migrated from github.com) commented 2026-03-01 10:32:16 +08:00

Ensure that a user for the container has been created

Ensure that a user for the container has been created

Show more details

## Ensure that a user for the container has been created Ensure that a user for the container has been created [Show more details](https://github.com/ruvnet/wifi-densepose/security/code-scanning/4212)
@@ -0,0 +57,4 @@
COPY --chmod=755 crates/ruvector-postgres/docker/benchmark/run-benchmarks.sh /usr/local/bin/run-benchmarks.sh
# Default command runs benchmarks
CMD ["/usr/local/bin/run-benchmarks.sh"]
github-advanced-security[bot] (Migrated from github.com) commented 2026-03-01 10:32:16 +08:00

Ensure that HEALTHCHECK instructions have been added to container images

Ensure that HEALTHCHECK instructions have been added to container images

Show more details

## Ensure that HEALTHCHECK instructions have been added to container images Ensure that HEALTHCHECK instructions have been added to container images [Show more details](https://github.com/ruvnet/wifi-densepose/security/code-scanning/4226)
github-advanced-security[bot] (Migrated from github.com) commented 2026-03-01 10:32:17 +08:00

Ensure that a user for the container has been created

Ensure that a user for the container has been created

Show more details

## Ensure that a user for the container has been created Ensure that a user for the container has been created [Show more details](https://github.com/ruvnet/wifi-densepose/security/code-scanning/4227)
@@ -0,0 +57,4 @@
COPY --chmod=755 crates/ruvector-postgres/docker/test-runner/run-tests.sh /usr/local/bin/run-tests.sh
# Default command runs pgrx tests and outputs JUnit XML
CMD ["/usr/local/bin/run-tests.sh"]
github-advanced-security[bot] (Migrated from github.com) commented 2026-03-01 10:32:17 +08:00

Ensure that HEALTHCHECK instructions have been added to container images

Ensure that HEALTHCHECK instructions have been added to container images

Show more details

## Ensure that HEALTHCHECK instructions have been added to container images Ensure that HEALTHCHECK instructions have been added to container images [Show more details](https://github.com/ruvnet/wifi-densepose/security/code-scanning/4221)
github-advanced-security[bot] (Migrated from github.com) commented 2026-03-01 10:32:17 +08:00

Ensure that a user for the container has been created

Ensure that a user for the container has been created

Show more details

## Ensure that a user for the container has been created Ensure that a user for the container has been created [Show more details](https://github.com/ruvnet/wifi-densepose/security/code-scanning/4222)
github-advanced-security[bot] (Migrated from github.com) reviewed 2026-03-01 10:33:29 +08:00
github-advanced-security[bot] (Migrated from github.com) left a comment

KICS found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

KICS found more than 20 potential problems in the proposed changes. Check the [Files changed](/ruvnet/wifi-densepose/pull/40/files) tab for more details.
Sign in to join this conversation.