Repository navigation
perf: X-Ray and the vault scan run only the signatures they read (Part of #5500) - #6105
Merged
Merged
Conversation
…t of #5500) run_xray_audit narrowed SecurityLens.THREAT_SIGNATURES after construction, but scan_content walks _scan_plan, built in __init__, so every signature ran on all files: 14.7 s of the ~40 s serial tail per galaxyscope scan of the crucible corpus. restrict_signatures() rebuilds the plan; X-Ray 14.7 s -> 2.6 s with anomalies_found 72 == 72. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Owner
Author
|
No description provided. |
squid-protocol
marked this pull request as ready for review
October 23, 2026 00:31
Contributor
squid-protocol
enabled auto-merge (squash)
October 23, 2026 00:41
Owner
Author
|
No description provided. |
This was referenced Oct 23, 2026
Closed
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.
Part of #5500.
Owner decisions
Owner OK (phone 2026-10-21): engine work on the single-threaded phases of the path-independence scan step (4.6 min -> ~4 min).
What
run_xray_audit(Phase 10 of every galaxyscope scan) narrowedSecurityLens.THREAT_SIGNATURESto two keys after constructing the lens, butscan_contentwalks_scan_plan, which__init__builds once, so the narrowing did nothing: X-Ray ran every signature (plus the hidden-text ones) on every file while reading only theentropyandbitwise_opscounts. NewSecurityLens.restrict_signatures(keys)rebuilds the plan; the three call sites use it.binary_anomaly_detector.py:run_xray_audit(Phase 10) and the standalonemainnow keepbitwise_ops(entropy is always computed). The oldreflection_metaprogrammingkey was never read, so it is dropped.vault_sentinel.py: keepshardcoded_secrets(the only count/snippet read);dead_codewas never read.Measured (language-crucible data, 3737 files, 6-core box, via heavy-run.sh)
run_xray_auditaloneanomalies_foundPer scan that is ~12 s off the ~40 s serial tail (Phase-10 audits were ~15 s of it), and both parent-path scans pay it.
crucible_path_check.pystill PASSes. I have no same-load before/after wall time for the full step: the box is shared and the earlier 147 s baseline was under different load. The CI number comes after merge.Class sweep
Class: a
SecurityLenswhoseTHREAT_SIGNATURESis reassigned after construction (no effect on_scan_plan).run_xray_auditbinary_anomaly_detector.mainvault_sentinelTHREAT_SIGNATURES = {finds only these three).Checklist: partial [c:3ef46cdf] -- the single-scan core usage was measured earlier on the issue; this drops the X-Ray work that never mattered to its result; the CI median is still to be confirmed after merge
Checklist: done [c:d640e0d1]
Checklist: done [c:7fff4ad5]
Gates
pr_gates.py --fast: 7/7 pass.crucible_check.py(golden-lock, both legs): PASS, no re-bless needed (output unchanged).pr_gates.py --ratchets: 8 pass,port-surfaceFAIL. This branch is 89 commits behind main andport-surfacewas changed by port_surface: a det port keeps the translator's facades (Part of #5089) #5986 on main; the same ratchet PASSES on a fresh origin/main checkout. Not caused by this change (no ports touched); I did not merge main.tests/security_auditing/test_binary_anomaly_detector.py(restricted vs. full lens counts/snippets/positions on varied samples;run_xray_auditcount parity).tests/security_auditing: 590 passed, 1 skipped.Lessons for agents
SecurityLens.THREAT_SIGNATURESafterSecurityLens()has no effect;scan_contentreads_scan_plan(built in__init__). Userestrict_signatures.🤖 Generated with Claude Code