Skip to content

Tooling: 5.36× faster production frameopt.close via one-basis modular closure with identical receipts - #2257

Open
VictorLiwentao wants to merge 3 commits into
CrocSwap:mainfrom
VictorLiwentao:cursor/bit-frame-closure-production-60b9
Open

VictorLiwentao wants to merge 3 commits into
CrocSwap:mainfrom
VictorLiwentao:cursor/bit-frame-closure-production-60b9

Conversation

@VictorLiwentao

@VictorLiwentao VictorLiwentao commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Change and scope

At base 0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2, production research/bit589-frame-optimum/frameopt.py:close still rebuilt a modular elimination for every candidate live line (rank(S ∪ {L_i}) == rank(S)). Ross Richardson’s opt-in adapter research/bit-frame-closure-basis/ (incorporated #1666) already proved an equivalent one-basis membership test with identical PR589/PR555/degraded receipts. This PR wires that equivalent check into the production close used by research/bit589-frame-optimum/verify.sh.

No certificate κ pins change. The historical pairwise frameopt.py digest in research/bit-frame-closure-basis/SOURCES.json is demoted to provenance (and dropped from live VERIFY.json / run.py inputs) so research-packages CI does not fail working-source drift after the production rewrite. research/r439-resynth-frame-seed10 still records the pairwise digest as certificate provenance and is left alone (no VERIFY.json / not in the research-packages matrix).

Tooling improvement; no new kappa. Selected frontier untouched.

Result

On Linux / CPython 3.12.3 (Linux-6.12.94+-x86_64-with-glibc2.39), five alternating fresh-process pairs gave:

  • PR589 median 17.298 → 3.213 s (5.38×)
  • Suite median (pr589+pr555+degraded) 47.744 → 8.904 s (5.36×)

Timing is host-descriptive and is not a correctness gate. Every case receipt and stdout digest matches the baseline checker.

Package: research/bit-frame-closure-production/.
Tip: e45c48ca6b44b917d8114140a8715352667795ea.

Validation

python3.12 -I -B research/bit-frame-closure-production/verify.py
python3.12 -I -O -B research/bit-frame-closure-production/verify.py
python3.12 -B scripts/research_package.py --package research/bit-frame-closure-production
python3.12 -B scripts/research_package.py --package research/bit-frame-closure-basis --check-only
python3.12 -I -B research/bit-frame-closure-basis/verify.py
python3.12 -I -B research/bit-frame-closure-production/benchmark.py --rounds 5

Expected:

PASS_BIT_FRAME_CLOSURE_PRODUCTION cases=['pr589', 'pr555', 'degraded'] corruption=subprocess_failure certs=0 no_new_kappa
PASS_PACKAGE_METADATA_AND_PINS (not a mathematical acceptance check)
PASS_BIT_FRAME_CLOSURE_BASIS
PASS_REGISTERED_RESEARCH_PACKAGE research/bit-frame-closure-production outcome=completed
PASS_IDENTICAL_BIT_FRAME_CLOSURE_PRODUCTION_RECEIPTS

Default verify is read-only. Temp-copy always-admit _in_span 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 checker change.

Overlap and credit

Closest priors (different delivery): Ross Richardson’s research/bit-frame-closure-basis/ / #1666 (opt-in one-basis; this is the production wiring), CrocSwap/integer-mult-bounds#756, CrocSwap/integer-mult-bounds#2194 / #2210 / #2231 / #2239 (same production-promotion pattern on other objects). No competing open PR on production frameopt.close at refresh.

Seth Burkart authored the PR886 frame-only optimum checker. Ross Richardson authored the one-basis algorithm. Prepared by Wentao Li (VictorLiwentao, @Is__Victor) with substantial AI assistance, under Apache-2.0.

… receipts

Promote Ross Richardson's proved CrocSwap#1666 bit-frame-closure-basis adapter into
research/bit589-frame-optimum/frameopt.py:close. Production verify.sh keeps
identical PR589/PR555/degraded receipts; no new kappa.

Prepared by Wentao Li with substantial AI assistance.
Five alternating pairs: suite median 47.744→8.904s (5.362×) with identical
receipts. Tighten temp-copy foil to always-admit _in_span for bounded rejection.

Prepared by Wentao Li with substantial AI assistance.
… provenance

After production one-basis close, keep the pairwise digest as provenance so
research-packages CI no longer fails working source drift when frameopt.py
changes. Live VERIFY/run inputs drop that path; basis verify still PASSes.

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

Copy link
Copy Markdown
Contributor

The production one-basis change and its separate baseline/production equivalence checks pass in normal and optimized launcher modes, including all three complete receipts and the rejection control. The remaining issue is preservation of #1666 evidence.

bit-frame-closure-basis/BENCHMARK.json retains every old timing sample unchanged, but replaces its implementation_sha256 for run.py and SOURCES.json with the newly edited files. Those samples were not measured with that implementation. Also, after dropping CHECKER from the live pins, run.execute(..., "reference") loads the now-optimized working frameopt.py, so the historical reference/basis comparison is no longer the original pairwise-versus-basis comparison. The new production package correctly retains an exact old baseline; please preserve the same distinction for the historical package.

Suggested fix: retain the original benchmark and the exact source bytes it authenticates as historical evidence; have the historical runner authenticate/load the original Git blob (or an exact retained snapshot) for its reference input. Record any new benchmark separately instead of changing the provenance of old timings. Update the verifier to distinguish historical benchmark binding from current replay binding. Please also keep the source-pin change explicit; simply deleting the checker pin should not silently broaden what code the historical replay accepts. No new kappa is inferred from the passing production comparison.

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