Skip to content

fix: use kResidualGateProbeCount=64 at post-solver verification gates#34

Merged
kyle-elliott-tob merged 3 commits intomasterfrom
fix/verification-probe-depth-cluster
May 5, 2026
Merged

fix: use kResidualGateProbeCount=64 at post-solver verification gates#34
kyle-elliott-tob merged 3 commits intomasterfrom
fix/verification-probe-depth-cluster

Conversation

@kyle-elliott-tob
Copy link
Copy Markdown
Collaborator

Summary

Closes the verification-probe-depth cluster (4 findings) from the 2026-05-04 audit. 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.

Findings closed:

  • signature-basis-55 — ResolveLiftedSubstitute used 8 probes; sibling ResolveResidualRecombine uses 64
  • signature-basis-cross-2 — Singleton override-path bypassed the 64-probe 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

Changes

  • SignatureChecker.h declares inline constexpr uint32_t kDefaultProbeCount = 8; and kResidualGateProbeCount = 64;
  • ResolveLiftedSubstitute's post-substitution verifier passes kResidualGateProbeCount (matches the sibling residual-recombine site at line 709)
  • RunSignatureSingletonPolyRecovery override-path passes kResidualGateProbeCount (matches the non-override path's recursive residual gate)
  • RunSignatureAnf's RepairProductShadow re-verifier passes kResidualGateProbeCount — the AND/MUL semantic boundary V2 already flagged as a known divergence
  • IsSpuriousFullWidth's per-variable probe uses kResidualGateProbeCount (was 8)

Test plan

  • Full unit suite (1171 tests, dataset/diagnostic suites excluded) passes — the strengthened verification surfaced no test deltas

🤖 Generated with Claude Code

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.
@kyle-elliott-tob kyle-elliott-tob merged commit e8f63cc into master May 5, 2026
9 checks passed
@kyle-elliott-tob kyle-elliott-tob deleted the fix/verification-probe-depth-cluster branch May 5, 2026 18:38
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