feat: Add guided installer with hardware detection and RVF build profiles

- install.sh: 7-step interactive installer detecting system, toolchains,
  WiFi hardware (interfaces, ESP32 USB, Intel CSI debug), and recommending
  the best build profile (verify/python/rust/browser/iot/docker/field/full)
- Rust is the primary recommended runtime (810x faster than Python)
- Makefile: 15+ targets including make install, make check, make build-rust,
  make build-wasm, make bench, make run-api, make run-viz
- README: Updated installation section with Rust-primary ordering, removed
  mock testing references, added v2.2.0 changelog entry

https://claude.ai/code/session_01Ki7pvEZtJDvqJkmyn6B714
This commit is contained in:
Claude
2026-02-28 13:41:47 +00:00
parent 13035c0192
commit 8583f3e3b5
7 changed files with 1297 additions and 55 deletions

View File

@@ -1,23 +1,23 @@
{
"running": true,
"startedAt": "2026-02-28T05:42:41.387Z",
"startedAt": "2026-02-28T13:34:03.423Z",
"workers": {
"map": {
"runCount": 40,
"successCount": 40,
"runCount": 41,
"successCount": 41,
"failureCount": 0,
"averageDurationMs": 1.1500000000000001,
"lastRun": "2026-02-28T09:12:41.502Z",
"nextRun": "2026-02-28T09:12:41.494Z",
"averageDurationMs": 1.1707317073170733,
"lastRun": "2026-02-28T13:34:03.434Z",
"nextRun": "2026-02-28T13:49:03.434Z",
"isRunning": false
},
"audit": {
"runCount": 35,
"runCount": 36,
"successCount": 0,
"failureCount": 35,
"failureCount": 36,
"averageDurationMs": 0,
"lastRun": "2026-02-28T09:04:41.452Z",
"nextRun": "2026-02-28T09:14:41.452Z",
"lastRun": "2026-02-28T13:41:03.432Z",
"nextRun": "2026-02-28T13:51:03.432Z",
"isRunning": false
},
"optimize": {
@@ -26,16 +26,16 @@
"failureCount": 27,
"averageDurationMs": 0,
"lastRun": "2026-02-28T09:11:41.441Z",
"nextRun": "2026-02-28T09:26:41.441Z",
"isRunning": false
"nextRun": "2026-02-28T13:38:03.426Z",
"isRunning": true
},
"consolidate": {
"runCount": 18,
"successCount": 18,
"runCount": 19,
"successCount": 19,
"failureCount": 0,
"averageDurationMs": 0.6111111111111112,
"lastRun": "2026-02-28T08:49:41.451Z",
"nextRun": "2026-02-28T09:18:41.402Z",
"averageDurationMs": 0.631578947368421,
"lastRun": "2026-02-28T13:41:03.438Z",
"nextRun": "2026-02-28T14:10:03.427Z",
"isRunning": false
},
"testgaps": {
@@ -44,7 +44,7 @@
"failureCount": 22,
"averageDurationMs": 0,
"lastRun": "2026-02-28T09:10:41.422Z",
"nextRun": "2026-02-28T09:30:41.423Z",
"nextRun": "2026-02-28T13:42:03.426Z",
"isRunning": false
},
"predict": {
@@ -131,5 +131,5 @@
}
]
},
"savedAt": "2026-02-28T09:12:41.503Z"
"savedAt": "2026-02-28T13:41:03.438Z"
}

View File

@@ -1 +1 @@
211
166

View File

@@ -1,5 +1,5 @@
{
"timestamp": "2026-02-28T09:12:41.502Z",
"timestamp": "2026-02-28T13:34:03.432Z",
"projectRoot": "/home/user/wifi-densepose",
"structure": {
"hasPackageJson": false,
@@ -7,5 +7,5 @@
"hasClaudeConfig": true,
"hasClaudeFlow": true
},
"scannedAt": 1772269961502
"scannedAt": 1772285643433
}

View File

@@ -1,5 +1,5 @@
{
"timestamp": "2026-02-28T08:49:41.450Z",
"timestamp": "2026-02-28T13:41:03.437Z",
"patternsConsolidated": 0,
"memoryCleaned": 0,
"duplicatesRemoved": 0

107
Makefile
View File

@@ -1,8 +1,42 @@
# WiFi-DensePose Makefile
# ============================================================
.PHONY: verify verify-verbose verify-audit help
.PHONY: verify verify-verbose verify-audit install install-verify install-python \
install-rust install-browser install-docker install-field install-full \
check build-rust build-wasm test-rust bench run-api run-viz clean help
# ─── Installation ────────────────────────────────────────────
# Guided interactive installer
install:
@./install.sh
# Profile-specific installs (non-interactive)
install-verify:
@./install.sh --profile verify --yes
install-python:
@./install.sh --profile python --yes
install-rust:
@./install.sh --profile rust --yes
install-browser:
@./install.sh --profile browser --yes
install-docker:
@./install.sh --profile docker --yes
install-field:
@./install.sh --profile field --yes
install-full:
@./install.sh --profile full --yes
# Hardware and environment check only (no install)
check:
@./install.sh --check-only
# ─── Verification ────────────────────────────────────────────
# Trust Kill Switch -- one-command proof replay
verify:
@./verify
@@ -15,12 +49,75 @@ verify-verbose:
verify-audit:
@./verify --verbose --audit
# ─── Rust Builds ─────────────────────────────────────────────
build-rust:
cd rust-port/wifi-densepose-rs && cargo build --release
build-wasm:
cd rust-port/wifi-densepose-rs && wasm-pack build crates/wifi-densepose-wasm --target web --release
build-wasm-mat:
cd rust-port/wifi-densepose-rs && wasm-pack build crates/wifi-densepose-wasm --target web --release -- --features mat
test-rust:
cd rust-port/wifi-densepose-rs && cargo test --workspace
bench:
cd rust-port/wifi-densepose-rs && cargo bench --package wifi-densepose-signal
# ─── Run ─────────────────────────────────────────────────────
run-api:
uvicorn v1.src.api.main:app --host 0.0.0.0 --port 8000
run-api-dev:
uvicorn v1.src.api.main:app --host 0.0.0.0 --port 8000 --reload
run-viz:
python3 -m http.server 3000 --directory ui
run-docker:
docker compose up
# ─── Clean ───────────────────────────────────────────────────
clean:
rm -f .install.log
cd rust-port/wifi-densepose-rs && cargo clean 2>/dev/null || true
# ─── Help ────────────────────────────────────────────────────
help:
@echo "WiFi-DensePose Build Targets"
@echo "============================================================"
@echo ""
@echo " make verify Run the trust kill switch (proof replay)"
@echo " make verify-verbose Verbose mode with feature details"
@echo " make verify-audit Full verification + codebase audit"
@echo " make help Show this help"
@echo " Installation:"
@echo " make install Interactive guided installer"
@echo " make install-verify Verification only (~5 MB)"
@echo " make install-python Full Python pipeline (~500 MB)"
@echo " make install-rust Rust pipeline with ~810x speedup"
@echo " make install-browser WASM for browser (~10 MB)"
@echo " make install-docker Docker-based deployment"
@echo " make install-field WiFi-Mat disaster kit (~62 MB)"
@echo " make install-full Everything available"
@echo " make check Hardware/environment check only"
@echo ""
@echo " Verification:"
@echo " make verify Run the trust kill switch"
@echo " make verify-verbose Verbose with feature details"
@echo " make verify-audit Full verification + codebase audit"
@echo ""
@echo " Build:"
@echo " make build-rust Build Rust workspace (release)"
@echo " make build-wasm Build WASM package (browser)"
@echo " make build-wasm-mat Build WASM with WiFi-Mat (field)"
@echo " make test-rust Run all Rust tests"
@echo " make bench Run signal processing benchmarks"
@echo ""
@echo " Run:"
@echo " make run-api Start Python API server"
@echo " make run-api-dev Start API with hot-reload"
@echo " make run-viz Serve 3D visualization (port 3000)"
@echo " make run-docker Start Docker dev stack"
@echo ""
@echo " Utility:"
@echo " make clean Remove build artifacts"
@echo " make help Show this help"
@echo ""

128
README.md
View File

@@ -152,8 +152,10 @@ cargo test --package wifi-densepose-mat
- [WiFi-Mat Disaster Response](#-wifi-mat-disaster-response-module)
- [System Architecture](#-system-architecture)
- [Installation](#-installation)
- [Using pip (Recommended)](#using-pip-recommended)
- [From Source](#from-source)
- [Guided Installer (Recommended)](#guided-installer-recommended)
- [Install Profiles](#install-profiles)
- [From Source (Rust)](#from-source-rust--primary)
- [From Source (Python)](#from-source-python)
- [Using Docker](#using-docker)
- [System Requirements](#system-requirements)
- [Quick Start](#-quick-start)
@@ -189,7 +191,7 @@ cargo test --package wifi-densepose-mat
- [Testing](#-testing)
- [Running Tests](#running-tests)
- [Test Categories](#test-categories)
- [Mock Testing](#mock-testing)
- [Testing Without Hardware](#testing-without-hardware)
- [Continuous Integration](#continuous-integration)
- [Deployment](#-deployment)
- [Production Deployment](#production-deployment)
@@ -266,24 +268,73 @@ WiFi DensePose consists of several key components working together:
## 📦 Installation
### Using pip (Recommended)
### Guided Installer (Recommended)
WiFi-DensePose is now available on PyPI for easy installation:
The interactive installer detects your hardware, checks your environment, and builds the right profile automatically:
```bash
# Install the latest stable version
pip install wifi-densepose
# Install with specific version
pip install wifi-densepose==1.0.0
# Install with optional dependencies
pip install wifi-densepose[gpu] # For GPU acceleration
pip install wifi-densepose[dev] # For development
pip install wifi-densepose[all] # All optional dependencies
./install.sh
```
### From Source
It walks through 7 steps:
1. **System detection** — OS, RAM, disk, GPU
2. **Toolchain detection** — Python, Rust, Docker, Node.js, ESP-IDF
3. **WiFi hardware detection** — interfaces, ESP32 USB, Intel CSI debug
4. **Profile recommendation** — picks the best profile for your hardware
5. **Dependency installation** — installs what's missing
6. **Build** — compiles the selected profile
7. **Summary** — shows next steps and verification commands
#### Install Profiles
| Profile | What it installs | Size | Requirements |
|---------|-----------------|------|-------------|
| `verify` | Pipeline verification only | ~5 MB | Python 3.8+ |
| `python` | Full Python API server + sensing | ~500 MB | Python 3.8+ |
| `rust` | Rust pipeline (~810x faster) | ~200 MB | Rust 1.70+ |
| `browser` | WASM for in-browser execution | ~10 MB | Rust + wasm-pack |
| `iot` | ESP32 sensor mesh + aggregator | varies | Rust + ESP-IDF |
| `docker` | Docker-based deployment | ~1 GB | Docker |
| `field` | WiFi-Mat disaster response kit | ~62 MB | Rust + wasm-pack |
| `full` | Everything available | ~2 GB | All toolchains |
#### Non-Interactive Install
```bash
# Install a specific profile without prompts
./install.sh --profile rust --yes
# Just run hardware detection (no install)
./install.sh --check-only
# Or use make targets
make install # Interactive
make install-verify # Verification only
make install-python # Python pipeline
make install-rust # Rust pipeline
make install-browser # WASM browser build
make install-docker # Docker deployment
make install-field # Disaster response kit
make install-full # Everything
make check # Hardware check only
```
### From Source (Rust — Primary)
```bash
git clone https://github.com/ruvnet/wifi-densepose.git
cd wifi-densepose
# Install Rust pipeline (810x faster than Python)
./install.sh --profile rust --yes
# Or manually:
cd rust-port/wifi-densepose-rs
cargo build --release
cargo test --workspace
```
### From Source (Python)
```bash
git clone https://github.com/ruvnet/wifi-densepose.git
@@ -292,6 +343,16 @@ pip install -r requirements.txt
pip install -e .
```
### Using pip (Python only)
```bash
pip install wifi-densepose
# With optional dependencies
pip install wifi-densepose[gpu] # For GPU acceleration
pip install wifi-densepose[all] # All optional dependencies
```
### Using Docker
```bash
@@ -301,19 +362,23 @@ docker run -p 8000:8000 ruvnet/wifi-densepose:latest
### System Requirements
- **Python**: 3.8 or higher
- **Rust**: 1.70+ (primary runtime — install via [rustup](https://rustup.rs/))
- **Python**: 3.8+ (for verification and legacy v1 API)
- **Operating System**: Linux (Ubuntu 18.04+), macOS (10.15+), Windows 10+
- **Memory**: Minimum 4GB RAM, Recommended 8GB+
- **Storage**: 2GB free space for models and data
- **Network**: WiFi interface with CSI capability
- **GPU**: Optional but recommended (NVIDIA GPU with CUDA support)
- **Network**: WiFi interface with CSI capability (optional — installer detects what you have)
- **GPU**: Optional (NVIDIA CUDA or Apple Metal)
## 🚀 Quick Start
### 1. Basic Setup
```bash
# Install the package
# Install the package (Rust — recommended)
./install.sh --profile rust --yes
# Or Python legacy
pip install wifi-densepose
# Copy example configuration
@@ -891,17 +956,16 @@ pytest tests/performance/ # Performance tests
- Memory usage profiling
- Stress testing
### Mock Testing
### Testing Without Hardware
For development without hardware:
For development without WiFi CSI hardware, use the deterministic reference signal:
```bash
# Enable mock mode
export MOCK_HARDWARE=true
export MOCK_POSE_DATA=true
# Verify the full signal processing pipeline (no hardware needed)
./verify
# Run tests with mocked hardware
pytest tests/ --mock-hardware
# Run Rust tests (all use real signal processing, no mocks)
cd rust-port/wifi-densepose-rs && cargo test --workspace
```
### Continuous Integration
@@ -1304,6 +1368,16 @@ SOFTWARE.
## Changelog
### v2.2.0 — 2026-02-28
- **Guided installer** — `./install.sh` with 7-step hardware detection, WiFi interface discovery, toolchain checks, and environment-specific RVF builds (verify/python/rust/browser/iot/docker/field/full profiles)
- **Make targets** — `make install`, `make check`, `make install-rust`, `make build-wasm`, `make bench`, and 15+ other targets
- **Real-only inference** — `forward()` and hardware adapters return explicit errors without weights/hardware instead of silent empty data
- **5.7x Doppler FFT speedup** — Phase cache ring buffer reduces full pipeline from 719us to 254us per frame
- **Trust kill switch** — `./verify` with SHA-256 proof replay, `--audit` mode, and production code integrity scan
- **Security hardening** — 10 vulnerabilities fixed (hardcoded creds, JWT bypass, NaN panics), 12 dead code instances removed
- **SOTA research** — Comprehensive WiFi sensing + RuVector analysis with 30+ citations and 20-year projection (docs/research/)
### v2.1.0 — 2026-02-28
- **RuVector RVF integration** — Architecture Decision Records (ADR-002 through ADR-013) defining integration of RVF cognitive containers, HNSW vector search, SONA self-learning, GNN pattern recognition, post-quantum cryptography, distributed consensus, WASM edge runtime, and witness chains

1071
install.sh Executable file

File diff suppressed because it is too large Load Diff