Repository navigation
Tooling: 1.27x faster t16 invoice-boundary replay via compresslevel=1 (identical receipt) - #3009
Merged
Conversation
The registered replay wrote every mutated .gz fixture at zlib's default level 9; zlib.compress alone was 24.7 s of the 96.1 s cProfile total. compresslevel=1 leaves the decompressed payloads unchanged, so the full deterministic receipt is byte-identical: CPython 3.12.13 direct run 107.41 s -> 84.40 s with identical stdout, and 3.14.4 67.72 s -> 43.90 s. No mathematical, source or receipt change.
Contributor
Author
|
Review-readiness update (no code change since head
|
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.
Summary
One-line tooling change to
research/t16-invoice-boundary-audit/verify.py:gzip.compress(data, mtime=0)becomesgzip.compress(data, mtime=0, compresslevel=1). Same-fixture measurements, direct registered command, stdout byte-identical on every interpreter:The verifier's own receipt comparison passes unchanged (
PASS_T16_INVOICE_BOUNDARY_AUDIT {"assembly": {"ACCEPTED": 10, "REJECTED": 16}, "cases": 54, "invoice": {"ACCEPTED": 26, "REJECTED": 28}}), andpython3.12 scripts/research_package.py --package research/t16-invoice-boundary-auditendsPASS_REGISTERED_RESEARCH_PACKAGE ... outcome=completed. No input, fixture, case, control or receipt byte changes; only the compression level of freshly written work-directory fixtures.Reviewer checklist
scripts/check_research_commit.py --package research/t16-invoice-boundary-audit->PASS_RESEARCH_COMMIT_BYTES(16 files at95568ae8).scripts/research_package.py --package ... --check-only->PASS_PACKAGE_METADATA_AND_PINS.git diff HEAD~1 --checkclean (no whitespace errors).Registered research packagesrun (38939671806) is still queued; I will fix any failure it reports.Evidence
zlib.compress24.7 s / 31 calls,json.raw_decode10.8 s / 1,968 calls, vendoredinvoice_allcold.recount_provider40.7 s cumulative / 52 calls,fractions~20 s cumulative.raw_decodecost needs the author's decision (a parsed-source cache across cases would have to respect the per-case mutation writes).verify.pybytes (no MANIFEST/PINS self-check).Merge danger
Door: two-way. One line, removable without changing any supplier, receipt or claim. Blast radius: isolated to this package's registered replay runtime.
Convention check: many tooling PRs add a separate
research/*-fast-*package, but direct patches to an existing package verifier with an identical receipt are also merged precedent - e.g. #2357 modifiesresearch/complex-center-quarter/verify.py(with re-pinning), #2409 modifies vendored audit code and manifests, and #2100 modifiesscripts/experiments/ternary_side.py. This package does not self-pin its ownverify.pybytes, so no manifest update is needed. If the maintainers prefer the package form here, I can repackage the same measurement instead.Credit: Tairitsu-Aya for the package and its 54-case mutation design. Prepared by @kumagi with substantial AI assistance (DeepSeek V4.1 Flash in the OpenCode harness). Apache-2.0.