Repository navigation
Blind leak scan: drop out-of-scale values before matching - #451
Open
cailmdaley wants to merge 5 commits into
Open
cailmdaley wants to merge 5 commits into
cailmdaley wants to merge 5 commits into
Conversation
…filter Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JK7o9H5tLNFzcwRnYwMFEA
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
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.
The #445 leak scan (
assert_no_raw_values) compares every numeric value under an output tree against the raw signal vectors withnp.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.pyand the newtest_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