Compare commits

..

3 Commits

Author SHA1 Message Date
Yossi Elkrief
b2fdc6282d feat: Expo mobile app scaffold (118-file structure) 2026-03-02 12:42:45 +02:00
ruv
08a6d5a7f1 docs: add validation and witness verification instructions to CLAUDE.md
- Add Validation & Witness Verification section with 4-step procedure
- Document proof hash regeneration workflow
- List witness bundle contents and key proof artifacts
- Update ADR list (now 28 ADRs including ADR-024, ADR-027, ADR-028)
- Update Pre-Merge Checklist: add proof verification and witness bundle steps
- Update test commands to full workspace (1,031+ tests)
- Set default branch to main

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-01 16:18:44 -05:00
rUv
322eddbcc3 Merge pull request #71 from ruvnet/adr-028-esp32-capability-audit
ADR-028 capability audit: 1,031 tests, proof PASS, witness bundle 7/7
2026-03-01 15:54:26 -05:00
124 changed files with 16763 additions and 18 deletions

View File

@@ -21,33 +21,77 @@ All 5 ruvector crates integrated in workspace:
- `ruvector-attention``model.rs` (apply_spatial_attention) + `bvp.rs`
### Architecture Decisions
All ADRs in `docs/adr/` (ADR-001 through ADR-017). Key ones:
28 ADRs in `docs/adr/` (ADR-001 through ADR-028). Key ones:
- ADR-014: SOTA signal processing (Accepted)
- ADR-015: MM-Fi + Wi-Pose training datasets (Accepted)
- ADR-016: RuVector training pipeline integration (Accepted — complete)
- ADR-017: RuVector signal + MAT integration (Proposed — next target)
- ADR-024: Contrastive CSI embedding / AETHER (Accepted)
- ADR-027: Cross-environment domain generalization / MERIDIAN (Accepted)
- ADR-028: ESP32 capability audit + witness verification (Accepted)
### Build & Test Commands (this repo)
```bash
# Rust — check training crate (no GPU needed)
# Rust — full workspace tests (1,031 tests, ~2 min)
cd rust-port/wifi-densepose-rs
cargo test --workspace --no-default-features
# Rust — single crate check (no GPU needed)
cargo check -p wifi-densepose-train --no-default-features
# Rust — run all tests
cargo test -p wifi-densepose-train --no-default-features
# Rust — full workspace check
cargo check --workspace --no-default-features
# Python — proof verification
# Python — deterministic proof verification (SHA-256)
python v1/data/proof/verify.py
# Python — test suite
cd v1 && python -m pytest tests/ -x -q
```
### Validation & Witness Verification (ADR-028)
**After any significant code change, run the full validation:**
```bash
# 1. Rust tests — must be 1,031+ passed, 0 failed
cd rust-port/wifi-densepose-rs
cargo test --workspace --no-default-features
# 2. Python proof — must print VERDICT: PASS
cd ../..
python v1/data/proof/verify.py
# 3. Generate witness bundle (includes both above + firmware hashes)
bash scripts/generate-witness-bundle.sh
# 4. Self-verify the bundle — must be 7/7 PASS
cd dist/witness-bundle-ADR028-*/
bash VERIFY.sh
```
**If the Python proof hash changes** (e.g., numpy/scipy version update):
```bash
# Regenerate the expected hash, then verify it passes
python v1/data/proof/verify.py --generate-hash
python v1/data/proof/verify.py
```
**Witness bundle contents** (`dist/witness-bundle-ADR028-<sha>.tar.gz`):
- `WITNESS-LOG-028.md` — 33-row attestation matrix with evidence per capability
- `ADR-028-esp32-capability-audit.md` — Full audit findings
- `proof/verify.py` + `expected_features.sha256` — Deterministic pipeline proof
- `test-results/rust-workspace-tests.log` — Full cargo test output
- `firmware-manifest/source-hashes.txt` — SHA-256 of all 7 ESP32 firmware files
- `crate-manifest/versions.txt` — All 15 crates with versions
- `VERIFY.sh` — One-command self-verification for recipients
**Key proof artifacts:**
- `v1/data/proof/verify.py` — Trust Kill Switch: feeds reference signal through production pipeline, hashes output
- `v1/data/proof/expected_features.sha256` — Published expected hash
- `v1/data/proof/sample_csi_data.json` — 1,000 synthetic CSI frames (seed=42)
- `docs/WITNESS-LOG-028.md` — 11-step reproducible verification procedure
- `docs/adr/ADR-028-esp32-capability-audit.md` — Complete audit record
### Branch
All development on: `claude/validate-code-quality-WNrNw`
Default branch: `main`
---
@@ -93,14 +137,16 @@ All development on: `claude/validate-code-quality-WNrNw`
Before merging any PR, verify each item applies and is addressed:
1. **Tests pass**`cargo test` (Rust) and `python -m pytest` (Python) green
2. **README.md** — Update platform tables, crate descriptions, hardware tables, feature summaries if scope changed
3. **CHANGELOG.md**Add entry under `[Unreleased]` with what was added/fixed/changed
4. **User guide** (`docs/user-guide.md`) — Update if new data sources, CLI flags, or setup steps were added
5. **ADR index** — Update ADR count in README docs table if a new ADR was created
6. **Docker Hub image** — Only rebuild if Dockerfile, dependencies, or runtime behavior changed (not needed for platform-gated code that doesn't affect the Linux container)
7. **Crate publishing** — Only needed if a crate is published to crates.io and its public API changed (workspace-internal crates don't need publishing)
8. **`.gitignore`** — Add any new build artifacts or binaries
1. **Rust tests pass**`cargo test --workspace --no-default-features` (1,031+ passed, 0 failed)
2. **Python proof passes**`python v1/data/proof/verify.py` (VERDICT: PASS)
3. **README.md**Update platform tables, crate descriptions, hardware tables, feature summaries if scope changed
4. **CHANGELOG.md** — Add entry under `[Unreleased]` with what was added/fixed/changed
5. **User guide** (`docs/user-guide.md`) — Update if new data sources, CLI flags, or setup steps were added
6. **ADR index** — Update ADR count in README docs table if a new ADR was created
7. **Witness bundle** — Regenerate if tests or proof hash changed: `bash scripts/generate-witness-bundle.sh`
8. **Docker Hub image**Only rebuild if Dockerfile, dependencies, or runtime behavior changed
9. **Crate publishing** — Only needed if a crate is published to crates.io and its public API changed
10. **`.gitignore`** — Add any new build artifacts or binaries
## Build & Test

1
mobile/.env.example Normal file
View File

@@ -0,0 +1 @@
EXPO_PUBLIC_DEFAULT_SERVER_URL=http://192.168.1.100:8080

26
mobile/.eslintrc.js Normal file
View File

@@ -0,0 +1,26 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
plugins: ['@typescript-eslint', 'react', 'react-hooks'],
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:@typescript-eslint/recommended',
],
settings: {
react: {
version: 'detect',
},
},
rules: {
'react/react-in-jsx-scope': 'off',
},
};

41
mobile/.gitignore vendored Normal file
View File

@@ -0,0 +1,41 @@
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files
# dependencies
node_modules/
# Expo
.expo/
dist/
web-build/
expo-env.d.ts
# Native
.kotlin/
*.orig.*
*.jks
*.p8
*.p12
*.key
*.mobileprovision
# Metro
.metro-health-check*
# debug
npm-debug.*
yarn-debug.*
yarn-error.*
# macOS
.DS_Store
*.pem
# local env files
.env*.local
# typescript
*.tsbuildinfo
# generated native folders
/ios
/android

4
mobile/.prettierrc Normal file
View File

@@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "all"
}

25
mobile/App.tsx Normal file
View File

@@ -0,0 +1,25 @@
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { StatusBar } from 'expo-status-bar';
export default function App() {
return (
<View style={styles.container}>
<Text style={styles.title}>WiFi-DensePose</Text>
<StatusBar style="dark" />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#fff',
},
title: {
fontSize: 24,
fontWeight: '600',
},
});

12
mobile/app.config.ts Normal file
View File

@@ -0,0 +1,12 @@
export default {
name: 'WiFi-DensePose',
slug: 'wifi-densepose',
version: '1.0.0',
ios: {
bundleIdentifier: 'com.ruvnet.wifidensepose',
},
android: {
package: 'com.ruvnet.wifidensepose',
},
// Use expo-env and app-level defaults from the project configuration when available.
};

30
mobile/app.json Normal file
View File

@@ -0,0 +1,30 @@
{
"expo": {
"name": "mobile",
"slug": "mobile",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
"splash": {
"image": "./assets/splash-icon.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"backgroundColor": "#E6F4FE",
"foregroundImage": "./assets/android-icon-foreground.png",
"backgroundImage": "./assets/android-icon-background.png",
"monochromeImage": "./assets/android-icon-monochrome.png"
},
"predictiveBackGestureEnabled": false
},
"web": {
"favicon": "./assets/favicon.png"
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
mobile/assets/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
mobile/assets/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 384 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

9
mobile/babel.config.js Normal file
View File

@@ -0,0 +1,9 @@
module.exports = function (api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
plugins: [
'react-native-reanimated/plugin'
]
};
};

View File

View File

View File

View File

View File

View File

View File

17
mobile/eas.json Normal file
View File

@@ -0,0 +1,17 @@
{
"cli": {
"version": ">= 4.0.0"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal"
},
"production": {
"autoIncrement": true
}
}
}

4
mobile/index.ts Normal file
View File

@@ -0,0 +1,4 @@
import { registerRootComponent } from 'expo';
import App from './App';
registerRootComponent(App);

8
mobile/jest.config.js Normal file
View File

@@ -0,0 +1,8 @@
module.exports = {
preset: 'jest-expo',
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
testPathIgnorePatterns: ['/src/__tests__/'],
transformIgnorePatterns: [
'node_modules/(?!(expo|expo-.+|react-native|@react-native|react-native-webview|react-native-reanimated|react-native-svg|react-native-safe-area-context|react-native-screens|@react-navigation|@expo|@unimodules|expo-modules-core)/)',
],
};

11
mobile/jest.setup.ts Normal file
View File

@@ -0,0 +1,11 @@
jest.mock('@react-native-async-storage/async-storage', () =>
require('@react-native-async-storage/async-storage/jest/async-storage-mock')
);
jest.mock('react-native-wifi-reborn', () => ({
loadWifiList: jest.fn(async () => []),
}));
jest.mock('react-native-reanimated', () =>
require('react-native-reanimated/mock')
);

16327
mobile/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

49
mobile/package.json Normal file
View File

@@ -0,0 +1,49 @@
{
"name": "mobile",
"version": "1.0.0",
"main": "index.ts",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"@expo/vector-icons": "^15.0.2",
"@react-native-async-storage/async-storage": "2.2.0",
"@react-navigation/bottom-tabs": "^7.15.3",
"@react-navigation/native": "^7.1.31",
"axios": "^1.13.6",
"expo": "~55.0.4",
"expo-status-bar": "~55.0.4",
"react": "19.2.0",
"react-native": "0.83.2",
"react-native-gesture-handler": "~2.30.0",
"react-native-reanimated": "4.2.1",
"react-native-safe-area-context": "~5.6.2",
"react-native-screens": "~4.23.0",
"react-native-svg": "15.15.3",
"react-native-webview": "13.16.0",
"react-native-wifi-reborn": "^4.13.6",
"victory-native": "^41.20.2",
"zustand": "^5.0.11"
},
"devDependencies": {
"@testing-library/jest-native": "^5.4.3",
"@testing-library/react-native": "^13.3.3",
"@types/jest": "^30.0.0",
"@types/react": "~19.2.2",
"@typescript-eslint/eslint-plugin": "^8.56.1",
"@typescript-eslint/parser": "^8.56.1",
"babel-preset-expo": "^55.0.10",
"eslint": "^10.0.2",
"jest": "^30.2.0",
"jest-expo": "^55.0.9",
"prettier": "^3.8.1",
"react-native-worklets": "^0.7.4",
"typescript": "~5.9.2"
},
"private": true
}

View File

@@ -0,0 +1,5 @@
describe('placeholder', () => {
it('passes', () => {
expect(true).toBe(true);
});
});

View File

@@ -0,0 +1,5 @@
describe('placeholder', () => {
it('passes', () => {
expect(true).toBe(true);
});
});

View File

@@ -0,0 +1,5 @@
describe('placeholder', () => {
it('passes', () => {
expect(true).toBe(true);
});
});

View File

@@ -0,0 +1,5 @@
describe('placeholder', () => {
it('passes', () => {
expect(true).toBe(true);
});
});

View File

@@ -0,0 +1,5 @@
describe('placeholder', () => {
it('passes', () => {
expect(true).toBe(true);
});
});

View File

@@ -0,0 +1,5 @@
describe('placeholder', () => {
it('passes', () => {
expect(true).toBe(true);
});
});

View File

@@ -0,0 +1,5 @@
describe('placeholder', () => {
it('passes', () => {
expect(true).toBe(true);
});
});

View File

@@ -0,0 +1,5 @@
describe('placeholder', () => {
it('passes', () => {
expect(true).toBe(true);
});
});

View File

@@ -0,0 +1,5 @@
describe('placeholder', () => {
it('passes', () => {
expect(true).toBe(true);
});
});

View File

@@ -0,0 +1,5 @@
describe('placeholder', () => {
it('passes', () => {
expect(true).toBe(true);
});
});

View File

@@ -0,0 +1,5 @@
describe('placeholder', () => {
it('passes', () => {
expect(true).toBe(true);
});
});

View File

@@ -0,0 +1,5 @@
describe('placeholder', () => {
it('passes', () => {
expect(true).toBe(true);
});
});

View File

@@ -0,0 +1,5 @@
describe('placeholder', () => {
it('passes', () => {
expect(true).toBe(true);
});
});

View File

@@ -0,0 +1,5 @@
describe('placeholder', () => {
it('passes', () => {
expect(true).toBe(true);
});
});

View File

@@ -0,0 +1,5 @@
describe('placeholder', () => {
it('passes', () => {
expect(true).toBe(true);
});
});

View File

@@ -0,0 +1,5 @@
describe('placeholder', () => {
it('passes', () => {
expect(true).toBe(true);
});
});

View File

@@ -0,0 +1,5 @@
describe('placeholder', () => {
it('passes', () => {
expect(true).toBe(true);
});
});

View File

@@ -0,0 +1,5 @@
describe('placeholder', () => {
it('passes', () => {
expect(true).toBe(true);
});
});

View File

@@ -0,0 +1,5 @@
describe('placeholder', () => {
it('passes', () => {
expect(true).toBe(true);
});
});

View File

@@ -0,0 +1,5 @@
describe('placeholder', () => {
it('passes', () => {
expect(true).toBe(true);
});
});

View File

@@ -0,0 +1,5 @@
describe('placeholder', () => {
it('passes', () => {
expect(true).toBe(true);
});
});

View File

@@ -0,0 +1,5 @@
describe('placeholder', () => {
it('passes', () => {
expect(true).toBe(true);
});
});

View File

@@ -0,0 +1,5 @@
describe('placeholder', () => {
it('passes', () => {
expect(true).toBe(true);
});
});

View File

@@ -0,0 +1,5 @@
describe('placeholder', () => {
it('passes', () => {
expect(true).toBe(true);
});
});

View File

@@ -0,0 +1,5 @@
describe('placeholder', () => {
it('passes', () => {
expect(true).toBe(true);
});
});

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

Some files were not shown because too many files have changed in this diff Show More