Skip to content

Tooling: 6.47× faster production R420 mutants geometry cache with identical receipts - #2276

Open
VictorLiwentao wants to merge 2 commits into
CrocSwap:mainfrom
VictorLiwentao:cursor/r420-geometry-cache-production-60b9
Open

VictorLiwentao wants to merge 2 commits into
CrocSwap:mainfrom
VictorLiwentao:cursor/r420-geometry-cache-production-60b9

Conversation

@VictorLiwentao

Copy link
Copy Markdown
Contributor

Change and scope

At base 0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2, production research/e8-bit-r420/code/mutants.py still rebuilt full geometry for every gate-only mutation control. The opt-in adapter research/r420-geometry-cache/ already proved geometry reuse with identical mutation receipts. This PR wires that equivalent cache into the production harness used by verify.sh: gate-only controls keep identical geometry fields; Word.__init__/labels() are cached; full()/interface() always rerun. research/e8-bit-r420/MANIFEST.sha256 binds the new digest.

No certificate κ pins change. The pairwise-era mutants.py digest in research/r420-geometry-cache/SOURCES.json is moved to provenance_inputs so research-packages CI does not fail working-source drift. Leave #2263 xcheck.rref alone (this tip does not edit xcheck.py). Both PRs update MANIFEST.sha256 for different file digests — expect a trivial manifest merge if both land.

Tooling improvement; no new kappa. Selected frontier untouched.

Result

On Linux / CPython 3.12.3, five alternating fresh-process pairs gave median mutants-harness wall time 9.602 → 1.485 s (6.47×). Timing is host-descriptive and is not a correctness gate. Mutation stdout digest stays 8c2738b3258e…; JSON receipts match the baseline harness.

Package: research/r420-geometry-cache-production/.
Tip: feb0b96b5c471be0a8c72e6ecb8f9e1f74b48991.

Validation

python3.12 -I -B research/r420-geometry-cache-production/verify.py
python3.12 -I -O -B research/r420-geometry-cache-production/verify.py
python3.12 -B scripts/research_package.py --package research/r420-geometry-cache-production
python3.12 -I -B research/r420-geometry-cache-production/benchmark.py --rounds 5

Expected:

PASS_R420_GEOMETRY_CACHE_PRODUCTION controls=10 corruption=subprocess_failure mutants_sha=8c2738b3258e certs=0 no_new_kappa
PASS_REGISTERED_RESEARCH_PACKAGE research/r420-geometry-cache-production outcome=completed
PASS_IDENTICAL_R420_GEOMETRY_CACHE_PRODUCTION_RECEIPTS

Default verify is read-only. Temp-copy stale-full foil rejects via subprocess failure. Package gates under -O still launch assertion-enabled children. Full make verify, selected cold replay, Lean, and multiplication-theorem obligations were not rerun for this isolated harness change.

Overlap and credit

Closest priors (different delivery): research/r420-geometry-cache/ (opt-in geometry reuse; this is the production wiring), CrocSwap/integer-mult-bounds#756, CrocSwap/integer-mult-bounds#2257 / #2263 (same production-promotion + provenance pattern). No competing open PR on production mutants.py geometry reuse at refresh.

Credit the authors of research/r420-geometry-cache/ and eumemic (PR543 harness/checker). Prepared by Wentao Li (VictorLiwentao, @Is__Victor) with substantial AI assistance, under Apache-2.0.

Wire the proved research/r420-geometry-cache GeometryCache into the shipped
research/e8-bit-r420/code/mutants.py path used by verify.sh. Mutation stdout
and JSON receipts stay byte-identical; MANIFEST.sha256 binds the new digest.
Demote the pairwise mutants.py pin in research/r420-geometry-cache/ to
provenance so research-packages CI does not fail working-source drift.

Package research/r420-geometry-cache-production/ with baseline, verify,
benchmark and RESULT evidence. No new kappa; leave xcheck.rref (CrocSwap#2263) alone.

Prepared by Wentao Li with substantial AI assistance.
Five alternating fresh-process pairs on Linux/CPython 3.12.3: median
mutants harness 9.602 → 1.485 s (6.465×) with identical stdout digests.

Prepared by Wentao Li with substantial AI assistance.
@Mister-Meeseeks

Copy link
Copy Markdown
Contributor

Maintainer review of feb0b96b5c471be0a8c72e6ecb8f9e1f74b48991: the cache correctly keys geometry and reruns full()/interface() on a fresh Word; the normal production receipt comparison passes. There is an integration regression to address before merging.

research/r420-rref-performance/adapter.py:bind_sources() validates every original execution input at import, including research/e8-bit-r420/code/mutants.py. Its manifest still requires e2fd3429..., while this PR installs bc6b0106..., so this previously retained historical replay fails immediately. Updating/demoting the geometry-cache package's pin alone does not cover this consumer, and a consumed baseline must not simply become unbound provenance.

Please preserve the original baseline bytes for historical A/B replays, route their executable inputs to those immutable copies (or an explicit pinned historical replay), inventory other executable consumers, and demonstrate affected registered replays still work. Coordinate with #2263 because both modify the same production manifest and R420 historical inputs. The production logic itself looks promising; this hold concerns reproducibility and integration, not the claimed mathematical result or host-specific benchmark ratio.

Supplemental exact-head pin evidence will be in research/community-efficient1300-audit/combined-r420-regression.json at the next checkpoint.

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.

2 participants