Repository navigation
Tooling: make the complete R2 audit 5.37x faster with mutation-path copies - #3240
Merged
Mister-Meeseeks merged 1 commit intoOct 17, 2026
Merged
Conversation
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.
After PR3218's comparator improvement, the retained R2 audit spends most of its time deep-copying entire fixtures for mutations that change one narrow part. This opt-in adapter isolates those write paths while executing every original mutation, nonvacuity check, predicate and exact rejection-message check.
Complete-audit median: 32.643 → 6.084 seconds, a 5.37x speedup. Against jackmgaller/#1939's existing checked-marshal copier on the identical workload, the improvement is 10.289 → 6.084 seconds, or 1.69x.
BENCHMARK.json records nine fresh serial CPython 3.12.14 processes in alternating order, exact sources, raw timings and memory. All modes use the same complete fixture, comparator, source bindings and added original-fixture guards. Every run retains all 32 semantic mutants and the same 253 operator decisions (244 accepted, 9 rejected). These are one-host measurements; native artifact generation is excluded. The copy-interval improvement is not a whole-audit speedup.
The adapter copies the ancestors of the selected event, gate or recipe and its writable subtree. Untouched cells remain shared and read-only. PROOF.md gives the tree-copy argument and all sixteen literal write footprints. Path copying is established programming practice; no method-priority claim is made. This is source-specific integration, not a general deepcopy replacement for aliased object graphs.
Validation:
Expected:
PASS_R2_PATH_COPY,PASS_R2_PATH_COPY_EXPORT, andPASS_REGISTERED_RESEARCH_PACKAGE ... outcome=completed. Normal fast use ispython3 -I -B research/r2-mutation-path-copy/replay.py; the registered command deliberately pays for full differential copying.Only
research/r2-mutation-path-copy/is added. Base:463113d675af7410ac91d53a4fed51ec6494eb9a. Pending PR3218 is retained verbatim ata93c4f0bfcac21bf9c62c79728c8936e35ebbc3b, including PR3202 at259043321323717b7e816d6be38ad5e1f0b69b4c. All 40 retained/live inputs are authenticated before execution; no pending Git objects are needed for direct replay. Published head:9f32d16ea188cfba57f6c0d570377be9becb857f.This is verification tooling, with no new kappa, supplier admission or recursive multiplication implementation. Selected/frozen sources and default commands are unchanged. PR3208 cleanup, PR3209 reader-cache/host-replication work and PR3219 Fano tables are complementary. Final overlap coverage and concrete next questions are in TASK/README: source/frame/event reconstruction now dominates this caller, while another caller needs its own proven mutation footprint.
Credit 24kHandsome1201/#3202, Tekalign/#3218, jackmgaller/#1939, Sagar Thakrar/#1781, ywz65/#2638, Charles Bethin/#662 and the full native/construction lineage preserved in NOTICE.md and retained notices. New work by Tekalign (@tekuuu), with substantial OpenAI Codex assistance in profiling, implementation, proof, testing, measurements and writing. Apache-2.0; no independent human or proof-kernel review claimed.
Canonical investigation.