Repository navigation
Tooling: 1.13x faster exact stage-pair audit with identical receipts - #824
Merged
Mister-Meeseeks merged 2 commits intoOct 14, 2026
Merged
Mister-Meeseeks merged 2 commits into
Mister-Meeseeks merged 2 commits into
Conversation
Contributor
|
100-PR batch review at Merged to Reviewed scope: Fraction reuse and modular-inverse caching in two rank checkers; focused reference-equivalence and failure regressions. The pinned scoped command passed; the batch ledger contains its command, input hashes, environment and log. This incorporates the research/tooling contribution and does not change the selected κ or discharge the inherited multiplication-theorem assumptions. Batch review, attribution and evidence. Thank you for the contribution. |
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 historical stage-pair audit spends most of its runtime in exact rational arithmetic. This replaces two wasteful patterns with identical operations, preserving every receipt and rejection check. Tooling improvement; no new kappa.
Changes
scripts/audit_fused_block.py—rational_rankskips redundantQ(x)construction when an entry is already aFraction.Q(Q)returns the same value after needless normalization.scripts/audit_stage_pair.py—modular_rankconverts denominators through a cached_mod_inv(d, prime)helper (samepow(d, -1, prime)call) instead of one freshpow()per matrix entry.lru_cachedoes not cache exceptions, so a non-invertible denominator raises the sameValueError.No matrix, pivot order, stopping rule, candidate list, or rejection predicate was touched.
Measurements
Fresh-process timings of
certificate()(compute only), CPython 3.12.14 / Windows, stdlib only. OS caches not flushed; host not isolated. Timing is descriptive, not a pass threshold.Median 15.79 s to 13.96 s: 1.13x faster, 11.6% less wall time. Microbenchmarks:
rational_rank3.05x on 50 sampled frames; modular conversion 1.42x on 20 sampled matrices.Expected:
PASS_IDENTICAL_STAGE_PAIR_RECEIPTS.Validation
certificate()output identical tocertificates/stage-pair-audit.jsonin every field except the single expectedsource_sha256entry for the editedaudit_stage_pair.py(rank sum 8684, 64 candidates, 6 local improvements).audit_fused_blockandaudit_joint_framescertificates regenerate byte-identical.tests/test_stage_pair_performance.py: 6 tests compare optimized helpers against verbatim base-commit references on edge cases (empty, zero, singular, non-square, ints vs Fractions, 30-digit numerators, primes 101/103), including theValueErrorpath. Existing suites pass:test_stage_pair(8),test_fused_block(7),test_joint_frames(8),test_quadratic_affine(4).make verifyand the selected-supplier cold replay were not rerun for this isolated historical-checker change.upstream/untouched; selected frontier unchanged.Provenance
7ee02b7c96d85f22b38d28bd7ed49bb8c1aeb261. OS-random assignment seed 92, verification-engineering track. Claim, candidates, and overlap review inresearch/stage-pair-performance/SELECTION.json. No open PR covers the stage-pair audit (checked through PR 823).