Skip to content

Commit 22944c8

Browse files
committed
chore(proof): commit CI-generated expected_features_v2.sha256; fix macOS wheel builds
- expected_features_v2.sha256 = witness-v2 artifact of python-ci run 42955822833 (Rust 1.89, Linux x86_64); provenance in ADR-028 §5.3 - pip-release: MACOSX_DEPLOYMENT_TARGET 10.12/11.0 so delocate accepts the rustc-built .so; macos-14 runner label is unsupported, use macos-15 Co-Authored-By: claude-flow <ruv@ruv.net>
1 parent 9a2aacc commit 22944c8

5 files changed

Lines changed: 39 additions & 6 deletions

File tree

‎.github/workflows/pip-release.yml‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,15 @@ jobs:
8383
arch: x86_64
8484
- os: ubuntu-latest
8585
arch: aarch64
86+
# macos_target: rustc's minimum macOS deployment target. Without it
87+
# cibuildwheel tags x86_64 wheels 10.9 and delocate-wheel rejects
88+
# the 10.12 .so that rustc emits.
8689
- os: macos-15-intel # x86_64 runner
8790
arch: x86_64
88-
- os: macos-14 # arm64 runner
91+
macos_target: "10.12"
92+
- os: macos-15 # arm64 runner (the macos-14 label is no longer supported)
8993
arch: arm64
94+
macos_target: "11.0"
9095
- os: windows-latest
9196
arch: AMD64
9297
runs-on: ${{ matrix.os }}
@@ -109,6 +114,7 @@ jobs:
109114
CIBW_ARCHS_LINUX: ${{ matrix.arch }}
110115
CIBW_ARCHS_MACOS: ${{ matrix.arch }}
111116
CIBW_ARCHS_WINDOWS: ${{ matrix.arch }}
117+
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos_target }}
112118
CIBW_BUILD_FRONTEND: "build"
113119
CIBW_BEFORE_BUILD: "pip install maturin>=1.7"
114120
# The PyO3 sdist landing depends on the cargo/Rust toolchain
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
92d867f2ed7ec9a96b4466b26903d81ff544b6d95dfeb71bb79d14ac633cd3cc

‎docs/adr/ADR-028-esp32-capability-audit.md‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,30 @@ python scripts/provision.py --port COM7 \
236236
| Generator | `archive/v1/data/proof/generate_reference_signal.py` | Deterministic multipath model |
237237
| Verifier | `archive/v1/data/proof/verify.py` | SHA-256 hash comparison |
238238
| Expected hash | `archive/v1/data/proof/expected_features.sha256` | `0b82bd45...` |
239+
| v2 verifier (Rust pipeline) | `python/wifi_densepose/witness.py` | `python -I -m wifi_densepose.witness` over the PyO3 wheel |
240+
| v2 expected hash | `archive/v1/data/proof/expected_features_v2.sha256` | `92d867f2...` (ADR-117 §11.3) |
239241

240242
**Audit-time result:** PASS. Hash regenerated with numpy 2.4.2 + scipy 1.17.1. Pipeline hash: `8c0680d7d285739ea9597715e84959d9c356c87ee3ad35b5f1e69a4ca41151c6`.
241243

244+
**v2 witness (ADR-117 §11.3, 2026-11-10).** The v2 hash covers the Rust vitals
245+
pipeline, not the v1 Python processor. Antenna 0 of each of the 1,000 reference
246+
frames goes through `CsiVitalPreprocessor`, `BreathingExtractor` and
247+
`HeartRateExtractor` (all `esp32_default()`, called through the PyO3 bindings).
248+
The residuals and estimates are rounded to 6 decimals, packed as little-endian
249+
float64 and hashed with SHA-256; `witness.py` documents the byte layout. The
250+
`witness-v2` job in `python-ci.yml` generated the committed value
251+
`92d867f2ed7ec9a96b4466b26903d81ff544b6d95dfeb71bb79d14ac633cd3cc`
252+
([run 42955822833](https://github.com/ruvnet/RuView/actions/runs/42955822833),
253+
Rust 1.89, Linux x86_64, release wheel). It ran the witness twice, and both runs
254+
agreed. A local Rust 1.89 build on Linux x86_64 gave the same hash. Of the 1,000
255+
frames, 501 produce a heart-rate estimate and none produce a breathing estimate:
256+
the breathing stage needs 10 s of history, and at the 10 s mark the signal is
257+
out of band. `python-ci.yml` re-checks the committed hash on every
258+
`python/**` PR. `pip-release.yml` re-checks it against the manylinux x86_64
259+
wheel it is about to publish. The hash is pinned for Linux x86_64 only; other
260+
platforms are expected to match because of the rounding, but they are not
261+
gated.
262+
242263
### 5.4 Security Posture
243264

244265
- JWT authentication (`python-jose[cryptography]`)

‎docs/adr/ADR-117-pip-wifi-densepose-modernization.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,9 +524,11 @@ scaffold core vitals+ client publish deferred
524524
- [ ] GIL release (`py.allow_threads`) on all calls >0.5 ms (measured in bench).
525525
- [ ] Integration test: feed 1,000 frames from `archive/v1/data/proof/sample_csi_data.json`
526526
through the PyO3 vitals pipeline; assert output is deterministic across runs.
527-
- [ ] Re-implement `witness/verify.py` using P3 bindings; compare SHA-256 against the
527+
- [x] Re-implement `witness/verify.py` using P3 bindings; compare SHA-256 against the
528528
v1 expected hash. **Note:** the hash will differ because the Rust and Python
529529
processors are not identical — generate and publish a new `expected_features_v2.sha256`.
530+
*Done 2026-11-10:* `python/wifi_densepose/witness.py`, hash generated in CI,
531+
provenance in ADR-028 §5.3.
530532

531533
### P4 — WS/MQTT client layer (1 week)
532534

‎docs/integrations/pypi-release.md‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ Per ADR-117 §7.3, the tombstone publishes first so it claims the
5151
2. Verify: `pip install wifi-densepose==1.99.0; python -c "import
5252
wifi_densepose"` → ImportError with migration URL.
5353
3. Confirm `archive/v1/data/proof/expected_features_v2.sha256` is
54-
committed and non-empty. Production publishing fails closed without it.
54+
committed. Every v2 publish fails closed unless it matches a fresh
55+
`python -I -m wifi_densepose.witness` run of the manylinux x86_64 wheel
56+
(see ADR-028 §5.3 for how the hash was generated).
5557
4. `git tag v2.0.0-pip && git push origin v2.0.0-pip` → the v2
5658
`wifi-densepose` wheel matrix and matching `ruview` wheel/sdist are
5759
published together. Their versions and dependency pin are checked in CI.
@@ -60,9 +62,10 @@ Per ADR-117 §7.3, the tombstone publishes first so it claims the
6062

6163
## Off-loop manual gates
6264

63-
- **Q3** (ADR-117 §11.3) — generate
64-
`archive/v1/data/proof/expected_features_v2.sha256` from the v2 Rust
65-
pipeline before a production v2 publish. The workflow enforces this gate.
65+
- **Q3** (ADR-117 §11.3) — done. `expected_features_v2.sha256` was
66+
generated by the `witness-v2` job in `python-ci.yml`. To regenerate it
67+
after an intentional pipeline change, take the `witness-v2-hash`
68+
artifact from that job, commit it, and record the run in ADR-028 §5.3.
6669
- **OIDC Trusted Publisher** — not used. The workflow is token-based;
6770
this is a deliberate choice to keep the secret refresh entirely in
6871
GCP. If the project migrates to OIDC later, remove `password:`

0 commit comments

Comments
 (0)