fix: use kResidualGateProbeCount=64 at post-solver verification gates#34
Merged
kyle-elliott-tob merged 3 commits intomasterfrom May 5, 2026
Merged
Conversation
Several post-solver verification sites left FullWidthCheckEval at the default 8-probe count while siblings on the same boundary used 64 — asymmetric verification depth without justification in the code or comments. The 64-probe count is the documented "residual-gate strength" that catches boolean-correct / full-width-incorrect false positives; the 8-probe default is for shape-deterministic rewrites. Closes the verification-probe-depth cluster from the 2026-05-04 audit: - signature-basis-55: ResolveLiftedSubstitute used 8 probes; sibling ResolveResidualRecombine uses 64 - signature-basis-cross-2: Singleton override-path bypassed the residual gate - signature-basis-cross-3: RunSignatureAnf accepted ProductShadow-repaired Expr after only 8 probes - expr-foundation-5: IsSpuriousFullWidth 8-probe sample insufficient for sparse-dependence Adds `inline constexpr uint32_t kResidualGateProbeCount = 64;` and `kDefaultProbeCount = 8` in SignatureChecker.h, then uses the strengthened count at: - ResolveLiftedSubstitute's post-substitution verifier (matches the sibling residual-recombine site at line 709) - RunSignatureSingletonPolyRecovery override-path (matches the non-override path's recursive residual gate) - RunSignatureAnf's RepairProductShadow re-verifier (the AND/MUL semantic boundary V2 already flagged as a known divergence) - IsSpuriousFullWidth's per-variable spurious-classification probe Refactor only — full unit suite (1171 tests) still passes; the strengthened verification did not surface any test deltas.
…obe-depth-cluster
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.
Summary
Closes the verification-probe-depth cluster (4 findings) from the 2026-05-04 audit. Several post-solver verification sites left
FullWidthCheckEvalat the default 8-probe count while siblings on the same boundary used 64 — asymmetric verification depth without justification in the code or comments. The 64-probe count is the documented "residual-gate strength" that catches boolean-correct / full-width-incorrect false positives; the 8-probe default is for shape-deterministic rewrites.Findings closed:
signature-basis-55— ResolveLiftedSubstitute used 8 probes; sibling ResolveResidualRecombine uses 64signature-basis-cross-2— Singleton override-path bypassed the 64-probe residual gatesignature-basis-cross-3— RunSignatureAnf accepted ProductShadow-repaired Expr after only 8 probesexpr-foundation-5— IsSpuriousFullWidth 8-probe sample insufficient for sparse-dependenceChanges
SignatureChecker.hdeclaresinline constexpr uint32_t kDefaultProbeCount = 8;andkResidualGateProbeCount = 64;ResolveLiftedSubstitute's post-substitution verifier passeskResidualGateProbeCount(matches the sibling residual-recombine site at line 709)RunSignatureSingletonPolyRecoveryoverride-path passeskResidualGateProbeCount(matches the non-override path's recursive residual gate)RunSignatureAnf'sRepairProductShadowre-verifier passeskResidualGateProbeCount— the AND/MUL semantic boundary V2 already flagged as a known divergenceIsSpuriousFullWidth's per-variable probe useskResidualGateProbeCount(was 8)Test plan
🤖 Generated with Claude Code