You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Audit QQ16 high-count scratch and exact installation costs - #5363
The QQ16 Context lifecycle handoff leaves the numerical new_context producer separate from finite-handle restoration. This package proves and checks one exact part of that producer: the temporary high count uses exactly two simultaneous scratch Tape leases, and its installation into the fixed highs role has a complete source/destination operation bill.
For M=q^w, the inherited count is H=q^((w-1)d^2). With n=bit_length(H)+1 (including RIGHT) and an old destination body of length D, the literal save_count path costs 7n+2D+10 reads, 2n+D writes and 6n+2D+14 unit moves. The written loop proof covers the stated parameter domain; finite tests corroborate it. The actual recursive caller parks streams before construction, giving D=0.
This is a scoped source audit, not a new count formula, full constructor tariff, supplier or kappa improvement. Numerical-word production, pool-selection/control cost, backing storage, metadata compilation, complete parent parking and the full F(K)/D* versus B* comparison remain open. The source loader and complete Ordinary/controller are not replayed. Only this five-file package is added.
Task and overlap
Base: canonical main 7c472563474e60185e6ca101a17622133d047e56; priority revision 7. Contribution: 5ac02c05ad29f4b136cab8fb787985a1ea64de80. Task joint-query-controller, refined to one numerical-producer obligation.
Canonical investigation and scope correction. The complete overlap refresh revealed an earlier concurrent restore_context claim, so this work moved to its explicitly excluded numerical producer. PR5034 supplies the graph cap; PR5330 supplies adoption and the open constructor question. R437 descendant ingress already reaches new_context; the delta here is its exact scratch/installation audit.
All live source inputs are pinned at the base commit. The algorithms are taken from the retained PR2809 nested archive inside research/physical-gaussian-leaf/inputs/pr3087.tar, without editing that archive. Latest overlap covers 307 open PRs, 4,638 Discussion records and all 7,267 tracked top-level notes, with complete reported pagination. Historical diffs and unpublished work are outside coverage. Refreshed main has no relevant source/guidance changes.
Validation
CPython 3.12.0 on Windows; standard library only.
Registered normal and optimized replay pass: 82 cases, three executed rejection controls and three arithmetic discriminators. Each case checks canonical values, aliases, scratch cleanup, dirty spectators, exact operation counts, ended-lease reuse and owned cleanup.
Discriminating witness: q=3, w=2, d=2, D=0 gives H=81 and exactly 66 reads, 16 writes, 62 moves. The largest tested Count has 203 value bits.
Metadata/source pins and all eight committed package/input byte checks pass. The official export integrity check passes.
Both isolated Git-free export replays pass, all nine exported files remain byte-identical, and a corrupted source archive is rejected in both modes.
Selected source-binding orientation passes; no selected native cold replay, Lean, Docker or whole-controller run. The optional full-history preflight was not run in this shallow checkout; every declared source pin is at the direct parent base.
Credit Jose Manuel/jmbarrancoml's PR2753/PR2769/PR2809 caller/cardinality/pool/parking sources, JoyboyBrian's PR5034/PR5330 and handoff, Chris R/Clear1nsight, Tekalign, ywz65, Mihir Srivastava and the retained QQ16/control lineage. The count formula and source implementation are inherited. The new contribution is the scoped proof, exact meter decomposition and source-bound verification.
Prepared by Mihir Srivastava with substantial OpenAI Codex assistance; Apache-2.0. No independent human or formal proof-kernel acceptance is claimed.
Open next questions
The package README/TASK name two bounded follow-ups: price the reached radix_power/divmod numerical-word loops, and compose the producer with finite-handle restoration and the real parent parking protocol. Those costs are required before claiming a complete constructor or caller advantage.
Review (James Reed, with Claude Code). Head 5ac02c05ad29f4b136cab8fb787985a1ea64de80. This is a lighter-scope review; see "Not checked".
Checked
Source. I extracted the retained chain pr3087.tar → pr3055 → pr2899 → pr2809 myself and read macro_machine.py. new_context calls save_count(context.highs, "highs"), which is commit(value.tape, label) (target.clear(), append_tape, rewind, then Lease.clear()) followed by value.close(). The audited path is exactly this literal code, with no hidden extra copy.
Arithmetic. For q = 3, w = 2, d = 2: H = 3^((2−1)·4) = 81, n = bit_length(81) + 1 = 8, giving 7n + 10 = 66 reads, 2n = 16 writes and 6n + 14 = 62 moves. That matches the stated witness.
The D terms. The +2D reads, +D writes and +2D moves are the expected shape for clearing an old destination body of length D (read and erase each cell, walk out and back). The expected_install(8,7) ≠ expected_install(8,0) control correctly prevents charging a dirty overwrite at the empty tariff.
Replay. The registered replay passes locally (PASS_REGISTERED_RESEARCH_PACKAGE).
Not checked
I did not independently re-derive the per-loop constants (7, 2, 6 and +10, +14) from the deeper tape primitives (append_tape, Lease.clear, and the scratch pool's meter forwarding). Nor did I re-run an instrumented count outside your harness. The "exactly two simultaneous scratch leases" claim also rests on your harness's lease accounting. Your 82 cases exercise all three claims, but this review does not add independent evidence for them.
Suggestion. A short table in the README deriving 7n + 2D + 10 term by term from clear, append_tape and rewind (the same style as #5364's invoice) would make the constants checkable without running the harness.
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
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.
Change and mathematical scope
The QQ16 Context lifecycle handoff leaves the numerical
new_contextproducer separate from finite-handle restoration. This package proves and checks one exact part of that producer: the temporary high count uses exactly two simultaneous scratch Tape leases, and its installation into the fixedhighsrole has a complete source/destination operation bill.For
M=q^w, the inherited count isH=q^((w-1)d^2). Withn=bit_length(H)+1(including RIGHT) and an old destination body of length D, the literalsave_countpath costs7n+2D+10reads,2n+Dwrites and6n+2D+14unit moves. The written loop proof covers the stated parameter domain; finite tests corroborate it. The actual recursive caller parks streams before construction, giving D=0.This is a scoped source audit, not a new count formula, full constructor tariff, supplier or kappa improvement. Numerical-word production, pool-selection/control cost, backing storage, metadata compilation, complete parent parking and the full F(K)/D* versus B* comparison remain open. The source loader and complete Ordinary/controller are not replayed. Only this five-file package is added.
Task and overlap
Base: canonical main
7c472563474e60185e6ca101a17622133d047e56; priority revision 7. Contribution:5ac02c05ad29f4b136cab8fb787985a1ea64de80. Taskjoint-query-controller, refined to one numerical-producer obligation.Canonical investigation and scope correction. The complete overlap refresh revealed an earlier concurrent
restore_contextclaim, so this work moved to its explicitly excluded numerical producer. PR5034 supplies the graph cap; PR5330 supplies adoption and the open constructor question. R437 descendant ingress already reachesnew_context; the delta here is its exact scratch/installation audit.All live source inputs are pinned at the base commit. The algorithms are taken from the retained PR2809 nested archive inside
research/physical-gaussian-leaf/inputs/pr3087.tar, without editing that archive. Latest overlap covers 307 open PRs, 4,638 Discussion records and all 7,267 tracked top-level notes, with complete reported pagination. Historical diffs and unpublished work are outside coverage. Refreshed main has no relevant source/guidance changes.Validation
CPython 3.12.0 on Windows; standard library only.
Reproduce:
Credit
Credit Jose Manuel/jmbarrancoml's PR2753/PR2769/PR2809 caller/cardinality/pool/parking sources, JoyboyBrian's PR5034/PR5330 and handoff, Chris R/Clear1nsight, Tekalign, ywz65, Mihir Srivastava and the retained QQ16/control lineage. The count formula and source implementation are inherited. The new contribution is the scoped proof, exact meter decomposition and source-bound verification.
Prepared by Mihir Srivastava with substantial OpenAI Codex assistance; Apache-2.0. No independent human or formal proof-kernel acceptance is claimed.
Open next questions
The package README/TASK name two bounded follow-ups: price the reached
radix_power/divmodnumerical-word loops, and compose the producer with finite-handle restoration and the real parent parking protocol. Those costs are required before claiming a complete constructor or caller advantage.