fix(verify): repoint wrapper to archive/v1 paths (#559) + cross-platform FFT probe (#560) - #577
Closed
ruvnet wants to merge 1 commit into
Closed
fix(verify): repoint wrapper to archive/v1 paths (#559) + cross-platform FFT probe (#560)#577ruvnet wants to merge 1 commit into
ruvnet wants to merge 1 commit into
Conversation
…orm FFT probe (#560) #559: Fix ./verify wrapper The repo moved v1/ -> archive/v1/ but ./verify still pointed at the old paths and failed before reaching the proof script with: FAIL: Reference signal not found at .../v1/data/proof/sample_csi_data.json FAIL: verify.py not found at .../v1/data/proof/verify.py Update PROOF_DIR, V1_SRC, and two diagnostic strings to use archive/v1/. #560: Add platform probe + root-cause evidence Add scripts/probe-fft-platform.py that runs verify.py's hash-relevant scipy.fft.fft / scipy.signal.windows.hamming calls in isolation on a deterministic input (no pydantic Settings stack), so the source of divergence can be located across platforms. Tested on three machines via Tailscale: Windows (Intel AVX-512, numpy 2.4.2 / scipy 1.17.1): first4_psd_floats = [..., 94.40426770856882, ..., 51.677496924642476] sha256 = 78b3fb4acb8cc18c3e870f92e29ee98143c7cac4767f2f71b0fc384a82b92f6e ruvultra (Linux x86_64, numpy 1.26.4 / scipy 1.14.1): first4_psd_floats = [..., 94.40426770856882, ..., 51.677496924642476] sha256 = 41dc56416b6e8346d6457b1e3c9ca5d4b9035f645658e40e2eb668d08efaf9b6 ruv-mac-mini (Apple Silicon arm64/NEON, numpy 2.4.4 / scipy 1.17.1): first4_psd_floats = [..., 94.4042677085688, ..., 51.67749692464246] sha256 = 9b5e192b56d26a486eefe5dff6bb0e05f6223163a4246043fc168002d495efca Win and Linux agree on the first PSD/doppler values but produce different SHA-256s (later FFT bins diverge due to scipy version's pocketfft SIMD path). Mac arm64 differs from x86_64 at ULP precision (~2e-14 at value ~94 = ~1 ULP) on index 1 of the FIRST PSD bins. Root cause: SIMD-vectorized FFT reorders floating-point operations. NEON on Apple Silicon vs AVX2/AVX-512 on x86_64 produce ULP-different results, which a bit-exact SHA-256 cannot tolerate. The verify.py docstring at line 172 ("platform-independent for IEEE 754 compliant systems") is incorrect -- IEEE 754 guarantees per-operation determinism but vectorized FFT reorders ops. This commit ships the diagnostic probe + the #559 path fix only. The verify.py hash function itself (quantize-before-hash to absorb ULP divergence + regeneration of expected_features.sha256 on a canonical CI platform) is a follow-up that affects a published trust-anchor artifact -- left for maintainer decision. Verification: cd <repo> && ./verify # before: FAIL before reaching pipeline (v1/... not found) # after: reaches verify.py and runs the pipeline python3 scripts/probe-fft-platform.py # prints JSON with sha256 + first-few-floats per platform Refs: #559, #560 Co-Authored-By: claude-flow <ruv@ruv.net>
This was referenced May 15, 2026
Owner
Author
|
Closing in favor of two cleaner follow-ups now that this session has merged the verify path fix and extracted the probe script:
Rebasing this PR would leave the |
ruvnet
added a commit
that referenced
this pull request
May 17, 2026
The verify.py "platform-independent for IEEE 754 compliant systems" docstring at archive/v1/data/proof/verify.py:172 is incorrect — scipy's pocketfft uses SIMD vector kernels (AVX2/AVX-512 on x86_64, NEON on Apple Silicon) that reorder FP operations differently across builds, so the SHA-256 of the production pipeline diverges at ULP precision per platform. That divergence is what bug report #560 caught on macOS arm64. This script reproduces verify.py's hash-relevant scipy.fft.fft + Hamming- window calls in isolation on a deterministic synthetic input, without dragging in src.app / pydantic Settings. Run on each platform and diff the JSON output: python3 scripts/probe-fft-platform.py - If two machines print the same first8_doppler_bytes_hex and the same first4_psd_floats but different sha256, the divergence is in later FFT bins (SIMD reordering). - If even the first values differ, it's true ULP-level divergence at every bin (NEON vs x86_64, or different scipy pocketfft builds). Captured empirical evidence across Windows (Intel AVX-512), Linux x86_64 (ruvultra), and Apple Silicon (ruv-mac-mini) — Win + Linux agree on first PSD values but produce different SHA-256s; Mac arm64 differs at the first bins at ~1 ULP precision (~2e-14 on a value of ~94). This commit ships only the diagnostic. The architectural fix for #560 (quantize-before-hash in features_to_bytes(), then regenerate expected_features.sha256 on a canonical CI platform) is left as a separate maintainer decision because it changes a published trust-anchor artifact and merits a deliberate call. Supersedes the probe portion of PR #577 (the verify path fix from #577 already shipped via PR #590).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #559. Adds empirical root-cause evidence for #560 (left open pending maintainer decision on quantize-before-hash).
#559 — ./verify wrapper points at removed v1/ paths
./verifyfailed before reaching the proof script on a fresh clone because the wrapper still pointed at the pre-archive layout:Repointed
PROOF_DIR,V1_SRC, and two diagnostic strings toarchive/v1/.... Three-line core diff matches exactly what @Fewmanism proposed in #559.#560 — Empirical root-cause probe
Added
scripts/probe-fft-platform.pywhich runsverify.py's hash-relevantscipy.fft.fft+scipy.signal.windows.hammingcalls in isolation on a deterministic input (no pydanticSettingsstack), so the source of divergence can be located cleanly.Tested via Tailscale on three real machines:
..., 94.40426770856882, ..., 51.67749692464247678b3fb…..., 94.40426770856882, ..., 51.67749692464247641dc56…..., 94.4042677085688, ..., 51.677496924642469b5e19…The divergence is at the SIMD level: NEON (Apple Silicon) vs AVX2/AVX-512 (x86_64) reorder vectorized FP operations differently. IEEE 754 guarantees per-operation determinism, not associativity under reordering — so the docstring at
archive/v1/data/proof/verify.py:172("platform-independent for IEEE 754 compliant systems") is incorrect.What this PR does not fix
The architectural fix for #560 is quantize-before-hash in
features_to_bytes()(round float64 to a fixed precision well above SIMD-ULP, e.g. 1e-9, before packing) — then regenerateexpected_features.sha256on a canonical CI platform. That changes a published trust-anchor artifact and merits a maintainer call. This PR ships only the path fix + diagnostic probe so #559 unblocks immediately while #560 gets reviewed.Verification
Test plan
./verifyon macOS / Linux / Windows: wrapper reachesverify.pyand the path-level errors are gonescripts/probe-fft-platform.pyruns cleanly on Windows + ruvultra Linux + ruv-mac-mini Mac arm64Thanks to @Fewmanism for the clean repro + the suggested diff in #559.
🤖 Generated with claude-flow