diff --git a/docs/ci-verification.md b/docs/ci-verification.md index 63ba3e9aa8..52b62d0481 100644 --- a/docs/ci-verification.md +++ b/docs/ci-verification.md @@ -1,8 +1,25 @@ # CI verification -## Current selected-family replay: #6030 +## Current selected-family replay: #7000 with #7001 The [selected record](../certificates/selected-result.json) binds conditional +κ = 0.00363005817 to the [application review](research/pr-intake-evidence/pr7000-application/PROOF-REVIEW.md), +[validation receipts](research/pr-intake-evidence/pr7000-application/VALIDATION.json), +and [explicit source closure](../certificates/frontier7000-source.json). +`make frontier7000-verify` follows that exact-source selected replay. The review +reuses eleven authenticated preceding executions and records seven fresh serial +application, scalar and complete native-catalogue executions. The earlier +monolithic timeout is retained separately and is not completed coverage. +Consult the receipts for exact commands, source heads and limits. + +The five inherited framework assumptions remain. No complete uniform word, +literal multiplier execution, independent human proof or formal-kernel proof +is asserted. Routine research submissions do not need to rerun this +selected-family replay. The sections below preserve historical checkpoints. + +## Historical selected-family replay: #6030 + +The [historical checkpoint](../certificates/checkpoints/frontier6030.json) binds conditional κ = 0.003125804 to the [proof review](research/pr-intake-evidence/pr6030-audit/PROOF-REVIEW.md), [validation receipts](research/pr-intake-evidence/pr6030-audit/VALIDATION.json), and [explicit source closure](../certificates/frontier6030-source.json). diff --git a/research/banked-native-row-order/.gitattributes b/research/banked-native-row-order/.gitattributes new file mode 100644 index 0000000000..60806b35aa --- /dev/null +++ b/research/banked-native-row-order/.gitattributes @@ -0,0 +1,4 @@ +# Preserve the original source notices, including the mixed CRLF/LF credit file. +notices/** -text +notices/7669-CREDITS.md whitespace=blank-at-eol,blank-at-eof,space-before-tab,cr-at-eol +PEER-GRAPH.json.gz binary diff --git a/research/banked-native-row-order/PEER-GRAPH.json.gz b/research/banked-native-row-order/PEER-GRAPH.json.gz new file mode 100644 index 0000000000..f0cd507df6 Binary files /dev/null and b/research/banked-native-row-order/PEER-GRAPH.json.gz differ diff --git a/research/banked-native-row-order/README.md b/research/banked-native-row-order/README.md new file mode 100644 index 0000000000..f11146f208 --- /dev/null +++ b/research/banked-native-row-order/README.md @@ -0,0 +1,59 @@ +# A 2,106-bank order for the #7674 native graph + +The forward graph of #7674 admits a legal serial row order using **2,106 snapshot banks**, 319 fewer than the 2,425 required by the order in #7681. The new order first reaches its peak at event 3,022, row token 94,904. The certificate supplies a bank for every entrance, paid return and terminal output. This answers the first open question in Ali Romman's fixed-order allocation. [#7681 proof and contract](https://github.com/aliromman/integer-mult-bounds/blob/1753a3ff56be34b09a217b12b590f51eba15defb/research/banked-native-snapshot-reuse/PROOF.md) + +| Field-level reservation | #7681 order | New order | +| --- | ---: | ---: | +| Snapshot banks per forward occurrence | 2,425 | 2,106 | +| Private homes including the paid-row accumulator and four scratch fields | 2,430 | 2,111 | +| Private homes for 16 disjoint occurrences | 38,880 | 33,776 | + +## Choose the next row + +Copy all 1,501 public entrances into distinct private banks. A row becomes ready when every paid donor has returned. Among ready rows, choose the one with the most donors whose only remaining use is this row. Break ties by the smaller integer row token. The donor list contains each donor once. Its last use can release its bank after the row and its child return. The rule uses only the fixed graph and can be run before field data are available. + +The generated order covers all 6,142 paid rows and all 1,501 terminal rows. A token's lifetime starts at its birth and ends at its last read, inclusively. An unread nonterminal may retire immediately after its birth. All terminal lifetimes extend through the common installation event. The allocator chooses the lowest free bank, releasing a previous owner only when its end precedes the next birth. The entrances use bank `i` for input role `i`. + +## Why the order preserves the map + +Induct on completed rows. At entry each bank holds its specified input at its original chart. Reserve the row's return bank before its first read. For each donor in the frozen order, the replay checks that its slot holds that exact token at the row's source chart. The coefficient travels with the donor in the frozen graph. The unchanged scalar operations therefore form the same sum, including every prefix, on arbitrary entrances. A paid row runs its original child and adapters between the same two charts. No other row starts until that return finishes. A terminal row accumulates directly into its reserved slot. Each donor stays live throughout the row. + +Once every read of a donor is complete, the bank can undergo its full retirement and initialization before reuse at a new chart. At installation the replay reads every terminal owner in its final chart, then checks that retirement empties the pool. Thus a permutation of complete rows preserves the labelled operator under the source's field and child contracts. The argument needs no numerical samples or assumptions about equal snapshot values. + +The verifier reconstructs lifetimes for allocation. A separate replay has no access to their end times. It counts unread donor occurrences, checks each bank's current owner and records simultaneous occupancy immediately after each new reservation. All 9,144 assignments fit and the replay reaches 2,106 simultaneous owners. This makes 2,106 exact for **this particular order** under distinct-snapshot ownership. Other legal orders may require fewer banks. Two controls check that aliasing a donor with its consumer's return slot and using the supplied assignment with one slot removed both fail. [Generated result](RESULT.json) · [Verifier](verify.py) + +## Field-level costs and limits + +Per forward occurrence there are 9,144 snapshot lifetimes, 6,142 uses of the shared paid-row accumulator and four scalar scratch lifetimes. Each of the resulting 15,290 lifetimes pays for full initialization and retirement. With 169,343 scalar terms and 7,643 rows, the source's conservative reset allowance for 16 occurrences is + +```text +16 × (2 × 15,290 + 4 × (169,343 + 7,643)) = 11,816,384. +``` + +Each donor read, coefficient, paid transfer, entrance copy and public installation belongs to the same labelled row as before. Each bank reuse pays for view setup and full-extent reset. For equal extent `L`, the source's serial selector bound uses `O(2111 (L+1))` per selection, scan and return. Changed views pay their actual packed extent. Public fields, guides, guards, suspended parent storage, recursive child and adapter workspace, and compiler backing carry their separate source charges. [#7674 physical model, section 4](https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/PROOF.md) + +This is a finite storage certificate with a scoped operator-preservation proof. It gives no global scheduling optimum or new κ. Physical operator correctness and the five framework assumptions are inherited. Physical operators, fixed-tape lowering, the complete caller, the selected cold replay and a formal proof were outside the verification scope. + +## Reproduce + +From the repository root with CPython 3.12 and its standard library: + +```sh +python3.12 -B scripts/research_package.py --package research/banked-native-row-order +python3.12 -I -B -W error research/banked-native-row-order/verify.py +python3.12 -I -B research/banked-native-row-order/verify.py --certificate +``` + +The final command emits all assignments in event order. Event zero contains all entrance copies. Each later line identifies the row and its reserved bank. Its TSV SHA-256 is `16de610956122d9f2c68f05d955b5484a0ee31bf201b69546a092495bf97dd86`. The default replay checks the receipt against the graph, verifier and complete allocation hashes. Normal and optimized runs use the same owner checks. + +## Inputs and credit + +This construction and allocation certificate were produced by Nick Petalas. Ali Romman posed the changed-order question, proved the prior fixed-order minimum and supplied the bank contract in #7681. His #7674 supplies the fifteen-pivot graph, the row and child semantics, and the physical cost model. SYLforge supplied the #7669 native word and caller. The retained notices credit the underlying work by DreamingOfClouds, Clear1nsight, Rohan Arun, Jerry Chen, Douglas Colkitt and their predecessors. [#7681](https://github.com/CrocSwap/integer-mult-bounds/pull/7681) · [#7674](https://github.com/CrocSwap/integer-mult-bounds/pull/7674) · [#7669](https://github.com/CrocSwap/integer-mult-bounds/pull/7669) · [Source notices](notices/) + +Clear1nsight supplied the canonical comparator encoding and its published digest in #7682. The bundled `PEER-GRAPH.json.gz` was materialized from the #7674 constructor with fifteen fixed pivots, using #7682's `record(..., "peer")`. The verifier pins the decompressed payload to `graphs.peer.canonical_sha256` in the published receipt. This identifies the graph separately from its gzip encoding and from #7682's role-230 candidate. [Graph constructor](https://github.com/aliromman/integer-mult-bounds/blob/26b6c469aa6c4aa04322ce25a22150f90e5fb14e/research/p104-banked-transfer-pivots/network.py) · [Comparator encoder](https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/engines/graph.py) · [Published graph digest](https://github.com/Clear1nsight/integer-mult-bounds/blob/1b4a4d6f9370b8c93b3f769a6229a9111ef3940e/research/p104-role230-banked/evidence/WIRE-RESULT.json) + +## Open next questions + +What lower bound holds for *all* legal topological orders under the same distinct-snapshot and common-installation contract? One first step is to find a family of donors and terminal outputs that must coexist across every legal ordering. Such a bound would measure the remaining room below 2,106. + +Can a concrete tape layout realize the 2,111-home reservation with the actual views, guards and suspended owners? A first step is to assign each bank its packed extent and charge its selection, initialization and return on consecutive uses. [Task record](TASK.json) diff --git a/research/banked-native-row-order/RESULT.json b/research/banked-native-row-order/RESULT.json new file mode 100644 index 0000000000..4ce89ecc74 --- /dev/null +++ b/research/banked-native-row-order/RESULT.json @@ -0,0 +1,19 @@ +{ + "graph_sha256": "d81ec9f47740852a4bf7bd83100feff5cb66b70e1973466e1609bbac8af75098", + "verifier_sha256": "3b8cc64631696e7f70dfd596db6e55ddd128d569bec490943c00091abe05ac40", + "certificate_sha256": "16de610956122d9f2c68f05d955b5484a0ee31bf201b69546a092495bf97dd86", + "entrances": 1501, + "paid_rows": 6142, + "terminal_rows": 1501, + "row_events": 7643, + "snapshot_assignments": 9144, + "scalar_terms": 169343, + "snapshot_banks": 2106, + "first_peak_event": 3022, + "first_peak_token": 94904, + "private_homes_per_occurrence": 2111, + "private_homes_for_16": 33776, + "lifetimes_per_occurrence": 15290, + "full_resets_per_occurrence": 30580, + "reset_allowance_for_16": 11816384 +} diff --git a/research/banked-native-row-order/SOURCES.json b/research/banked-native-row-order/SOURCES.json new file mode 100644 index 0000000000..5335fa97d9 --- /dev/null +++ b/research/banked-native-row-order/SOURCES.json @@ -0,0 +1,18 @@ +{ + "schema_version": 1, + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "75d77b328ea02ded535e7f23aee5b1e55d0bb1a8", + "sha256": "154c3d30455d778fd3343b6b4851f0fa4665f0f7625b0adb3675e2bafbbf6bf1" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec", + "sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81" + } + ] +} diff --git a/research/banked-native-row-order/TASK.json b/research/banked-native-row-order/TASK.json new file mode 100644 index 0000000000..beade8bedc --- /dev/null +++ b/research/banked-native-row-order/TASK.json @@ -0,0 +1,120 @@ +{ + "schema_version": 1, + "task_id": "supplier-boundary-audit", + "priority_revision": 8, + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "original_card": { + "id": "supplier-boundary-audit", + "question": "Does one changed supplier have complete source-bound native, caller, ordinary and outer admission coverage?", + "starting_points": [ + "docs/research/current-priorities.md", + "docs/research/research-family-status.md", + "certificates/selected-result.json", + "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md" + ], + "methods": [ + "Construct and independently check one source-bound instance of the stated first experiment.", + "Seek an exact counterexample or target-specific complete-budget obstruction to that same proposed change." + ], + "acceptance_gate": "Pin the current sources and one obligation; the historical owner audit is an example, not evidence of a current bug.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_selected_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read revision 8, the selected review and live exact-source handoffs. Then follow this card's bounded first_experiment.", + "scope": "Source-bound orientation only, not a supplier replay or theorem proof." + }, + "first_experiment": "Choose one latest uncovered candidate and build a delta coverage map against the selected review. For P104, #5717 changes owned-lifetime assumptions and #5719 covers exact #5713 causal premises; neither automatically transfers to #5718. For BIT, #5679/#5708 need component admission and compatible outer use. Check controls and exact source identity before reuse; stop with one resolved gap or explicit remaining obligation. A heavy full replay requires a separate serial resource budget.", + "bottleneck_link": "Judge the actual current supplier contract and complete signed target/paid bill; frozen-profile ceilings require an applicability proof.", + "allowed_variations": [ + "One exact source head, helper/cut region or quantified proposition and changed hypothesis; check live handoffs first. Different seeds are not different scopes." + ], + "scope_change_triggers": [ + "Changing source head, helper/cut domain, operation alphabet or caller boundary without recording the new scope.", + "Treating an archived proposal or local numerical pass as complete supplier admission." + ], + "overlap_terms": [ + "supplier admission", + "5717", + "5719", + "5708", + "owned lifetime" + ], + "existing_checks": [ + { + "scope": "PR #4088: author-checked local words, native receipts, owner/phase fill and exact moment.", + "evidence": "research/staged544-mixed-fourth-entry/README.md", + "remaining": "Rebind and validate ordinary/outer admission with all four providers; full mixed release not established.", + "status": "author-checked", + "source_commit": "72d7efc181edb21806a878f174847c96dd410ab0", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "PR #3801: successor scatter-boundary decision package.", + "evidence": "research/scatter-boundary-decision/README.md", + "remaining": "Consult its exact acceptance scope before any new exporter audit; not proof of a selected failure.", + "status": "author-checked", + "source_commit": "911f8800ba7a4b03603ef62c5ffc6240e53cb5fd", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "Selected PR5599: complete helper-subspace construction and independent caller replay; five framework assumptions remain.", + "evidence": "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md", + "remaining": "The next experiment must identify uncovered source-specific work. Successor archive intake does not transfer this admission.", + "status": "reviewed", + "source_commit": "09dd0965711ca7eeb169057a420abab1c9052137", + "selected_record_sha256": "2a0220e866417774606e0f991e41b9c1d26b1f43b97857238cf478dbc7d330b5" + } + ] + }, + "scope_status": "changed", + "actual_scope": "A new legal storage schedule for the fixed PR 7674 forward banked native graph under PR 7681's distinct-snapshot contract.", + "scope_change_reason": "PR 7681 asks whether changing complete row order can lower the bank reservation. The contribution constructs an order for this source-specific storage question.", + "bottleneck_link": "Reduces private field backing in one forward native supplier. A new recursive saving would require a change to its complete signed invoice.", + "budget_minutes": 60, + "stop_rule": "Stop at the first checked schedule with fewer than 2425 snapshot banks.", + "outcome": "completed", + "evidence": "A graph-bound order and slot assignment for all 9144 tokens. Structural replay checks every one of 169343 donor reads, final installation, bank occupancy and the logical reset allowance.", + "author": "Nick Petalas", + "ai_assistance": "Independent human and formal proof-kernel review are unclaimed.", + "open_questions": [ + { + "question": "What lower bound applies to every legal order under the same storage contract?", + "why_it_matters": "It would bound the remaining improvement below 2106 banks.", + "first_step": "Find donors and final outputs forced to coexist in every topological order.", + "blocked_by": "The peak cut certificate fixes a row order." + }, + { + "question": "Can one concrete tape occurrence realize the 2111-home reservation?", + "why_it_matters": "Field counts alone do not quantify packed cell backing and movement.", + "first_step": "Assign actual extents to the banks at each reuse and charge complete selection, initialization and retirement.", + "blocked_by": "The construction has no complete tape layout or suspended-owner mapping." + } + ], + "claim_url": "https://github.com/CrocSwap/integer-mult-bounds/discussions/1166#discussioncomment-19714933", + "predecessors": [ + { + "pr": 7681, + "head": "1753a3ff56be34b09a217b12b590f51eba15defb", + "role": "First open question, fixed-order minimum and ownership contract." + }, + { + "pr": 7674, + "head": "26b6c469aa6c4aa04322ce25a22150f90e5fb14e", + "role": "Scientific graph, row semantics and physical cost model." + }, + { + "pr": 7682, + "head": "1b4a4d6f9370b8c93b3f769a6229a9111ef3940e", + "role": "Canonical comparator encoding and published uncompressed graph digest." + }, + { + "pr": 7669, + "head": "eaef5d1580e5761feaed09262b964871f3e5f553", + "role": "Underlying native word and caller." + } + ] +} diff --git a/research/banked-native-row-order/VERIFY.json b/research/banked-native-row-order/VERIFY.json new file mode 100644 index 0000000000..6806609b16 --- /dev/null +++ b/research/banked-native-row-order/VERIFY.json @@ -0,0 +1,34 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-B", + "-W", + "error", + "{package}/verify.py" + ], + "timeout_seconds": 45, + "checks": "Construct the order, replay every donor and bank, reject a live overwrite and an undersized assignment, and check the generated receipt." + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "-W", + "error", + "-O", + "{package}/verify.py" + ], + "timeout_seconds": 45, + "checks": "Construct the order, replay every donor and bank, reject a live overwrite and an undersized assignment, and check the generated receipt." + } + ] +} diff --git a/research/banked-native-row-order/notices/7663-NOTICE b/research/banked-native-row-order/notices/7663-NOTICE new file mode 100644 index 0000000000..6ce1bc49a3 --- /dev/null +++ b/research/banked-native-row-order/notices/7663-NOTICE @@ -0,0 +1,7 @@ +Apache-2.0. Ali Romman with substantial OpenAI Codex assistance. + +The new material is the joint chart assignment, its source-bound operator and caller checks, and the fresh-cost complete-root scalar and private-bank specialization. The parent data are from Clear1nsight's PR #7660 on DreamingOfClouds' PRs #7658 and #7641 and SYLforge's PR #7637. The contributors credited in those sources retain their credit. Original notices are in source/parent-NOTICE, source/physical-NOTICE and source/word-NOTICE. + +Rohan Arun supplied the 17-stage signed caller in PR #7113. The unmodified interval gate and the exact caller data come from its pinned source. See source/caller-NOTICE and source/independent-NOTICE, and the source file inventory for all consumed bytes. The two operator engines and integer power evaluator come from the declared current-main inputs. + +Jerry Chen (CubeJerry) supplied selected PRs #7000 and #7001. The selected application and its phase, common-root, finite-cost and compiler arguments, the odd-native common-grid package, the prior typed six-Gamma reset of PR #7586 and the contributors credited in those records provided the foundations used here. PR #7661 independently derives the fixed caller residuals. PR #7662 supplies a rounded parent-clock alternative. This package uses neither implementation. diff --git a/research/banked-native-row-order/notices/7669-CREDITS.md b/research/banked-native-row-order/notices/7669-CREDITS.md new file mode 100644 index 0000000000..bbee2437f0 --- /dev/null +++ b/research/banked-native-row-order/notices/7669-CREDITS.md @@ -0,0 +1,43 @@ +# Provenance, credit and scope + +This is a cumulative contribution. Thank you to everyone who has made their constructions, exact inputs, failure cases and careful reviews available. Those contributions made this composition possible; the small increment here should not obscure the much larger body of work it rests on. We aim to leave equally inspectable material for the next researcher. + +## Direct lineage and reused methods + +- **SYLforge, #7637:** the H5B frame-restored233-CLEAR construction is the published ancestor of this research. The present K372-2 source retains its descendants rather than starting a new independent construction. [PR7637](https://github.com/CrocSwap/integer-mult-bounds/pull/7637). +- **DreamingOfClouds, #7641 and #7658:** #7641 combines20 edits over #7637. #7658 supplies the large-neighbourhood construction and its exact joint hub reconstruction: helper360/537 SWAP-NULL relabel, main176 bypass, helper236 contact re-chart, helper370 last-stay removal and helper461 first-stay removal. The source explicitly credits its #7630/#7636 relabel lineage and #7634 swap law. Our source descends from this word; those gains are not claimed as new work here. [PR7641](https://github.com/CrocSwap/integer-mult-bounds/pull/7641), [PR7658](https://github.com/CrocSwap/integer-mult-bounds/pull/7658). +- **Clear1nsight:** the contact re-chart type from #7612 and the24-bit coefficient-splitting report are part of the construction's lineage. #7626 contributed source isolation/portable materialization, and #7631/#7633 are credited by the parent lineage. #7660 separately published the role379 shortcut already present in our source; we do not count its rediscovery as another improvement. [PR7612](https://github.com/CrocSwap/integer-mult-bounds/pull/7612), [coefficient report](https://github.com/CrocSwap/integer-mult-bounds/discussions/7111#discussioncomment-19691406), [PR7660](https://github.com/CrocSwap/integer-mult-bounds/pull/7660). +- **ToikY, #7643:** the contact re-chart work is explicitly credited by #7658 alongside Clear1nsight's #7612. Its74-erasure contract and κ are not added to this candidate. No shared CI repair is copied by this PR. [PR7643](https://github.com/CrocSwap/integer-mult-bounds/pull/7643). +- **Rohan Arun, #7113:** the signed caller/accounting lineage underlies the actual16-call composition. Its original source commit is07a76c5e2738882c0cb322278e56f6cae3c9885d. We recount the literal16-call input here; we do not substitute historical17-call constants. [PR7113](https://github.com/CrocSwap/integer-mult-bounds/pull/7113). +- **Ali Romman and upstream contributors:** #7605 supplies an earlier exact protected/application checkpoint cited by the #7637 lineage. The two unmodified directed invoice comparison files are copied from canonical upstream base e54523517d0f03e58352e647c403a5af3e525a57, retaining their attribution and Apache-2.0 headers. Their arithmetic is not a full scientific acceptance gate. [PR7605](https://github.com/CrocSwap/integer-mult-bounds/pull/7605). +- **CubeJerry, Douglas Colkitt and the earlier source contributors:** the retained framework, primitive/service work and repository infrastructure form part of the inherited basis. This package does not claim that their open supplier obligations are resolved by a successful finite replay. + +## What this contribution adds + +The predecessor K372-2 supplies five EARLY edits (1188,1013,940,1141,1195, with940/1141 sharing one ADD). This construction recomputes the1517/770 bypass on that actual source and combined it with a three-field triangle repair. The new contribution is their compatible composition, exact12-block edit, final235 CLEAR witnesses and a small reproducible publication package. Substantial OpenAI Codex assistance was used for research and packaging. New work is Apache-2.0. + +Exact source canonical:3dd1199d95291ee96e6c0aeb6f55f86244a569b1d4975840bf0207e2dcf9c025. Exact candidate canonical:ee251f6005d2a92b887c5b804bd7aac05989d278b2c9ccb3c3091b50d533b08d. Byte hashes are in MANIFEST.json. The12 edit blocks specify every changed event and leave all other fields unchanged. The parent research generators are not silently imported; this publication uses the transparent exact edit as its deterministic reconstruction recipe. + +## Related work, not automatically incorporated + +Ali Romman's #7662 studies one half-ADD rounding-error propagation with CubeJerry's service contract. Nick Petalas's #7654 provides a scoped minimal-rank interpolation result used as background when assessing structural repairs. Neither is a substitute for this candidate's entire rounded caller or physical supply proof. Their actual domains and assumptions must be checked before application. [PR7662](https://github.com/CrocSwap/integer-mult-bounds/pull/7662), [PR7654](https://github.com/CrocSwap/integer-mult-bounds/pull/7654). + +At the publication checkpoint, upstream main remained e54523517d0f03e58352e647c403a5af3e525a57. Ali Romman's #7663 uses a separate17-call full-private-bank model and changed helper endpoints; Clear1nsight's #7664 concerns180erasures/17calls; #7666 charges bank selection and return without claiming a new κ. K372-4 is later, separate research with changed helper-boundary conditions. None is silently folded into ee251f60 or used to assert identical physical assumptions. This is not a claim to the greatest bound across all models. + +## Fresh versus reused evidence + +Publication replay freshly reconstructs the whole word, runs exact rows/CLEAR, recounts native/caller histograms and checks the four directed price points. Normal, optimized Python and a Git-free committed-byte export were tested. The recorded ordinary/precision/native-phase/owner evidence retains its narrower scope and original source identifiers; it is not advertised as freshly rerun. No selected record, frozen predecessor package or common verifier is changed. + +## Editorial normalization of publication labels + +The follow-up editorial commit replaces workstation labels with construction terminology. It changes no candidate, edit, certificate, invoice, numeric result, executable code or contributor attribution. The original recorded bytes remain retrievable at commit `95d476623f1468822057554475dc8badb19bfa44`. Evidence JSON field labels and descriptive scopes are normalized, not recomputed scientific results. In NATIVE-EVIDENCE-REUSE.json, `predecessor-receipt:K372-2/NATIVE-NEW.json` is a historical receipt identifier, not a packaged file path. In PRICE-SUMMARY.json, recorded command invoice arguments now use the equivalent packaged `data/INVOICE.json` path; this is a portability transcription, not the verbatim original command. The fresh replay constructs and runs its own package-relative command. MANIFEST.json authenticates the edited publication bytes. + +Evidence byte-custody mapping (original -> editorially normalized SHA-256): + +- `evidence/BUILD.json`: `4744201691120223ded62a3e0d55ea1029203f3ea996305163e7db8d9e3679a4` -> `a0bafbb3f44920ed6ac1ed3d83385f025f5bbbcf5e9c8013ab1ca55ccf23c32d`. + +- `evidence/NATIVE-EVIDENCE-REUSE.json`: `6615b8a051ac9e4d8c73b5decf8a70d2a33d14da0c4c369574dec946984aa351` -> `84bab14d5c584aa8853b8e1025b562541ac6657e458d120ec803f2bc149c3eb8`. + +- `evidence/ROLE770-BUILD.json`: `c4ee72317678791d4b801479df0af052f3a50662c11ce3f3393b2151368fc92d` -> `1c400f16efbc427c40c811a57dc656fe97c2c84f94c71529e2c5c0598b146369`. + +- `evidence/PRICE-SUMMARY.json`: `c2777382c677634f7017b68c55dbd831a40945b77057f26b738f857c17ee8759` -> `d13741fe3217a01edd0b79b40dad037e644e441fbbc300838df99c0b050a5f42`. diff --git a/research/banked-native-row-order/notices/7674-NOTICE b/research/banked-native-row-order/notices/7674-NOTICE new file mode 100644 index 0000000000..951f081717 --- /dev/null +++ b/research/banked-native-row-order/notices/7674-NOTICE @@ -0,0 +1,7 @@ +Apache License 2.0. Research prepared for Ali Romman with substantial OpenAI Codex assistance. + +New work includes the fifteen certified sender/receiver pivots, the forward and transposed communication construction, the complete native row checker, and the finite stock and precision application for this 16-call program. + +SYLforge supplied the composition, native word reconstruction, published invoice and exact 16-stage caller bytes from PR #7669. Their original PROVENANCE.md is preserved in source/7669-CREDITS.md. It credits the H5B work of SYLforge, DreamingOfClouds' joint native reconstructions, Clear1nsight's coefficient splitting, role-379 and helper work, Rohan Arun's signed caller lineage, and prior contributions from CubeJerry, Douglas Colkitt and others. The source/ directory holds the exact file bytes identified in SOURCE-PINS.json. + +The group-ring caller checker, independent operator checks, bit service, finite-cost method and field guide adapt the corresponding code and arguments of Ali Romman's PR #7663. That package in turn builds on the contributors named in its preserved source/7663-NOTICE. The unchanged directed log/exp gate retains its listed sources in source/gate-NOTICE. Earlier paid-transfer and bank-support constructions include PRs #7434 and #7576. Jerry Chen (CubeJerry) supplied the selected PRs #7000 and #7001 and the typed initializer in PR #7586. The per-call odd-grid induction and the selected application review provide the complete-root realization and finite-cost substitution. Douglas Colkitt and the credited repository authors supplied the pinned operator engines, price evaluator and research workflow. The license accompanies this package. diff --git a/research/banked-native-row-order/notices/7682-NOTICE b/research/banked-native-row-order/notices/7682-NOTICE new file mode 100644 index 0000000000..4654631de0 --- /dev/null +++ b/research/banked-native-row-order/notices/7682-NOTICE @@ -0,0 +1,9 @@ +Apache License 2.0. Research prepared for Clear1nsight with substantial OpenAI Codex assistance. + +Ali Romman supplied the fifteen exact banked pivots and the frozen #7674 baseline, along with the complete signed 16-call graph and application method. The original notices remain at peer/NOTICE, peer/source/7663-NOTICE and peer/source/gate-NOTICE. Read peer/SOURCE-PINS.json for each ancestry binding and ASSETS.json for the exact vendored bytes at scientific commit 26b6c469aa6c4aa04322ce25a22150f90e5fb14e and refreshed head 28b2af322a1fab01b3734365988930920f9dda48. + +SYLforge supplied the #7669 composition, native source pins and literal caller. Its preserved parent provenance is peer/source/7669-CREDITS.md. Retain DreamingOfClouds' #7641/#7658 lineage, Clear1nsight's integer scalar/contact work including #7612, ToikY's #7643 contact-rechart precedent, Rohan Arun's #7113 signed-caller lineage, 5080's helper work, and all other contributors named in the original records. Ali Romman's #7663 exact-grid and extent proof and #7666/#7670 selection and guide work supply relevant implementation precedents. Jerry Chen (CubeJerry) supplied the selected #7000/#7001 applications and #7586 typed initialization. Douglas Colkitt and the authors in the original notices supplied the frozen native compiler, independent checker, price evaluator and package infrastructure. + +The release base reuses ToikY's exact shared CI and historical replay sync 0eabc624a9bc9ed2847719efd63390db4d297df4 above canonical e54523517d0f03e58352e647c403a5af3e525a57. This workflow provenance is separate from the banked construction and its mathematical comparison. + +This package credits the original role-230 splice and its same-contract transfer to the unchanged fifteen-pivot graph, the independent exact wire and price replays, matched complete resource accounting and source-bound native and caller verification. The original works retain their authorships and licenses. diff --git a/research/banked-native-row-order/notices/gate-NOTICE b/research/banked-native-row-order/notices/gate-NOTICE new file mode 100644 index 0000000000..1bc9b4da2b --- /dev/null +++ b/research/banked-native-row-order/notices/gate-NOTICE @@ -0,0 +1,13 @@ +# Attribution and source reuse + +New independent operator/invoice verification and fixed-grid interval implementation: OpenAI Codex-assisted research session, 2026-11-10. Apache-2.0. + +DreamingOfClouds supplied the #6936 native predecessor and #6937 shared-wire backup/E-free root. CubeJerry supplied #6912 caller blocks, #6980's QUERY-only caller and #6970/#6985 precision methods. Preserve Ali Romman's #5599 helper-split attribution, icekylinx's #104 odd-grid attribution and unpaidmoon's #6930 width-phase attribution in the parent construction. + +Three unchanged source files are authenticated by exact SHA256 and source commit/path in `INDEPENDENT-SOURCES.json`: + +- #6970 `independent_bounds.py`: fixed integer-grid and positive caller-transfer engine. +- #6985 `envelopes.py`: positive forward envelopes and backward covector witnesses. +- #6985 `source_binding.py`: retained helper functions for the envelope engine. + +The adapter applies only two literal helper-census substitutions in memory and records them. It does not call that adaptation an independent mathematical implementation. The new reverse native operator, formal caller ring and elementary interval engine do not import the source authors' operator or invoice checkers. diff --git a/research/banked-native-row-order/verify.py b/research/banked-native-row-order/verify.py new file mode 100644 index 0000000000..c201fe02d9 --- /dev/null +++ b/research/banked-native-row-order/verify.py @@ -0,0 +1,199 @@ +"""Construct and check a field allocation on the frozen forward graph of PR 7674.""" + +import argparse +from collections import Counter, defaultdict +import gzip +from hashlib import sha256 +from heapq import heapify, heappop, heappush +import json +from pathlib import Path +import sys + + +ROOT = Path(__file__).resolve().parent +# Clear1nsight, PR 7682, evidence/WIRE-RESULT.json, graphs.peer.canonical_sha256. +GRAPH_SHA256 = "d81ec9f47740852a4bf7bd83100feff5cb66b70e1973466e1609bbac8af75098" +CAPACITY = 2106 + + +def require(condition, message): + if not condition: + raise ValueError(message) + + +def read_graph(): + raw = gzip.decompress((ROOT / "PEER-GRAPH.json.gz").read_bytes()) + require(sha256(raw).hexdigest() == GRAPH_SHA256, "wrong forward graph") + return json.loads(raw) + + +def release_order(rows): + """Choose a ready row with the most last-use donors; break ties by token.""" + users = defaultdict(set) + for node, donors in rows.items(): + for donor in donors: + users[donor].add(node) + + last_uses = Counter() + for readers in users.values(): + if len(readers) == 1: + last_uses[next(iter(readers))] += 1 + + pending = {n: sum(d >= 0 for d in donors) for n, donors in rows.items()} + ready = {n for n in rows if pending[n] == 0} + order = [] + for _ in range(len(rows)): + require(ready, "cycle in row dependencies") + node = min(ready, key=lambda n: (-last_uses[n], n)) + ready.remove(node) + order.append(node) + for donor in rows[node]: + readers = users[donor] + readers.remove(node) + if len(readers) == 1: + last_uses[next(iter(readers))] += 1 + for reader in users[node]: + pending[reader] -= 1 + if pending[reader] == 0: + ready.add(reader) + return order + + +def allocate(order, rows, entrances, outputs): + """Assign disjoint closed lifetimes to slots in order of birth.""" + last = dict.fromkeys(entrances, 0) + for event, node in enumerate(order, 1): + last[node] = event + for donor in rows[node]: + last[donor] = event + last.update(dict.fromkeys(outputs, len(order) + 1)) + slots = {node: slot for slot, node in enumerate(entrances)} + active = [(last[node], slot) for node, slot in slots.items()] + heapify(active) + free = [] + capacity = len(active) + for event, node in enumerate(order, 1): + # A last read at this event still occupies a bank during this birth. + while active and active[0][0] < event: + _, slot = heappop(active) + heappush(free, slot) + if free: + slot = heappop(free) + else: + slot = capacity + capacity += 1 + slots[node] = slot + heappush(active, (last[node], slot)) + return slots, capacity + + +def replay(graph, order, slots, capacity): + """Check the supplied order and slots using live owners and unread edge counts.""" + forms = dict(graph["forms"]) + moves = {node: (src, dst) for node, src, dst in graph["moves"]} + entrances = {~i: chart for i, chart in enumerate(graph["initial"])} + outputs = {graph["first_output"] + i: chart for i, chart in enumerate(graph["final"])} + require(len(order) == len(forms) and set(order) == forms.keys(), "row inventory") + require(slots.keys() == entrances.keys() | forms.keys(), "slot inventory") + require(all(0 <= slot < capacity for slot in slots.values()), "bank capacity") + + owners = {slots[token]: (token, chart) for token, chart in entrances.items()} + require(len(owners) == len(entrances), "entrance bank collision") + reads = Counter(d for row in forms.values() for d, _ in row) + total_reads = reads.total() + peak = len(owners) + peak_event = 0 + for token in entrances: + if reads[token] == 0: + del owners[slots[token]] + for event, node in enumerate(order, 1): + src, dst = moves[node] if node in moves else (outputs[node], outputs[node]) + require(slots[node] not in owners, "overwrite of a live bank") + owners[slots[node]] = (node, dst) + if len(owners) > peak: + peak, peak_event = len(owners), event + + # The frozen row carries its original ordered list of (donor, coefficient). + for donor, _ in forms[node]: + require(owners.get(slots[donor]) == (donor, src), "missing donor or wrong chart") + + # Release only after every donor was read and the child returned. + for donor, _ in forms[node]: + reads[donor] -= 1 + if reads[donor] == 0: + del owners[slots[donor]] + if node in moves and reads[node] == 0: + del owners[slots[node]] + + require(all(count == 0 for count in reads.values()), "unconsumed scalar reads") + require(len(owners) == len(outputs), "unexpected owner at installation") + for token, chart in outputs.items(): + require(owners.pop(slots[token], None) == (token, chart), "missing public output") + require(not owners, "incomplete final retirement") + return peak, peak_event, total_reads + + +def negative_controls(graph, order, slots): + forms = dict(graph["forms"]) + # The first nonempty row's first donor has to coexist with its result. + node = next(n for n in order if forms[n]) + donor = forms[node][0][0] + collided = dict(slots) + collided[node] = slots[donor] + for assignment, capacity, expected in ( + (collided, CAPACITY, "overwrite of a live bank"), + (slots, CAPACITY - 1, "bank capacity"), + ): + try: + replay(graph, order, assignment, capacity) + except ValueError as exc: + require(str(exc) == expected, f"unexpected rejection: {exc}") + else: + raise ValueError(f"accepted negative control: {expected}") + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + mode = parser.add_mutually_exclusive_group() + mode.add_argument("--certificate", action="store_true", help="print the complete allocation as TSV") + mode.add_argument("--receipt", action="store_true", help="print the computed result and hashes") + args = parser.parse_args() + graph = read_graph() + rows = {n: tuple(d for d, _ in terms) for n, terms in graph["forms"]} + entrances = [~i for i in range(len(graph["initial"]))] + outputs = range(graph["first_output"], graph["first_output"] + len(graph["final"])) + order = release_order(rows) + slots, capacity = allocate(order, rows, entrances, outputs) + peak, event, terms = replay(graph, order, slots, capacity) + require(peak == capacity == CAPACITY, "wrong allocation peak") + negative_controls(graph, order, slots) + + certificate = ["event\ttoken\tbank\n"] + certificate.extend(f"0\t{n}\t{slots[n]}\n" for n in entrances) + certificate.extend(f"{i}\t{n}\t{slots[n]}\n" for i, n in enumerate(order, 1)) + data = "".join(certificate).encode("ascii") + paid = len(graph["moves"]) + homes = capacity + 1 + 4 + lifetimes = len(slots) + paid + 4 + receipt = { + "graph_sha256": GRAPH_SHA256, + "verifier_sha256": sha256(Path(__file__).read_bytes()).hexdigest(), + "certificate_sha256": sha256(data).hexdigest(), + "entrances": len(entrances), "paid_rows": paid, "terminal_rows": len(outputs), + "row_events": len(order), "snapshot_assignments": len(slots), "scalar_terms": terms, + "snapshot_banks": capacity, "first_peak_event": event, "first_peak_token": order[event - 1], + "private_homes_per_occurrence": homes, "private_homes_for_16": 16 * homes, + "lifetimes_per_occurrence": lifetimes, "full_resets_per_occurrence": 2 * lifetimes, + "reset_allowance_for_16": 16 * (2 * lifetimes + 4 * (terms + len(order))), + } + if args.receipt: + print(json.dumps(receipt, indent=2)) + elif args.certificate: + sys.stdout.buffer.write(data) + else: + require(receipt == json.loads((ROOT / "RESULT.json").read_bytes()), "receipt mismatch") + print(f"PASS_BANKED_NATIVE_ROW_ORDER {capacity} banks, {homes} private homes, {terms} reads") + + +if __name__ == "__main__": + main() diff --git a/research/historical-selected-replay-gap/README.md b/research/historical-selected-replay-gap/README.md index 55d8cc3b49..36d9a873ca 100644 --- a/research/historical-selected-replay-gap/README.md +++ b/research/historical-selected-replay-gap/README.md @@ -69,7 +69,11 @@ python3 -B scripts/research_package.py --package research/historical-selected-re The direct command prints `PASS_HISTORICAL_SELECTED_REPLAY_GAP`. A registered replay prints `PASS_REGISTERED_RESEARCH_PACKAGE`. Both require Git history -containing the two inspected commits. +containing the two inspected commits and the source and manifest objects at +`2485805a6d47f36ea83ddde6327d453ac82d44dc`. The verifier uses a temporary +sparse checkout of that commit, checks the declared source digests there, and +uses its planner and manifest inventory. The recorded rejections and selection +therefore remain reproducible after later changes to the live Makefile or CI guide. ## Open next questions diff --git a/research/historical-selected-replay-gap/SOURCES.json b/research/historical-selected-replay-gap/SOURCES.json index c1010eec95..62bb8b3950 100644 --- a/research/historical-selected-replay-gap/SOURCES.json +++ b/research/historical-selected-replay-gap/SOURCES.json @@ -4,13 +4,13 @@ "files": [ { "path": "Makefile", - "usage": "input", + "usage": "provenance", "git_blob": "0d683a06b9e7ee162496108ce9a7c5d2ee94fccf", "sha256": "4f2d4f2dcd15139ec82658a975f85ed300897385f85799218539f4c8d60567da" }, { "path": "certificates/partial-swap-network.json", - "usage": "input", + "usage": "provenance", "git_blob": "eccafa830c16170c36faf93045ddf1f638f7bcd4", "sha256": "4c0b9d37e1034b2076e30a70f8e514416298c462d9ee98bc87fe6556b14df786" }, @@ -22,7 +22,7 @@ }, { "path": "docs/ci-verification.md", - "usage": "input", + "usage": "provenance", "git_blob": "63ba3e9aa8bdc5e942b56e34244b92b16f854085", "sha256": "c7d3027e9ad8bcbff68f07aa9576b30fb2f3c76c44d876d40c7fdbf4a3e2228a" }, @@ -34,163 +34,163 @@ }, { "path": "research/clifford-state-performance/SOURCE.json", - "usage": "input", + "usage": "provenance", "git_blob": "6f98a0061a5104dfab82c9e806f819b41811f684", "sha256": "396d0f08df24952248140d5c65c51b8c902ef1c580892ff7ea182890530f67ee" }, { "path": "research/community-batch1047-audit/CONTENT-COVERAGE.json", - "usage": "input", + "usage": "provenance", "git_blob": "5e0f92af463ec12c5e1dcc3effd44081a88af647", "sha256": "07a9daeaf2bda308a92e9a4684f13d5fc766c7772d74801fceb7f4599fdab226" }, { "path": "research/community-batch1099-audit/CONTENT-COVERAGE.json", - "usage": "input", + "usage": "provenance", "git_blob": "9e13266bf85e627f1b7dc225e9530ea69fd2c7f0", "sha256": "421e1211fb1897c45621dc6801c276e53f2e6f335583c9c9049e535f87c0a3b1" }, { "path": "research/community-batch932-audit/CONTENT-COVERAGE.json", - "usage": "input", + "usage": "provenance", "git_blob": "cc4d03eb59b9ab3f952735f7e88ff18c2d15d7af", "sha256": "184629cac91a5cfaca50330a88596008b824221433867dcf8117539c913c284a" }, { "path": "research/community-batch970-audit/CONTENT-COVERAGE.json", - "usage": "input", + "usage": "provenance", "git_blob": "8b9f4111badf7de5d97684799560b55110e9da79", "sha256": "23188ed920e38a54006cb883e181585620821c63bf7e8b5e05d32719417cc37e" }, { "path": "research/community-frontier741-audit/CONTENT-COVERAGE.json", - "usage": "input", + "usage": "provenance", "git_blob": "a5300d4e7a5381a3f443fc54c768ca6f0f236d68", "sha256": "3c820fb30e1b4d9bcfc6a7ab524375e5b2abd66b940af2c509146104f0bcd79c" }, { "path": "research/community-frontier890-audit/CONTENT-COVERAGE.json", - "usage": "input", + "usage": "provenance", "git_blob": "d7ff6d777b01d69b6ce84caf25d3b7e4a4d2f211", "sha256": "6b185a9902652f893f3ebd8ada92d2f11b6de6533a9a4d11718a8a4496101128" }, { "path": "research/community-hyperplane599-audit/SOURCE.json", - "usage": "input", + "usage": "provenance", "git_blob": "546f37d326d10a99910ae8f908e71ef768524d98", "sha256": "65099d764bfcc39bda5e4d9966783611b094c3522dbdd1435cd498d657a8ef8e" }, { "path": "research/community-k492-audit/SOURCE.json", - "usage": "input", + "usage": "provenance", "git_blob": "e538481e4cb16ed936d3195f2dfb5b5a9ca0a76b", "sha256": "2c0f4fa5bc150d05658af2e7c54c4d2c337dd52b7efd3d69530ae73bcbdf452a" }, { "path": "research/community-reconciliation92-audit/MANIFEST.json", - "usage": "input", + "usage": "provenance", "git_blob": "2a2e93685173d5f13cbb5abe740f5d90352e0228", "sha256": "5f501f3c118131e7d069f30ad77186eb2ad6961f9680a0ef105f4514ed41808a" }, { "path": "research/partial-swap-digest/baseline.py", - "usage": "input", + "usage": "provenance", "git_blob": "a2f0190704db83bd8ef48e46e723c49b925804fe", "sha256": "81e9af92cdf38243a540cdcff2062778e449467848d444da37a9553c12ca4c34" }, { "path": "research/r420-two-sided-basis/SOURCES.json", - "usage": "input", + "usage": "provenance", "git_blob": "5d718e11e62f4bcadecf1e02d6b61f87dbe190b0", "sha256": "d9810b0d139c5a1211fd2c1f0d142187cc1fca30026e1e7bc4f9ecfacf1596d1" }, { "path": "research/skip-clones/SOURCE.json", - "usage": "input", + "usage": "provenance", "git_blob": "8d1bb3b9c8189e35e5d8bfdfa632d7473e8be0d5", "sha256": "0b68e63e35a97ce6b0cdb6e291b88ebaa8f2dd4afb70b2498f10ee89428258dc" }, { "path": "research/split-skip/SOURCE.json", - "usage": "input", + "usage": "provenance", "git_blob": "2ab610b6ea2edd2865fda793ef2168b0c76afb4f", "sha256": "7c2b4646a3ecfef6f881da5c43e4bd0fa9a4d1b00548b8ab458d897e16735134" }, { "path": "scripts/historical-ci-inputs/Makefile", - "usage": "input", + "usage": "provenance", "git_blob": "aff68409021c9d401a6f8013b9dfd7dbcc30f2a8", "sha256": "ea8830dd79da493e2d75baf753d733ff7efbcf2b4794afe41fae0ac8f3055646" }, { "path": "scripts/historical-ci-inputs/ledger-batch932-run_isolated_tests.py", - "usage": "input", + "usage": "provenance", "git_blob": "65db599ab0b1dea0312c4ca048e0bd0f44c3736f", "sha256": "96ea543e6c707424afe247e77bd86c82152f90fc76a0773c4232145da5cdf8d1" }, { "path": "scripts/historical-ci-inputs/ledger-batch932-test_isolated_test_runner.py", - "usage": "input", + "usage": "provenance", "git_blob": "34820a8f24678f918f4d0e7a35380d8013fc3495", "sha256": "628391b6abfbc8674ceec1751867a4392f2cc0b5b66886243e139af86cf355ac" }, { "path": "scripts/historical-ci-inputs/ledger-batch970-verify_selected_result.py", - "usage": "input", + "usage": "provenance", "git_blob": "c755b76e0d44ba4917aa94440ebe54daefce5b2a", "sha256": "d7fd929726b326aeeaf0a3996475adec88eee9aac09ae0bebeeaa0bc1fc8f199" }, { "path": "scripts/historical-ci-inputs/ledger-frontier741-ci-verification.md", - "usage": "input", + "usage": "provenance", "git_blob": "7f3c012504187917a728b9fe87043f0fc8cd006a", "sha256": "a854022e0e1d5d4db4d60e586be3ea56005013ef14a1fc06d02bc06e8529c4b0" }, { "path": "scripts/historical-ci-inputs/partial-swap-context.json", - "usage": "input", + "usage": "provenance", "git_blob": "ad65114886bf34a4fd27e79f3be502389e689faa", "sha256": "833a9642f33aeab2ffea17ec9c6b82e0a953f90192b2c82e10bef21538dccba9" }, { "path": "scripts/historical-ci-inputs/partial-swap-network.json", - "usage": "input", + "usage": "provenance", "git_blob": "52075f2463f60af5e16571347f24274fce73a1ea", "sha256": "f3c4be597b2f2136da4ae2cc80c7454f63c90aa01f84e5b8131cee4dd55de815" }, { "path": "scripts/partial_swap/shared.py", - "usage": "input", + "usage": "provenance", "git_blob": "44a0e454c70f9c4b98e258b8443612e6a119904b", "sha256": "5a0646a50b9f3e8ea55168620a78e8853b0ab810517cefc8cfb8696aedee278a" }, { "path": "scripts/replay_historical_check.py", - "usage": "input", + "usage": "provenance", "git_blob": "1e92fff2782970ef71378f594f2350d245a4db26", "sha256": "5467619c78183d3adc82b0cb55af28e5c1a01fca2b0588677816244b53e2bafd" }, { "path": "scripts/research_package.py", - "usage": "input", + "usage": "provenance", "git_blob": "091b4c8f58bac9a9580d76025b887dc5c873d05f", "sha256": "e1256016e7f51827d04fa2179255989f639ae1d97afaa9c16265f85a0c6abd70" }, { "path": "scripts/run_isolated_tests.py", - "usage": "input", + "usage": "provenance", "git_blob": "a96ab35b315ce492e7fbbfd6c5ae211aa066b541", "sha256": "49eb56dd0fc0d8d8ffdb209970a7adf2176223580646f575d5c22e59543b381c" }, { "path": "scripts/verify_selected_result.py", - "usage": "input", + "usage": "provenance", "git_blob": "6882a4700e410dec569b51ae2eaf1a19cc019195", "sha256": "d6b305eac5b9bdb8172c469ad30a1655a60fa0aceac8b1bf610e1b73f51babd8" }, { "path": "tests/test_isolated_test_runner.py", - "usage": "input", + "usage": "provenance", "git_blob": "343b24abf6719b81805eba5a84c74e57634c8288", "sha256": "3a5470d0b139828b90e19bf9583ddeafcd69f8e34f2824664eb3a2958a52e34d" } diff --git a/research/historical-selected-replay-gap/VERIFY.json b/research/historical-selected-replay-gap/VERIFY.json index 98553e72ed..ab7efa3471 100644 --- a/research/historical-selected-replay-gap/VERIFY.json +++ b/research/historical-selected-replay-gap/VERIFY.json @@ -4,36 +4,7 @@ "python": "3.12", "requirements": [], "inputs": [ - "Makefile", - "certificates/partial-swap-network.json", - "docs/ci-verification.md", - "research/clifford-state-performance/SOURCE.json", - "research/community-batch1047-audit/CONTENT-COVERAGE.json", - "research/community-batch1099-audit/CONTENT-COVERAGE.json", - "research/community-batch932-audit/CONTENT-COVERAGE.json", - "research/community-batch970-audit/CONTENT-COVERAGE.json", - "research/community-frontier741-audit/CONTENT-COVERAGE.json", - "research/community-frontier890-audit/CONTENT-COVERAGE.json", - "research/community-hyperplane599-audit/SOURCE.json", - "research/community-k492-audit/SOURCE.json", - "research/community-reconciliation92-audit/MANIFEST.json", - "research/partial-swap-digest/baseline.py", - "research/r420-two-sided-basis/SOURCES.json", - "research/skip-clones/SOURCE.json", - "research/split-skip/SOURCE.json", - "scripts/historical-ci-inputs/Makefile", - "scripts/historical-ci-inputs/ledger-batch932-run_isolated_tests.py", - "scripts/historical-ci-inputs/ledger-batch932-test_isolated_test_runner.py", - "scripts/historical-ci-inputs/ledger-batch970-verify_selected_result.py", - "scripts/historical-ci-inputs/ledger-frontier741-ci-verification.md", - "scripts/historical-ci-inputs/partial-swap-context.json", - "scripts/historical-ci-inputs/partial-swap-network.json", - "scripts/partial_swap/shared.py", - "scripts/replay_historical_check.py", - "scripts/research_package.py", - "scripts/run_isolated_tests.py", - "scripts/verify_selected_result.py", - "tests/test_isolated_test_runner.py" + "scripts/research_package.py" ], "commands": [ { diff --git a/research/historical-selected-replay-gap/verify.py b/research/historical-selected-replay-gap/verify.py index 83b995941a..9d266c5a4e 100644 --- a/research/historical-selected-replay-gap/verify.py +++ b/research/historical-selected-replay-gap/verify.py @@ -6,8 +6,10 @@ """ import hashlib import importlib.util +import json import subprocess import sys +import tempfile from pathlib import Path ROOT = Path(__file__).resolve().parents[2] @@ -61,31 +63,47 @@ def require(ok, message): raise SystemExit(message) -def load_checker(): - path = ROOT / "scripts/replay_historical_check.py" - spec = importlib.util.spec_from_file_location("historical_selected_replay_gap_checker", path) +def load_module(path): + spec = importlib.util.spec_from_file_location(path.stem, path) module = importlib.util.module_from_spec(spec) spec.loader.exec_module(module) return module +def checkout_snapshot(snapshot, sources, runner, env): + paths = [runner.canonical_relative_path(row["path"]) for row in sources["files"]] + git = ["git", "-c", "maintenance.auto=false", "-c", "gc.auto=0", + "-c", "core.autocrlf=false"] + subprocess.run([*git, "clone", "--quiet", "--shared", "--no-tags", "--no-checkout", + "--", str(ROOT), str(snapshot)], cwd=ROOT, env=env, check=True) + subprocess.run([*git, "update-ref", "--no-deref", "HEAD", INSPECTED], + cwd=snapshot, env=env, check=True) + # The pinned planner reads omitted manifests from the sparse HEAD/index. + patterns = "".join(f"/{path.as_posix()}\n" for path in paths) + subprocess.run([*git, "sparse-checkout", "set", "--no-cone", "--stdin"], + cwd=snapshot, env=env, input=patterns.encode("utf-8"), check=True) + subprocess.run([*git, "read-tree", "-mu", "HEAD"], cwd=snapshot, env=env, check=True) + for path, row in zip(paths, sources["files"], strict=True): + require(hashlib.sha256((snapshot / path).read_bytes()).hexdigest() == row["sha256"], + "historical checkout source digest changed: " + path.as_posix()) + + def entries(checker): for name, config in checker.CONFIG.items(): for entry in [config, *config.get("additional_inputs", [])]: yield name, entry -def reject(checker, entry): +def reject(root, checker, entry): try: - checker.authenticated_input(ROOT, entry) + checker.authenticated_input(root, entry) except ValueError as exc: return str(exc) raise SystemExit("historical input was admitted: " + entry["path"]) -def main(): - require(not sys.flags.optimize, "assertions must stay enabled") - checker = load_checker() +def check_snapshot(root, env): + checker = load_module(root / "scripts/replay_historical_check.py") selected = [entry for name, entry in entries(checker) if name == "tooling-ledger" and entry["path"] == SELECTED_PATH] require(len(selected) == 1, "selected-result checker overlay is not unique") @@ -94,7 +112,7 @@ def main(): require(entry["accepted_live_sha256"] == [SELECTED_ACCEPTED], "accepted selected-checker successors changed") frozen = (checker.INPUTS / entry["input"]).read_bytes() - live = (ROOT / SELECTED_PATH).read_bytes() + live = (root / SELECTED_PATH).read_bytes() require(hashlib.sha256(frozen).hexdigest() == SELECTED_PIN, "frozen selected checker bytes changed") require(hashlib.sha256(live).hexdigest() == SELECTED_LIVE, "live selected checker digest changed") require(SELECTED_LIVE not in (SELECTED_PIN, SELECTED_ACCEPTED), "live checker was already admitted") @@ -102,7 +120,7 @@ def main(): # live successor, not a broken comparison. require(SELECTED_PIN in (SELECTED_PIN, *entry["accepted_live_sha256"]), "pin membership control failed") - require(reject(checker, entry) == REJECTIONS[SELECTED_PATH][1], + require(reject(root, checker, entry) == REJECTIONS[SELECTED_PATH][1], "selected checker rejection text changed") counts = {path: 0 for path in REJECTIONS} @@ -110,7 +128,7 @@ def main(): for _name, item in entries(checker): if item["path"] not in REJECTIONS: continue - message = reject(checker, item) + message = reject(root, checker, item) counts[item["path"]] += 1 messages.setdefault(item["path"], message) for path, (count, message) in REJECTIONS.items(): @@ -118,20 +136,31 @@ def main(): require(messages[path] == message, "rejection text changed for " + path) require(sum(counts.values()) == 19, "rejection total changed") ci = [item for _name, item in entries(checker) if item["path"] == CI_PATH] - require(len(ci) == 1 and hashlib.sha256((ROOT / CI_PATH).read_bytes()).hexdigest() == CI_LIVE, + require(len(ci) == 1 and hashlib.sha256((root / CI_PATH).read_bytes()).hexdigest() == CI_LIVE, "selected CI note digest changed") diff = subprocess.check_output( - ["git", "diff", "--name-only", PARENT, INSPECTED], cwd=ROOT, text=True) + ["git", "diff", "--name-only", PARENT, INSPECTED], cwd=root, env=env, text=True) changed = sorted(name for name in diff.splitlines() if name) require(changed == CHANGED, "inspected commit diff changed") - sys.path.insert(0, str(ROOT / "scripts")) - from research_package import plan_details - details = plan_details(ROOT, set(changed)) + planner = load_module(root / "scripts/research_package.py") + details = planner.plan_details(root, set(changed)) require([row["package"] for row in details] == PLAN_PACKAGES, "helper plan selection changed") matched = {name for row in details for names in row["causes"].values() for name in names} require(sorted(set(changed) - matched) == UNMATCHED, "unmatched plan paths changed") - require(plan_details(ROOT, set()) == [], "empty change set selected a package") + require(planner.plan_details(root, set()) == [], "empty change set selected a package") + + +def main(): + require(not sys.flags.optimize, "assertions must stay enabled") + sources = json.loads(Path(__file__).with_name("SOURCES.json").read_bytes()) + require(sources["base_commit"] == INSPECTED, "historical checkout base changed") + runner = load_module(ROOT / "scripts/research_package.py") + env = runner.git_source_env() + with tempfile.TemporaryDirectory(prefix="historical-selected-replay-") as temporary: + snapshot = Path(temporary) / "snapshot" + checkout_snapshot(snapshot, sources, runner, env) + check_snapshot(snapshot, env) print("PASS_HISTORICAL_SELECTED_REPLAY_GAP") print("selected_checker_live=" + SELECTED_LIVE) print("rejections=19 distinct_paths=7 plan_packages=9")