Skip to content

Blind leak scan: drop out-of-scale values before matching - #451

Open
cailmdaley wants to merge 5 commits into
developfrom
fix/blind-scan-scales
Open

cailmdaley wants to merge 5 commits into
developfrom
fix/blind-scan-scales

Conversation

@cailmdaley

Copy link
Copy Markdown
Collaborator

The #445 leak scan (assert_no_raw_values) compares every numeric value under an output tree against the raw signal vectors with np.isclose. On a full production tree, geometry maps contribute millions of zeros and counts, which makes the scan very slow.

A value can only match if its magnitude falls within the raw vector's range, widened by the tolerance. The scan now drops everything outside that range before the chunked isclose. The verdict is unchanged: the filter is exact, not a heuristic.

Tests: test_blind_scan.py and the new test_blind_scan_scales.py, 49 passed in the image. The new file includes a raw value hidden among many out-of-scale geometry values, which must still be caught.

This came up running the leak gate over the GLASS-mock cosmo_val tree (#449).

Claude Opus 5.5 on behalf of Cail.

🤖 Generated with Claude Code

cailmdaley and others added 5 commits October 30, 2026 05:20
json.dumps writes floats at full precision, so a JSON value is a binary
value unless its writer rounded it. Treating every JSON number as rounded
text (rtol 5e-6) made coincidences fire: a rho/tau EIV fit residual on the
GLASS mock matched an unrelated integration xi- bin to 8e-9. Numbers with
more than 10 written digits now use the binary tolerance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A float32 value prints 16-17 digits but holds ~7, so a raw xi read from a
float32 column and dumped would escape the binary tolerance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant