diff --git a/research/rank7-v45-frozen-owner-invoice/README.md b/research/rank7-v45-frozen-owner-invoice/README.md new file mode 100644 index 0000000000..9658b92155 --- /dev/null +++ b/research/rank7-v45-frozen-owner-invoice/README.md @@ -0,0 +1,174 @@ +# V45 needs a changed owner assignment + +Lowering all four V45 endpoints on PR2942's existing owner-bin assignment +**increases** the complete recursive moment for every positive saving parameter. +The same holds for all 16 endpoint subsets with the V45 partner frames fixed. +This is a scoped obstruction to retaining that assignment, not a defect in +PR2979, which supplies a different allocation and additional word changes. + +The new result closes a specific gap between [PR2993][2993]'s local symbolic +invoice and an actual idle bill. It complements [PR2987][2987]'s analysis of +the different final pattern mix. It does not repeat the frame-only audit or +claim a new supplier, exponent or selected-frontier change. + +## Exact result + +The reference is PR2942's literal T74 fill, retained on scientific base main +`836b19bfa309ceafbc8ee32a15e8c4b10dde7e11`, priority revision 6. +The changed frame record is [PR2979][2979] at +`be191346391661f4d35fc0d1508d0a6029572576`. +All ten live inputs have SHA256 and Git-blob pins in [SOURCES.json](SOURCES.json). +The selected record and catalogue are historical provenance, not live inputs. + +Keep each role's call, owner replica, child and port fixed. Grant free +compaction of offsets within each bin, preserving the role order. Bill one +idle child for the complete remaining capacity, including empty bins. +This is favorable to the changed word. It does not charge movement or prove +that the changed native program can execute physically. + +Both providers independently recount the V45 local difference for `k` lowered +endpoints, with all 61 V45 gate-frame edits retained: + +```text +Delta_local(k) = (2-k) H1 + 10 H2 + 6 H3 - 10 H4. +``` + +`Hr` denotes one rank-r recursive child. There are 666 actual calls, 250 base +and 416 extra. The four helpers have ordered indices 25, 27, 41 and 43 among +the 408 live helpers. The checker derives those indices from original role +names 249, 251, 265 and 267, rather than assuming original and compact names +coincide. + +For the joint change, all 2,664 freed width units land in previously full bins: + +| Freed capacity per touched bin | Bins | New idle bill | +|---:|---:|---:| +| 1 | 2,370 | 2,370 H1 | +| 2 | 147 | 147 H2 | + +The unchanged parent idle bill is +`17316 H1 + 5861 H3 + 6215 H5 + H14 + 27291 H48`. +All 149,184 bins, 271,728 role placements and source availability windows +are checked, including those unaffected by the change. Adding the actual idle +difference to 666 copies of the local difference gives + +```text +Delta_complete(4) = 1038 H1 + 6807 H2 + 3996 H3 - 6660 H4. +``` + +This is a complete recursive-histogram difference under the fixed assignment. +The role counts, 86 private cleanup names, eight centres and nominal source +stock of 66,808 remain unchanged. Counting those names is not physical storage +or cleanup-semantic admission. + +## Proof of the strict sign + +The signed rank mass is exactly zero: + +```text +1038*1 + 6807*2 + 3996*3 = 6660*4 = 26640. +``` + +In the retained moment, a rank-r tariff is proportional to `r^(1-a)`. +For every `a > 0` and `r < 4`, `r^(-a) > 4^(-a)`. +Replace each positive term `n_r r^(1-a)` by +`n_r r * 4^(-a)`. Every replacement strictly decreases the sum, and the +rank-mass equality makes the resulting signed sum zero. The original +complete difference is therefore strictly positive. The common normalization +`73^(a-1)/(896*74)` preserves its sign. + +The checker certifies the same sign pattern and rank-mass identity separately +for every endpoint subset, including the fixed-partner zero-endpoint control. +For example, any singleton has complete difference +`1264 H1 + 6694 H2 + 3996 H3 - 6660 H4`. +No floating-point prices, approximate idle tariffs or root estimates are used. + +For the usual `0 < a < 1`, splitting a bin's idle remainder into several +positive-rank children cannot lower this bill, since `x^(1-a)` is subadditive. +Thus the obstruction also covers such splits with fixed role-to-bin placement. +It does not cover moving roles between bins, changing the word's partner +frames, using different endpoint paths or changing the coverage contract. + +PR2979's positive surrogate guide used a width tariff near `H48/48`. +The frozen parent fill actually produces new H1/H2 children. This result +explains why that guide cannot establish a saving on this unchanged fill. +It neither prices nor invalidates PR2979's different final allocation. + +## Reproduce and evidence + +The checker uses only the Python standard library and executes no predecessor +code. It writes no repository files during verification and needs no network. + +```sh +python3.12 -B scripts/research_package.py --package research/rank7-v45-frozen-owner-invoice +python3.12 -O -Werror -B research/rank7-v45-frozen-owner-invoice/verify.py +python3.12 -Werror -B research/rank7-v45-frozen-owner-invoice/test_verify.py +``` + +`verify.py --emit` prints deterministic evidence. [RESULT.json](RESULT.json) +contains the independently recounted parent invoice, both providers' frame +profiles for every subset, complete idle and recursive histograms, touched-bin +counts and digests of the rebound rows. The default command compares fresh +evidence with that committed result. [TASK.json](TASK.json) records the scope +refinement, overlap coverage and source heads. [decisions.tsv](decisions.tsv) +records the bounded investigation. + +Seven behavioral test groups check genuine source geometry and reject missing +or duplicated roles, capacity violations, unavailable source windows, unbound +providers, noncompact source prefixes, invalid frame endpoints, omitted frame +edits, unpaid idle children, false sign claims, duplicate JSON keys and corrupt +source exports. A subprocess checks the real optimized CLI. All acceptance +conditions use exceptions and remain enabled under Python `-O`. + +## Limits + +This proves a finite invoice obstruction for one frozen assignment. The +Clifford/native semantics, arbitrary dirty-state restoration, physical movement, +precision/tape, selected stock coefficients, full supplier and outer release, +and all-size/compiler implications were not replayed. It does not generalize +to PR2979's shipped final allocation or to all rank-seven mechanisms. + +## Open next questions + +The useful continuation is to join the already published changed packing and +native event evidence to an independently checked physical invoice. Start with +PR2987's actual final fill and [PR3008][3008]'s named helper/private-buffer event +inventory. The remaining native dependency closure, physical ownership and +precision costs block admission. Another unchanged-parent packing calculation +is unnecessary. This session stops at the fixed-assignment theorem. + +## Credit and engineering constraints + +Nick Petalas. Apache-2.0. Marius-Paul Dumitrean supplied PR2942's words/fill and +PR2979's joint mechanism. Jeremy Kothe supplied the frame/cleanup conventions; +Mason Hale and Jeremy Diviney supplied the paired-extraction chain. Ross +Richardson supplied the complementary packing audits. The source-window and +family conventions retain Tekalign's owner-checker lineage. Retain Yiyang Lu, +Dugongue, icekylinx, Sagar Thakrar, themilkman216 and the geometry/native/owner +contributors credited by the source packages. No predecessor code is copied, +modified or imported here. No independent human or formal-kernel review is claimed. + +Build the Lever determined the rerunnable integer certificate. Prove It Works +required reading every actual role placement and idle bin. Test Behavior, Not +Implementation determined the semantic failure controls. Unslop shaped the prose. + +Power of Ten inspection covers the four Python files. Loop bounds come from +ten authenticated inputs, 704 word slots, nine binary axes, at most 10,000 +gates per section, 480 warps, 666 calls, 408 helpers, 18 idle children per +replica, 112 ports and 16 subsets. File reads stop at 16 MiB raw and 64 MiB +decoded; the immutable span cache has 4,096 entries. No recursion or dynamic +code loading is used. Source authentication runs before decoding and again +after replay. Ruff and warning-as-error execution check the new code. + +Rule 3 deviation: Python allocates managed objects during the bounded recount. +The fixed domains and file/cache caps bound live state; no resident service is +introduced. A service accepting larger inputs would need fixed-capacity storage +and a separate allocation audit. Rules 8/9 deviation: `lru_cache`, the strict +JSON object hook and unittest callbacks use standard-library dispatch. Their +targets are fixed local functions; the cache is bounded and contains immutable +sets. Boundary, optimized CLI and corruption tests exercise these paths. + +[2979]: https://github.com/CrocSwap/integer-mult-bounds/pull/2979 +[2987]: https://github.com/CrocSwap/integer-mult-bounds/pull/2987 +[2993]: https://github.com/CrocSwap/integer-mult-bounds/pull/2993 +[3008]: https://github.com/CrocSwap/integer-mult-bounds/pull/3008 diff --git a/research/rank7-v45-frozen-owner-invoice/RESULT.json b/research/rank7-v45-frozen-owner-invoice/RESULT.json new file mode 100644 index 0000000000..81fc618c84 --- /dev/null +++ b/research/rank7-v45-frozen-owner-invoice/RESULT.json @@ -0,0 +1,1663 @@ +{ + "bins": 149184, + "calls": 666, + "cases": [ + { + "complete_delta": { + "1": 1332, + "2": 6660, + "3": 3996, + "4": -6660 + }, + "complete_profile": { + "1": 1639692, + "14": 1, + "2": 427572, + "3": 200333, + "4": 62604, + "48": 27291, + "5": 23531, + "8": 5328 + }, + "frames": { + "extra": { + "local_delta": { + "1": 2, + "2": 10, + "3": 6, + "4": -10 + }, + "local_profile": { + "1": 2436, + "2": 642, + "3": 292, + "4": 94, + "5": 26, + "8": 8 + }, + "private_names": 86, + "width_inventory": { + "4": 26, + "5": 2, + "7": 62, + "8": 100, + "9": 218 + } + }, + "gauge44": { + "local_delta": { + "1": 2, + "2": 10, + "3": 6, + "4": -10 + }, + "local_profile": { + "1": 2436, + "2": 642, + "3": 292, + "4": 94, + "5": 26, + "8": 8 + }, + "private_names": 86, + "width_inventory": { + "4": 26, + "5": 2, + "7": 62, + "8": 100, + "9": 218 + } + } + }, + "helpers": [], + "idle": { + "1": 17316, + "14": 1, + "3": 5861, + "48": 27291, + "5": 6215 + }, + "idle_delta": {}, + "rebound_rows": 0, + "rebound_rows_sha256": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "strict_cost_increase": { + "negative_rank": 4, + "positive_rank_mass": 26640, + "saving_domain": "a > 0" + }, + "touched_bins": [] + }, + { + "complete_delta": { + "1": 1264, + "2": 6694, + "3": 3996, + "4": -6660 + }, + "complete_profile": { + "1": 1639624, + "14": 1, + "2": 427606, + "3": 200333, + "4": 62604, + "48": 27291, + "5": 23531, + "8": 5328 + }, + "frames": { + "extra": { + "local_delta": { + "1": 1, + "2": 10, + "3": 6, + "4": -10 + }, + "local_profile": { + "1": 2435, + "2": 642, + "3": 292, + "4": 94, + "5": 26, + "8": 8 + }, + "private_names": 86, + "width_inventory": { + "4": 26, + "5": 2, + "7": 63, + "8": 99, + "9": 218 + } + }, + "gauge44": { + "local_delta": { + "1": 1, + "2": 10, + "3": 6, + "4": -10 + }, + "local_profile": { + "1": 2435, + "2": 642, + "3": 292, + "4": 94, + "5": 26, + "8": 8 + }, + "private_names": 86, + "width_inventory": { + "4": 26, + "5": 2, + "7": 63, + "8": 99, + "9": 218 + } + } + }, + "helpers": [ + 249 + ], + "idle": { + "1": 17914, + "14": 1, + "2": 34, + "3": 5861, + "48": 27291, + "5": 6215 + }, + "idle_delta": { + "1": 598, + "2": 34 + }, + "rebound_rows": 755, + "rebound_rows_sha256": "40ef2fe553c296adf5bf450afa798fbc3357a32eda905d5a0275ce2fcf983faa", + "strict_cost_increase": { + "negative_rank": 4, + "positive_rank_mass": 26640, + "saving_domain": "a > 0" + }, + "touched_bins": [ + { + "count": 598, + "freed": 1, + "old_idle": 0 + }, + { + "count": 34, + "freed": 2, + "old_idle": 0 + } + ] + }, + { + "complete_delta": { + "1": 1264, + "2": 6694, + "3": 3996, + "4": -6660 + }, + "complete_profile": { + "1": 1639624, + "14": 1, + "2": 427606, + "3": 200333, + "4": 62604, + "48": 27291, + "5": 23531, + "8": 5328 + }, + "frames": { + "extra": { + "local_delta": { + "1": 1, + "2": 10, + "3": 6, + "4": -10 + }, + "local_profile": { + "1": 2435, + "2": 642, + "3": 292, + "4": 94, + "5": 26, + "8": 8 + }, + "private_names": 86, + "width_inventory": { + "4": 26, + "5": 2, + "7": 63, + "8": 99, + "9": 218 + } + }, + "gauge44": { + "local_delta": { + "1": 1, + "2": 10, + "3": 6, + "4": -10 + }, + "local_profile": { + "1": 2435, + "2": 642, + "3": 292, + "4": 94, + "5": 26, + "8": 8 + }, + "private_names": 86, + "width_inventory": { + "4": 26, + "5": 2, + "7": 63, + "8": 99, + "9": 218 + } + } + }, + "helpers": [ + 251 + ], + "idle": { + "1": 17914, + "14": 1, + "2": 34, + "3": 5861, + "48": 27291, + "5": 6215 + }, + "idle_delta": { + "1": 598, + "2": 34 + }, + "rebound_rows": 752, + "rebound_rows_sha256": "65b4db7ee309b4dbba03168a520a98e7f364d462c39e81137a5dc1670c60f4a0", + "strict_cost_increase": { + "negative_rank": 4, + "positive_rank_mass": 26640, + "saving_domain": "a > 0" + }, + "touched_bins": [ + { + "count": 598, + "freed": 1, + "old_idle": 0 + }, + { + "count": 34, + "freed": 2, + "old_idle": 0 + } + ] + }, + { + "complete_delta": { + "1": 1264, + "2": 6694, + "3": 3996, + "4": -6660 + }, + "complete_profile": { + "1": 1639624, + "14": 1, + "2": 427606, + "3": 200333, + "4": 62604, + "48": 27291, + "5": 23531, + "8": 5328 + }, + "frames": { + "extra": { + "local_delta": { + "1": 1, + "2": 10, + "3": 6, + "4": -10 + }, + "local_profile": { + "1": 2435, + "2": 642, + "3": 292, + "4": 94, + "5": 26, + "8": 8 + }, + "private_names": 86, + "width_inventory": { + "4": 26, + "5": 2, + "7": 63, + "8": 99, + "9": 218 + } + }, + "gauge44": { + "local_delta": { + "1": 1, + "2": 10, + "3": 6, + "4": -10 + }, + "local_profile": { + "1": 2435, + "2": 642, + "3": 292, + "4": 94, + "5": 26, + "8": 8 + }, + "private_names": 86, + "width_inventory": { + "4": 26, + "5": 2, + "7": 63, + "8": 99, + "9": 218 + } + } + }, + "helpers": [ + 265 + ], + "idle": { + "1": 17914, + "14": 1, + "2": 34, + "3": 5861, + "48": 27291, + "5": 6215 + }, + "idle_delta": { + "1": 598, + "2": 34 + }, + "rebound_rows": 752, + "rebound_rows_sha256": "2fb131037bab52634ebd3b43975ad72ebdb29da61bb67f05af4b6e49b2480eaa", + "strict_cost_increase": { + "negative_rank": 4, + "positive_rank_mass": 26640, + "saving_domain": "a > 0" + }, + "touched_bins": [ + { + "count": 598, + "freed": 1, + "old_idle": 0 + }, + { + "count": 34, + "freed": 2, + "old_idle": 0 + } + ] + }, + { + "complete_delta": { + "1": 1264, + "2": 6694, + "3": 3996, + "4": -6660 + }, + "complete_profile": { + "1": 1639624, + "14": 1, + "2": 427606, + "3": 200333, + "4": 62604, + "48": 27291, + "5": 23531, + "8": 5328 + }, + "frames": { + "extra": { + "local_delta": { + "1": 1, + "2": 10, + "3": 6, + "4": -10 + }, + "local_profile": { + "1": 2435, + "2": 642, + "3": 292, + "4": 94, + "5": 26, + "8": 8 + }, + "private_names": 86, + "width_inventory": { + "4": 26, + "5": 2, + "7": 63, + "8": 99, + "9": 218 + } + }, + "gauge44": { + "local_delta": { + "1": 1, + "2": 10, + "3": 6, + "4": -10 + }, + "local_profile": { + "1": 2435, + "2": 642, + "3": 292, + "4": 94, + "5": 26, + "8": 8 + }, + "private_names": 86, + "width_inventory": { + "4": 26, + "5": 2, + "7": 63, + "8": 99, + "9": 218 + } + } + }, + "helpers": [ + 267 + ], + "idle": { + "1": 17914, + "14": 1, + "2": 34, + "3": 5861, + "48": 27291, + "5": 6215 + }, + "idle_delta": { + "1": 598, + "2": 34 + }, + "rebound_rows": 752, + "rebound_rows_sha256": "99328d2eedd3cef743aaf48995b2bce4d0ce530feda449f00117fdb6bcd96d0b", + "strict_cost_increase": { + "negative_rank": 4, + "positive_rank_mass": 26640, + "saving_domain": "a > 0" + }, + "touched_bins": [ + { + "count": 598, + "freed": 1, + "old_idle": 0 + }, + { + "count": 34, + "freed": 2, + "old_idle": 0 + } + ] + }, + { + "complete_delta": { + "1": 1190, + "2": 6731, + "3": 3996, + "4": -6660 + }, + "complete_profile": { + "1": 1639550, + "14": 1, + "2": 427643, + "3": 200333, + "4": 62604, + "48": 27291, + "5": 23531, + "8": 5328 + }, + "frames": { + "extra": { + "local_delta": { + "2": 10, + "3": 6, + "4": -10 + }, + "local_profile": { + "1": 2434, + "2": 642, + "3": 292, + "4": 94, + "5": 26, + "8": 8 + }, + "private_names": 86, + "width_inventory": { + "4": 26, + "5": 2, + "7": 64, + "8": 98, + "9": 218 + } + }, + "gauge44": { + "local_delta": { + "2": 10, + "3": 6, + "4": -10 + }, + "local_profile": { + "1": 2434, + "2": 642, + "3": 292, + "4": 94, + "5": 26, + "8": 8 + }, + "private_names": 86, + "width_inventory": { + "4": 26, + "5": 2, + "7": 64, + "8": 98, + "9": 218 + } + } + }, + "helpers": [ + 249, + 251 + ], + "idle": { + "1": 18506, + "14": 1, + "2": 71, + "3": 5861, + "48": 27291, + "5": 6215 + }, + "idle_delta": { + "1": 1190, + "2": 71 + }, + "rebound_rows": 1501, + "rebound_rows_sha256": "cd44eb888e1a414c06094a4ec246742a47347a7d67a705bcd61bc5f9527bfee4", + "strict_cost_increase": { + "negative_rank": 4, + "positive_rank_mass": 26640, + "saving_domain": "a > 0" + }, + "touched_bins": [ + { + "count": 1190, + "freed": 1, + "old_idle": 0 + }, + { + "count": 71, + "freed": 2, + "old_idle": 0 + } + ] + }, + { + "complete_delta": { + "1": 1194, + "2": 6729, + "3": 3996, + "4": -6660 + }, + "complete_profile": { + "1": 1639554, + "14": 1, + "2": 427641, + "3": 200333, + "4": 62604, + "48": 27291, + "5": 23531, + "8": 5328 + }, + "frames": { + "extra": { + "local_delta": { + "2": 10, + "3": 6, + "4": -10 + }, + "local_profile": { + "1": 2434, + "2": 642, + "3": 292, + "4": 94, + "5": 26, + "8": 8 + }, + "private_names": 86, + "width_inventory": { + "4": 26, + "5": 2, + "7": 64, + "8": 98, + "9": 218 + } + }, + "gauge44": { + "local_delta": { + "2": 10, + "3": 6, + "4": -10 + }, + "local_profile": { + "1": 2434, + "2": 642, + "3": 292, + "4": 94, + "5": 26, + "8": 8 + }, + "private_names": 86, + "width_inventory": { + "4": 26, + "5": 2, + "7": 64, + "8": 98, + "9": 218 + } + } + }, + "helpers": [ + 249, + 265 + ], + "idle": { + "1": 18510, + "14": 1, + "2": 69, + "3": 5861, + "48": 27291, + "5": 6215 + }, + "idle_delta": { + "1": 1194, + "2": 69 + }, + "rebound_rows": 1505, + "rebound_rows_sha256": "d33cf2f253113d2d6dac09ccfb55cc1a25d4905b8de45f5fe9e3e3f8119ca2a2", + "strict_cost_increase": { + "negative_rank": 4, + "positive_rank_mass": 26640, + "saving_domain": "a > 0" + }, + "touched_bins": [ + { + "count": 1194, + "freed": 1, + "old_idle": 0 + }, + { + "count": 69, + "freed": 2, + "old_idle": 0 + } + ] + }, + { + "complete_delta": { + "1": 1196, + "2": 6728, + "3": 3996, + "4": -6660 + }, + "complete_profile": { + "1": 1639556, + "14": 1, + "2": 427640, + "3": 200333, + "4": 62604, + "48": 27291, + "5": 23531, + "8": 5328 + }, + "frames": { + "extra": { + "local_delta": { + "2": 10, + "3": 6, + "4": -10 + }, + "local_profile": { + "1": 2434, + "2": 642, + "3": 292, + "4": 94, + "5": 26, + "8": 8 + }, + "private_names": 86, + "width_inventory": { + "4": 26, + "5": 2, + "7": 64, + "8": 98, + "9": 218 + } + }, + "gauge44": { + "local_delta": { + "2": 10, + "3": 6, + "4": -10 + }, + "local_profile": { + "1": 2434, + "2": 642, + "3": 292, + "4": 94, + "5": 26, + "8": 8 + }, + "private_names": 86, + "width_inventory": { + "4": 26, + "5": 2, + "7": 64, + "8": 98, + "9": 218 + } + } + }, + "helpers": [ + 249, + 267 + ], + "idle": { + "1": 18512, + "14": 1, + "2": 68, + "3": 5861, + "48": 27291, + "5": 6215 + }, + "idle_delta": { + "1": 1196, + "2": 68 + }, + "rebound_rows": 1507, + "rebound_rows_sha256": "98216757312c1c5f7a5a92b3cf4b074d8714784936c8b8ad58e328a8d483b53b", + "strict_cost_increase": { + "negative_rank": 4, + "positive_rank_mass": 26640, + "saving_domain": "a > 0" + }, + "touched_bins": [ + { + "count": 1196, + "freed": 1, + "old_idle": 0 + }, + { + "count": 68, + "freed": 2, + "old_idle": 0 + } + ] + }, + { + "complete_delta": { + "1": 1190, + "2": 6731, + "3": 3996, + "4": -6660 + }, + "complete_profile": { + "1": 1639550, + "14": 1, + "2": 427643, + "3": 200333, + "4": 62604, + "48": 27291, + "5": 23531, + "8": 5328 + }, + "frames": { + "extra": { + "local_delta": { + "2": 10, + "3": 6, + "4": -10 + }, + "local_profile": { + "1": 2434, + "2": 642, + "3": 292, + "4": 94, + "5": 26, + "8": 8 + }, + "private_names": 86, + "width_inventory": { + "4": 26, + "5": 2, + "7": 64, + "8": 98, + "9": 218 + } + }, + "gauge44": { + "local_delta": { + "2": 10, + "3": 6, + "4": -10 + }, + "local_profile": { + "1": 2434, + "2": 642, + "3": 292, + "4": 94, + "5": 26, + "8": 8 + }, + "private_names": 86, + "width_inventory": { + "4": 26, + "5": 2, + "7": 64, + "8": 98, + "9": 218 + } + } + }, + "helpers": [ + 251, + 265 + ], + "idle": { + "1": 18506, + "14": 1, + "2": 71, + "3": 5861, + "48": 27291, + "5": 6215 + }, + "idle_delta": { + "1": 1190, + "2": 71 + }, + "rebound_rows": 1498, + "rebound_rows_sha256": "12d81927740ee3d2f27e12c395ea0f0d1cba8bff6c0ccd75ae59f310a40e7c88", + "strict_cost_increase": { + "negative_rank": 4, + "positive_rank_mass": 26640, + "saving_domain": "a > 0" + }, + "touched_bins": [ + { + "count": 1190, + "freed": 1, + "old_idle": 0 + }, + { + "count": 71, + "freed": 2, + "old_idle": 0 + } + ] + }, + { + "complete_delta": { + "1": 1194, + "2": 6729, + "3": 3996, + "4": -6660 + }, + "complete_profile": { + "1": 1639554, + "14": 1, + "2": 427641, + "3": 200333, + "4": 62604, + "48": 27291, + "5": 23531, + "8": 5328 + }, + "frames": { + "extra": { + "local_delta": { + "2": 10, + "3": 6, + "4": -10 + }, + "local_profile": { + "1": 2434, + "2": 642, + "3": 292, + "4": 94, + "5": 26, + "8": 8 + }, + "private_names": 86, + "width_inventory": { + "4": 26, + "5": 2, + "7": 64, + "8": 98, + "9": 218 + } + }, + "gauge44": { + "local_delta": { + "2": 10, + "3": 6, + "4": -10 + }, + "local_profile": { + "1": 2434, + "2": 642, + "3": 292, + "4": 94, + "5": 26, + "8": 8 + }, + "private_names": 86, + "width_inventory": { + "4": 26, + "5": 2, + "7": 64, + "8": 98, + "9": 218 + } + } + }, + "helpers": [ + 251, + 267 + ], + "idle": { + "1": 18510, + "14": 1, + "2": 69, + "3": 5861, + "48": 27291, + "5": 6215 + }, + "idle_delta": { + "1": 1194, + "2": 69 + }, + "rebound_rows": 1502, + "rebound_rows_sha256": "a0120bade2d31c1ef16329892b1a3a6bb64d168496da19af5ac62957b0dafd66", + "strict_cost_increase": { + "negative_rank": 4, + "positive_rank_mass": 26640, + "saving_domain": "a > 0" + }, + "touched_bins": [ + { + "count": 1194, + "freed": 1, + "old_idle": 0 + }, + { + "count": 69, + "freed": 2, + "old_idle": 0 + } + ] + }, + { + "complete_delta": { + "1": 1190, + "2": 6731, + "3": 3996, + "4": -6660 + }, + "complete_profile": { + "1": 1639550, + "14": 1, + "2": 427643, + "3": 200333, + "4": 62604, + "48": 27291, + "5": 23531, + "8": 5328 + }, + "frames": { + "extra": { + "local_delta": { + "2": 10, + "3": 6, + "4": -10 + }, + "local_profile": { + "1": 2434, + "2": 642, + "3": 292, + "4": 94, + "5": 26, + "8": 8 + }, + "private_names": 86, + "width_inventory": { + "4": 26, + "5": 2, + "7": 64, + "8": 98, + "9": 218 + } + }, + "gauge44": { + "local_delta": { + "2": 10, + "3": 6, + "4": -10 + }, + "local_profile": { + "1": 2434, + "2": 642, + "3": 292, + "4": 94, + "5": 26, + "8": 8 + }, + "private_names": 86, + "width_inventory": { + "4": 26, + "5": 2, + "7": 64, + "8": 98, + "9": 218 + } + } + }, + "helpers": [ + 265, + 267 + ], + "idle": { + "1": 18506, + "14": 1, + "2": 71, + "3": 5861, + "48": 27291, + "5": 6215 + }, + "idle_delta": { + "1": 1190, + "2": 71 + }, + "rebound_rows": 1498, + "rebound_rows_sha256": "02f639c554414dfd9cb5cc8ecba83dd6d00cf1605ba6078a7fdff3d6baa0d785", + "strict_cost_increase": { + "negative_rank": 4, + "positive_rank_mass": 26640, + "saving_domain": "a > 0" + }, + "touched_bins": [ + { + "count": 1190, + "freed": 1, + "old_idle": 0 + }, + { + "count": 71, + "freed": 2, + "old_idle": 0 + } + ] + }, + { + "complete_delta": { + "1": 1114, + "2": 6769, + "3": 3996, + "4": -6660 + }, + "complete_profile": { + "1": 1639474, + "14": 1, + "2": 427681, + "3": 200333, + "4": 62604, + "48": 27291, + "5": 23531, + "8": 5328 + }, + "frames": { + "extra": { + "local_delta": { + "1": -1, + "2": 10, + "3": 6, + "4": -10 + }, + "local_profile": { + "1": 2433, + "2": 642, + "3": 292, + "4": 94, + "5": 26, + "8": 8 + }, + "private_names": 86, + "width_inventory": { + "4": 26, + "5": 2, + "7": 65, + "8": 97, + "9": 218 + } + }, + "gauge44": { + "local_delta": { + "1": -1, + "2": 10, + "3": 6, + "4": -10 + }, + "local_profile": { + "1": 2433, + "2": 642, + "3": 292, + "4": 94, + "5": 26, + "8": 8 + }, + "private_names": 86, + "width_inventory": { + "4": 26, + "5": 2, + "7": 65, + "8": 97, + "9": 218 + } + } + }, + "helpers": [ + 249, + 251, + 265 + ], + "idle": { + "1": 19096, + "14": 1, + "2": 109, + "3": 5861, + "48": 27291, + "5": 6215 + }, + "idle_delta": { + "1": 1780, + "2": 109 + }, + "rebound_rows": 2245, + "rebound_rows_sha256": "0a491bff70e04f0de462790061bcaf0396fbbe2197b1b3cd7403b47da8f48714", + "strict_cost_increase": { + "negative_rank": 4, + "positive_rank_mass": 26640, + "saving_domain": "a > 0" + }, + "touched_bins": [ + { + "count": 1780, + "freed": 1, + "old_idle": 0 + }, + { + "count": 109, + "freed": 2, + "old_idle": 0 + } + ] + }, + { + "complete_delta": { + "1": 1120, + "2": 6766, + "3": 3996, + "4": -6660 + }, + "complete_profile": { + "1": 1639480, + "14": 1, + "2": 427678, + "3": 200333, + "4": 62604, + "48": 27291, + "5": 23531, + "8": 5328 + }, + "frames": { + "extra": { + "local_delta": { + "1": -1, + "2": 10, + "3": 6, + "4": -10 + }, + "local_profile": { + "1": 2433, + "2": 642, + "3": 292, + "4": 94, + "5": 26, + "8": 8 + }, + "private_names": 86, + "width_inventory": { + "4": 26, + "5": 2, + "7": 65, + "8": 97, + "9": 218 + } + }, + "gauge44": { + "local_delta": { + "1": -1, + "2": 10, + "3": 6, + "4": -10 + }, + "local_profile": { + "1": 2433, + "2": 642, + "3": 292, + "4": 94, + "5": 26, + "8": 8 + }, + "private_names": 86, + "width_inventory": { + "4": 26, + "5": 2, + "7": 65, + "8": 97, + "9": 218 + } + } + }, + "helpers": [ + 249, + 251, + 267 + ], + "idle": { + "1": 19102, + "14": 1, + "2": 106, + "3": 5861, + "48": 27291, + "5": 6215 + }, + "idle_delta": { + "1": 1786, + "2": 106 + }, + "rebound_rows": 2251, + "rebound_rows_sha256": "aa9402b249992f5e3a5ac1da9e7c9bd01bab5342d9e3905cfe456f797b6a7c1c", + "strict_cost_increase": { + "negative_rank": 4, + "positive_rank_mass": 26640, + "saving_domain": "a > 0" + }, + "touched_bins": [ + { + "count": 1786, + "freed": 1, + "old_idle": 0 + }, + { + "count": 106, + "freed": 2, + "old_idle": 0 + } + ] + }, + { + "complete_delta": { + "1": 1120, + "2": 6766, + "3": 3996, + "4": -6660 + }, + "complete_profile": { + "1": 1639480, + "14": 1, + "2": 427678, + "3": 200333, + "4": 62604, + "48": 27291, + "5": 23531, + "8": 5328 + }, + "frames": { + "extra": { + "local_delta": { + "1": -1, + "2": 10, + "3": 6, + "4": -10 + }, + "local_profile": { + "1": 2433, + "2": 642, + "3": 292, + "4": 94, + "5": 26, + "8": 8 + }, + "private_names": 86, + "width_inventory": { + "4": 26, + "5": 2, + "7": 65, + "8": 97, + "9": 218 + } + }, + "gauge44": { + "local_delta": { + "1": -1, + "2": 10, + "3": 6, + "4": -10 + }, + "local_profile": { + "1": 2433, + "2": 642, + "3": 292, + "4": 94, + "5": 26, + "8": 8 + }, + "private_names": 86, + "width_inventory": { + "4": 26, + "5": 2, + "7": 65, + "8": 97, + "9": 218 + } + } + }, + "helpers": [ + 249, + 265, + 267 + ], + "idle": { + "1": 19102, + "14": 1, + "2": 106, + "3": 5861, + "48": 27291, + "5": 6215 + }, + "idle_delta": { + "1": 1786, + "2": 106 + }, + "rebound_rows": 2251, + "rebound_rows_sha256": "90096a33eeef35e1f5e8dfd3d2bacd14f493c46e4e8236084005b8a8f601adae", + "strict_cost_increase": { + "negative_rank": 4, + "positive_rank_mass": 26640, + "saving_domain": "a > 0" + }, + "touched_bins": [ + { + "count": 1786, + "freed": 1, + "old_idle": 0 + }, + { + "count": 106, + "freed": 2, + "old_idle": 0 + } + ] + }, + { + "complete_delta": { + "1": 1114, + "2": 6769, + "3": 3996, + "4": -6660 + }, + "complete_profile": { + "1": 1639474, + "14": 1, + "2": 427681, + "3": 200333, + "4": 62604, + "48": 27291, + "5": 23531, + "8": 5328 + }, + "frames": { + "extra": { + "local_delta": { + "1": -1, + "2": 10, + "3": 6, + "4": -10 + }, + "local_profile": { + "1": 2433, + "2": 642, + "3": 292, + "4": 94, + "5": 26, + "8": 8 + }, + "private_names": 86, + "width_inventory": { + "4": 26, + "5": 2, + "7": 65, + "8": 97, + "9": 218 + } + }, + "gauge44": { + "local_delta": { + "1": -1, + "2": 10, + "3": 6, + "4": -10 + }, + "local_profile": { + "1": 2433, + "2": 642, + "3": 292, + "4": 94, + "5": 26, + "8": 8 + }, + "private_names": 86, + "width_inventory": { + "4": 26, + "5": 2, + "7": 65, + "8": 97, + "9": 218 + } + } + }, + "helpers": [ + 251, + 265, + 267 + ], + "idle": { + "1": 19096, + "14": 1, + "2": 109, + "3": 5861, + "48": 27291, + "5": 6215 + }, + "idle_delta": { + "1": 1780, + "2": 109 + }, + "rebound_rows": 2242, + "rebound_rows_sha256": "943e7e22140921155f3eb939dfbbd46c9866d50f288aa6c9e30c057fabb1ee41", + "strict_cost_increase": { + "negative_rank": 4, + "positive_rank_mass": 26640, + "saving_domain": "a > 0" + }, + "touched_bins": [ + { + "count": 1780, + "freed": 1, + "old_idle": 0 + }, + { + "count": 109, + "freed": 2, + "old_idle": 0 + } + ] + }, + { + "complete_delta": { + "1": 1038, + "2": 6807, + "3": 3996, + "4": -6660 + }, + "complete_profile": { + "1": 1639398, + "14": 1, + "2": 427719, + "3": 200333, + "4": 62604, + "48": 27291, + "5": 23531, + "8": 5328 + }, + "frames": { + "extra": { + "local_delta": { + "1": -2, + "2": 10, + "3": 6, + "4": -10 + }, + "local_profile": { + "1": 2432, + "2": 642, + "3": 292, + "4": 94, + "5": 26, + "8": 8 + }, + "private_names": 86, + "width_inventory": { + "4": 26, + "5": 2, + "7": 66, + "8": 96, + "9": 218 + } + }, + "gauge44": { + "local_delta": { + "1": -2, + "2": 10, + "3": 6, + "4": -10 + }, + "local_profile": { + "1": 2432, + "2": 642, + "3": 292, + "4": 94, + "5": 26, + "8": 8 + }, + "private_names": 86, + "width_inventory": { + "4": 26, + "5": 2, + "7": 66, + "8": 96, + "9": 218 + } + } + }, + "helpers": [ + 249, + 251, + 265, + 267 + ], + "idle": { + "1": 19686, + "14": 1, + "2": 147, + "3": 5861, + "48": 27291, + "5": 6215 + }, + "idle_delta": { + "1": 2370, + "2": 147 + }, + "rebound_rows": 2989, + "rebound_rows_sha256": "6eaa39bf8ee1dcd583df630a3d387c57d6d4d170a9109f9260f4a474eff7e1cb", + "strict_cost_increase": { + "negative_rank": 4, + "positive_rank_mass": 26640, + "saving_domain": "a > 0" + }, + "touched_bins": [ + { + "count": 2370, + "freed": 1, + "old_idle": 0 + }, + { + "count": 147, + "freed": 2, + "old_idle": 0 + } + ] + } + ], + "inputs": { + "research/paired-extension-normal45/allocation/DISPATCH.json": "65e435bd68e97243c003677271b88485a29d4d0fae2dff1354100404a145e74c", + "research/paired-extension-normal45/allocation/FILL.json.gz": "1880caffbea87cf9e946be60528fbc68c119e8e2ff56df9370b6cc373fc50e66", + "research/paired-extension-normal45/allocation/ORDER.json": "519d1d5dbb997a219fcfcad34c0b03e7838bef24199784d7e964fa10090f66e1", + "research/paired-extension-normal45/allocation/PROFILE.json": "c462213fe141f04bdcd680f040bb7f746717265894395b845204f1115e1f904e", + "research/paired-extension-normal45/allocation/PROVIDERS.json": "c20af31dd673bd1f731d4e78b4d2320c3ea6179267f574c170efc4e9c4ef5955", + "research/paired-extension-normal45/allocation/vendor/PLAN.json.gz": "d566cfb87b71639d4138e1f89b543e2dd6a7772070226a2a14c799a6835bf21e", + "research/paired-extension-normal45/allocation/vendor/TEMPLATE.json.gz": "21297b20f1f2dc76eb9dd8124416068c3cb096bab9df17fa4da19bc68dfe082e", + "research/rank7-joint-endframes/data/PARENT-base.json.gz": "54ca34c749e3228d7e2df3d8dbf7aa1568c2872490166997c5962f12fd03da35", + "research/rank7-joint-endframes/data/PARENT-extra.json.gz": "eded756dfe8f411c3d1f80a3ac16516f0ea5dd6f9866728b2179b157630fa7b6", + "research/rank7-joint-endframes/data/STAGE1-FRAME-EDITS.json": "5fbfce004330ebc1fbac8de264614fe295f1a074811b478db4892c3bc3852cd3" + }, + "parent_idle": { + "1": 17316, + "14": 1, + "3": 5861, + "48": 27291, + "5": 6215 + }, + "parent_profile": { + "1": 1638360, + "14": 1, + "2": 420912, + "3": 196337, + "4": 69264, + "48": 27291, + "5": 23531, + "8": 5328 + }, + "provider_calls": { + "extra": 416, + "gauge44": 250 + }, + "replicas": 74, + "roles": 271728, + "scope": "Fixed call/owner/child/port assignment, free within-bin compaction, complete recursive histogram; no native or physical admission.", + "status": "PASS_V45_FROZEN_OWNER_INVOICE" +} diff --git a/research/rank7-v45-frozen-owner-invoice/SOURCES.json b/research/rank7-v45-frozen-owner-invoice/SOURCES.json new file mode 100644 index 0000000000..98cd5c6bc2 --- /dev/null +++ b/research/rank7-v45-frozen-owner-invoice/SOURCES.json @@ -0,0 +1,78 @@ +{ + "schema_version": 1, + "base_commit": "836b19bfa309ceafbc8ee32a15e8c4b10dde7e11", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "b1fea0c94436b236cc2b7d41a7be032811b94c81", + "sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "4450dbbd1d01929022259f523234590f4cce65b9", + "sha256": "ca056a6def333df7afd822c1f34adc2eaa9089b241fc2bdd5803b64066fc9355" + }, + { + "path": "research/paired-extension-normal45/allocation/DISPATCH.json", + "usage": "input", + "git_blob": "9544fee4e6ee1f202cee22bfaeaf229ee3b2515e", + "sha256": "65e435bd68e97243c003677271b88485a29d4d0fae2dff1354100404a145e74c" + }, + { + "path": "research/paired-extension-normal45/allocation/FILL.json.gz", + "usage": "input", + "git_blob": "0bbabf43b2a7b135ed0ca794c305f0fe1baaf4f1", + "sha256": "1880caffbea87cf9e946be60528fbc68c119e8e2ff56df9370b6cc373fc50e66" + }, + { + "path": "research/paired-extension-normal45/allocation/ORDER.json", + "usage": "input", + "git_blob": "7409c4df1092241729739596c7648bda504e6aad", + "sha256": "519d1d5dbb997a219fcfcad34c0b03e7838bef24199784d7e964fa10090f66e1" + }, + { + "path": "research/paired-extension-normal45/allocation/PROFILE.json", + "usage": "input", + "git_blob": "fb42d6d616fdf08c52f71551b8709782ad8c32fa", + "sha256": "c462213fe141f04bdcd680f040bb7f746717265894395b845204f1115e1f904e" + }, + { + "path": "research/paired-extension-normal45/allocation/PROVIDERS.json", + "usage": "input", + "git_blob": "5b60ab9c76a0a3535284e72792e8abcdc159c189", + "sha256": "c20af31dd673bd1f731d4e78b4d2320c3ea6179267f574c170efc4e9c4ef5955" + }, + { + "path": "research/paired-extension-normal45/allocation/vendor/PLAN.json.gz", + "usage": "input", + "git_blob": "7a1db55a4d53ee99280be4f3ab7d29f7b2033adf", + "sha256": "d566cfb87b71639d4138e1f89b543e2dd6a7772070226a2a14c799a6835bf21e" + }, + { + "path": "research/paired-extension-normal45/allocation/vendor/TEMPLATE.json.gz", + "usage": "input", + "git_blob": "114808c32b1799da53524bdc25cea67efb60009e", + "sha256": "21297b20f1f2dc76eb9dd8124416068c3cb096bab9df17fa4da19bc68dfe082e" + }, + { + "path": "research/rank7-joint-endframes/data/PARENT-base.json.gz", + "usage": "input", + "git_blob": "1ca8287d6ae5eb45d87db65b369be8d09ba692b2", + "sha256": "54ca34c749e3228d7e2df3d8dbf7aa1568c2872490166997c5962f12fd03da35" + }, + { + "path": "research/rank7-joint-endframes/data/PARENT-extra.json.gz", + "usage": "input", + "git_blob": "c39913ce24cbce4c841eabcc9b1e5a18e4ccc754", + "sha256": "eded756dfe8f411c3d1f80a3ac16516f0ea5dd6f9866728b2179b157630fa7b6" + }, + { + "path": "research/rank7-joint-endframes/data/STAGE1-FRAME-EDITS.json", + "usage": "input", + "git_blob": "66525d293bd0e615e469b4c2191281e8cafb8788", + "sha256": "5fbfce004330ebc1fbac8de264614fe295f1a074811b478db4892c3bc3852cd3" + } + ] +} diff --git a/research/rank7-v45-frozen-owner-invoice/TASK.json b/research/rank7-v45-frozen-owner-invoice/TASK.json new file mode 100644 index 0000000000..e0beb6e620 --- /dev/null +++ b/research/rank7-v45-frozen-owner-invoice/TASK.json @@ -0,0 +1,166 @@ +{ + "schema_version": 1, + "task_id": "independent-moment", + "priority_revision": 6, + "base_commit": "836b19bfa309ceafbc8ee32a15e8c4b10dde7e11", + "original_card": { + "id": "independent-moment", + "question": "Does one changed supplier or assembly claim lack a source-bound independent check of a specific new implication?", + "starting_points": [ + "certificates/selected-result.json", + "research/rank7-joint-endframes/README.md", + "docs/research/research-family-status.md" + ], + "methods": [ + "Independently reconstruct a coordinated frame/circuit change and its single-change control, then derive the complete rank and physical ledger.", + "Implement certified moment inequalities through a different exact enclosure method." + ], + "acceptance_gate": "Demonstrate independence, source binding, positive cases and semantic failure controls. Name the existing checks and the missing coverage. More digits or another equivalent evaluation of an unchanged root is not by itself new verification coverage.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read #2979 joint rank-7 end-frame proposal and the revision-6 evidence status. Its claimed kappa is not selected. Compare coordinated changes with the losing single-change controls and locate the complete physical ledger; an aggregate moment alone does not validate the mechanism.", + "scope": "Positive control / source-bound orientation only; this is not a new construction or full cold replay." + }, + "first_experiment": "Prioritize a bounded independent audit of #2979: reconstruct one joint group and its single-lowering control, check the declared frames/chronology, then trace changed children, idle widths and cleanup buffers into the complete invoice and both supplier caps. Choose one still-missing implication after checking existing audits. Stop with exact unresolved dependencies if full admission exceeds the session; do not launch a new lowering census on an unvalidated premise or substitute extra root digits for mechanism checking.", + "bottleneck_link": "Independent pricing prevents unsupported frontier claims and can reveal genuine accounting slack.", + "allowed_variations": [ + "Reconstruct either a source ledger or a numeric enclosure with a different method." + ], + "scope_change_triggers": [ + "Importing the primary function and calling its output independent verification.", + "Promoting #2979 from merged source archive to validated supplier solely from author PASS receipts or aggregate pricing." + ], + "overlap_terms": [ + "independent moment", + "rank histogram", + "exact enclosure", + "2979", + "rank7 joint endframes", + "paired extraction", + "joint lowering" + ] + }, + "scope_status": "refined", + "actual_scope": "Certify the complete recursive histogram of all sixteen V45 endpoint subsets on PR2942's fixed call/owner/child/port assignment, granting free within-bin compaction; prove the strict moment sign by exact rank-mass dominance.", + "scope_change_reason": "The revision-6 independent-moment priority calls for tracing a coordinated group through the complete invoice. Live overlap found PR2993 already audits the frame identity; this package instead binds it to the actual parent idle bill. It deliberately audits a frozen assignment rather than PR2979's different final fill.", + "bottleneck_link": "A local rank-saving guide cannot establish a supplier improvement if the actual consumer repays it as small idle children. This audit identifies the exact owner-assignment premise that must change for the V45 gain.", + "budget_minutes": 60, + "stop_rule": "Stop after checking both providers, all 16 endpoint subsets, every source role/bin/window, exact complete histograms and semantic failure controls. Do not launch a packing or lowering search, claim a supplier, or change the selected frontier.", + "outcome": "negative-result", + "evidence": "RESULT.json records 16 complete invoice cases. The joint difference is 1038H1+6807H2+3996H3-6660H4, equal rank mass with every positive rank below four. Therefore its moment difference is strictly positive for every a>0. Seven behavioral groups and registered replay are required.", + "author": "Nick Petalas", + "ai_assistance": "Substantial automated assistance with implementation and verification; no independent human review is claimed.", + "open_questions": [ + { + "question": "Can the published changed owner allocation and native event evidence be joined to an independently checked physical invoice?", + "why_it_matters": "The frozen parent assignment repays the local benefit as H1/H2 idle work, so an admission argument must bind the actual changed packing and its implementation rather than use the local guide.", + "first_step": "Use PR2987's actual final fill and PR3008's helper249/private953 event inventory to bind the remaining native dependencies to storage and precision charges.", + "blocked_by": "Other registers' native/warp dependency closure, physical ownership, precision/tape and inherited supplier/all-size admission." + } + ], + "selection": { + "nonce": "d2e1a1f253beb55b9cf9e0cbb8983781", + "drawn_track": "complex-mechanisms", + "override": "Use revision-6 independent-moment audit for the named complex V45 group; the frame-only result already exists in PR2993." + }, + "coordination": "https://github.com/CrocSwap/integer-mult-bounds/discussions/2612#discussioncomment-18978871", + "upstream_checkpoint": { + "commit": "d8e0f83f00191df62174b641e9fff055c357f641", + "priority_revision": 6, + "checked_at": "2026-10-16T17:41:29.689223+00:00", + "decision": "Preserve the initial scientific baseline 836b19bf. Refreshed AGENTS/autoresearch, current priorities, standing procedure, coordination and priority log were read. Workflow-only changes leave the selected record and all ten live scientific inputs unchanged; continue this scoped task." + }, + "predecessors": [ + { + "pr": 2942, + "head": "a027b0f6fdb0ab2b42ba10fc31b53960166bf2bf", + "role": "Parent literal words and full T74 allocation; Marius-Paul Dumitrean and retained owner/producer lineage" + }, + { + "pr": 2979, + "head": "be191346391661f4d35fc0d1508d0a6029572576", + "role": "Construction record and parent source pins; Marius-Paul Dumitrean and retained lineage" + }, + { + "pr": 2993, + "head": "34a7003866390618b8e8006dc483e7a37a37903f", + "role": "Independent frame-only comparison; Nick Petalas" + }, + { + "pr": 2987, + "head": "02c3047a1e78e6e35e7573c12434ba26f6f9bd96", + "role": "Complementary changed-pattern packing audit; Ross Richardson" + } + ], + "overlap": { + "searched_at": "2026-10-16T17:34:24.205424+00:00", + "coverage": { + "open_prs": { + "fetched_at": "2026-10-16T17:32:04.864161+00:00", + "complete_pagination": true, + "records": 253 + }, + "discussions": { + "fetched_at": "2026-10-16T17:32:52.745215+00:00", + "complete_pagination": true, + "records": 1723 + } + }, + "limitations": "Remote PR scope is open PRs including drafts. Closed work is searched through local READMEs, TASK metadata and ledger only. No code diffs or arbitrary package files are searched. Recheck relevant heads before submission.", + "nearest_prs": [ + 2979, + 2987, + 2993, + 3006, + 3008, + 3010 + ], + "distinction": "Existing audits cover local frame paths, changed-pattern packing, native endpoints and direct events. This result binds the original parent assignment to its full idle invoice and proves its universally losing moment sign.", + "presubmission": { + "searched_at": "2026-10-16T17:41:11.359880+00:00", + "coverage": { + "open_prs": { + "fetched_at": "2026-10-16T17:40:40.978373+00:00", + "complete_pagination": true, + "records": 256 + }, + "discussions": { + "fetched_at": "2026-10-16T17:41:11.198253+00:00", + "complete_pagination": true, + "records": 1726 + } + }, + "warnings": [], + "decision": "No competing frozen-parent complete-idle invoice found in this metadata snapshot. Known local-frame, native and final-pattern audits remain complementary; no claim of exhaustive novelty." + } + }, + "boundary": { + "fixed": "call, provider, helper identity, owner replica, child, port, source availability windows and local scalar operations", + "changed": "the 61 V45 gate frames, a selected subset of four helper end frames, and free offset compaction inside original bins", + "owned_or_borrowed": "408 logical helper roles per call, including arbitrary dirty inputs under inherited semantics; 86 unchanged private cleanup names", + "restoration": "Cleanup syntax is byte-for-byte unchanged; arbitrary dirty restoration and physical execution are inherited obligations, not proved by this frame/invoice audit." + }, + "obligation_ledger": { + "proved": "ten exact input bindings, both local frame invoices, 271728 parent placements, 149184 idle bins, every source window, all16 signed complete recursive histograms and their strict sign for a>0", + "constructive_upper_bound": "within-bin offsets are compacted for free; this is a favorable geometric grant, not a physical relocation implementation", + "unknown": "native/warp semantics, physical movement, ownership/storage admission, precision/tape, all-size/compiler and complete supplier/outer release", + "decision": "narrow and stop at this fixed-assignment obstruction; no dependent search expansion" + }, + "verification_environment": { + "python_primary": "CPython 3.12.15", + "python_secondary": "CPython 3.14.8", + "platform": "macOS-27.0.1-arm64-arm-64bit", + "dependencies": "Python standard library only", + "diagnostics": "Ruff 0.17.1 E4,E7,E9,F,B,I and format check; Python warnings as errors; optimized CLI" + }, + "internal_review": { + "mathematical": "Clean: independently recounted freed bins, all16 signed mass identities and normalization. Native/physical semantics remain outside scope.", + "checker": "No invoice correctness finding. Fixed the corrupt-export test subprocess to use -B, then reran behavioral checks.", + "status": "Internal read-only reviews, not independent human or formal-kernel review." + } +} diff --git a/research/rank7-v45-frozen-owner-invoice/VERIFY.json b/research/rank7-v45-frozen-owner-invoice/VERIFY.json new file mode 100644 index 0000000000..77076e8b02 --- /dev/null +++ b/research/rank7-v45-frozen-owner-invoice/VERIFY.json @@ -0,0 +1,40 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/paired-extension-normal45/allocation/DISPATCH.json", + "research/paired-extension-normal45/allocation/FILL.json.gz", + "research/paired-extension-normal45/allocation/ORDER.json", + "research/paired-extension-normal45/allocation/PROFILE.json", + "research/paired-extension-normal45/allocation/PROVIDERS.json", + "research/paired-extension-normal45/allocation/vendor/PLAN.json.gz", + "research/paired-extension-normal45/allocation/vendor/TEMPLATE.json.gz", + "research/rank7-joint-endframes/data/PARENT-base.json.gz", + "research/rank7-joint-endframes/data/PARENT-extra.json.gz", + "research/rank7-joint-endframes/data/STAGE1-FRAME-EDITS.json" + ], + "commands": [ + { + "argv": [ + "{python}", + "-B", + "-Werror", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Authenticate ten source inputs, independently recount both provider frames, reconstruct every parent owner window/bin, check all 16 complete recursive invoices, and certify strict moment increase by integer rank-mass dominance." + }, + { + "argv": [ + "{python}", + "-B", + "-Werror", + "{package}/test_verify.py" + ], + "timeout_seconds": 120, + "checks": "Seven behavioral groups; semantic geometry/frame/invoice/sign failures, corrupt source export, JSON boundary, and real optimized verifier CLI." + } + ] +} diff --git a/research/rank7-v45-frozen-owner-invoice/decisions.tsv b/research/rank7-v45-frozen-owner-invoice/decisions.tsv new file mode 100644 index 0000000000..54d8e6b34c --- /dev/null +++ b/research/rank7-v45-frozen-owner-invoice/decisions.tsv @@ -0,0 +1,7 @@ +timestamp phase decision reason evidence result +2026-10-16T17:31:41Z orientation Pin canonical main 836b19bfa309ceafbc8ee32a15e8c4b10dde7e11 Start from current priorities priority revision 6; selected kappa 0.001672660197076918 isolated worktree +2026-10-16T17:33:04Z overlap Discard a new V45 frame-only audit PR2993 already covers the exact proposed check 34a7003866390618b8e8006dc483e7a37a37903f; live PR and discussion coverage no duplicate package +2026-10-16T17:35:00Z scope Audit the complete fixed-parent owner invoice Local guide prices do not supply an actual idle tariff PR2993 symbolic identity; PR2942 literal allocation; claim 18978871 scoped independent-moment audit +2026-10-16T17:36:00Z probe Use integer rank-mass comparison instead of numerical root evaluation All positive histogram changes have ranks below the sole negative rank joint delta 1038H1+6807H2+3996H3-6660H4 strict increase for every positive saving +2026-10-16T17:41:29.689223+00:00 review Add -B to corrupt-export subprocess Internal review found bytecode writes outside registered isolation seven behavioral groups; literal output check fix and rerun +2026-10-16T17:41:29.689223+00:00 freshness Retain scientific baseline 836b19bf against main d8e0f83f Workflow-only update; all10 live inputs and selected record unchanged read new guidance and compare exact source paths continue scoped task diff --git a/research/rank7-v45-frozen-owner-invoice/frames.py b/research/rank7-v45-frozen-owner-invoice/frames.py new file mode 100644 index 0000000000..ebe7a2b934 --- /dev/null +++ b/research/rank7-v45-frozen-owner-invoice/frames.py @@ -0,0 +1,156 @@ +# SPDX-License-Identifier: Apache-2.0 +"""Finite frame accountant, using explicit subsets of the nine-bit space. + +The frame/centre tariff conventions are those of Kothe's retained supplier. +No predecessor Python implementation is imported or executed. +""" + +from collections import Counter +from copy import deepcopy +from functools import lru_cache + +HELPERS = (249, 251, 265, 267) +W = (256, 128, 64, 35, 16, 11, 5) +FULL = frozenset(range(512)) + + +def require(ok, message): + if not ok: + raise ValueError(message) + + +def span(generators): + require(len(generators) <= 9, "at most nine frame generators") + require( + all(type(v) is int and 0 <= v < 512 for v in generators), + "nine-bit frame generator", + ) + return cached_span(generators) + + +@lru_cache(maxsize=4096) +def cached_span(generators): + points = {0} + for v in generators: + points |= {x ^ v for x in points} + return frozenset(points) + + +def dimension(space): + return len(space).bit_length() - 1 + + +def recount(word): + require( + word["report"]["v"] == 112 and word["report"]["R"] == 480, "fixed word size" + ) + start = [span((p,)) for p in word["ports"]] + [span(())] * 592 + end = [FULL] * 112 + end += [ + frozenset(x for x in range(512) if (x & p).bit_count() % 2 == 0) + for p in word["ports"] + ] + [FULL] * 480 + for role, frame in word["start_extra"].items(): + start[int(role)] = span(tuple(frame)) + for role, frame in word["helper_final"].items(): + end[int(role)] = span(tuple(frame)) + current, paid = list(start), Counter() + + def climb(role, frame): + require(0 <= role < 704 and current[role] <= frame, "monotone frame climb") + rank = dimension(frame) - dimension(current[role]) + if rank: + paid[rank] += 1 + current[role] = frame + + def step(gate): + if gate[0] == "warp": + old, new = span(tuple(gate[-2])), span(tuple(gate[-1])) + require( + current[gate[1]] == old and len(old) == len(new), "warp frame boundary" + ) + current[gate[1]] = new + else: + require(gate[0] in ("add", "scale"), "known scalar operation") + for role in gate[1:3] if gate[0] == "add" else gate[1:2]: + climb(role, span(tuple(gate[-1]))) + + for section in ("A", "B", "restore"): + require(len(word[section]) <= 10000, "bounded word section") + for gate in word["A"]: + step(gate) + centre_costs(word, current, paid) + warps = {} + require(len(word["warps"]) <= 480, "bounded warp list") + for position, role, _matrix, old, new in word["warps"]: + require(0 <= position <= len(word["B"]), "warp position") + warps.setdefault(position, []).append(["warp", role, old, new]) + for position in range(len(word["B"]) + 1): + for gate in warps.get(position, ()): + step(gate) + if position < len(word["B"]): + step(word["B"][position]) + for gate in word["restore"]: + step(gate) + live = sorted(set(range(704)) - set(word["removed"])) + for role in live: + climb(role, end[role]) + widths = [dimension(end[r]) - dimension(start[r]) for r in live if r >= 224] + require(len(widths) == 408 and min(widths) > 0, "408 positive helper widths") + return paid, widths + + +def centre_costs(word, current, paid): + require(len(word["centers"]) == len(word["center_frames"]) == 8, "eight centres") + require(len(word["cut"]) <= 10000, "bounded centre readout") + for role, frame in zip(word["centers"], word["center_frames"], strict=True): + previous = span(tuple(frame)) + require(current[role] == previous, "centre entrance frame") + levels = { + span(tuple(word["target_levels"].get(str(g[1] - 112), []))) + for g in word["cut"] + if g[2] == role + } + for level in sorted(levels, key=lambda s: (-len(s), tuple(sorted(s)))): + require(level <= previous, "nested centre readout") + rank = dimension(previous) - dimension(level) + if rank: + paid[rank] += 1 + previous = level + + +def v45_word(parent, record, subset): + require(set(subset) <= set(HELPERS), "V45 endpoint subset") + require(record["groups"]["V45"] == [list(W), list(HELPERS)], "V45 source group") + require(len(record["frame_edits"]) == 139, "source edit inventory") + result, edits = deepcopy(parent), 0 + for edit in record["frame_edits"]: + new = span(tuple(edit["new_frame"])) + containing = [ + name + for name, (frame, _) in record["groups"].items() + if new <= span(tuple(frame)) + ] + require(len(containing) == 1, "unique edit group") + if containing[0] != "V45": + continue + section, index = edit["section"], edit["index"] + require( + section in ("B", "restore") and 0 <= index < len(result[section]), + "edit position", + ) + gate = result[section][index] + require( + gate[:-1] == edit["gate"] and gate[-1] == edit["old_frame"], "edit preimage" + ) + old = span(tuple(gate[-1])) + require(new < old and len(old) == 2 * len(new), "codimension-one gate edit") + gate[-1] = list(edit["new_frame"]) + edits += 1 + require(edits == 61, "61 V45 partner edits") + for role in subset: + old = span(tuple(parent["helper_final"][str(role)])) + require(span(W) < old and len(old) == 256, "rank-eight old endpoint") + result["helper_final"][str(role)] = list(W) + require(result["cleanup"] == parent["cleanup"], "unchanged cleanup syntax") + return result diff --git a/research/rank7-v45-frozen-owner-invoice/owners.py b/research/rank7-v45-frozen-owner-invoice/owners.py new file mode 100644 index 0000000000..1c6981d690 --- /dev/null +++ b/research/rank7-v45-frozen-owner-invoice/owners.py @@ -0,0 +1,185 @@ +# SPDX-License-Identifier: Apache-2.0 +"""Source-window and full-bin invoice checks for one frozen assignment. + +The source event conventions follow the retained Tekalign/PR2839 owner model. +Within-bin compaction is granted for free, a favorable geometric relaxation. +""" + +from collections import Counter, defaultdict + +from frames import require + + +def source_windows(template, order): + require( + len(order) == 666 and len(template["execution_schedule"]) <= 64, + "T74 schedule size", + ) + require(len(template["idle_children"]) <= 2016, "bounded idle inventory") + ranks = {} + for child in template["idle_children"]: + key, rank = child["child"], child["rank"] + require(key not in ranks or ranks[key] == rank, "consistent child capacities") + ranks[key] = rank + pairs = {e["stage"]: e["pair"] for e in template["recipe"] if e["kind"] == "local"} + blocks, active = {}, None + for event in template["execution_schedule"]: + kind = event["kind"] + if kind in ("bank_padding_cover_sweep", "translate_every_live_family"): + continue + if kind == "local_cover_sweep": + active = event["stage"] + require(active not in blocks, "unique source stage") + blocks[active] = [] + require(active is not None, "source begins with a local call") + blocks[active].append(event) + require(set(blocks) == set(pairs) == set(range(9)), "nine source stages") + progress, last_touch, windows = [0] * 74, {}, {} + for time, call in enumerate(order): + require( + len(call) == 2 and all(type(v) is int for v in call), "integer call shape" + ) + stage, replica = call + require( + 0 <= replica < 74 and stage == progress[replica], "per-replica chronology" + ) + progress[replica] += 1 + for event in blocks[stage]: + kind = event["kind"] + if kind == "local_cover_sweep": + last_touch[replica, pairs[stage]] = time + elif kind == "bridge": + for pair in (event["src"], event["dst"]): + last_touch[replica, pair] = time + elif kind == "idle_cover_sweep": + require(len(event["child_indices"]) <= 18, "bounded idle event") + for child in event["child_indices"]: + if child in ranks: + require((replica, child) not in windows, "unique idle window") + windows[replica, child] = ( + ranks[child], + last_touch.get((replica, event["pair"]), -1), + time, + ) + else: + require( + kind in ("terminal_Y_translations", "terminal"), + "known source event", + ) + require(progress == [9] * 74 and len(windows) == 74 * 18, "complete source windows") + return windows + + +def check_fill(fill, order, dispatch, plan, windows, widths): + require( + fill["columns"] + == ["time", "helper", "owner_replica", "child", "port", "offset"], + "role columns", + ) + require(len(fill["rows"]) == 666 * 408, "complete role count") + require( + len(dispatch) == 666 and set(dispatch) == set(map(tuple, order)), + "dispatch coverage", + ) + for stage, replica, provider in fill.get("dispatch_overrides", ()): + require(dispatch[stage, replica] == provider, "dispatch override") + seen, families, bins = set(), set(), defaultdict(list) + for row in fill["rows"]: + require(len(row) == 6 and all(type(v) is int for v in row), "integer role row") + time, helper, owner, child, port, offset = row + require( + 0 <= time < 666 and 0 <= helper < 408 and 0 <= port < 112, "role bounds" + ) + require((time, helper) not in seen, "unique call/helper role") + seen.add((time, helper)) + require((owner, child) in windows, "known owner window") + capacity, begin, finish = windows[owner, child] + require(begin < time <= finish, "source availability window") + family = ( + time, + owner, + 2 * plan["pairs"][str(child)] + plan["sides"][str(child)], + port, + ) + require(family not in families, "distinct physical families per call") + families.add(family) + provider = dispatch[tuple(order[time])] + require( + provider in widths and len(widths[provider]) == 408, "bound provider widths" + ) + width = widths[provider][helper] + require(0 <= offset and offset + width <= capacity, "bin capacity") + bins[owner, child, port].append((offset, time, helper, width)) + require(len(seen) == 666 * 408, "every helper at every call") + for rows in bins.values(): + cursor = 0 + for offset, _time, _helper, width in sorted(rows): + require(offset == cursor, "nonoverlapping compact source prefix") + cursor += width + return bins + + +def idle_invoice(bins, windows, lowered): + """Every one of the 149,184 bins is billed, including empty bins.""" + require(set(lowered) <= {25, 27, 41, 43}, "four V45 helper indices") + idle, touched, journal = Counter(), Counter(), [] + for (owner, child), (capacity, _begin, _finish) in sorted(windows.items()): + for port in range(112): + key = (owner, child, port) + rows = sorted(bins.get(key, ())) + used = sum(row[3] for row in rows) + freed = sum(row[2] in lowered for row in rows) + require(0 <= used <= capacity, "source capacity") + cursor = 0 + for _offset, time, helper, width in rows: + new_width = width - (helper in lowered) + require( + new_width > 0 and cursor + new_width <= capacity, + "compacted capacity", + ) + if freed: + journal.append([time, helper, owner, child, port, cursor]) + cursor += new_width + require(cursor == used - freed, "compaction conserves used width") + if cursor < capacity: + idle[capacity - cursor] += 1 + if freed: + touched[capacity - used, freed] += 1 + require( + sum(n * freed for (_old, freed), n in touched.items()) == 666 * len(lowered), + "every freed unit charged", + ) + return idle, touched, journal + + +def complete_profile(idle, local, dispatch): + profile = Counter(idle) + counts = Counter(dispatch.values()) + require(set(counts) == set(local), "all local profiles dispatched") + for provider, number in counts.items(): + for rank, count in local[provider].items(): + profile[rank] += number * count + require(sum(r * n for r, n in profile.items()) == 65088 * 74, "complete rank mass") + return profile + + +def strict_cost_increase(delta): + """Certify sum delta[r]*r**(1-a)>0 for every a>0, by equal rank mass.""" + require( + delta + and all(type(r) is int and type(n) is int and r > 0 for r, n in delta.items()), + "integer histogram delta", + ) + negative = [r for r, n in delta.items() if n < 0] + require(len(negative) == 1, "one negative rank") + top = negative[0] + require( + all(0 < r < top for r, n in delta.items() if n > 0), + "all positive ranks below negative rank", + ) + require(sum(r * n for r, n in delta.items()) == 0, "equal signed rank mass") + return { + "negative_rank": top, + "positive_rank_mass": -top * delta[top], + "saving_domain": "a > 0", + } diff --git a/research/rank7-v45-frozen-owner-invoice/test_verify.py b/research/rank7-v45-frozen-owner-invoice/test_verify.py new file mode 100644 index 0000000000..85c9a10007 --- /dev/null +++ b/research/rank7-v45-frozen-owner-invoice/test_verify.py @@ -0,0 +1,209 @@ +# SPDX-License-Identifier: Apache-2.0 +"""Positive literal replay and semantic controls independent of file checksums.""" + +import json +import shutil +import subprocess +import sys +import tempfile +import unittest +from collections import Counter +from pathlib import Path + +import verify +from frames import HELPERS, recount, span, v45_word +from owners import ( + check_fill, + complete_profile, + idle_invoice, + source_windows, + strict_cost_increase, +) + + +class InvoiceTests(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.root = verify.PACKAGE.parents[1] + ( + _hashes, + cls.data, + cls.parents, + cls.order, + cls.dispatch, + cls.profiles, + cls.windows, + cls.bins, + ) = verify.load_sources(cls.root) + cls.widths = { + provider: recount(word)[1] for provider, word in cls.parents.items() + } + cls.fill = cls.data[verify.ALLOCATION + "FILL.json.gz"] + cls.plan = cls.data[verify.ALLOCATION + "vendor/PLAN.json.gz"] + + def check_rows(self, rows): + return check_fill( + {**self.fill, "rows": rows}, + self.order, + self.dispatch, + self.plan, + self.windows, + self.widths, + ) + + def test_literal_idle_and_joint_invoice(self): + old, _, _ = idle_invoice(self.bins, self.windows, set()) + new, touched, _ = idle_invoice(self.bins, self.windows, {25, 27, 41, 43}) + self.assertEqual(dict(old), {1: 17316, 3: 5861, 5: 6215, 14: 1, 48: 27291}) + self.assertEqual(dict(touched), {(0, 1): 2370, (0, 2): 147}) + self.assertEqual( + verify.clean(verify.difference(new, old)), {"1": 2370, "2": 147} + ) + local, _, _ = verify.frame_variants( + self.parents, + self.data[verify.CONSTRUCTION + "data/STAGE1-FRAME-EDITS.json"], + HELPERS, + ) + before = complete_profile(old, self.profiles, self.dispatch) + after = complete_profile(new, local, self.dispatch) + self.assertEqual( + verify.clean(verify.difference(after, before)), + {"1": 1038, "2": 6807, "3": 3996, "4": -6660}, + ) + + def test_geometric_failure_controls(self): + rows = self.fill["rows"] + with self.assertRaisesRegex(ValueError, "complete role count"): + self.check_rows(rows[:-1]) + key, occupied = next( + (key, entries) + for key, entries in self.bins.items() + if sum(entry[3] for entry in entries) < self.windows[key[:2]][0] + ) + _offset, time, helper, _width = max(occupied) + changed = list(rows) + index = next(i for i, row in enumerate(rows) if row[:2] == [time, helper]) + changed[index] = list(rows[index]) + changed[index][5] += 1 + with self.assertRaisesRegex(ValueError, "nonoverlapping compact source prefix"): + self.check_rows(changed) + with self.assertRaisesRegex(ValueError, "unique call/helper role"): + self.check_rows([rows[0], rows[0], *rows[2:]]) + first = list(rows[0]) + first[2] = 74 + with self.assertRaisesRegex(ValueError, "known owner window"): + self.check_rows([first, *rows[1:]]) + first = list(rows[0]) + first[5] = 49 + with self.assertRaisesRegex(ValueError, "bin capacity"): + self.check_rows([first, *rows[1:]]) + + def test_source_window_and_dispatch_controls(self): + template = self.data[verify.ALLOCATION + "vendor/TEMPLATE.json.gz"] + later = next( + i + for i, (stage, replica) in enumerate(self.order) + if stage == 1 and replica == self.order[0][1] + ) + bad_order = list(self.order) + bad_order[0], bad_order[later] = bad_order[later], bad_order[0] + with self.assertRaisesRegex(ValueError, "per-replica chronology"): + source_windows(template, bad_order) + wrong = dict(self.dispatch) + wrong[tuple(self.order[0])] = "missing" + with self.assertRaisesRegex( + ValueError, "bound provider widths|dispatch override" + ): + check_fill( + self.fill, self.order, wrong, self.plan, self.windows, self.widths + ) + first = list(self.fill["rows"][0]) + first[2:4] = next( + key + for key, (_cap, begin, end) in self.windows.items() + if not begin < first[0] <= end + ) + with self.assertRaisesRegex(ValueError, "source availability window"): + self.check_rows([first, *self.fill["rows"][1:]]) + + def test_actual_frame_controls(self): + record = self.data[verify.CONSTRUCTION + "data/STAGE1-FRAME-EDITS.json"] + parent = self.parents["gauge44"] + child = v45_word(parent, record, HELPERS) + old, _ = recount(parent) + new, _ = recount(child) + self.assertEqual( + verify.clean(verify.difference(new, old)), + {"1": -2, "2": 10, "3": 6, "4": -10}, + ) + child["helper_final"]["249"] = [] + with self.assertRaisesRegex(ValueError, "monotone frame climb"): + recount(child) + stale = {**record, "frame_edits": record["frame_edits"][:-1]} + with self.assertRaisesRegex(ValueError, "source edit inventory"): + v45_word(parent, stale, HELPERS) + self.assertEqual(span((1, 2, 3)), frozenset({0, 1, 2, 3})) + self.assertEqual(span((1,)), frozenset({0, 1})) + with self.assertRaisesRegex(ValueError, "nine-bit"): + span((True,)) + with self.assertRaisesRegex(ValueError, "at most nine"): + span(tuple(range(10))) + + def test_proof_accepts_splitting_and_rejects_reversed_or_unbalanced_claim(self): + self.assertEqual( + strict_cost_increase({1: 2, 2: -1}), + {"negative_rank": 2, "positive_rank_mass": 2, "saving_domain": "a > 0"}, + ) + for false_claim in ({1: -2, 2: 1}, {1: 3, 2: -1}, {1: 2, 2: -3, 4: 1}): + with self.subTest(delta=false_claim), self.assertRaises(ValueError): + strict_cost_increase(false_claim) + idle, _, _ = idle_invoice(self.bins, self.windows, {25, 27, 41, 43}) + bad_idle = Counter(idle) + del bad_idle[48] + with self.assertRaisesRegex(ValueError, "complete rank mass"): + complete_profile(bad_idle, self.profiles, self.dispatch) + + def test_corrupt_export_rejected_and_optimized_cli(self): + with tempfile.TemporaryDirectory() as temporary: + root = Path(temporary) + for name in verify.authenticate(self.root): + target = root / name + target.parent.mkdir(parents=True, exist_ok=True) + shutil.copyfile(self.root / name, target) + path = root / (verify.ALLOCATION + "PROFILE.json") + path.write_bytes(path.read_bytes() + b" ") + bad = subprocess.run( + [ + sys.executable, + "-O", + "-B", + str(verify.PACKAGE / "verify.py"), + "--source-root", + str(root), + ], + capture_output=True, + text=True, + timeout=30, + ) + self.assertNotEqual(bad.returncode, 0) + self.assertIn("source bytes:", bad.stderr) + good = subprocess.run( + [sys.executable, "-O", "-Werror", "-B", str(verify.PACKAGE / "verify.py")], + capture_output=True, + text=True, + timeout=120, + ) + self.assertEqual(good.returncode, 0, good.stderr) + self.assertEqual( + good.stdout, + "PASS_V45_FROZEN_OWNER_INVOICE 16 subsets; strictly higher moment for every a > 0\n", + ) + + def test_json_boundary(self): + self.assertEqual(verify.unique_object([("x", 2)]), {"x": 2}) + with self.assertRaisesRegex(ValueError, "duplicate JSON key"): + json.loads('{"x":1,"x":2}', object_pairs_hook=verify.unique_object) + + +if __name__ == "__main__": + unittest.main() diff --git a/research/rank7-v45-frozen-owner-invoice/verify.py b/research/rank7-v45-frozen-owner-invoice/verify.py new file mode 100644 index 0000000000..67bb22f820 --- /dev/null +++ b/research/rank7-v45-frozen-owner-invoice/verify.py @@ -0,0 +1,235 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +"""Recount V45's complete invoice on PR2942's fixed owner-bin assignment.""" + +import argparse +import gzip +import hashlib +import io +import json +from collections import Counter +from itertools import combinations +from pathlib import Path + +from frames import HELPERS, recount, require, v45_word +from owners import ( + check_fill, + complete_profile, + idle_invoice, + source_windows, + strict_cost_increase, +) + +PACKAGE = Path(__file__).resolve().parent +CONSTRUCTION = "research/rank7-joint-endframes/" +ALLOCATION = "research/paired-extension-normal45/allocation/" + + +def unique_object(pairs): + result = {} + for key, value in pairs: + require(key not in result, "duplicate JSON key") + result[key] = value + return result + + +def read_json(path): + require(path.stat().st_size <= 16 * 1024 * 1024, "raw input size bound") + raw = path.read_bytes() + if raw[:2] == b"\x1f\x8b": + with gzip.GzipFile(fileobj=io.BytesIO(raw)) as stream: + raw = stream.read(64 * 1024 * 1024 + 1) + require(len(raw) <= 64 * 1024 * 1024, "decoded input size bound") + return json.loads(raw, object_pairs_hook=unique_object) + + +def authenticate(root): + sources = read_json(PACKAGE / "SOURCES.json") + inputs = [f for f in sources["files"] if f["usage"] == "input"] + require(len(inputs) == 10, "ten authenticated live inputs") + hashes = {} + for record in inputs: + relative = record["path"] + require( + relative.startswith((CONSTRUCTION, ALLOCATION)) + and ".." not in Path(relative).parts, + "source path", + ) + path = root / relative + require(path.stat().st_size <= 16 * 1024 * 1024, "raw input size bound") + actual = hashlib.sha256(path.read_bytes()).hexdigest() + require(actual == record["sha256"], "source bytes: " + relative) + hashes[relative] = actual + require(len(hashes) == 10, "unique input inventory") + return hashes + + +def clean(counter): + return {str(r): n for r, n in sorted(counter.items()) if n} + + +def difference(after, before): + delta = Counter(after) + delta.subtract(before) + return Counter({r: n for r, n in delta.items() if n}) + + +def frame_variants(parents, edits, subset): + local, widths, records = {}, {}, {} + for provider, parent in parents.items(): + old_profile, old_widths = recount(parent) + word = v45_word(parent, edits, subset) + profile, new_widths = recount(word) + expected = Counter({1: 2 - len(subset), 2: 10, 3: 6, 4: -10}) + require( + difference(profile, old_profile) == difference(expected, {}), + "V45 symbolic frame identity", + ) + live = sorted(set(range(224, 704)) - set(parent["removed"])) + indices = {live.index(h) for h in subset} + require( + new_widths == [v - (i in indices) for i, v in enumerate(old_widths)], + "only selected widths fall", + ) + require( + word["cleanup"] == parent["cleanup"] and len(parent["helper_final"]) == 86, + "86 unchanged private names", + ) + local[provider], widths[provider] = profile, new_widths + records[provider] = { + "local_profile": clean(profile), + "width_inventory": clean(Counter(new_widths)), + "local_delta": clean(difference(profile, old_profile)), + "private_names": 86, + } + return local, widths, records + + +def load_sources(root): + hashes = authenticate(root) + data = {name: read_json(root / name) for name in hashes} + parents = { + provider: data[CONSTRUCTION + "data/PARENT-" + tag + ".json.gz"] + for provider, tag in (("gauge44", "base"), ("extra", "extra")) + } + order = data[ALLOCATION + "ORDER.json"] + raw_dispatch = data[ALLOCATION + "DISPATCH.json"] + require(len(raw_dispatch) == 666, "666 literal provider calls") + dispatch = {(stage, replica): provider for stage, replica, provider in raw_dispatch} + require(len(dispatch) == 666, "unique dispatch calls") + widths, profiles = {}, {} + registry = data[ALLOCATION + "PROVIDERS.json"] + for provider, parent in parents.items(): + profiles[provider], widths[provider] = recount(parent) + require( + clean(profiles[provider]) == parent["report"]["local_profile"], + "parent local report", + ) + require( + widths[provider] == registry[provider]["widths"], + "source helper ordering and widths", + ) + require( + clean(profiles[provider]) == registry[provider]["actual_paid_profile"], + "source paid registry", + ) + live = sorted(set(range(224, 704)) - set(parent["removed"])) + require( + [live.index(h) for h in HELPERS] == [25, 27, 41, 43], "V45 helper ordering" + ) + windows = source_windows(data[ALLOCATION + "vendor/TEMPLATE.json.gz"], order) + bins = check_fill( + data[ALLOCATION + "FILL.json.gz"], + order, + dispatch, + data[ALLOCATION + "vendor/PLAN.json.gz"], + windows, + widths, + ) + return hashes, data, parents, order, dispatch, profiles, windows, bins + + +def run(root): + hashes, data, parents, _order, dispatch, profiles, windows, bins = load_sources( + root + ) + parent_idle, _touched, _journal = idle_invoice(bins, windows, set()) + baseline = complete_profile(parent_idle, profiles, dispatch) + require( + clean(baseline) == data[ALLOCATION + "PROFILE.json"], "complete parent profile" + ) + edits = data[CONSTRUCTION + "data/STAGE1-FRAME-EDITS.json"] + cases = [] + for size in range(5): + for subset in combinations(HELPERS, size): + local, _widths, frame_records = frame_variants(parents, edits, subset) + indices = { + dict(zip(HELPERS, (25, 27, 41, 43), strict=True))[h] for h in subset + } + idle, touched, journal = idle_invoice(bins, windows, indices) + profile = complete_profile(idle, local, dispatch) + delta = difference(profile, baseline) + proof = strict_cost_increase(delta) + require( + all(old == 0 and freed in (1, 2) for old, freed in touched), + "only full source bins, at most two freed units", + ) + payload = json.dumps(journal, separators=(",", ":")).encode() + cases.append( + { + "helpers": list(subset), + "frames": frame_records, + "idle": clean(idle), + "idle_delta": clean(difference(idle, parent_idle)), + "complete_profile": clean(profile), + "complete_delta": clean(delta), + "strict_cost_increase": proof, + "touched_bins": [ + {"old_idle": old, "freed": freed, "count": n} + for (old, freed), n in sorted(touched.items()) + ], + "rebound_rows": len(journal), + "rebound_rows_sha256": hashlib.sha256(payload).hexdigest(), + } + ) + require(len(cases) == 16, "all endpoint subsets") + require( + cases[-1]["complete_delta"] == {"1": 1038, "2": 6807, "3": 3996, "4": -6660}, + "joint full invoice", + ) + require(authenticate(root) == hashes, "no input drift") + return { + "status": "PASS_V45_FROZEN_OWNER_INVOICE", + "inputs": hashes, + "parent_idle": clean(parent_idle), + "parent_profile": clean(baseline), + "calls": 666, + "roles": 271728, + "bins": 149184, + "replicas": 74, + "provider_calls": dict(sorted(Counter(dispatch.values()).items())), + "cases": cases, + "scope": "Fixed call/owner/child/port assignment, free within-bin compaction, complete recursive histogram; no native or physical admission.", + } + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument( + "--emit", action="store_true", help="print fresh deterministic evidence" + ) + parser.add_argument("--source-root", type=Path, default=PACKAGE.parents[1]) + args = parser.parse_args() + result = run(args.source_root.resolve()) + if args.emit: + print(json.dumps(result, indent=2, sort_keys=True)) + else: + require( + result == read_json(PACKAGE / "RESULT.json"), + "committed evidence matches replay", + ) + print(result["status"], "16 subsets; strictly higher moment for every a > 0") + + +if __name__ == "__main__": + main()