chore(repo): move v1/ → archive/v1/ + add archive/README.md (#430)

The Rust port at v2/ has been the primary codebase since the rename
in #427. The Python implementation at v1/ is no longer the active
target; the only load-bearing path is the deterministic proof bundle
at v1/data/proof/ (per ADR-011 / ADR-028 witness verification).

Move the whole Python tree into archive/v1/ and document the policy
in archive/README.md: no new features, bug fixes only when they affect
a still-load-bearing path (currently just the proof), CI continues to
verify the proof on every push and PR.

Path references updated in 26 files via path-pattern sed (only
matches v1/<known-child> patterns, never bare v1 or API URLs like
/api/v1/). Two double-prefix typos (archive/archive/v1/) caught and
hand-fixed in verify-pipeline.yml and ADR-011.

Validated:
- Python proof verify.py imports cleanly at archive/v1/data/proof/
  (numpy/scipy still required; CI installs requirements-lock.txt
  from archive/v1/ now)
- cargo test --workspace --no-default-features → 1,539 passed,
  0 failed, 8 ignored (unaffected by Python tree relocation)
- ESP32-S3 on COM7 untouched (no firmware paths changed)

After-merge: contributors should re-run any local `python v1/...`
commands as `python archive/v1/...` (CLAUDE.md and CHANGELOG already
updated).
This commit is contained in:
rUv 2026-04-25 23:07:52 -04:00 committed by GitHub
parent 74233cfb23
commit 81cc241b9e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
183 changed files with 290 additions and 216 deletions

View file

@ -4,16 +4,16 @@ on:
push:
branches: [ main, master, 'claude/**' ]
paths:
- 'v1/src/core/**'
- 'v1/src/hardware/**'
- 'v1/data/proof/**'
- 'archive/v1/src/core/**'
- 'archive/v1/src/hardware/**'
- 'archive/v1/data/proof/**'
- '.github/workflows/verify-pipeline.yml'
pull_request:
branches: [ main, master ]
paths:
- 'v1/src/core/**'
- 'v1/src/hardware/**'
- 'v1/data/proof/**'
- 'archive/v1/src/core/**'
- 'archive/v1/src/hardware/**'
- 'archive/v1/data/proof/**'
- '.github/workflows/verify-pipeline.yml'
workflow_dispatch:
@ -37,19 +37,19 @@ jobs:
- name: Install pinned dependencies
run: |
python -m pip install --upgrade pip
pip install -r v1/requirements-lock.txt
pip install -r archive/v1/requirements-lock.txt
- name: Verify reference signal is reproducible
run: |
echo "=== Regenerating reference signal ==="
python v1/data/proof/generate_reference_signal.py
python archive/v1/data/proof/generate_reference_signal.py
echo ""
echo "=== Checking data file matches committed version ==="
# The regenerated file should be identical to the committed one
# (We compare the metadata file since data file is large)
python -c "
import json, hashlib
with open('v1/data/proof/sample_csi_meta.json') as f:
with open('archive/v1/data/proof/sample_csi_meta.json') as f:
meta = json.load(f)
assert meta['is_synthetic'] == True, 'Metadata must mark signal as synthetic'
assert meta['numpy_seed'] == 42, 'Seed must be 42'
@ -76,7 +76,7 @@ jobs:
echo "=== Scanning for unseeded np.random usage in production code ==="
# Search for np.random calls without a seed in production code
# Exclude test files, proof data generators, and known parser placeholders
VIOLATIONS=$(grep -rn "np\.random\." v1/src/ \
VIOLATIONS=$(grep -rn "np\.random\." archive/v1/src/ \
--include="*.py" \
--exclude-dir="__pycache__" \
| grep -v "np\.random\.RandomState" \

View file

@ -520,7 +520,7 @@ Major release: complete Rust sensing server, full DensePose training pipeline, R
- `PresenceClassifier` — rule-based 3-state classification (ABSENT / PRESENT_STILL / ACTIVE)
- Cross-receiver agreement scoring for multi-AP confidence boosting
- WebSocket sensing server (`ws_server.py`) broadcasting JSON at 2 Hz
- Deterministic CSI proof bundles for reproducible verification (`v1/data/proof/`)
- Deterministic CSI proof bundles for reproducible verification (`archive/v1/data/proof/`)
- Commodity sensing unit tests (`b391638`)
### Changed
@ -528,7 +528,7 @@ Major release: complete Rust sensing server, full DensePose training pipeline, R
### Fixed
- Review fixes for end-to-end training pipeline (`45f0304`)
- Dockerfile paths updated from `src/` to `v1/src/` (`7872987`)
- Dockerfile paths updated from `src/` to `archive/v1/src/` (`7872987`)
- IoT profile installer instructions updated for aggregator CLI (`f460097`)
- `process.env` reference removed from browser ES module (`e320bc9`)

View file

@ -91,10 +91,10 @@ cargo test --workspace --no-default-features
cargo check -p wifi-densepose-train --no-default-features
# Python — deterministic proof verification (SHA-256)
python v1/data/proof/verify.py
python archive/v1/data/proof/verify.py
# Python — test suite
cd v1 && python -m pytest tests/ -x -q
cd archive/v1 && python -m pytest tests/ -x -q
```
### ESP32 Firmware Build (Windows — Python subprocess required)
@ -156,7 +156,7 @@ cargo test --workspace --no-default-features
# 2. Python proof — must print VERDICT: PASS
cd ..
python v1/data/proof/verify.py
python archive/v1/data/proof/verify.py
# 3. Generate witness bundle (includes both above + firmware hashes)
bash scripts/generate-witness-bundle.sh
@ -169,8 +169,8 @@ 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
python archive/v1/data/proof/verify.py --generate-hash
python archive/v1/data/proof/verify.py
```
**Witness bundle contents** (`dist/witness-bundle-ADR028-<sha>.tar.gz`):
@ -183,9 +183,9 @@ python v1/data/proof/verify.py
- `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)
- `archive/v1/data/proof/verify.py` — Trust Kill Switch: feeds reference signal through production pipeline, hashes output
- `archive/v1/data/proof/expected_features.sha256` — Published expected hash
- `archive/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
@ -216,8 +216,8 @@ Active feature branch: `ruvsense-full-implementation` (PR #77)
- `v2/crates/wifi-densepose-ruvector/src/viewpoint/` — Cross-viewpoint fusion (5 files)
- `v2/crates/wifi-densepose-hardware/src/esp32/` — ESP32 TDM protocol
- `firmware/esp32-csi-node/main/` — ESP32 C firmware (channel hopping, NVS config, TDM)
- `v1/src/` — Python source (core, hardware, services, api)
- `v1/data/proof/` — Deterministic CSI proof bundles
- `archive/v1/src/` — Python source (core, hardware, services, api)
- `archive/v1/data/proof/` — Deterministic CSI proof bundles
- `.claude-flow/` — Claude Flow coordination state (committed for team sharing)
- `.claude/` — Claude Code settings, agents, memory (committed for team sharing)
@ -243,7 +243,7 @@ Active feature branch: `ruvsense-full-implementation` (PR #77)
Before merging any PR, verify each item applies and is addressed:
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)
2. **Python proof passes**`python archive/v1/data/proof/verify.py` (VERDICT: PASS)
3. **README.md** — Update platform tables, crate descriptions, hardware tables, feature summaries if scope changed
4. **CLAUDE.md** — Update crate table, ADR list, module tables, version if scope changed
5. **CHANGELOG.md** — Add entry under `[Unreleased]` with what was added/fixed/changed

View file

@ -92,7 +92,7 @@ node scripts/mincut-person-counter.js --port 5006 # Correct person counting
> | **Research NIC** | Intel 5300 / Atheros AR9580 | ~$50-100 | Yes | Full CSI with 3x3 MIMO |
> | **Any WiFi** | Windows, macOS, or Linux laptop | $0 | No | RSSI-only: coarse presence and motion |
>
> No hardware? Verify the signal processing pipeline with the deterministic reference signal: `python v1/data/proof/verify.py`
> No hardware? Verify the signal processing pipeline with the deterministic reference signal: `python archive/v1/data/proof/verify.py`
>
---
@ -1171,7 +1171,7 @@ Bundle verify: 7/7 checks PASS
cd v2 && cargo test --workspace --no-default-features
# Run the deterministic proof
python v1/data/proof/verify.py
python archive/v1/data/proof/verify.py
# Generate + verify the witness bundle
bash scripts/generate-witness-bundle.sh
@ -2164,7 +2164,7 @@ cargo test -p wifi-densepose-sensing-server
./target/release/sensing-server --benchmark
# Python tests
python -m pytest v1/tests/ -v
python -m pytest archive/v1/tests/ -v
# Pipeline verification (no hardware needed)
./verify

74
archive/README.md Normal file
View file

@ -0,0 +1,74 @@
# Archive
Frozen, no-longer-active components of RuView preserved for historical
reference, reproducibility, and load-bearing legacy paths the active
codebase still depends on.
## What lives here
| Path | What it is | Why it's archived | Still load-bearing? |
|------|------------|-------------------|---------------------|
| `v1/` | Original Python implementation of RuView (CSI processing, hardware adapters, services, FastAPI) | Superseded by the Rust workspace at `v2/`; ~810× slower in benchmarks. Kept rather than deleted because the deterministic proof bundle (`v1/data/proof/`) is part of the pre-merge witness verification process per ADR-011 / ADR-028. | **Yes — for the proof bundle only.** Active code lives in `v2/`. |
## What "archived" means
- **Do not add new features here.** New work goes in `v2/`.
- **Do not refactor or modernize the archived code beyond what is
strictly necessary** to keep the load-bearing paths working. The
Python proof bundle is intentionally frozen so that its SHA-256
reproducibility holds across releases (per ADR-028's witness
verification requirement).
- **Bug fixes inside archived code are allowed** when the bug affects a
still-load-bearing path (currently: only the Python proof). All
other "bugs" in archived code are out-of-scope — they are part of
the historical record and any fix would unnecessarily churn the
witness hashes.
- **CI continues to verify the load-bearing paths.**
`.github/workflows/verify-pipeline.yml` runs the Python proof on
every push and PR; if you change anything inside `archive/v1/src/`
or `archive/v1/data/proof/`, expect the determinism check to flag
it.
## Quick reference for the load-bearing paths
```bash
# Run the deterministic Python proof (must print VERDICT: PASS)
python archive/v1/data/proof/verify.py
# Regenerate the expected hash (only if numpy/scipy version legitimately changed)
python archive/v1/data/proof/verify.py --generate-hash
# Run the full Python test suite (legacy, still maintained)
cd archive/v1&& python -m pytest tests/ -x -q
```
## Why we keep `v1/` rather than delete it
1. **Trust kill-switch.** The proof at `v1/data/proof/verify.py` feeds
a known reference signal through the full pipeline and hashes the
output. If the active code's behavior drifts, the hash changes and
CI fails. This is what stops accidental regression in the science
layer of the codebase.
2. **Witness verification.** ADR-028's witness-bundle process bundles
the proof, the rust workspace test results, and firmware hashes
into a tarball recipients can self-verify. Removing v1 would break
that chain.
3. **Historical reference.** ADR-011 documents the "no mocks in
production code" decision; the original violations and their fixes
live in this Python codebase. The ADRs reference these paths.
If the time comes to retire the proof bundle (e.g., a Rust port of
the proof exists and the Python version is no longer canonical), the
right move is a single follow-up that simultaneously: ports the
witness-bundle process, updates `verify-pipeline.yml`, and either
deletes `archive/v1/` or moves it to a separate read-only repository.
That decision belongs in its own ADR.
## See also
- `docs/adr/ADR-011-python-proof-of-reality-mock-elimination.md`
- `docs/adr/ADR-028-esp32-capability-audit.md`
- `archive/v1/data/proof/README.md` (if present)
- `docs/WITNESS-LOG-028.md`

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