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/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") diff --git a/research/p104-original74-courier226/LICENSE b/research/p104-original74-courier226/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/research/p104-original74-courier226/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/research/p104-original74-courier226/NOTICE b/research/p104-original74-courier226/NOTICE new file mode 100644 index 0000000000..46ceb0397a --- /dev/null +++ b/research/p104-original74-courier226/NOTICE @@ -0,0 +1,3 @@ +Apache License 2.0. Clear1nsight prepared the 226/990 transfer to #7645 and its verification package with substantial OpenAI Codex assistance. ChatGPT Pro contributed the legal order mutation and reviewed the algebra on public references. + +DreamingOfClouds introduced the 226/990 funded-return construction in #7617 at 12f6626e194808fa38f473a3e84b2f81e169e3d3 on SYLforge's #7616 W2 predecessor. #7645 supplied the exact original-74 joint role-46 word. ToikY supplied the #7644 baseline and much of its application. DreamingOfClouds supplied #7611, Clear1nsight supplied #7612, Ali Romman and Hao Yan contributed #7605/#7604 and the original protected interface, and Rohan Arun supplied the signed #7113 caller. PREDECESSOR-NOTICE and the notices embedded with the pinned application retain the original contributor and license statements. diff --git a/research/p104-original74-courier226/PREDECESSOR-NOTICE b/research/p104-original74-courier226/PREDECESSOR-NOTICE new file mode 100644 index 0000000000..248e6d3c44 --- /dev/null +++ b/research/p104-original74-courier226/PREDECESSOR-NOTICE @@ -0,0 +1,23 @@ +Apache-2.0. ToikY, with substantial OpenAI Codex assistance. +The following notice describes the retained #7644 source; its statement +that role 46 is unchanged applies to #7644, not this successor. +DreamingOfClouds with Claude Opus 5.5 authored the two contractions and +coupled scalar repair in PR7611. This package extracts that component on +Ali Romman's original PR7605 protected erasure rows. Role 46 is unchanged. +SYLforge's PR7616 W1 previously transplanted the larger PR7611/PR7612 family +onto uncollapsed PR7605 and W2 added stationary lifetimes. +Hao Yan (FanPUYen), SYLforge, DreamingOfClouds, ToikY and Clear1nsight +contributed the retained native construction. Rohan Arun supplied the +signed PR7113 caller. All retained source authors keep the attribution and +license in their original files, including the complete predecessor NOTICE +at retained/pr7605/NOTICE. The independent verifier and adapted complete +application are supplied for review under the repository Apache-2.0 license. + +This successor combines DreamingOfClouds' #7611 role-46 premix and local +corrections with ToikY's #7644 strict-original-erasure word. SYLforge's +#7616 W1/W2 ported a larger family; those contributions and all retained +notices remain credited. Ali Romman contributed #7605 and the original +protected interface; Rohan Arun contributed the #7113 signed caller. The +packaging and adaptation were prepared by Clear1nsight with substantial +OpenAI Codex assistance. The two separately retained source blobs and the +remainder archive preserve their original bytes and embedded notices. diff --git a/research/p104-original74-courier226/PROOF.md b/research/p104-original74-courier226/PROOF.md new file mode 100644 index 0000000000..4c07f0be7a --- /dev/null +++ b/research/p104-original74-courier226/PROOF.md @@ -0,0 +1,36 @@ +# The 226/990 courier on the original 74 erasures + +## Word and protected interface + +All clocks below are zero-based positions in the 76,673-event source from [#7645](https://github.com/CrocSwap/integer-mult-bounds/pull/7645), head `8ee7e6869b57ce445dbebd1d720366eab1f8ca40`. Its decoded SHA-256 is `6c52b2fba7c20343a50cb92ed4b997aa9921c78f212ac6428d13fff2bcd014cf`. The candidate has the same length and decodes to `450c7e544efb5258c4b8b4858b49cbd7482d14f206cdda1a71833fc73343ac66`. The expected bytes are checked after reconstruction from pinned source. Unchanged headers bind the 1,501 public registers, 68 owned register labels, start and end charts, and fixed target/caller interface. + +[#7617](https://github.com/CrocSwap/integer-mult-bounds/pull/7617), by DreamingOfClouds, proposed two couriers on SYLforge’s 113-lifetime #7616 word. This package transfers the 226/990 courier to the original 74-erasure word. The earlier #7645 joint main-46 and 82/185 corrections remain part of the source. The distinct 134/329 experiment announced by #7647 remains under its own coordination. + +## Literal edits + +| Source location | Candidate operation | +|---|---| +| After 41465, before 990 leaves 719 at 41466 | Keep the subtraction of the old 473 from 990 first. Advance the original 41470 MOVE of 226 from 260 to 719 and its 41471 addition to 473. Then subtract 226 from 990. | +| 41467 | Retain the addition of half of 931 into 990 at 907. | +| 43515–43517 | Retain the addition of half of 990 into 166. Delete the 719→907 MOVE of 226 and the subtraction of half of 226 from 166. | +| 45736–45740 | Preserve the unrelated MOVE of 1477. Before 1477 reads 226, move 990 from 907 to 127, move 226 directly from 719 to 127, and add 226 back into 990. Keep both original reads at 127 in order. | + +The script checks each replaced event, including its chart, sign and operands. The combined edit map reconstructs the same candidate separately in the #7605 coordinates used by the native application. It preserves the charged source paths and their attributions. + +## Arbitrary-input identity + +Let $X$ be the value in 226. Let $Y$ and $Z$ be the initial values in 990 and 473 at the contact at 719. Write $Q=Y-Z+R$, where $R$ is the later contribution of half of 931. The initial subtraction uses the old $Z$ in both words. Upon completion of the advanced corrections, 473 has the same value $Z+X$ and 990 carries $Q-X$ at the consumer in the successor. The source carries $Q$ there. If 166 initially contains $W$, its source adds $Q/2$ and then subtracts $X/2$. Its candidate adds $(Q-X)/2$ once. The source’s intervening MOVE has no scalar read of 166. At 127 the candidate restores 990 to $Q$ before its next sensitive read. Register 226 carries its original $X$ throughout. + +The early write to 473, encoded interval in 990, and interval between the source’s two writes to 166 each require their own observation check. Literal co-location, all 630 ordered private or COPY observations, all 74 ordered erased values and every final public input coefficient are checked against the pinned word. The separate rational interpreter reconstructs register trajectories and labels from the two words without consuming the constructor’s alignment map. + +A price-preserving control reverses the order of the read of old 473 and its update by 226, with both operands cocharted. It leaves the full invoice, all 74 erasures and all 630 protected observations equal. It changes 65 public rows. On unit input 2, the coefficient of output 17 changes from 0 to 4. The separate wrong-sign control changes that coefficient from 0 to −8. Decoding before the courier arrives fails chart legality. [Ordering control receipt](independent/ordering-control.json) + +## Complete moment and ceiling + +The old 719→907→127 route has dimension increments 1 and 2. The direct 719→127 transition has increment 3. The signed 17-call paid histogram therefore changes by $-17$ at rank 1, $-17$ at rank 2 and $+17$ at rank 3. The full application derives the histogram from the actual word and caller. Paid positions fall from 110,298 to 110,281, with 22,461 productive positions and the other invoice terms fixed. Strict subadditivity gives $3^t<1+2^t$ for every $0=Q(reference[\"raw_bracket\"][0]):\n tested=claim+(tested-claim)/10", + "old": "tested=claim+Q(7,10**17)" + }, + { + "file": "check_odd_partial_admission.py", + "new": "g=gate(invoice,claim,tested,*bracket,r[\"gate\"][\"BIT_pin\"])\ntry:\n gate(invoice,claim,Q(bracket[0]),*bracket,r[\"gate\"][\"BIT_pin\"])\nexcept AssertionError:\n crossing_probe_rejected=True\nelse:\n raise AssertionError(\"Probe at lower crossing unexpectedly accepted\")", + "old": "g=gate(invoice,claim,tested,*bracket,r[\"gate\"][\"BIT_pin\"])" + }, + { + "file": "check_odd_partial_admission.py", + "new": "\"crossing_probe_rejected\":crossing_probe_rejected,\"scope\":\"Fresh complete changed-native arbitrary-input adjoint;", + "old": "\"scope\":\"Reuse exact same native word all-column adjoint;" + }, + { + "file": "check_odd_precision.py", + "new": "patch('(life, peak, owned_count) == (54, 43, 51)','(life, peak, owned_count) == (74, 50, 68)')\nenv=ModuleType(\"short_envelope\")", + "old": "env=ModuleType(\"short_envelope\")" + }, + { + "file": "check_odd_precision.py", + "new": "", + "old": "previous=json.loads((root/\"SHORT-PRECISION.json\").read_text())" + }, + { + "file": "check_odd_precision.py", + "new": "assert grid_receipt[\"caller_sha256\"]==sha256(cpath.read_bytes()).hexdigest()", + "old": "assert previous[\"native_sha256\"]==sha and grid_receipt[\"caller_sha256\"]==sha256(cpath.read_bytes()).hexdigest()" + }, + { + "file": "check_odd_precision.py", + "new": "wg=grid.word_run(w, frac=25)\nwp,wr=env.native_envelope(w)\nwg=json.loads(json.dumps(wg,default=str));wr=json.loads(json.dumps(wr,default=str))\nassert wg==r[\"precision\"][\"word\"] and wr==r[\"precision\"][\"rounded_native\"], \"Fresh changed-native grid and envelope\"", + "old": "wg=previous[\"native_grid\"]\nwr=previous[\"rounded_native\"]\nwp={key:(Q(v[\"exact\"]),v[\"witness\"]) for key,v in wr[\"bounds\"].items()}" + } + ] + }, + "assumptions": [ + "native_all_columns", + "owned_erasure", + "compiler", + "precision_tape", + "analytic_recovery" + ], + "caller_sha256": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "catalogue": [ + { + "catalogue_digest": "905f2b9f34848f81e234c231654e9f54844293937715eae9e0d59b688dc061e2", + "catalogue_size": 3044, + "checked_maps": 1000, + "distinct_helper_maps": 187, + "distinct_paid_maps": 2959, + "exact_recipe_digest": "e35fd04bcac592917873c53ae0e96a92258b419c0508a8283bfbb4ab81cf5cc6", + "main_boundary_digest": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "main_boundary_pairs": 0, + "phase_control_rejected": true, + "scope": "Complete signed Pauli action plus exact Gaussian global phase; for Clifford maps these determine every matrix column. Generic tensor-product and physical grammar application is written in the review. No random-field substitution.", + "slice_start": 0, + "slice_stop": 1000, + "status": "PASS_CURRENT_NATIVE_CATALOGUE_SLICE", + "word_sha256": "3ac422ca8381ab132c10329389585c7a36519bb8989cf659dfdd37543613d1cf" + }, + { + "catalogue_digest": "905f2b9f34848f81e234c231654e9f54844293937715eae9e0d59b688dc061e2", + "catalogue_size": 3044, + "checked_maps": 1000, + "distinct_helper_maps": 187, + "distinct_paid_maps": 2959, + "exact_recipe_digest": "50810ee0c92b6c83c147c7ebfab7cac82e9a128e61fe2cb7771478c6f9777cd1", + "main_boundary_digest": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "main_boundary_pairs": 0, + "phase_control_rejected": true, + "scope": "Complete signed Pauli action plus exact Gaussian global phase; for Clifford maps these determine every matrix column. Generic tensor-product and physical grammar application is written in the review. No random-field substitution.", + "slice_start": 1000, + "slice_stop": 2000, + "status": "PASS_CURRENT_NATIVE_CATALOGUE_SLICE", + "word_sha256": "3ac422ca8381ab132c10329389585c7a36519bb8989cf659dfdd37543613d1cf" + }, + { + "catalogue_digest": "905f2b9f34848f81e234c231654e9f54844293937715eae9e0d59b688dc061e2", + "catalogue_size": 3044, + "checked_maps": 1000, + "distinct_helper_maps": 187, + "distinct_paid_maps": 2959, + "exact_recipe_digest": "50ad013a47baedd59dc3f883c4abc9c0604325728bce9e1d2c51daaf3b7b0eb1", + "main_boundary_digest": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "main_boundary_pairs": 0, + "phase_control_rejected": true, + "scope": "Complete signed Pauli action plus exact Gaussian global phase; for Clifford maps these determine every matrix column. Generic tensor-product and physical grammar application is written in the review. No random-field substitution.", + "slice_start": 2000, + "slice_stop": 3000, + "status": "PASS_CURRENT_NATIVE_CATALOGUE_SLICE", + "word_sha256": "3ac422ca8381ab132c10329389585c7a36519bb8989cf659dfdd37543613d1cf" + }, + { + "catalogue_digest": "905f2b9f34848f81e234c231654e9f54844293937715eae9e0d59b688dc061e2", + "catalogue_size": 3044, + "checked_maps": 44, + "distinct_helper_maps": 187, + "distinct_paid_maps": 2959, + "exact_recipe_digest": "931e60281a505df75887c623abe050b912388a21b90b457a03402723c1d3c1cd", + "main_boundary_digest": "ad959887c990b8862a0e60db3f53d5195a1c9d667c1593f0101adc8db18f27fa", + "main_boundary_pairs": 104, + "phase_control_rejected": true, + "scope": "Complete signed Pauli action plus exact Gaussian global phase; for Clifford maps these determine every matrix column. Generic tensor-product and physical grammar application is written in the review. No random-field substitution.", + "slice_start": 3000, + "slice_stop": 3044, + "status": "PASS_CURRENT_NATIVE_CATALOGUE_SLICE", + "word_sha256": "3ac422ca8381ab132c10329389585c7a36519bb8989cf659dfdd37543613d1cf" + } + ], + "checks": { + "ODD-8X9-APPLICATION-CHECKS.json": { + "assumptions": [ + "native_all_columns", + "owned_erasure", + "compiler", + "precision_tape", + "analytic_recovery" + ], + "caller_sha256": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "candidate": "1826211905933/500000000000000", + "catalogue": [ + { + "catalogue_digest": "905f2b9f34848f81e234c231654e9f54844293937715eae9e0d59b688dc061e2", + "catalogue_size": 3044, + "checked_maps": 1000, + "distinct_helper_maps": 187, + "distinct_paid_maps": 2959, + "exact_recipe_digest": "e35fd04bcac592917873c53ae0e96a92258b419c0508a8283bfbb4ab81cf5cc6", + "log_sha256": "d77d9a8976c4868f86be5014dd617f599f8decd18f2fc3f7d2425235394d0586", + "main_boundary_digest": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "main_boundary_pairs": 0, + "phase_control_rejected": true, + "scope": "Complete signed Pauli action plus exact Gaussian global phase; for Clifford maps these determine every matrix column. Generic tensor-product and physical grammar application is written in the review. No random-field substitution.", + "slice_start": 0, + "slice_stop": 1000, + "status": "PASS_CURRENT_NATIVE_CATALOGUE_SLICE", + "word_sha256": "3ac422ca8381ab132c10329389585c7a36519bb8989cf659dfdd37543613d1cf" + }, + { + "catalogue_digest": "905f2b9f34848f81e234c231654e9f54844293937715eae9e0d59b688dc061e2", + "catalogue_size": 3044, + "checked_maps": 1000, + "distinct_helper_maps": 187, + "distinct_paid_maps": 2959, + "exact_recipe_digest": "50810ee0c92b6c83c147c7ebfab7cac82e9a128e61fe2cb7771478c6f9777cd1", + "log_sha256": "00c2d96d1d6d1f11e789786befa5ebb1fcc9e66f975f601c1921136d41d8bcdb", + "main_boundary_digest": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "main_boundary_pairs": 0, + "phase_control_rejected": true, + "scope": "Complete signed Pauli action plus exact Gaussian global phase; for Clifford maps these determine every matrix column. Generic tensor-product and physical grammar application is written in the review. No random-field substitution.", + "slice_start": 1000, + "slice_stop": 2000, + "status": "PASS_CURRENT_NATIVE_CATALOGUE_SLICE", + "word_sha256": "3ac422ca8381ab132c10329389585c7a36519bb8989cf659dfdd37543613d1cf" + }, + { + "catalogue_digest": "905f2b9f34848f81e234c231654e9f54844293937715eae9e0d59b688dc061e2", + "catalogue_size": 3044, + "checked_maps": 1000, + "distinct_helper_maps": 187, + "distinct_paid_maps": 2959, + "exact_recipe_digest": "50ad013a47baedd59dc3f883c4abc9c0604325728bce9e1d2c51daaf3b7b0eb1", + "log_sha256": "83f7fa9cf7efab45025cd5cdf021b0011726afc83bbdc36f7fe13467bd692c12", + "main_boundary_digest": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945", + "main_boundary_pairs": 0, + "phase_control_rejected": true, + "scope": "Complete signed Pauli action plus exact Gaussian global phase; for Clifford maps these determine every matrix column. Generic tensor-product and physical grammar application is written in the review. No random-field substitution.", + "slice_start": 2000, + "slice_stop": 3000, + "status": "PASS_CURRENT_NATIVE_CATALOGUE_SLICE", + "word_sha256": "3ac422ca8381ab132c10329389585c7a36519bb8989cf659dfdd37543613d1cf" + }, + { + "catalogue_digest": "905f2b9f34848f81e234c231654e9f54844293937715eae9e0d59b688dc061e2", + "catalogue_size": 3044, + "checked_maps": 44, + "distinct_helper_maps": 187, + "distinct_paid_maps": 2959, + "exact_recipe_digest": "931e60281a505df75887c623abe050b912388a21b90b457a03402723c1d3c1cd", + "log_sha256": "47d8aee875de39cbac85db6f4aed24e3521f117e827b29f0dd4c7eccbad25764", + "main_boundary_digest": "ad959887c990b8862a0e60db3f53d5195a1c9d667c1593f0101adc8db18f27fa", + "main_boundary_pairs": 104, + "phase_control_rejected": true, + "scope": "Complete signed Pauli action plus exact Gaussian global phase; for Clifford maps these determine every matrix column. Generic tensor-product and physical grammar application is written in the review. No random-field substitution.", + "slice_start": 3000, + "slice_stop": 3044, + "status": "PASS_CURRENT_NATIVE_CATALOGUE_SLICE", + "word_sha256": "3ac422ca8381ab132c10329389585c7a36519bb8989cf659dfdd37543613d1cf" + } + ], + "fixed_tape_counts": { + "H": 16548000000000000000000, + "Kstar_bits": 14093, + "actual_ambient": 145, + "caller_odd_scale": 675, + "caller_sha256": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "common_grid": { + "fractional": "p+D", + "signed_width": "p+h+2D+3", + "temp_padding": 26 + }, + "compiler_ambient_cap": 153, + "context_bound_bits": 14104, + "context_c": 2430, + "elementary_records_per_map_upper": 85264, + "elementary_records_upper": 25436979648, + "log_power": 2242, + "max_scalar_numerator_bits": 24, + "monomial_map_slots": 298332, + "native_invocations": 17, + "native_sha256": "450c7e544efb5258c4b8b4858b49cbd7482d14f206cdda1a71833fc73343ac66", + "owned_banks_per_raw_occurrence": 1156, + "scalar_macro_inputs": { + "caller": 117856, + "conversions": 58522, + "native": 1196936 + }, + "scalar_services_upper": 43946048, + "scalar_steps_coefficient": 46080771227648, + "scope": "Exact finite-cost and common-format substitutions in the selected #7000 conditional application proof, using the conservative primitive movement and scalar constants there. The premise is the complete signed native/physical binding and retained compiler, BIT, stock, and outer contracts. This script counts the raw occurrence, not an enumerated top-level compiled multiplier.", + "tested_claim": "1826211905933/500000000000000" + }, + "native_archive_sha256": "3ac422ca8381ab132c10329389585c7a36519bb8989cf659dfdd37543613d1cf", + "native_canonical_sha256": "450c7e544efb5258c4b8b4858b49cbd7482d14f206cdda1a71833fc73343ac66", + "numeric_gate": { + "BIT_margin": "11426618813393/100000000000000000", + "BIT_pin": "376669/100000000", + "H": "16548000000000000000000", + "alpha": [ + 0.9999999999999992, + 0.9999999999999992 + ], + "claim": "1826211905933/500000000000000", + "compiler_gap": "1/100000000000000000", + "delta": [ + 0.908150211760023, + 0.908150211760023 + ], + "derivative_upper": -380892.3710594304, + "gamma": [ + 0.9410036085012365, + 0.9410036085012365 + ], + "input_lift": { + "derivative_upper_on_required_interval": "-2299831290525933154178526076272396899996972093654613095735772838275432653960006518819/2500000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "interval_kappa_cap": "376669/100000000", + "margins": { + "1826211905933/500000000000000": [ + "4984088387862564965853172939530528379832174370482587991696775132292845597961/4000000000000000000000000000000000000000000000000000000000000000000000000000000", + "124602209696564124146329323488263209495804359262064699792419378307321139951001/100000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "365242381186607/100000000000000000": [ + "31150552424141602522394620162965432720944643418490138682987422844234381655127/25000000000000000000000000000000000000000000000000000000000000000000000000000000", + "124602209696566410089578480651861730883778573673960554731949691376937526622459/100000000000000000000000000000000000000000000000000000000000000000000000000000000" + ] + }, + "source_BIT_wide_crude_bound_would_be": "-2299831290525933154178526076272396899996972093654613095735772838275432653960006518819/2500000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + }, + "minimum_log_power": 2241, + "moment_margin_float": { + "365242381186607/100000000000000000": [ + 2.3015347068312003e-10, + 2.3015347068312003e-10 + ], + "36524238118666647796962230370563/10000000000000000000000000000000000": [ + 3.250569181449084e-29, + 3.250569181449084e-29 + ], + "9131059529666661949240557592641/2500000000000000000000000000000000": [ + -6.1898911290153974e-30, + -6.1898911290153974e-30 + ] + }, + "moment_margins": { + "365242381186607/100000000000000000": [ + "2876918383539000202858465405213802893459194825951593160023886817299327/12500000000000000000000000000000000000000000000000000000000000000000000000000000", + "4603069413662400324573544648342084629534711721522549056038218915450067/20000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "36524238118666647796962230370563/10000000000000000000000000000000000": [ + "1625284590724541972308329561921447746783433357045337/50000000000000000000000000000000000000000000000000000000000000000000000000000000", + "1625284590724541972308329561921447746783433376397279/50000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "9131059529666661949240557592641/2500000000000000000000000000000000": [ + "-38686819556346231869736710780931819506971386651117/6250000000000000000000000000000000000000000000000000000000000000000000000000000", + "-123797822580307941983157474498981822422308429557531/20000000000000000000000000000000000000000000000000000000000000000000000000000000" + ] + }, + "outer": { + "BIT_just_below_effective_rejected": true, + "functional_count": 4, + "minimum_margin": "1/1000000000000000000", + "strict_count": 54 + }, + "raw_bracket": [ + "36524238118666647796962230370563/10000000000000000000000000000000000", + "9131059529666661949240557592641/2500000000000000000000000000000000" + ], + "tested": "365242381186607/100000000000000000", + "written_log_power": 2242 + }, + "physical_binding": { + "ambient": 145, + "complete_paid_position_digest": "fa39be465c251c82b86ca4cd1937f076f544e30c1594f9bc036c9b58635a58ce", + "fresh_helpers": 18717, + "idle_uses": 3392, + "lambda_uses": 11280, + "native_calls": 17, + "native_contact_boundaries": 13600, + "native_public": 1501, + "nonzero_boundary_translations": 13600, + "paid": { + "1": 68197, + "16": 416, + "2": 14382, + "24": 416, + "3": 14093, + "32": 416, + "4": 3791, + "40": 416, + "48": 416, + "5": 5865, + "56": 416, + "6": 289, + "64": 208, + "7": 187, + "8": 741, + "9": 32 + }, + "paid_positions": 110281, + "phase_record_digest": "586ab7499fb677afdd83c397ea0b6d3b25f73ea6cdfa1ec95dd68adccff935ad", + "productive_fields": 22461, + "query_uses": 384, + "rank_surplus": 1424, + "reserved_native_banks": 1156, + "reserved_serial_query_lambda_bank": 1, + "targets": { + "1": 306, + "137": 208, + "17": 416, + "2": 357, + "25": 416, + "3": 799, + "33": 416, + "4": 3825, + "41": 416, + "49": 416, + "5": 1360, + "57": 416, + "6": 731, + "65": 416, + "7": 323, + "73": 208, + "8": 544, + "9": 10888 + } + }, + "scope": "Conditional component application to the exact 8+9 source with the selected completed BIT predecessor and inherited five assumptions. Checks every normalized endpoint, every paid/helper nested chart map up to exact signed Pauli and absolute phase, caller occurrence/phase, precision, finite scalar and route bounds, and numeric gates. Does not run a compiled Turing machine, select an upstream frontier, or claim human/formal review.", + "source_unit_ordinary": { + "all_caller_scalar_surcharge": 2248928, + "caller_items": { + "A": { + "envelope": 102076416, + "field_boundary": 89856, + "fused_routes": 0, + "idle_routes": 170112000, + "output_routes": 213120000, + "query_routes": 1152000, + "thin": 6144 + }, + "B": { + "envelope": 35730432, + "field_boundary": 7488, + "fused_routes": 1168000, + "idle_routes": 18016000, + "output_routes": 17760000, + "query_routes": 0, + "thin": 0 + } + }, + "caller_total": 559238336, + "charged_caller_odd_conversions": 479232, + "conservative_total": 782629172, + "init_clear_allowance": 296, + "lambda_paid_rank1_would_reduce_S_by": 11280, + "lambda_second_charge": 11280000, + "margin_to_billion": 217370828, + "odd_divisions": { + "ADD": 5830, + "SCALE": 71 + }, + "per_input_conversion": 2653768, + "raw_upper": 765967244, + "route_items": { + "first_main_adapter": 416, + "first_main_boundary": 208, + "helper_boundary": 2202, + "moves": 6265, + "owned_lifetime": 296, + "second_main_adapter": 384, + "second_main_boundary": 192 + }, + "routing": 9963000, + "scalar_upper": 2197524 + }, + "status": "PASS_8X9_EXACT_COMPONENT_APPLICATION_CHECKS" + }, + "ODD-ADMISSION-PARTIAL.json": { + "caller_sha256": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "compiler_outer": { + "BIT_margin": "11426618813393/100000000000000000", + "BIT_pin": "376669/100000000", + "H": "16548000000000000000000", + "alpha": [ + 0.9999999999999992, + 0.9999999999999992 + ], + "claim": "1826211905933/500000000000000", + "compiler_gap": "1/100000000000000000", + "delta": [ + 0.908150211760023, + 0.908150211760023 + ], + "derivative_upper": -380892.3710594304, + "gamma": [ + 0.9410036085012365, + 0.9410036085012365 + ], + "input_lift": { + "derivative_upper_on_required_interval": "-2299831290525933154178526076272396899996972093654613095735772838275432653960006518819/2500000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "interval_kappa_cap": "376669/100000000", + "margins": { + "1826211905933/500000000000000": [ + "4984088387862564965853172939530528379832174370482587991696775132292845597961/4000000000000000000000000000000000000000000000000000000000000000000000000000000", + "124602209696564124146329323488263209495804359262064699792419378307321139951001/100000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "365242381186607/100000000000000000": [ + "31150552424141602522394620162965432720944643418490138682987422844234381655127/25000000000000000000000000000000000000000000000000000000000000000000000000000000", + "124602209696566410089578480651861730883778573673960554731949691376937526622459/100000000000000000000000000000000000000000000000000000000000000000000000000000000" + ] + }, + "source_BIT_wide_crude_bound_would_be": "-2299831290525933154178526076272396899996972093654613095735772838275432653960006518819/2500000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + }, + "minimum_log_power": 2241, + "moment_margin_float": { + "365242381186607/100000000000000000": [ + 2.3015347068312003e-10, + 2.3015347068312003e-10 + ], + "36524238118666647796962230370563/10000000000000000000000000000000000": [ + 3.250569181449084e-29, + 3.250569181449084e-29 + ], + "9131059529666661949240557592641/2500000000000000000000000000000000": [ + -6.1898911290153974e-30, + -6.1898911290153974e-30 + ] + }, + "moment_margins": { + "365242381186607/100000000000000000": [ + "2876918383539000202858465405213802893459194825951593160023886817299327/12500000000000000000000000000000000000000000000000000000000000000000000000000000", + "4603069413662400324573544648342084629534711721522549056038218915450067/20000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "36524238118666647796962230370563/10000000000000000000000000000000000": [ + "1625284590724541972308329561921447746783433357045337/50000000000000000000000000000000000000000000000000000000000000000000000000000000", + "1625284590724541972308329561921447746783433376397279/50000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "9131059529666661949240557592641/2500000000000000000000000000000000": [ + "-38686819556346231869736710780931819506971386651117/6250000000000000000000000000000000000000000000000000000000000000000000000000000", + "-123797822580307941983157474498981822422308429557531/20000000000000000000000000000000000000000000000000000000000000000000000000000000" + ] + }, + "outer": { + "BIT_just_below_effective_rejected": true, + "functional_count": 4, + "minimum_margin": "1/1000000000000000000", + "strict_count": 54 + }, + "raw_bracket": [ + "36524238118666647796962230370563/10000000000000000000000000000000000", + "9131059529666661949240557592641/2500000000000000000000000000000000" + ], + "tested": "365242381186607/100000000000000000", + "written_log_power": 2242 + }, + "crossing_probe_rejected": true, + "finite_rank9_fields": [ + { + "child_rank": 9, + "denominator": 512, + "exponent": 1, + "mutated_entries": { + "missing global phase": 8, + "missing multiplicity": 0 + }, + "spectators": 136, + "stage": 8, + "swaps": [ + [ + 1, + 65 + ], + [ + 2, + 66 + ], + [ + 3, + 67 + ], + [ + 4, + 68 + ], + [ + 5, + 69 + ], + [ + 6, + 70 + ], + [ + 7, + 71 + ], + [ + 8, + 72 + ] + ], + "tested_entries": 262144, + "width": 1 + }, + { + "child_rank": 9, + "denominator": 262144, + "exponent": 2, + "mutated_entries": { + "missing global phase": 8, + "missing multiplicity": 8 + }, + "spectators": 272, + "stage": 8, + "swaps": [ + [ + 1, + 65 + ], + [ + 2, + 66 + ], + [ + 3, + 67 + ], + [ + 4, + 68 + ], + [ + 5, + 69 + ], + [ + 6, + 70 + ], + [ + 7, + 71 + ], + [ + 8, + 72 + ] + ], + "tested_entries": 1024, + "width": 2 + }, + { + "child_rank": 9, + "denominator": 134217728, + "exponent": 3, + "mutated_entries": { + "missing global phase": 8, + "missing multiplicity": 8 + }, + "spectators": 408, + "stage": 8, + "swaps": [ + [ + 1, + 65 + ], + [ + 2, + 66 + ], + [ + 3, + 67 + ], + [ + 4, + 68 + ], + [ + 5, + 69 + ], + [ + 6, + 70 + ], + [ + 7, + 71 + ], + [ + 8, + 72 + ] + ], + "tested_entries": 1024, + "width": 3 + }, + { + "child_rank": 9, + "denominator": 512, + "exponent": 1, + "mutated_entries": { + "missing global phase": 8, + "missing multiplicity": 0 + }, + "spectators": 136, + "stage": 9, + "swaps": [ + [ + 1, + 73 + ], + [ + 2, + 74 + ], + [ + 3, + 75 + ], + [ + 4, + 76 + ], + [ + 5, + 77 + ], + [ + 6, + 78 + ], + [ + 7, + 79 + ], + [ + 8, + 80 + ] + ], + "tested_entries": 262144, + "width": 1 + }, + { + "child_rank": 9, + "denominator": 262144, + "exponent": 2, + "mutated_entries": { + "missing global phase": 8, + "missing multiplicity": 8 + }, + "spectators": 272, + "stage": 9, + "swaps": [ + [ + 1, + 73 + ], + [ + 2, + 74 + ], + [ + 3, + 75 + ], + [ + 4, + 76 + ], + [ + 5, + 77 + ], + [ + 6, + 78 + ], + [ + 7, + 79 + ], + [ + 8, + 80 + ] + ], + "tested_entries": 1024, + "width": 2 + }, + { + "child_rank": 9, + "denominator": 134217728, + "exponent": 3, + "mutated_entries": { + "missing global phase": 8, + "missing multiplicity": 8 + }, + "spectators": 408, + "stage": 9, + "swaps": [ + [ + 1, + 73 + ], + [ + 2, + 74 + ], + [ + 3, + 75 + ], + [ + 4, + 76 + ], + [ + 5, + 77 + ], + [ + 6, + 78 + ], + [ + 7, + 79 + ], + [ + 8, + 80 + ] + ], + "tested_entries": 1024, + "width": 3 + } + ], + "invoice": { + "P": { + "1": 68197, + "16": 416, + "2": 14382, + "24": 416, + "3": 14093, + "32": 416, + "4": 3791, + "40": 416, + "48": 416, + "5": 5865, + "56": 416, + "6": 289, + "64": 208, + "7": 187, + "8": 741, + "9": 32 + }, + "S": 1424, + "T": { + "1": 306, + "137": 208, + "17": 416, + "2": 357, + "25": 416, + "3": 799, + "33": 416, + "4": 3825, + "41": 416, + "49": 416, + "5": 1360, + "57": 416, + "6": 731, + "65": 416, + "7": 323, + "73": 208, + "8": 544, + "9": 10888 + }, + "empty_root_credits": 0, + "no_E_credit_crossing": "0.0036524238118666647796962230370563840036235193759654960077302687380", + "raw_crossing": "0.0036524238118666647796962230370563840036235193759654960077302687380" + }, + "native_sha256": "450c7e544efb5258c4b8b4858b49cbd7482d14f206cdda1a71833fc73343ac66", + "ordinary": { + "all_caller_scalar_surcharge": 2248928, + "caller_items": { + "A": { + "envelope": 102076416, + "field_boundary": 89856, + "fused_routes": 0, + "idle_routes": 170112000, + "output_routes": 213120000, + "query_routes": 1152000, + "thin": 6144 + }, + "B": { + "envelope": 35730432, + "field_boundary": 7488, + "fused_routes": 1168000, + "idle_routes": 18016000, + "output_routes": 17760000, + "query_routes": 0, + "thin": 0 + } + }, + "caller_total": 559238336, + "charged_caller_odd_conversions": 479232, + "conservative_total": 782629172, + "init_clear_allowance": 296, + "lambda_paid_rank1_would_reduce_S_by": 11280, + "lambda_second_charge": 11280000, + "margin_to_billion": 217370828, + "odd_divisions": { + "ADD": 5830, + "SCALE": 71 + }, + "per_input_conversion": 2653768, + "raw_upper": 765967244, + "route_items": { + "first_main_adapter": 416, + "first_main_boundary": 208, + "helper_boundary": 2202, + "moves": 6265, + "owned_lifetime": 296, + "second_main_adapter": 384, + "second_main_boundary": 192 + }, + "routing": 9963000, + "scalar_upper": 2197524 + }, + "scope": "Fresh complete changed-native arbitrary-input adjoint; fresh exact signed caller and invoice, ordinary source-unit upper bill, inherited numerical compiler and outer inequalities, and signed rank9 child finite field routes. Fresh integrated physical native/caller and changed-word precision/occurrence application remain separate." + }, + "ODD-CALLER-EXACT-GRID.json": { + "caller_odd_scale": "675", + "caller_odd_scale_bits": 10, + "caller_sha256": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "grid_exponents": [ + 381, + 3, + 2 + ], + "peak_terms": 3752, + "preproduct_exact_divisions": 176874, + "prime_order": [ + 2, + 3, + 5 + ], + "safe_valuation_bound": [ + 381, + 69, + 62 + ], + "scope": "Independent integer Laurent caller endpoint and pre-product divisibility. Valuation bound propagates complete field operators whose Gaussian coefficients have only power-of-two denominators, so odd factors are sourced only from the charged scalar operations. Fixed conversion and storage bounds still needed." + }, + "ODD-FIXED-TAPE-COUNTS.json": { + "H": 16548000000000000000000, + "Kstar_bits": 14093, + "actual_ambient": 145, + "caller_odd_scale": 675, + "caller_sha256": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "common_grid": { + "fractional": "p+D", + "signed_width": "p+h+2D+3", + "temp_padding": 26 + }, + "compiler_ambient_cap": 153, + "context_bound_bits": 14104, + "context_c": 2430, + "elementary_records_per_map_upper": 85264, + "elementary_records_upper": 25436979648, + "log_power": 2242, + "max_scalar_numerator_bits": 24, + "monomial_map_slots": 298332, + "native_invocations": 17, + "native_sha256": "450c7e544efb5258c4b8b4858b49cbd7482d14f206cdda1a71833fc73343ac66", + "owned_banks_per_raw_occurrence": 1156, + "scalar_macro_inputs": { + "caller": 117856, + "conversions": 58522, + "native": 1196936 + }, + "scalar_services_upper": 43946048, + "scalar_steps_coefficient": 46080771227648, + "scope": "Exact finite-cost and common-format substitutions in the selected #7000 conditional application proof, using the conservative primitive movement and scalar constants there. The premise is the complete signed native/physical binding and retained compiler, BIT, stock, and outer contracts. This script counts the raw occurrence, not an enumerated top-level compiled multiplier.", + "tested_claim": "1826211905933/500000000000000" + }, + "ODD-PHYSICAL-BINDING.json": { + "aliased_main_rejected": true, + "caller_sha256": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "native_sha256": "450c7e544efb5258c4b8b4858b49cbd7482d14f206cdda1a71833fc73343ac66", + "occurrence_and_geometry": { + "ambient": 145, + "complete_paid_position_digest": "fa39be465c251c82b86ca4cd1937f076f544e30c1594f9bc036c9b58635a58ce", + "fresh_helpers": 18717, + "idle_uses": 3392, + "lambda_uses": 11280, + "native_calls": 17, + "native_contact_boundaries": 13600, + "native_public": 1501, + "nonzero_boundary_translations": 13600, + "paid": { + "1": 68197, + "16": 416, + "2": 14382, + "24": 416, + "3": 14093, + "32": 416, + "4": 3791, + "40": 416, + "48": 416, + "5": 5865, + "56": 416, + "6": 289, + "64": 208, + "7": 187, + "8": 741, + "9": 32 + }, + "paid_positions": 110281, + "phase_record_digest": "586ab7499fb677afdd83c397ea0b6d3b25f73ea6cdfa1ec95dd68adccff935ad", + "productive_fields": 22461, + "query_uses": 384, + "rank_surplus": 1424, + "reserved_native_banks": 1156, + "reserved_serial_query_lambda_bank": 1, + "targets": { + "1": 306, + "137": 208, + "17": 416, + "2": 357, + "25": 416, + "3": 799, + "33": 416, + "4": 3825, + "41": 416, + "49": 416, + "5": 1360, + "57": 416, + "6": 731, + "65": 416, + "7": 323, + "73": 208, + "8": 544, + "9": 10888 + } + }, + "patched_application_sha256": "733b31b1cee4567b466fdf834a34460b530f1f87ca6dca9270c0fabb2cf89849", + "scope": "Current caller port and ownership substitution, full phase-polynomial native contact identities on disjoint stage axes, whole signed idle/output geometry, and ordered paid positions. Retains the standard nested chart and local operator premises and requires separate full native replay and complete fixed-tape tariff application.", + "source_reviewer_sha256": "d98987db98553dc55bfc80e3ca47abfcd51c57af6f8cda61101391d8eae94184" + }, + "ODD-PRECISION.json": { + "caller_grid": { + "caller_odd_scale": "675", + "caller_odd_scale_bits": 10, + "caller_sha256": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "grid_exponents": [ + 381, + 3, + 2 + ], + "peak_terms": 3752, + "preproduct_exact_divisions": 176874, + "prime_order": [ + 2, + 3, + 5 + ], + "safe_valuation_bound": [ + 381, + 69, + 62 + ], + "scope": "Independent integer Laurent caller endpoint and pre-product divisibility. Valuation bound propagates complete field operators whose Gaussian coefficients have only power-of-two denominators, so odd factors are sourced only from the charged scalar operations. Fixed conversion and storage bounds still needed." + }, + "caller_sha256": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "context_c": 2430, + "context_height": 406, + "context_mass_bits": 1215, + "native_grid": { + "coefficient_visits": 16465531, + "dyadic_height": 25, + "mass_witness": [ + 66436, + "stored add" + ], + "maximum_scaled_mass": "841374570120675/8192", + "numerator_bits": 24, + "odd_scale_lcm": 1125 + }, + "native_sha256": "450c7e544efb5258c4b8b4858b49cbd7482d14f206cdda1a71833fc73343ac66", + "precision_program_sha256": "9362598a87627d4bfd0adb2a6ca02fb7510067a43965a6029f5aa3c6bb7d1ab2", + "rounded_caller": { + "bounds": { + "E_joint_entrance": { + "exact": "3702985070285105113397785053215520682049045482823225636008822753838051434718816084230837095294740241812401637612687040799240352563478433651405969309346780377819615329499681917987603927937262489870071563029808807601582621030489433565307335852025495767939136021234873278627195925220237299226878624197793999668469890347619787681459064209748675788797501570764603310041436359859132642279149371285692442918460605510271359611981566387901365078249/621565922642917122701475579763837894656000000000000000000000000000000000000000000000", + "strict_power_of_two": 1179, + "witness": { + "cut": 4691, + "event": 4691, + "factor": "1", + "kind": "stored", + "register": 36 + } + }, + "Gamma_context": { + "exact": "95565165400931487550801573973593211975359789608550947470530994548438257333999041094556065587616572977459214224283346143135251190677607871274365380182863789236340481860062511235468798652851855341226891867167024510391856506487541365247248183288189401831071956112950288684390878105835822752792543401501370042882768982499023411692913347979383327043654208790100517788795258815565629342876984732801917152495981429903071809618538239120036334636579/466174441982187842026106684822878420992000000000000000000000000000000000000000000000", + "strict_power_of_two": 1184, + "witness": { + "cut": 4783, + "factor": "1", + "kind": "public-return", + "register": 37 + } + }, + "M_caller": { + "exact": "321214676655933560129782836030951119958622429471431692811117505066079252658303325303661828534046786576018850667853596288128047313819788006911616028348392581085050721023636971054851673799947587501432346122953175312809813833001587100311020687804583808767060460431114911369649528995555025426696059541/456139469146728515625000000", + "strict_power_of_two": 897, + "witness": { + "cut": 4751, + "event": 4750, + "factor": "1", + "kind": "stored", + "register": 37 + } + }, + "M_context": { + "exact": "982542399542026493207737597058991295797648121016368961005009683082530359174677875355695086239762702241394648529861418321940689273119306537634129910505993606004084590801675665658075526505105289721258539639100923167312715368501754720379344519730557528988786216870556927992640501147736630429567890710700528635319719817499919116947157730831467210718929705637526207815159624654292911984122239233786310680655253871309261688835450824273293578324802557/5525030423492596646235338486789670174720000000000000000000000000000000000000000000000", + "strict_power_of_two": 1194, + "witness": { + "cut": 4692, + "event": 4691, + "factor": "1", + "kind": "stored", + "register": null + } + }, + "M_joint_entrance": { + "exact": "12446513821466013746992171114880354528234540647439407368041740746722705684890095694539586093101687855496797040728247169012299728404791642365323413178973703529222728715961384485250463009966565309368602073434714550373752128374887698957802006867751735225949803848812917591840288770078529478244705471/608185958862304687500000000", + "strict_power_of_two": 892, + "witness": { + "cut": 4691, + "event": 4691, + "factor": "1", + "kind": "stored", + "register": 36 + } + }, + "Sigma_caller": { + "exact": "95565165400931487550801573973593211975359789608550947470530994548438257333999041094556065587616572977459214224283346143135251190677607871274365380182863789236340481860062511235468798652851855341226891867167024510391856506487541365247248183288189401831071956112950288684390878105835822752792543401501370042882768982499023411692913347979383327043654208790100517788795258815565629342876984732801917152495981429903071809618538239120036334636579/466174441982187842026106684822878420992000000000000000000000000000000000000000000000", + "strict_power_of_two": 1184, + "witness": { + "cut": 4753, + "event": 4752, + "factor": "1", + "kind": "stored", + "register": 37 + } + }, + "Sigma_context": { + "exact": "292317984667427511048774506745159151088404646966015115024777080259745007919737746738380771282503103208015979312727934615373178371374030081386234981034601699580922410060232717431447196774254724718952567370415167673209979008956799506224303646665566277637574997003570366772177792559671850112993555557213033981264951298849599963436947681874146378780398829495876521825741182857400309227755507009715965832399461932925379504230357705402493878835274678935064343758773419268822118171501581039030870928851710950803907282767550522685349326300791418952552864194983870753904462472448076734383510226683/5646579936229456007840352585096220475858963262973477037060052051047627725209600000000000000000000000000000000000000000000000000000000000000000", + "strict_power_of_two": 1481, + "witness": { + "cut": 4692, + "event": 4691, + "factor": "1", + "kind": "stored", + "register": null + } + } + }, + "fresh_arbitrary_helpers": 18717, + "helper_allocation_premise": "distinct (stage, helper) public inputs as in frozen caller proof", + "independent_adjoint": { + "E_joint_entrance": { + "entrance_mass": "12446513821466013746992171114880354528234540647439407368041740746722705684890095694539586093101687855496797040728247169012299728404791642365323413178973703529222728715961384485250463009966565309368602073434714550373752128374887698957802006867751735225949803848812917591840288770078529478244705471/608185958862304687500000000", + "joint_coefficient": "144218124282401204617230263054514744346632405857442589144991781917530152132889870002846209306787762894150543865356389849084238452276894627352790762454037345126994351979907477144401257368423063007427271766117739822282248246858569624239109891511459830034432108241771054783468611278140179030295737/14596463012695312500000000000", + "primitive_coefficient": "1237373204913668966810008103424843603237049842106979534739539344726881600855129275554334885562896567825503574055929527662143657491595081161117482238618339640110136792453314323518006796600687371906278112102741547626404362403105174332310591538741639237757093806525664195341657589882317257470101709011/175157556152343750000000000000", + "residual_mass": "3702985070285105113397785053215520682049045482823225636008822753838051434718816084230837095294740241812401637612687040799240352563478433651405969309346780377819615329499681917987603927937262489870071563029808807601582621030489433565307335852025495767939136021234873278627195925220237299226878624197793999668469890347619787681459064209748675788797501570764603310041436359859132642279149371285692442918460605510271359611981566387901365078249/621565922642917122701475579763837894656000000000000000000000000000000000000000000000" + }, + "Gamma_context": { + "entrance_mass": "321214676655933560129782836030951119958622429471431692811117505066079252658303325303661828534046786576018850667853596288128047313819788006911616028348392581085050721023636971054851673799947587501432346122953175312809813833001587100311020687804583808767060460431114911369649528995555025426696059541/456139469146728515625000000", + "joint_coefficient": "3721923971948022264020008386608472289590988528157114268392412469599050143495508978788641788787976594161440706214373829555996384554677122174093932095769106055424540710380314024651007332164525664382203471694821380954416641216321248248752759218861172626274920078125266851782731337714997593665899027/10947347259521484375000000000", + "primitive_coefficient": "31933635363307317503891208167952125518099265598871297188945655447689887409437080424471754322893069036961252717295444311531802702290424391181977246033332095685934810861449534911850277930109610390733877602745069385156892357266512877411313922547610591253415658016844390796379192959369382262182067424881/131368167114257812500000000000", + "residual_mass": "95565165400931487550801573973593211975359789608550947470530994548438257333999041094556065587616572977459214224283346143135251190677607871274365380182863789236340481860062511235468798652851855341226891867167024510391856506487541365247248183288189401831071956112950288684390878105835822752792543401501370042882768982499023411692913347979383327043654208790100517788795258815565629342876984732801917152495981429903071809618538239120036334636579/466174441982187842026106684822878420992000000000000000000000000000000000000000000000" + }, + "M_caller": { + "entrance_mass": "321214676655933560129782836030951119958622429471431692811117505066079252658303325303661828534046786576018850667853596288128047313819788006911616028348392581085050721023636971054851673799947587501432346122953175312809813833001587100311020687804583808767060460431114911369649528995555025426696059541/456139469146728515625000000", + "joint_coefficient": "3721923971948022264020008386608472289590988528157114268392412469599050143495508978788641788787976594161440706214373829555996384554677122174093932095769106055424540710380314024651007332164525664382203471694821380954416641216321248248752759218861172626274920078125266851782731337714997593665899027/10947347259521484375000000000", + "primitive_coefficient": "31933635363307317503891208167952125518099265598871297188945655447689887409437080424471754322893069036961252717295444311531802702290424391181977246033332095685934810861449534911850277930109610390733877602745069385156892357266512877411313922547610591253415658016844390796247824792255124449682067424881/131368167114257812500000000000", + "residual_mass": "95565165400931487550801573973593211975359789608550947470530994548438257333999041094556065587616572977459214224283346143135251190677607871274365380182863789236340481860062511235468798652851855341226891867167024510391856506487541365247248183288189401831071956112950288684390878105835822752792543401501370042882768982499023411692913347979383327043654208790100051614353276627723603236192161854380925152495981429903071809618538239120036334636579/466174441982187842026106684822878420992000000000000000000000000000000000000000000000" + }, + "M_joint_entrance": { + "entrance_mass": "12446513821466013746992171114880354528234540647439407368041740746722705684890095694539586093101687855496797040728247169012299728404791642365323413178973703529222728715961384485250463009966565309368602073434714550373752128374887698957802006867751735225949803848812917591840288770078529478244705471/608185958862304687500000000", + "joint_coefficient": "144218124282401204617230263054514744346632405857442589144991781917530152132889870002846209306787762894150543865356389849084238452276894627352790762454037345126994351979907477144401257368423063007427271766117739822282248246858569624239109891511459830034432108241771054783468611278140179030295737/14596463012695312500000000000", + "primitive_coefficient": "1237373204913668966810008103424843603237049842106979534739539344726881600855129275554334885562896567825503574055929527662143657491595081161117482238618339640110136792453314323518006796600687371906278112102741547626404362403105174332310591538741639237757093806525664195341657589882317257470101709011/175157556152343750000000000000", + "residual_mass": "3702985070285105113397785053215520682049045482823225636008822753838051434718816084230837095294740241812401637612687040799240352563478433651405969309346780377819615329499681917987603927937262489870071563029808807601582621030489433565307335852025495767939136021234873278627195925220237299226878624197793999668469890347619787681459064209748675788797501570764603310041436359859132642279149371285692442918460605510271359611981566387901365078249/621565922642917122701475579763837894656000000000000000000000000000000000000000000000" + }, + "Sigma_caller": { + "entrance_mass": "321214676655933560129782836030951119958622429471431692811117505066079252658303325303661828534046786576018850667853596288128047313819788006911616028348392581085050721023636971054851673799947587501432346122953175312809813833001587100311020687804583808767060460431114911369649528995555025426696059541/456139469146728515625000000", + "joint_coefficient": "3721923971948022264020008386608472289590988528157114268392412469599050143495508978788641788787976594161440706214373829555996384554677122174093932095769106055424540710380314024651007332164525664382203471694821380954416641216321248248752759218861172626274920078125266851782731337714997593665899027/10947347259521484375000000000", + "primitive_coefficient": "31933635363307317503891208167952125518099265598871297188945655447689887409437080424471754322893069036961252717295444311531802702290424391181977246033332095685934810861449534911850277930109610390733877602745069385156892357266512877411313922547610591253415658016844390796379192959369382262182067424881/131368167114257812500000000000", + "residual_mass": "95565165400931487550801573973593211975359789608550947470530994548438257333999041094556065587616572977459214224283346143135251190677607871274365380182863789236340481860062511235468798652851855341226891867167024510391856506487541365247248183288189401831071956112950288684390878105835822752792543401501370042882768982499023411692913347979383327043654208790100517788795258815565629342876984732801917152495981429903071809618538239120036334636579/466174441982187842026106684822878420992000000000000000000000000000000000000000000000" + } + }, + "joint_entries": [ + { + "entrance_defect": "1435/4", + "entrance_mass": "2067/2", + "event": 43, + "stage": 1 + }, + { + "entrance_defect": "44045271993859269993686376012807955792046250363018103870760791385516843630681236059622365045163314214494969431988283149114171598727067716065154138807839/13307288940955860965151791568755097600000000000000000000", + "entrance_mass": "56849465528/5", + "event": 137, + "stage": 2 + }, + { + "entrance_defect": "66922035233683820673184032838012652544239612269360029881950719043595946522078478033458877059388047753230678278275107968026861205258914328087403056775399198904663199/1277499738331762652654571990600489369600000000000000000000", + "entrance_mass": "899756300051784928313/5", + "event": 268, + "stage": 3 + }, + { + "entrance_defect": "62331487904252165639857133239363271862907200901290634629926552840414571481792383916953128168364550110510368128696685324260053675587612781547373211239030029620240966957319007/1277499738331762652654571990600489369600000000000000000000", + "entrance_mass": "2514111326902273689027625979152/15", + "event": 432, + "stage": 4 + }, + { + "entrance_defect": "12732915336670041570317785126852332187318038253944704014891427124651041052384629443070893623727844153206052388486620102306668342450967373746558332364844087078023960511419964198742156697/1277499738331762652654571990600489369600000000000000000000", + "entrance_mass": "513576167499541081817002847690160861158177/15", + "event": 633, + "stage": 5 + }, + { + "entrance_defect": "1219176446741258290563340006379727600570221483680156546865104431001606908198301508324678369061910021724267662072787875316372717532081133646305477705596621908800503936954988874932635019784789811973/19162496074976439789818579859007340544000000000000000000000", + "entrance_mass": "49174910102467876864090432969907258581035345395534834/225", + "event": 867, + "stage": 6 + }, + { + "entrance_defect": "130031391909535864472497409136483026023291956432776077114659358780649152489519571723381667046266501980186591009354035516251085121594617394463139598061873827154638124093146557294609925104558875573134498582923/2129166230552937754424286651000815616000000000000000000000", + "entrance_mass": "47202796791779792903787260464709452698419616298153732189406926691/225", + "event": 1138, + "stage": 7 + }, + { + "entrance_defect": "37859860626751924980489810517500184983223495958962305687296579325067437762053239941558296199854530894191680203468944025241744364309604304642832092905166568356382875109179968518801108194114903150430061290317673669594533119517/2395312009372054973727322482375917568000000000000000000000000", + "entrance_mass": "1527059719525243651854937925515623170877847518562264265010551055991429949116792541/28125", + "event": 1423, + "stage": 8 + }, + { + "entrance_defect": "13501687907048266903953034051820309322177590112519504312961004834461795892810390152049053088926511827503308384968089007721910880542606252319655740357743319285659431684057479637911224118303378243231151309007745579516013159005751446906701917135493447014038696790567742983805919340534649933415757332736271579344826832969103050310954105933996469830010727288615057/2762515211746298323117669243394835087360000000000000000000000000000000000000000000", + "entrance_mass": "45382020709918266925583064268574418985484021788023395083741971786893952543604385214817042722264713249357732585113211736557042182118473445437784492974844696068231496289005681248244219743195326431922663592509646282903/2703048706054687500000000", + "event": 3058, + "stage": 9 + }, + { + "entrance_defect": "5134035580994507224750101740417044090409872158324859671530495834711124137150459065504559646620773431993485671195866650157597781366257657685523453619010717614507246419833516927048235456081550134157164274736164651917923357089173535120324563918146520933597858263578857079990666303218128437385070646268623872104126223205940665172092472954571539497505125293869384370859705571403/69062880293657458077941731084870877184000000000000000000000000000000000000000000000", + "entrance_mass": "17256576412236653193246225901973714737195067836439327666112948810725372605325768521068989782195051084826433423902219365061463548934152577319772447024097669813834215493691840531234110147024064996639957180865886380686899413865699437/67576217651367187500000000", + "event": 3377, + "stage": 10 + }, + { + "entrance_defect": "2449375496204903800566234391622923826720685356795723327741490642188084086906107736657811959628337086137193736136321331426611563381246487242980244388827879670499289307150158822078504032325795918129863738417208591844263520953249494125356015336200267591172273668332528446077569022501808512207879596724816509801566476543865288237269852931155127804115058842712840877250841931549884693201257/2302096009788581935931391036162362572800000000000000000000000000000000000000000000", + "entrance_mass": "8232867642949280967953864719378369729636081542640965177026582834276172086852779069019078166383458700724373015543641299678854718814560615654710102550769670203427726502361438450768012893674227975469242856299447027845030556012745339827937032703/2252540588378906250000000", + "event": 3674, + "stage": 11 + }, + { + "entrance_defect": "30779864189083418253917477160367049626323015133655102943686290374656469227869578544689525410218257591834286352092659254200850975508059630336558342840963305523139838429247485690295608095565229889809007467999671700272991238283545055053208408457552393920244434012471405330393628303585608378642147218769968055631234656266816894097879993569331608417766031791380306924546862453710217080387257549987857289/310782961321458561350737789881918947328000000000000000000000000000000000000000000000", + "entrance_mass": "103457615351059805192637231353494210876529187337645013912367786609511281374638184501291799844537790265462481580051228205479278831706979374022592427678836083146990308179368316797029946556942233864286312243671687806427572314354434738422294564686254956597631/304092979431152343750000000", + "event": 3934, + "stage": 12 + }, + { + "entrance_defect": "2027450069000965499475531011383440157169692659145924008011727152250823725013802714621335681650912998554196893713864583467049607132818767507469279240285026157705418904456890973392462124642027626633844928401708143881489090438401316771077138505910231660684557364707699437736399207223957607926045476923286299873508478859867880772297659391847803024293643002588446229008917170191052671297647733275251856967002441/77695740330364640337684447470479736832000000000000000000000000000000000000000000000", + "entrance_mass": "6814687293408352348961376609223100753789665399854180217091951198766673494955017243489117504312576625705862588971333049204842152193259763726092611947454717867967563820647006231530855513792517852570389360287582421241328472893443552787136426885585158158296407747039/76023244857788085937500000", + "event": 4149, + "stage": 13 + }, + { + "entrance_defect": "81425584843388057261777923277631576483627640259189165511567698243434871847781145319885555264503337966417800065169854918406618095052640192349917866874540197241183079445862593373040925708344109111338518595326080311033636087678321212722207197854636599119369642802920867208911138754837114797014981978484772779327620611670404261760698080845527547398236855251446691378540205507259996374917258537241828295599977690621652529/621565922642917122701475579763837894656000000000000000000000000000000000000000000000", + "entrance_mass": "273688564209132230699064882255651065961520374651451250325109091529813162250488973700796593555467744131430272845604649750549608356985710665121874068107850799585492748533787927289567936649257940207702597871193107311090132538524151482351564937285621850171994049078063458209591/608185958862304687500000000", + "event": 4337, + "stage": 14 + }, + { + "entrance_defect": "1556219095082705602535539984316181199241414728010807878729816681441166376732635736277629251238654896253887005217361545543260288509974840458867177751682722888545905709174284882407661337634007250197779339330209830966101244598866375520988892612402468108557952715214769713820614630937204138697937364897442949509643730807171971579909466171509399815662217484508787400730764899113003630465282574669808006540636500183162953692734459/310782961321458561350737789881918947328000000000000000000000000000000000000000000000", + "entrance_mass": "5230780602279043381317572379439763694807653157987526423412516241866438709931406455512285461654380762978554988724296151241130161368896505647624919395909388513302452136334767445346454946237326490486725295589968816639097338790755366202380875008783642473174121062695038054202858248061/304092979431152343750000000", + "event": 4485, + "stage": 15 + }, + { + "entrance_defect": "1722719654929303685804889961659584110788074988207994914248692461051661236674290995681236665053019942214592215275526735283615766406930521020634921826594855109550244891204900742534345832506819778910608575853777788199093449269214774219930159217242085902055305097601334109017194084043515091567908643042624789735195382568591203175525037339080136342660401820396805250559990934422440640575124004495296795593512351910957371825071924519391097/621565922642917122701475579763837894656000000000000000000000000000000000000000000000", + "entrance_mass": "5790424100720951765768300756324298709533962301792798636386692749870979029496708556989270788662796627612885676197810930990877069943243536093513215980405080279750566239442965631097385199413957318608000177913047677092759213914423460784984181631621622445055356552059259436283593839861423838063/608185958862304687500000000", + "event": 4606, + "stage": 16 + }, + { + "entrance_defect": "3702985070285105113397785053215520682049045482823225636008822753838051434718816084230837095294740241812401637612687040799240352563478433651405969309346780377819615329499681917987603927937262489870071563029808807601582621030489433565307335852025495767939136021234873278627195925220237299226878624197793999668469890347619787681459064209748675788797501570764603310041436359859132642279149371285692442918460605510271359611981566387901365078249/621565922642917122701475579763837894656000000000000000000000000000000000000000000000", + "entrance_mass": "12446513821466013746992171114880354528234540647439407368041740746722705684890095694539586093101687855496797040728247169012299728404791642365323413178973703529222728715961384485250463009966565309368602073434714550373752128374887698957802006867751735225949803848812917591840288770078529478244705471/608185958862304687500000000", + "event": 4691, + "stage": 17 + } + ], + "physical_main_inputs": 3744, + "sites": { + "ADD": 4126, + "IDLE_ODD": 4, + "IDLE_ONE": 90, + "J": 17, + "LAMBDA": 178, + "QUERY": 4, + "SCALE": 312, + "SWAP": 52, + "noninteger_scalar": 1752 + } + }, + "rounded_native": { + "bounds": { + "Gamma": { + "exact": "25676280902351028061379238870313549957558906057290254657210091474219729563118977630161421060304743100846943045044216630555429375926219093232774577/42583324611058755088485733020016312320000000000000000000", + "strict_power_of_two": 299, + "witness": { + "cut": 76673, + "factor": "1", + "kind": "public-return", + "register": 1498 + } + }, + "M": { + "exact": "78941172896741109193371653754794049391461850348438502646520906162789856881359627097535988172701977790473361222238056117891896309263283996780702016067/9084442583692534418876956377603479961600000000000000000000", + "strict_power_of_two": 303, + "witness": { + "cut": 76632, + "factor": "1", + "kind": "stored", + "register": 1498 + } + }, + "Sigma": { + "exact": "25676280902351028061379238870313549957558906057290254657210091474219729563118977630161421060304743100846943045044216630555429375926219093232774577/42583324611058755088485733020016312320000000000000000000", + "strict_power_of_two": 299, + "witness": { + "cut": 76632, + "factor": "1", + "kind": "stored", + "register": 1498 + } + } + }, + "census": { + "denominator_bits": 20, + "events": 76673, + "lifetimes": 74, + "max_denominator": 655360, + "max_numerator": 14729531, + "numerator_bits": 24, + "opcodes": { + "ADD": 66531, + "CLEAR": 74, + "COPY": 1, + "INIT": 74, + "MOVE": 6265, + "SCALE": 3728 + }, + "owned_labels": 68, + "peak_owned": 50, + "public": 1501, + "scalars": { + "dyadic": 64359, + "integer": 39884, + "noninteger": 30376, + "odd": 5901 + } + }, + "independent_adjoint": { + "Gamma": { + "active_residual_sites": 26679, + "entrance_mass": "78941172896741109193371653754794049391461850348438502646520906162789856881359627097535988172701977790473361222238056117891896309263283996780702016067/9084442583692534418876956377603479961600000000000000000000", + "residual_mass": "25676280902351028061379238870313549957558906057290254657210091474219729563118977630161421060304743100846943045044216630555429375926219093232774577/42583324611058755088485733020016312320000000000000000000" + }, + "M": { + "active_residual_sites": 26679, + "entrance_mass": "78941172896741109193371653754794049391461850348438502646520906162789856881359627097535988172701977790473361222238056117891896309263283996780702016067/9084442583692534418876956377603479961600000000000000000000", + "residual_mass": "25676280902351028061379238870313549957558906057290254657210091474219729563118977630161421060304743100846943045044216630555429375926219093232774577/42583324611058755088485733020016312320000000000000000000" + }, + "Sigma": { + "active_residual_sites": 26679, + "entrance_mass": "78941172896741109193371653754794049391461850348438502646520906162789856881359627097535988172701977790473361222238056117891896309263283996780702016067/9084442583692534418876956377603479961600000000000000000000", + "residual_mass": "25676280902351028061379238870313549957558906057290254657210091474219729563118977630161421060304743100846943045044216630555429375926219093232774577/42583324611058755088485733020016312320000000000000000000" + } + } + }, + "scope": "Fixed integer Laurent grid with charged odd caller scale, and pinned attributed forward/adjoint all-fibre defect engine applied to the emitted 17-stage caller. Each LAMBDA, QUERY and signed/unsigned idle is one unitary with one child defect. The caller allocation assumes independent stage helpers. Full physical application remains separate." + }, + "ODD-TYPE-AB-REPLAY.json": { + "caller_sha256": "255d89f38cd45e38e5770f559bc43dc217e989032359768cdc7e8cdfd64b47bc", + "paid": { + "1": 68197, + "16": 416, + "2": 14382, + "24": 416, + "3": 14093, + "32": 416, + "4": 3791, + "40": 416, + "48": 416, + "5": 5865, + "56": 416, + "6": 289, + "64": 208, + "7": 187, + "8": 741, + "9": 32 + }, + "raw_bracket": [ + "36524238118666647796962230370563/10000000000000000000000000000000000", + "9131059529666661949240557592641/2500000000000000000000000000000000" + ], + "replay": { + "bad_outputs": [], + "caller_denominator_height_bound": 578, + "caller_mass_bound": "854474036861847560509026474008040300059938928517783661039773198072080884690114508581583887358835968277340425788985297793555303569703690223623950838857161290503004459697662544865276977234864184443860251086668962688762176068520364648820282528496698239206689277049335412289161443623602012468587331439851515703/168151253906250000000000000000000", + "caller_mass_ceiling_bits": 910, + "max_terms": 3752 + }, + "scope": "Exact emitted signed Laurent caller endpoint and recomputed native/caller paid and target profiles. Physical address bindings, independent branch-source composition, ordinary units, precision and outer gates are still required.", + "shape": [ + 8, + 9 + ], + "source_word_sha256": "450c7e544efb5258c4b8b4858b49cbd7482d14f206cdda1a71833fc73343ac66", + "target": { + "1": 306, + "137": 208, + "17": 416, + "2": 357, + "25": 416, + "3": 799, + "33": 416, + "4": 3825, + "41": 416, + "49": 416, + "5": 1360, + "57": 416, + "6": 731, + "65": 416, + "7": 323, + "73": 208, + "8": 544, + "9": 10888 + } + } + }, + "claim": "1826211905933/500000000000000", + "component_head": "71f5acb0409daf208a865482f3349049dbd3251c", + "elapsed_seconds": 445.2596626281738, + "peer_head": "ba2638c5a6e2b9a1c0c559a41811e5d41a591f41", + "price": { + "after": { + "P": { + "1": 68197, + "16": 416, + "2": 14382, + "24": 416, + "3": 14093, + "32": 416, + "4": 3791, + "40": 416, + "48": 416, + "5": 5865, + "56": 416, + "6": 289, + "64": 208, + "7": 187, + "8": 741, + "9": 32 + }, + "S": 1424, + "T": { + "1": 306, + "137": 208, + "17": 416, + "2": 357, + "25": 416, + "3": 799, + "33": 416, + "4": 3825, + "41": 416, + "49": 416, + "5": 1360, + "57": 416, + "6": 731, + "65": 416, + "7": 323, + "73": 208, + "8": 544, + "9": 10888 + }, + "empty_root_credits": 0, + "no_E_credit_crossing": "0.0036524238118666647796962230370563840036235193759654960077302687380", + "raw_crossing": "0.0036524238118666647796962230370563840036235193759654960077302687380" + }, + "before": { + "P": { + "1": 68367, + "16": 416, + "2": 14484, + "24": 416, + "3": 14059, + "32": 416, + "4": 3791, + "40": 416, + "48": 416, + "5": 5831, + "56": 416, + "6": 272, + "64": 208, + "7": 187, + "8": 741, + "9": 32 + }, + "S": 1424, + "T": { + "1": 306, + "137": 208, + "17": 416, + "2": 357, + "25": 416, + "3": 799, + "33": 416, + "4": 3825, + "41": 416, + "49": 416, + "5": 1360, + "57": 416, + "6": 731, + "65": 416, + "7": 323, + "73": 208, + "8": 544, + "9": 10888 + }, + "empty_root_credits": 0, + "no_E_credit_crossing": "0.0036484112947908453248116499202422483195579770444679095881071437933", + "raw_crossing": "0.0036484112947908453248116499202422483195579770444679095881071437933" + }, + "gate": { + "BIT_margin": "11426618813393/100000000000000000", + "BIT_pin": "376669/100000000", + "H": "16548000000000000000000", + "alpha": [ + 0.9999999999999992, + 0.9999999999999992 + ], + "claim": "1826211905933/500000000000000", + "compiler_gap": "1/100000000000000000", + "delta": [ + 0.908150211760023, + 0.908150211760023 + ], + "derivative_upper": -380892.3710594304, + "gamma": [ + 0.9410036085012365, + 0.9410036085012365 + ], + "input_lift": { + "derivative_upper_on_required_interval": "-2299831290525933154178526076272396899996972093654613095735772838275432653960006518819/2500000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "interval_kappa_cap": "376669/100000000", + "margins": { + "1826211905933/500000000000000": [ + "4984088387862564965853172939530528379832174370482587991696775132292845597961/4000000000000000000000000000000000000000000000000000000000000000000000000000000", + "124602209696564124146329323488263209495804359262064699792419378307321139951001/100000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "365242381186607/100000000000000000": [ + "31150552424141602522394620162965432720944643418490138682987422844234381655127/25000000000000000000000000000000000000000000000000000000000000000000000000000000", + "124602209696566410089578480651861730883778573673960554731949691376937526622459/100000000000000000000000000000000000000000000000000000000000000000000000000000000" + ] + }, + "source_BIT_wide_crude_bound_would_be": "-2299831290525933154178526076272396899996972093654613095735772838275432653960006518819/2500000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + }, + "minimum_log_power": 2241, + "moment_margin_float": { + "365242381186607/100000000000000000": [ + 2.3015347068312003e-10, + 2.3015347068312003e-10 + ], + "36524238118666647796962230370563/10000000000000000000000000000000000": [ + 3.250569181449084e-29, + 3.250569181449084e-29 + ], + "9131059529666661949240557592641/2500000000000000000000000000000000": [ + -6.1898911290153974e-30, + -6.1898911290153974e-30 + ] + }, + "moment_margins": { + "365242381186607/100000000000000000": [ + "2876918383539000202858465405213802893459194825951593160023886817299327/12500000000000000000000000000000000000000000000000000000000000000000000000000000", + "4603069413662400324573544648342084629534711721522549056038218915450067/20000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "36524238118666647796962230370563/10000000000000000000000000000000000": [ + "1625284590724541972308329561921447746783433357045337/50000000000000000000000000000000000000000000000000000000000000000000000000000000", + "1625284590724541972308329561921447746783433376397279/50000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "9131059529666661949240557592641/2500000000000000000000000000000000": [ + "-38686819556346231869736710780931819506971386651117/6250000000000000000000000000000000000000000000000000000000000000000000000000000", + "-123797822580307941983157474498981822422308429557531/20000000000000000000000000000000000000000000000000000000000000000000000000000000" + ] + }, + "outer": { + "BIT_just_below_effective_rejected": true, + "functional_count": 4, + "minimum_margin": "1/1000000000000000000", + "strict_count": 54 + }, + "raw_bracket": [ + "36524238118666647796962230370563/10000000000000000000000000000000000", + "9131059529666661949240557592641/2500000000000000000000000000000000" + ], + "tested": "365242381186607/100000000000000000", + "written_log_power": 2242 + }, + "native_baseline_rejects_new_claim": true, + "new_native": "450c7e544efb5258c4b8b4858b49cbd7482d14f206cdda1a71833fc73343ac66", + "old_native": "bdecd5cc1cb9f164dc695ce07a07d5d44e9961996fcdfa4d77b4092fecbda745", + "original_7605": { + "P": { + "1": 68265, + "16": 416, + "2": 14433, + "24": 416, + "3": 14076, + "32": 416, + "4": 3808, + "40": 416, + "48": 416, + "5": 5848, + "56": 416, + "6": 272, + "64": 208, + "7": 187, + "8": 741, + "9": 32 + }, + "S": 1424, + "T": { + "1": 306, + "137": 208, + "17": 416, + "2": 357, + "25": 416, + "3": 799, + "33": 416, + "4": 3825, + "41": 416, + "49": 416, + "5": 1360, + "57": 416, + "6": 731, + "65": 416, + "7": 323, + "73": 208, + "8": 544, + "9": 10888 + }, + "empty_root_credits": 0, + "no_E_credit_crossing": "0.0036504442447168877637990594570590431740683465572645409981409513896", + "raw_crossing": "0.0036504442447168877637990594570590431740683465572645409981409513896" + }, + "original_7605_raw": [ + "3650444244716887763799059457059/1000000000000000000000000000000000", + "36504442447168877637990594570591/10000000000000000000000000000000000" + ], + "price": { + "baseline_rejects_new_claim": true, + "candidate_margin_at_old_upper": [ + "31053593800461010016653474002365215647005067479940878422627389704583161236702257/20000000000000000000000000000000000000000000000000000000000000000000000000000000", + "77633984501152525041633685005913039117512668699852196056568474261457903108905149/50000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "claim_decimal": "0.003652423811866", + "gain": "0.000004012517076", + "gain_exact": "1003129269/250000000000000", + "independent_raw_bracket": [ + "0.00365242381186666477969622303705638", + "0.00365242381186666477969622303705639" + ], + "previous_claim": "364841129479/100000000000000", + "raw_bracket": [ + "0.0036524238118666647796962230370563", + "0.0036524238118666647796962230370564" + ] + }, + "public_claim_gate": { + "BIT_margin": "11426618823/100000000000000", + "BIT_pin": "376669/100000000", + "H": "14265700000000000000", + "alpha": [ + 0.9999999999998729, + 0.9999999999998729 + ], + "claim": "36524238117/10000000000000", + "compiler_gap": "1/100000000000000", + "delta": [ + 0.9081502117599598, + 0.9081502117599598 + ], + "derivative_upper": -380892.3710594304, + "gamma": [ + 0.9410036085011478, + 0.9410036085011478 + ], + "input_lift": { + "derivative_upper_on_required_interval": "-2299831290525933154178526076272396899996972093654613095735772838275432653960006518819/2500000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "interval_kappa_cap": "376669/100000000", + "margins": { + "36524238117/10000000000000": [ + "3893819052848224156643837636987628813727108427387727369192233075577493158941/3125000000000000000000000000000000000000000000000000000000000000000000000000000", + "15575276211392896626575350547950515254908433709550909476768932302309972636009/12500000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "365242381177/100000000000000": [ + "124602209693429116261767261134568610937791211897227457483164527400335895788361/100000000000000000000000000000000000000000000000000000000000000000000000000000000", + "1557527621167863953272090764182107636722390148715343218539556592504198697379/1250000000000000000000000000000000000000000000000000000000000000000000000000000" + ] + }, + "source_BIT_wide_crude_bound_would_be": "-2299831290525933154178526076272396899996972093654613095735772838275432653960006518819/2500000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + }, + "minimum_log_power": 2241, + "moment_margin_float": { + "365242381177/100000000000000": [ + 3.7405000004517e-08, + 3.7405000004517e-08 + ], + "36524238118666647796962230370563/10000000000000000000000000000000000": [ + 3.250569181449084e-29, + 3.250569181449084e-29 + ], + "9131059529666661949240557592641/2500000000000000000000000000000000": [ + -6.1898911290153974e-30, + -6.1898911290153974e-30 + ] + }, + "moment_margins": { + "365242381177/100000000000000": [ + "935125000112924990162689601132486120836001556543607822304548140794914213/25000000000000000000000000000000000000000000000000000000000000000000000000000000", + "37405000004516999606507584045299444833440062261744312892181925632185927/1000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "36524238118666647796962230370563/10000000000000000000000000000000000": [ + "1625284590724541972308329561921447746783433357045337/50000000000000000000000000000000000000000000000000000000000000000000000000000000", + "1625284590724541972308329561921447746783433376397279/50000000000000000000000000000000000000000000000000000000000000000000000000000000" + ], + "9131059529666661949240557592641/2500000000000000000000000000000000": [ + "-38686819556346231869736710780931819506971386651117/6250000000000000000000000000000000000000000000000000000000000000000000000000000", + "-123797822580307941983157474498981822422308429557531/20000000000000000000000000000000000000000000000000000000000000000000000000000000" + ] + }, + "outer": { + "BIT_just_below_effective_rejected": true, + "functional_count": 4, + "minimum_margin": "1/1000000000000000", + "strict_count": 54 + }, + "raw_bracket": [ + "36524238118666647796962230370563/10000000000000000000000000000000000", + "9131059529666661949240557592641/2500000000000000000000000000000000" + ], + "tested": "365242381177/100000000000000", + "written_log_power": 2242 + }, + "signed_incumbent_rejects_new_claim": true + }, + "source_head": "99438c43df7aac1e5dbcc43c1578fcd886c119ec", + "status": "PASS_CHART1062_COMPLETE_SIGNED_APPLICATION", + "timings": [ + { + "check": "emit_odd_type_b.py", + "seconds": 6.410520792007446 + }, + { + "check": "emit_odd_type_ab.py", + "seconds": 2.8826451301574707 + }, + { + "check": "check_odd_caller_exact_grid.py", + "seconds": 5.176121234893799 + }, + { + "check": "check_odd_physical_binding.py", + "seconds": 11.105579137802124 + }, + { + "check": "check_odd_precision.py", + "seconds": 25.07399582862854 + }, + { + "check": "check_odd_partial_admission.py", + "seconds": 19.30940580368042 + }, + { + "check": "check_odd_fixed_tape_counts.py", + "seconds": 0.9473230838775635 + } + ] +} diff --git a/research/p104-original74-courier226/independent/PLAN.md b/research/p104-original74-courier226/independent/PLAN.md new file mode 100644 index 0000000000..174f4433f0 --- /dev/null +++ b/research/p104-original74-courier226/independent/PLAN.md @@ -0,0 +1,7 @@ +# Prospective independent comparison plan + +2026-11-18 Australia/Sydney. Written before inspecting the candidate construction or verifier implementation. + +Compare the frozen raw words #7645 at head 8ee7e6869b57ce445dbebd1d720366eab1f8ca40 (SHA-256 6c52b2fba7c20343a50cb92ed4b997aa9921c78f212ac6428d13fff2bcd014cf) and candidate (SHA-256 450c7e544efb5258c4b8b4858b49cbd7482d14f206cdda1a71833fc73343ac66). Independently replay literal operations with exact rational coefficients for all original inputs and introduce an independent variable at each dirty input. Match 74 erasure observations and 630 protected observations by semantic chart/rank identity, never builder offsets or candidate origin annotations. Compare every coefficient, preserving full erasure identities and observation scope. Check provider contract and account all changes and charges separately; structural or exact comparison does not itself establish a native provider, signed execution or global κ admission. + +First examine the earlier independent verifier and input schema, select/adapt only independent replay and matching logic with documented shared dependencies. Verify raw input hashes before and after the run. Include a genuine wrong sign or stage-order mutation that changes the actual replay and is rejected by the same comparison; reject malformed-input-only controls as insufficient. Preserve executable source, input references, result, clock timestamps, and exact commands. Limit each test to one CPU, 2 GiB address space, and 600 seconds; record interruption as such. Run only after planned and started progress records are confirmed. Report incomplete work honestly; avoid fallback to construction-aware matching if independent alignment fails. diff --git a/research/p104-original74-courier226/independent/README.md b/research/p104-original74-courier226/independent/README.md new file mode 100644 index 0000000000..3192b91b0f --- /dev/null +++ b/research/p104-original74-courier226/independent/README.md @@ -0,0 +1,24 @@ +# Independent exact reviewer + +This optional standalone comparator reads two frozen literal words and their full 17-call invoices; no constructor, builder origin map, or sibling checkout is imported. It uses the previously independently authored rational interpreter `exact.py` from the #7645 independent reviewer and a new comparison driver. `PLAN.md` is the prospective plan written before inspecting construction logic; `RESULT.json` is the original successful run. The prior work includes DreamingOfClouds #7617 and SYLforge #7616, and the credited predecessor chain remains applicable. + +Supply the exact frozen inputs as explicit paths. Both word raw SHA-256 hashes and invoice file hashes are pinned in the checker. The compressed bytes may be repacked; their hashes are included as receipt metadata. Use Python 3 with Linux affinity/resource support and a new output path: + +```sh +python3 -I -B independent/check.py \ + --base PATH/TO/7645-WORD.json.gz \ + --candidate PATH/TO/COURIER-WORD.json.gz \ + --base-invoice PATH/TO/7645-INVOICE.json \ + --candidate-invoice PATH/TO/COURIER-INVOICE.json \ + --output PATH/TO/NEW-RESULT.json +``` + +The checker selects one allowed CPU, sets 2 GiB address-space, 570 seconds CPU and 600 seconds wall alarm, and fails if the output already exists. It checks literal ordered protected events, their roles and live chart, and every before/after rational row, including all 1,501 arbitrary public input columns; all 74 ordered erasures and all 1,501 final public rows are compared. The actual sign of a candidate-specific public ADD is flipped and the same replay must reject it. The output records the changed event and first error. + +The fixed full 17-call baseline invoice is decomposed into its 17 native word charges plus a residual. Candidate word charges are added back and the resulting paid and target histograms must equal the pinned candidate invoice. This does not independently establish that inherited residual, the price crossing, physical provider availability or native/signed execution. Owned INIT is ideal zero and depends on the inherited reset contract. The logical replay does not discharge common-U, physical covariance, precision, allocation, or goal admission. This reviewer shares the published word format and prior #7645 independent interpreter; it is independent of the new builder and origin alignment, not of those shared assumptions. + +The predecessor and candidate inputs used for the original comparison have raw hashes `6c52b2fba7c20343a50cb92ed4b997aa9921c78f212ac6428d13fff2bcd014cf` and `450c7e544efb5258c4b8b4858b49cbd7482d14f206cdda1a71833fc73343ac66`. Invoice hashes are `7d54c1ec036d4c096526dd95e06892ca99210812d51a503b22f6d78243330ca9` and `fa0c37a9e67d0a82850c4fcfd5cbdb3bd88e1f8db329176e5669da6c7788f6a2`. The original run started 2026-11-17T23:48:51Z and took 63.92 seconds. An initial invocation failed before scientific execution because Python isolated mode omitted the module path; the portable driver inserts its own directory explicitly. + +To compare a new result with the original receipt while allowing different timestamps, elapsed time, and gzip repacking, run `python3 independent/compare_results.py independent/RESULT.json PATH/TO/NEW-RESULT.json`. The checked stable fields include both raw word hashes, the complete test counts and invoice deltas, the mutation witness, and the scope statement. When using the package's generated fresh workspace, its input names are `baseline.json.gz`, `candidate.json.gz`, `baseline-invoice.json`, and `candidate-invoice.json`. + +A separate-directory replay completed on 2026-11-18 at 00:07:36 UTC in 66.31 seconds. `RELOCATED-RESULT.json` preserves that receipt, and `STABLE-COMPARISON.txt` records equality of all 20 stable fields against the original. The relocated receipt SHA-256 is `1d6a1c86cacf43c382450139e522ad65d9d4723c25e25e268d9239dabf2c8dfc`. Recompression metadata and timing are intentionally excluded from stable comparison; raw word hashes remain included. diff --git a/research/p104-original74-courier226/independent/RELOCATED-RESULT.json b/research/p104-original74-courier226/independent/RELOCATED-RESULT.json new file mode 100644 index 0000000000..874cf1dc25 --- /dev/null +++ b/research/p104-original74-courier226/independent/RELOCATED-RESULT.json @@ -0,0 +1,53 @@ +{ + "actual_sign_mutation": { + "clock": 41468, + "error": "public row 17: {'input_column': 2, 'difference': '8'}", + "mutated": [ + "ADD", + 990, + 226, + "1", + 719 + ], + "original": [ + "ADD", + 990, + 226, + "-1", + 719 + ], + "rejected": true + }, + "all_arbitrary_public_input_columns": 1501, + "base_compressed_sha256": "f4e8d0c000ee3f2a1bd51e5c52715c7aef40946f768c5f19c101bce4f1ae1448", + "base_word": "6c52b2fba7c20343a50cb92ed4b997aa9921c78f212ac6428d13fff2bcd014cf", + "candidate_compressed_sha256": "3ac422ca8381ab132c10329389585c7a36519bb8989cf659dfdd37543613d1cf", + "candidate_peak": 50, + "candidate_word": "450c7e544efb5258c4b8b4858b49cbd7482d14f206cdda1a71833fc73343ac66", + "compared_before_after": 1260, + "copy_count": 1, + "elapsed_seconds": 66.308261897997, + "ended_utc": "2026-11-18T00:07:36.047192+00:00", + "invoice_candidate_match": true, + "native_paid_delta": { + "1": -1, + "2": -1, + "3": 1 + }, + "native_target_delta": {}, + "ordered_erasures": 74, + "post_base_raw_sha256": "6c52b2fba7c20343a50cb92ed4b997aa9921c78f212ac6428d13fff2bcd014cf", + "post_candidate_raw_sha256": "450c7e544efb5258c4b8b4858b49cbd7482d14f206cdda1a71833fc73343ac66", + "protected_events": 630, + "public_outputs": 1501, + "scope": "Exact Q rows for all public input columns; ideal-zero owned INIT, inherited supplier reset; chart and liveness checks; unchanged protected event ordered identity. No native/signed physical application, provider admission, independent price engine, covariance, precision, or goal admission.", + "signed17_paid_delta": { + "1": -17, + "2": -17, + "3": 17 + }, + "signed17_target_delta": {}, + "source_peak": 50, + "started_utc": "2026-11-18T00:06:29.738930+00:00", + "status": "PASS_INDEPENDENT_EXACT" +} diff --git a/research/p104-original74-courier226/independent/RESULT.json b/research/p104-original74-courier226/independent/RESULT.json new file mode 100644 index 0000000000..48c0bb65a3 --- /dev/null +++ b/research/p104-original74-courier226/independent/RESULT.json @@ -0,0 +1,53 @@ +{ + "actual_sign_mutation": { + "clock": 41468, + "error": "public row 17: {'input_column': 2, 'difference': '8'}", + "mutated": [ + "ADD", + 990, + 226, + "1", + 719 + ], + "original": [ + "ADD", + 990, + 226, + "-1", + 719 + ], + "rejected": true + }, + "all_arbitrary_public_input_columns": 1501, + "base_compressed_sha256": "f4e8d0c000ee3f2a1bd51e5c52715c7aef40946f768c5f19c101bce4f1ae1448", + "base_word": "6c52b2fba7c20343a50cb92ed4b997aa9921c78f212ac6428d13fff2bcd014cf", + "candidate_compressed_sha256": "3ac422ca8381ab132c10329389585c7a36519bb8989cf659dfdd37543613d1cf", + "candidate_peak": 50, + "candidate_word": "450c7e544efb5258c4b8b4858b49cbd7482d14f206cdda1a71833fc73343ac66", + "compared_before_after": 1260, + "copy_count": 1, + "elapsed_seconds": 63.92434637900442, + "ended_utc": "2026-11-17T23:49:55.153593+00:00", + "invoice_candidate_match": true, + "native_paid_delta": { + "1": -1, + "2": -1, + "3": 1 + }, + "native_target_delta": {}, + "ordered_erasures": 74, + "post_base_raw_sha256": "6c52b2fba7c20343a50cb92ed4b997aa9921c78f212ac6428d13fff2bcd014cf", + "post_candidate_raw_sha256": "450c7e544efb5258c4b8b4858b49cbd7482d14f206cdda1a71833fc73343ac66", + "protected_events": 630, + "public_outputs": 1501, + "scope": "Exact Q rows for all public input columns; ideal-zero owned INIT, inherited supplier reset; chart and liveness checks; unchanged protected event ordered identity. No native/signed physical application, provider admission, independent price engine, covariance, precision, or goal admission.", + "signed17_paid_delta": { + "1": -17, + "2": -17, + "3": 17 + }, + "signed17_target_delta": {}, + "source_peak": 50, + "started_utc": "2026-11-17T23:48:51.229246+00:00", + "status": "PASS_INDEPENDENT_EXACT" +} diff --git a/research/p104-original74-courier226/independent/STABLE-COMPARISON.txt b/research/p104-original74-courier226/independent/STABLE-COMPARISON.txt new file mode 100644 index 0000000000..90ba546e11 --- /dev/null +++ b/research/p104-original74-courier226/independent/STABLE-COMPARISON.txt @@ -0,0 +1 @@ +PASS_STABLE_FIELDS 20 diff --git a/research/p104-original74-courier226/independent/check.py b/research/p104-original74-courier226/independent/check.py new file mode 100644 index 0000000000..a72321e2fc --- /dev/null +++ b/research/p104-original74-courier226/independent/check.py @@ -0,0 +1,71 @@ +#!/usr/bin/env python3 +import argparse, collections, datetime, gzip, hashlib, json, os, resource, signal, sys, time +from pathlib import Path +sys.path.insert(0, str(Path(__file__).resolve().parent)) +from exact import Interpreter, diff +BASE=CAND=BI=CI=None +INVOICE_PINS=['7d54c1ec036d4c096526dd95e06892ca99210812d51a503b22f6d78243330ca9','fa0c37a9e67d0a82850c4fcfd5cbdb3bd88e1f8db329176e5669da6c7788f6a2'] +PINS=['6c52b2fba7c20343a50cb92ed4b997aa9921c78f212ac6428d13fff2bcd014cf','450c7e544efb5258c4b8b4858b49cbd7482d14f206cdda1a71833fc73343ac66'] +def sha(b): return hashlib.sha256(b).hexdigest() +def load(p,pin): + b=gzip.decompress(p.read_bytes()); assert sha(b)==pin; return json.loads(b) +def roles(e): return e[1:3] if e[0] in ('ADD','COPY') else e[1:2] +def watched(e,n): return any(r>=n for r in roles(e)) or e[0]=='COPY' +def observe(a,e): return a.snapshot(sorted(set(roles(e)))) +def run(w): + a=Interpreter(w); observations=[]; erasures=[] + for i,e in enumerate(w['program']): + watch=watched(e,a.n) + if watch: before=observe(a,e) + if e[0]=='CLEAR': erasures.append((e[1],e[2],a.rows[e[1]].copy())) + a.step(i) + if watch: observations.append((e,before,observe(a,e))) + a.end();return a,observations,erasures +def compare(base,cand): + a,ao,ae=run(base); b,bo,be=run(cand) + assert len(ao)==len(bo)==630, ('observation count',len(ao),len(bo)) + assert len(ae)==len(be)==74, ('erasure count',len(ae),len(be)) + for i,(x,y) in enumerate(zip(ao,bo)): + if x!=y: raise ValueError('protected observation mismatch index %d event %s / %s'%(i,x[0],y[0])) + for i,(x,y) in enumerate(zip(ae,be)): + if x!=y: raise ValueError('erasure mismatch index %d role/chart %s / %s'%(i,x[:2],y[:2])) + for r in range(a.n): + if a.rows[r]!=b.rows[r]:raise ValueError('public row %d: %s'%(r,diff(a.rows[r],b.rows[r]))) + assert a.peak==b.peak + return {'protected_events':len(ao),'compared_before_after':2*len(ao),'ordered_erasures':len(ae),'all_arbitrary_public_input_columns':a.n,'public_outputs':a.n,'source_peak':a.peak,'candidate_peak':b.peak,'copy_count':sum(e[0]=='COPY' for e,_,_ in ao)} +def census(w): + n=w['public'];dim=list(map(len,w['frames']));main=set(w['live']);main|={r+112 for r in w['live']};main|=set(w['hosted']['X2'])|set(w['hosted']['Y2']) + return collections.Counter(abs(dim[e[3]]-dim[e[2]]) for e in w['program'] if e[0]=='MOVE'),collections.Counter(dim[w['final'][r]]-dim[w['initial'][r]] for r in range(n) if r not in main) +def fmt(c):return {str(k):v for k,v in sorted(c.items()) if v} +def delta(a,b): + c=collections.Counter(b);c.subtract(a);return fmt(c) +def now():return datetime.datetime.now(datetime.timezone.utc).isoformat() +def main(): + global BASE,CAND,BI,CI + if not __debug__: raise SystemExit('optimized Python is unsupported') + parser=argparse.ArgumentParser(description='Independent exact comparator on explicit frozen inputs') + for name in ('base','candidate','base-invoice','candidate-invoice','output'): parser.add_argument('--'+name,required=True,type=Path) + args=parser.parse_args();BASE,CAND,BI,CI=args.base,args.candidate,args.base_invoice,args.candidate_invoice + if args.output.exists(): raise SystemExit('output already exists; use a new path') + os.sched_setaffinity(0,{min(os.sched_getaffinity(0))});resource.setrlimit(resource.RLIMIT_AS,(2*1024**3,)*2);resource.setrlimit(resource.RLIMIT_CPU,(570,570));signal.alarm(600) + started=now();t=time.monotonic(); result={'started_utc':started,'base_word':PINS[0],'candidate_word':PINS[1]} + try: + base=load(BASE,PINS[0]);cand=load(CAND,PINS[1]);assert sha(BI.read_bytes())==INVOICE_PINS[0] and sha(CI.read_bytes())==INVOICE_PINS[1], 'invoice pins';assert {k:v for k,v in base.items() if k!='program'}=={k:v for k,v in cand.items() if k!='program'} + result.update(compare(base,cand)) + # Identify a candidate-specific public ADD from literal sequence diff, not constructor annotations. + aa=[tuple(e) for e in base['program']];bb=[tuple(e) for e in cand['program']]; extra=collections.Counter(bb)-collections.Counter(aa) + inserted=[j for j,e in enumerate(bb) if extra[e]>0 and e[0]=='ADD' and all(r=0 for v in residp.values()) and all(v>=0 for v in residt.values());newp=collections.Counter({k:17*v for k,v in cp.items()});newp.update(residp);newt=collections.Counter({k:17*v for k,v in ct.items()});newt.update(residt);assert fmt(newp)==ci['paid'] and fmt(newt)==ci['targets'] + result.update(native_paid_delta=delta(bp,cp),native_target_delta=delta(bt,ct),signed17_paid_delta=delta(oldp,newp),signed17_target_delta=delta(oldt,newt),invoice_candidate_match=True,status='PASS_INDEPENDENT_EXACT') + except BaseException as e: + result.update(status='FAILED_OR_INTERRUPTED',error_type=type(e).__name__,error=str(e)) + finally: + result.update(ended_utc=now(),elapsed_seconds=time.monotonic()-t,base_compressed_sha256=sha(BASE.read_bytes()),candidate_compressed_sha256=sha(CAND.read_bytes()),post_base_raw_sha256=sha(gzip.decompress(BASE.read_bytes())),post_candidate_raw_sha256=sha(gzip.decompress(CAND.read_bytes())),scope='Exact Q rows for all public input columns; ideal-zero owned INIT, inherited supplier reset; chart and liveness checks; unchanged protected event ordered identity. No native/signed physical application, provider admission, independent price engine, covariance, precision, or goal admission.') + with args.output.open('x') as out: json.dump(result,out,indent=2,sort_keys=True);out.write('\n') + print(json.dumps(result,sort_keys=True));return 0 if result['status']=='PASS_INDEPENDENT_EXACT' else 1 +if __name__=='__main__':sys.exit(main()) diff --git a/research/p104-original74-courier226/independent/compare_results.py b/research/p104-original74-courier226/independent/compare_results.py new file mode 100644 index 0000000000..dbfbad7bb7 --- /dev/null +++ b/research/p104-original74-courier226/independent/compare_results.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python3 +"""Compare stable results, allowing recompression and different run timings.""" +import argparse, json +from pathlib import Path +p=argparse.ArgumentParser();p.add_argument('original',type=Path);p.add_argument('relocated',type=Path);a=p.parse_args() +x=json.loads(a.original.read_text());y=json.loads(a.relocated.read_text()) +volatile={'started_utc','ended_utc','elapsed_seconds','base_compressed_sha256','candidate_compressed_sha256'} +for k in volatile:x.pop(k,None);y.pop(k,None) +if x!=y: + for k in sorted(x.keys()|y.keys()): + if x.get(k)!=y.get(k):print('MISMATCH',k,repr(x.get(k)),repr(y.get(k))) + raise SystemExit(1) +print('PASS_STABLE_FIELDS',len(x)) diff --git a/research/p104-original74-courier226/independent/exact.py b/research/p104-original74-courier226/independent/exact.py new file mode 100644 index 0000000000..2796707c89 --- /dev/null +++ b/research/p104-original74-courier226/independent/exact.py @@ -0,0 +1,110 @@ +"""Independent exact row and provider-bank primitives; no source is loaded here.""" +from fractions import Fraction as Q + +class Reject(Exception): + def __init__(self, code, **detail): + self.code, self.detail = code, detail + super().__init__(code) + +def require(ok, code, **detail): + if not ok: raise Reject(code, **detail) + +def add(a, b, q=Q(1)): + out = a.copy() + for k,v in b.items(): + v = out.get(k,Q(0)) + q*v + if v: out[k] = v + else: out.pop(k,None) + return out + +def diff(a,b): + d=add(a,b,Q(-1)) + return None if not d else {'input_column':min(d),'difference':str(d[min(d)])} + +def reconstruct(target, providers): + """Solve target from an ordered, explicitly bounded provider bank over Q. + + A nonzero remainder excludes this bank only. Coefficients are independently + substituted before return. Provider chart and liveness must be checked by caller. + """ + require(len({r for r,_ in providers})==len(providers),'duplicate_provider') + basis={} + for role,row in providers: + v=row.copy(); combo={role:Q(1)} + while v: + p=min(v) + if p not in basis: + factor=v[p] + basis[p]=({k:x/factor for k,x in v.items()}, + {k:x/factor for k,x in combo.items()}) + break + b,c=basis[p]; q=v[p]; v=add(v,b,-q); combo=add(combo,c,-q) + rem=target.copy(); result={} + while rem: + p=min(rem) + if p not in basis: + return {'status':'bank_excluded','rank':len(basis),'residual_column':p, + 'residual_coefficient':str(rem[p])} + b,c=basis[p]; q=rem[p]; rem=add(rem,b,-q); result=add(result,c,q) + actual={}; lookup=dict(providers) + for role,q in result.items(): actual=add(actual,lookup[role],q) + require(actual==target,'internal_span_substitution_failure') + return {'status':'exact_bank_span','rank':len(basis), + 'coefficients':{str(k):str(v) for k,v in sorted(result.items())}} + +def spans(frames): + result=[] + for f in frames: + span={0} + for x in f: + require(type(x) is int and x>0 and x not in span,'invalid_frame') + span |= {x ^ y for y in tuple(span)} + result.append(frozenset(span)) + return result + +class Interpreter: + def __init__(self, word): + self.w=word; self.n=word['public']; self.N=self.n+word['owned_fields'] + self.sp=spans(word['frames']); self.rows=[{r:Q(1)} if r=self.n and r not in self.live and self.chart[r] is None,'bad_init',clock=clock,role=r) + self.live.add(r); self.chart[r]=e[2]; self.rows[r]={}; self.birth[r]=(clock,e[2]); self.peak=max(self.peak,len(self.live)-self.n) + elif op=='CLEAR': + require(r>=self.n and r in self.live and self.chart[r]==e[2],'bad_clear',clock=clock,role=r) + self.lifetimes.append((r,self.birth.pop(r),clock,e[2])); self.live.remove(r); self.chart[r]=None; self.rows[r]={} + elif op=='MOVE': + a,b,owned=e[2:] + require(r in self.live and self.chart[r]==a and type(owned) is bool and owned==(r>=self.n),'bad_move',clock=clock,role=r) + require(self.sp[a]=N or base['program'][i][0]=='COPY'} +assert len(watching)==630 + +def run(w,watch): + q=Interpreter(w);reads={};clears=[];owned=[];paid=collections.Counter();dims=list(map(len,w['frames'])) + for i,e in enumerate(w['program']): + if i in watch:reads[i]=[(r,q.rows[r].copy()) for r in pairs(e)] + if e[0]=='CLEAR':clears.append((e[1],e[2],q.rows[e[1]].copy())) + if any(r>=N for r in pairs(e)):owned.append(e) + if e[0]=='MOVE':paid[abs(dims[e[3]]-dims[e[2]])]+=1 + q.step(i) + q.end();return q,reads,clears,owned,paid +print('begin independent exact baseline',flush=True) +x,xr,xc,xo,xp=run(base,set(watching));print('baseline completed',round(time.monotonic()-start,2),flush=True) +y,yr,yc,yo,yp=run(good,set(watching.values()));print('positive completed',round(time.monotonic()-start,2),flush=True) +assert x.rows==y.rows and xc==yc and xo==yo and all(xr[i]==yr[j] for i,j in watching.items()) +assert len(xc)==len(yc)==74 +z,zr,zc,zo,zp=run(mut,set(watching.values()));print('mutant completed',round(time.monotonic()-start,2),flush=True) +assert yp==zp and yo==zo and len(zc)==74 and len(yc)==74 +# Fixed-caller charges consist of 17 occurrences of the equal native histogram, +# plus the authenticated unchanged outer charges and targets of this invoice. +assert sum(invoice['paid'].values())==110281 and sum(invoice['targets'].values())==22461 +assert all(v>=17*yp[int(k)] for k,v in invoice['paid'].items() if int(k) in yp) +observed=[] +for i,j in watching.items(): + for (role,u),(role2,v) in zip(yr[j],zr[j]): + assert role==role2 + d=diff(v,u) + if d:observed.append({'candidate_clock':j,'baseline_clock':i,'event':good['program'][j],'role':role,'mutant_minus_candidate':d}) +clear=[] +for index,(u,v) in enumerate(zip(yc,zc)): + assert u[:2]==v[:2] + d=diff(v[2],u[2]) + if d:clear.append({'index':index,'role':u[0],'chart':u[1],'mutant_minus_candidate':d}) +outputs=[] +for r,(u,v) in enumerate(zip(y.rows[:N],z.rows[:N])): + d=diff(v,u) + if d:outputs.append({'role':r,'mutant_minus_candidate':d,'candidate_coefficient':str(u.get(d['input_column'],0)),'mutant_coefficient':str(v.get(d['input_column'],0))}) +assert observed or clear or outputs +out={'status':'PASS_ORDERING_NEGATIVE_CONTROL','credits':['ChatGPT Pro suggested the price-preserving ordering mutation','DreamingOfClouds #7617 and credited funded-return predecessors'], 'baseline_sha256':sha(base),'candidate_sha256':sha(good),'mutant_sha256':sha(mut),'source_head':'8ee7e6869b57ce445dbebd1d720366eab1f8ca40','ordering_clock':loc,'source_events':old,'mutant_events':tape[loc:loc+4], 'positive':{'public_rows':N,'protected_observations':len(watching),'ordered_clears':len(yc),'owned_events':len(yo),'exact_positive_matches_baseline':True},'mutation':{'lawful_interpreter_complete':True,'native_paid_equal':dict(sorted(yp.items())),'full_invoice_unchanged':True,'full_paid_count':sum(invoice['paid'].values()),'full_target_count':sum(invoice['targets'].values()),'first_protected_witness':observed[0] if observed else None,'protected_mismatch_count':len(observed),'first_clear_witness':clear[0] if clear else None,'clear_mismatch_count':len(clear),'first_public_output_witness':outputs[0] if outputs else None,'public_output_mismatch_count':len(outputs)},'elapsed_seconds':round(time.monotonic()-start,3)} +a.output.write_text(json.dumps(out,indent=2,sort_keys=True)+'\n');print(json.dumps(out,indent=2),flush=True) diff --git a/research/p104-original74-courier226/src/build_candidate.py b/research/p104-original74-courier226/src/build_candidate.py new file mode 100644 index 0000000000..1faf9ad8d4 --- /dev/null +++ b/research/p104-original74-courier226/src/build_candidate.py @@ -0,0 +1,33 @@ +# SPDX-License-Identifier: Apache-2.0 +"""Prepare #7611's already-published joint main-46 repair on #7644. + +Credits: DreamingOfClouds #7611, SYLforge #7616 W1, ToikY #7644, +Ali Romman #7605 and all retained NOTICE authors. Source pins below. +This builds a word only; it is not a replay, price, or supplier proof. +""" +import gzip, hashlib, json +from pathlib import Path +D=Path(__file__).resolve().parent +SOURCE=D/'source7644/data/word.json.gz' +PEER=D/'source7644/data/peer7611.json' +assert hashlib.sha256(gzip.decompress(SOURCE.read_bytes())).hexdigest()=='86bc8a1d1276c5b8d80a19704f90279e85b24b9490a02b9afa67c1a5b119c114' +assert hashlib.sha256(PEER.read_bytes()).hexdigest()=='64f096802f328cac7e51c655c2c5a1aa6c011dd33ea278c53a05caaa598594df' +w=json.loads(gzip.decompress(SOURCE.read_bytes())); p=w['program']; peer=json.loads(PEER.read_bytes()); edits=dict(peer['insert_before']) +entrance=[e for e in edits[0] if e[1] not in (185,196)] +assert len(entrance)==24 +expected={43543:['MOVE',46,513,914,False],43544:['ADD',145,46,'1',914],45387:['MOVE',46,914,245,False],45388:['ADD',1456,46,'1',245],45390:['ADD',588,46,'-1',245],47973:['MOVE',46,245,127,False]} +assert all(p[i]==e for i,e in expected.items()) +assert p[45391]==['MOVE',818,914,245,False] +assert p[45392]==['ADD',818,1456,'1',245] +assert edits[43525]==[['ADD',145,818,'-1',914]] +assert edits[45372]==[['ADD',588,818,'1',245],['ADD',1456,818,'-1',245]] +assert edits[47953]==[['MOVE',46,513,127,False]] +inserts={43543:edits[43525],45392:edits[45372],47973:edits[47953]} +out=list(entrance) +for i,e in enumerate(p): + out.extend(inserts.get(i,[])) + if i not in expected:out.append(e) +w['program']=out +raw=json.dumps(w,sort_keys=True,separators=(',',':')).encode() +(D/'candidate.json.gz').write_bytes(gzip.compress(raw,compresslevel=9,mtime=0)) +print(json.dumps({'canonical_sha256':hashlib.sha256(raw).hexdigest(),'events':len(out),'entrance_ops':len(entrance),'removed':len(expected),'added_local':sum(map(len,inserts.values()))},indent=2)) diff --git a/research/p104-original74-courier226/src/combined.py b/research/p104-original74-courier226/src/combined.py new file mode 100644 index 0000000000..072e613d1f --- /dev/null +++ b/research/p104-original74-courier226/src/combined.py @@ -0,0 +1,33 @@ +# SPDX-License-Identifier: Apache-2.0 +"""Bind the candidate to #7605 with the #7611 peer edit and retained credit.""" +import json,gzip,hashlib +from pathlib import Path +D=Path(__file__).resolve().parent;S=D/'source7644';load=lambda p:json.loads(gzip.decompress(p.read_bytes()) if p.suffix=='.gz' else p.read_bytes()) +source=load(S/'retained/pr7605/data/word.json.gz'); peer=load(S/'data/peer7611.json');candidate=load(D/'candidate.json.gz');p=source['program']; assert len(p)==peer['base_events']+5 +removed=[[i+5,e] for i,e in peer['delete']] +assert all(p[i]==e for i,e in removed) +insert=[] +for i,ops in peer['insert_before']: + if i==0: + ops=[e for e in ops if e[1] not in (185,196)]+[e for e in ops if e[1] in (185,196)] + insert.append([0,ops]) + else:insert.append([i+5,ops]) +manifest={'base_events':len(p),'delete':removed,'insert_before':insert,'append':[]} +rm=dict(removed);add=dict(insert);reconstructed=[] +for i,e in enumerate(p): + reconstructed.extend(add.get(i,[])) + if i not in rm:reconstructed.append(e) +assert reconstructed==candidate['program'] and dict(source,program=reconstructed)==candidate +(D/'combined-edits.json').write_text(json.dumps(manifest,indent=2)+'\n') +# Exact tariff is recomputed from literal native MOVE ranks, each counted 17 times. +def paid(w): + from collections import Counter + hist=Counter();dim=list(map(len,w['frames'])) + for e in w['program']: + if e[0]=='MOVE':hist[str(abs(dim[e[3]]-dim[e[2]]))]+=1 + return hist +old=load(S/'data/word.json.gz'); x,y=paid(old),paid(candidate); invoice=load(S/'data/invoice.json');delta={k:17*(y[k]-x[k]) for k in set(x)|set(y) if x[k]!=y[k]} +assert delta=={'1':-34,'4':-17,'6':17},delta +for k,v in delta.items():invoice['paid'][k]+=v +(D/'candidate-invoice.json').write_text(json.dumps(invoice,indent=2)+'\n') +print(json.dumps({'candidate_sha256':hashlib.sha256(gzip.decompress((D/'candidate.json.gz').read_bytes())).hexdigest(),'old_7605_events':len(p),'candidate_events':len(reconstructed),'signed_paid_delta':delta,'paid_total':sum(invoice['paid'].values()),'combined_edits_sha256':hashlib.sha256((D/'combined-edits.json').read_bytes()).hexdigest(),'invoice_sha256':hashlib.sha256((D/'candidate-invoice.json').read_bytes()).hexdigest()},indent=2)) diff --git a/research/p104-original74-courier226/src/compose_edits.py b/research/p104-original74-courier226/src/compose_edits.py new file mode 100644 index 0000000000..487faacd7e --- /dev/null +++ b/research/p104-original74-courier226/src/compose_edits.py @@ -0,0 +1,48 @@ +# SPDX-License-Identifier: Apache-2.0 +"""Compose two literal edit manifests; no replay or scientific calculation.""" +import gzip, hashlib, json, runpy +from pathlib import Path +H=Path(__file__).resolve().parent +P=H +def read(p): + return json.loads(gzip.decompress(p.read_bytes()) if p.suffix=='.gz' else p.read_bytes()) +def sha(b): return hashlib.sha256(b).hexdigest() +def canonical(x): return json.dumps(x,sort_keys=True,separators=(',',':')).encode() +def main(): + u=runpy.run_path(str(H/'word_checks.py')) + base=read(P/'source7644/retained/pr7605/data/word.json.gz') + prev=read(P/'baseline.json.gz') + candidate_path=H/'candidate.json.gz' + assert sha(gzip.decompress(candidate_path.read_bytes()))=='450c7e544efb5258c4b8b4858b49cbd7482d14f206cdda1a71833fc73343ac66' + candidate=read(candidate_path) + assert sha(canonical(prev))=='6c52b2fba7c20343a50cb92ed4b997aa9921c78f212ac6428d13fff2bcd014cf' + tagged=u['reconstruct'](base,read(P/'baseline-edits.json')) + assert [e for _,e in tagged]==prev['program'] + m=read(H/'manifest.json') + aligned={v:int(k) for k,v in m['aligned_origins'].items()} + inserts={x['candidate_clock']:x['event'] for x in m['inserted']} + assert len(aligned)+len(inserts)==len(candidate['program']) + assert set(aligned).isdisjoint(inserts) and set(aligned)|set(inserts)==set(range(len(candidate['program']))) + result=[] + for i,e in enumerate(candidate['program']): + if i in aligned: + j=aligned[i]; assert prev['program'][j]==e; result.append(tagged[j]) + else: + assert inserts[i]==e; result.append((-1,e)) + retained=[i for i,e in result if i>=0] + assert retained==sorted(set(retained)) + retained_set=set(retained) + delete=[[i,e] for i,e in enumerate(base['program']) if i not in retained_set] + before={}; pending=[] + for i,e in result: + if i<0: pending.append(e) + else: + if pending: before[i]=pending; pending=[] + assert not pending + edits={'base_events':len(base['program']),'delete':delete,'insert_before':[[i,es] for i,es in before.items()],'append':[]} + assert [e for _,e in u['reconstruct'](base,edits)]==candidate['program'] + assert {k:v for k,v in base.items() if k!='program'}=={k:v for k,v in candidate.items() if k!='program'} + out=H/'combined-edits.json'; assert not out.exists() + out.write_text(json.dumps(edits,sort_keys=True,indent=2)+'\n') + print(json.dumps({'edits_sha256':sha(out.read_bytes()),'candidate_canonical_sha256':sha(canonical(candidate)),'deleted':len(delete),'insertion_anchors':len(before)})) +if __name__=='__main__': main() diff --git a/research/p104-original74-courier226/src/generate.py b/research/p104-original74-courier226/src/generate.py new file mode 100644 index 0000000000..020e8c66a7 --- /dev/null +++ b/research/p104-original74-courier226/src/generate.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python3 +"""Literal #7617 courier adapted to strict #7645; clocks are baseline zero-based.""" +import gzip,hashlib,json +from pathlib import Path +D=Path(__file__).resolve().parent +base=D/'baseline.json.gz' +w=json.loads(gzip.decompress(base.read_bytes())); raw=json.dumps(w,sort_keys=True,separators=(',',':')).encode() +assert hashlib.sha256(raw).hexdigest()=='6c52b2fba7c20343a50cb92ed4b997aa9921c78f212ac6428d13fff2bcd014cf' +p=w['program'] +removed={41470:['MOVE',226,260,719,False],41471:['ADD',473,226,'1',719],43516:['MOVE',226,719,907,False],43517:['ADD',166,226,'-1/2',907],45736:['MOVE',226,907,127,False],45739:['MOVE',990,907,127,False]} +insert={41466:[p[41470],p[41471],['ADD',990,226,'-1',719]],45738:[p[45739],['MOVE',226,719,127,False],['ADD',990,226,'1',127]]} +for i,e in removed.items():assert p[i]==e,(i,p[i],e) +assert p[41465]==['ADD',990,473,'-1',719] and p[41466]==['MOVE',990,719,907,False] +assert p[43515]==['ADD',166,990,'1/2',907] and p[45738]==['ADD',1477,226,'1',127] +assert p[45740]==['ADD',990,1477,'1',127] +out=[];align={};inserted=[] +for i,e in enumerate(p): + for item in insert.get(i,[]):inserted.append({'before_source_clock':i,'candidate_clock':len(out),'event':item});out.append(item) + if i not in removed:align[str(i)]=len(out);out.append(e) +w['program']=out;raw=json.dumps(w,sort_keys=True,separators=(',',':')).encode(); digest=hashlib.sha256(raw).hexdigest() +(D/'candidate.json.gz').write_bytes(gzip.compress(raw,compresslevel=9,mtime=0)) +manifest={'source_word_sha256':'6c52b2fba7c20343a50cb92ed4b997aa9921c78f212ac6428d13fff2bcd014cf','source_head':'8ee7e6869b57ce445dbebd1d720366eab1f8ca40','courier_source_head':'12f6626e194808fa38f473a3e84b2f81e169e3d3','candidate_word_sha256':digest,'source_events':len(p),'candidate_events':len(out),'removed':[{'source_clock':i,'event':e} for i,e in removed.items()],'inserted':inserted,'aligned_origins':align} +(D/'manifest.json').write_text(json.dumps(manifest,sort_keys=True,indent=2)+'\n') +print(json.dumps({k:manifest[k] for k in ('source_word_sha256','candidate_word_sha256','source_events','candidate_events','removed','inserted')},indent=2)) diff --git a/research/p104-original74-courier226/src/paired.py b/research/p104-original74-courier226/src/paired.py new file mode 100644 index 0000000000..25b400fa86 --- /dev/null +++ b/research/p104-original74-courier226/src/paired.py @@ -0,0 +1,79 @@ +#!/usr/bin/env python3 +"""Exact paired replay, negative controls, and fixed-caller invoice for 226/990.""" +import copy,gzip,hashlib,importlib.util,json,time,traceback +from collections import Counter +from pathlib import Path +D=Path(__file__).resolve().parent +P=D +spec=importlib.util.spec_from_file_location('independent7644',P/'source7644/independent.py');m=importlib.util.module_from_spec(spec);spec.loader.exec_module(m) +def load(p):return json.loads(gzip.decompress(p.read_bytes())) +def canon(w):return hashlib.sha256(json.dumps(w,sort_keys=True,separators=(',',':')).encode()).hexdigest() +def save(name,x):(D/name).write_text(json.dumps(x,indent=2,sort_keys=True)+'\n') +a=load(P/'baseline.json.gz');b=load(D/'candidate.json.gz'); M=json.loads((D/'manifest.json').read_text());align={int(k):v for k,v in M['aligned_origins'].items()} +assert canon(a)==M['source_word_sha256'] and canon(b)==M['candidate_word_sha256'] +assert all(a['program'][i]==b['program'][j] for i,j in align.items()) +n=a['public'];operands=lambda e:e[1:3] if e[0] in ('ADD','COPY') else e[1:2] +watch={i:j for i,j in align.items() if max(operands(a['program'][i]))>=n or a['program'][i][0]=='COPY'} +assert len(watch)==630,(len(watch),n) +t=time.monotonic();print('starting paired exact replay',flush=True) +x=m.replay(a,set(watch));print('baseline replay seconds',round(time.monotonic()-t,3),flush=True) +y=m.replay(b,set(watch.values()));print('candidate replay seconds',round(time.monotonic()-t,3),flush=True) +for k in ('rows','erased','lifetime','peak','rises','owned_events','copies','targets','grid','mass'):assert x[k]==y[k],k +assert len(x['erased'])==74 and not x['bad_helpers'] and not y['bad_helpers'] +assert all(x['readings'][i]==y['readings'][j] for i,j in watch.items()) +delta=Counter(y['paid']);delta.subtract(x['paid']);delta={str(k):v for k,v in sorted(delta.items()) if v};assert delta=={'1':-1,'2':-1,'3':1},delta +def observable_hash(z, indices): + data = {'rows': z['rows'], 'erased': z['erased'], 'lifetime': z['lifetime'], + 'peak': z['peak'], 'rises': z['rises'], 'owned_events': z['owned_events'], + 'copies': z['copies'], 'targets': z['targets'], 'grid': z['grid'], 'mass': z['mass'], + 'readings': [z['readings'][i] for i in indices]} + return hashlib.sha256(json.dumps(data,sort_keys=True,separators=(',',':')).encode()).hexdigest() +source_observables = observable_hash(x, sorted(watch)) +candidate_observables = observable_hash(y, [watch[i] for i in sorted(watch)]) +assert source_observables == candidate_observables, 'observable digest mismatch' +result={'status':'PASS_PAIRED_EXACT_STRICT74','source_sha256':canon(a),'candidate_sha256':canon(b),'source_observable_sha256':source_observables,'candidate_observable_sha256':candidate_observables,'public_rows':n,'observations':len(watch),'ordered_clears':len(x['erased']),'copies':len(x['copies']),'peak':x['peak'],'rises':x['rises'],'native_paid_delta':delta,'source_paid':dict(x['paid']),'candidate_paid':dict(y['paid']),'source_targets':dict(x['targets']),'candidate_targets':dict(y['targets']),'grid':x['grid'],'mass':x['mass'],'mass_source_at':x['mass_at'],'mass_candidate_at':y['mass_at'],'elapsed_seconds':round(time.monotonic()-t,3)} +save('paired.json',result);print(json.dumps(result,sort_keys=True),flush=True);print('PASS paired; beginning controls',flush=True) +# Full-caller invoice inherits all fixed external terms and adjusts only exact native delta. +inv=json.loads((P/'baseline-invoice.json').read_text()); inv2=copy.deepcopy(inv) +for k,v in delta.items():inv2['paid'][k]+=17*v +assert sum(inv['paid'].values())==110298 and sum(inv2['paid'].values())==110281 +assert inv['targets']==inv2['targets'] and sum(inv2['targets'].values())==22461 +assert json.loads((D/'candidate-invoice.json').read_text()) == inv2, 'candidate invoice mismatch' +def hist(z): + p={int(k):v for k,v in z['paid'].items()};t={int(k):v for k,v in z['targets'].items()};return {r:t.get(r,0)-p.get(r,0) for r in p.keys()|t.keys()} +from fractions import Fraction +old,new=hist(inv),hist(inv2);lo,hi=m.crossing(old);nl,nh=m.crossing(new) +assert nl>hi +# Conservative public claim follows the original public gate slack of 7e-14 and 1e-13 granularity. +slack=Fraction(7,10**14); scaled=(nl-slack)*10**13;claim=Fraction((scaled.numerator-1)//scaled.denominator,10**13) +assert claim>hi +points={} +for label,h,q,expect in [('candidate_claim_plus_slack',new,claim+slack,1),('old_at_new_claim',old,claim,-1),('candidate_claim',new,claim,1)]: + dl,du=m.decimal_moment(h,q); il,iu=m.dyadic_moment(h,q) + assert (dl>0 and il>0) if expect==1 else (du<0 and iu<0) + points[label]={'point':str(q),'decimal_lower':str(dl),'decimal_upper':str(du),'dyadic_lower':str(il),'dyadic_upper':str(iu)} +price={'source_bracket':[str(lo),str(hi)],'candidate_bracket':[str(nl),str(nh)],'strict_gain_lower':str(nl-hi),'public_claim':str(claim),'public_claim_decimal':str(float(claim)),'public_slack':str(slack),'points':points,'native_paid_delta':delta,'source_paid_count':sum(inv['paid'].values()),'candidate_paid_count':sum(inv2['paid'].values()),'productive_count':sum(inv2['targets'].values()),'method':'#7644 decimal directed bisection plus dyadic integer-root signs, 17-call inherited full invoice'} +save('price.json',price);print('PASS directed prices',price['candidate_bracket'],price['public_claim_decimal'],flush=True) +controls={} +def control(name,mutate): + bad=copy.deepcopy(b); mutate(bad['program']) + try: + z=m.replay(bad,set(watch.values())) + ok=(z['rows']!=x['rows'] or z['erased']!=x['erased'] or any(z['readings'][j]!=x['readings'][i] for i,j in watch.items())) + assert ok,'mutation was not rejected' + controls[name]={'rejected':True,'reason':'paired output or protected observation differs'} + except (AssertionError,ValueError) as e: + if str(e)=='mutation was not rejected':raise + controls[name]={'rejected':True,'reason':str(e)} + print('control',name,controls[name],flush=True);save('controls.json',controls) +def wrong_sign(p): + i=p.index(['ADD',990,226,'-1',719]);p[i]=['ADD',990,226,'1',719] +def chronology(p): + i=p.index(['ADD',990,226,'1',127]);e=p.pop(i);j=p.index(['ADD',1477,226,'1',127]);p.insert(j+1,e) +control('wrong_encode_sign',wrong_sign) +# A late decode after a read of 226 may be observationally equivalent: use the meaningful control +# decode before 990 arrives at chart 127, which must fail legality. +def bad_chronology(p): + i=p.index(['ADD',990,226,'1',127]);e=p.pop(i);j=p.index(['MOVE',990,907,127,False]);p.insert(j,e) +control('decode_before_990_arrives',bad_chronology) +print('PASS all controls elapsed',round(time.monotonic()-t,3),flush=True) diff --git a/research/p104-original74-courier226/src/run.py b/research/p104-original74-courier226/src/run.py new file mode 100644 index 0000000000..9a6ab20205 --- /dev/null +++ b/research/p104-original74-courier226/src/run.py @@ -0,0 +1,314 @@ +# SPDX-License-Identifier: Apache-2.0 +"""Apply the original helper757 native and signed application engines to a frozen derived word.""" +import argparse +from datetime import datetime, timezone +from fractions import Fraction as Q +import inspect +import json +import os +from pathlib import Path +import runpy +import shutil +import signal +import subprocess +import sys +import time +from types import SimpleNamespace + +HERE = Path(__file__).resolve().parent +BASE = 'e20f3f9240ac3f5fa4bbd7ab9b5550d660886901bb209f335409c329ac45d9cd' +PINS = { + 'application.py':'b46e39f81116aaa2feb3283d0e53bf95608313240b16e96f174b43fa7b4ab69e', + 'build.py':'db60577c9cf43d2d7d83b3452c47e3eb43096e566984c3f9c26309238fbc6396', + 'SOURCE-VERSIONS.json':'ce3910302d76c9050c14e1a40edf498be7dd4c5e32773e9ce7384ab99fd27410', + 'data/word.json.gz':'37358c493d18ebc6be386aebb4c17529b38883674731f7009ef4e96a5313467d', + 'data/NATIVE.json':'0ada1e2e7de8887e6ebbd16cda3c8b9738d71873857657ff4fa6e180653cf888', + 'data/SIGNED.json':'0dda72ce4f1612ee6c8b6f4078b538f972d24b0108552d6ec50e545a1458cc16', + 'data/invoice-new.json':'b38afd7ca590b5c4c301ee4fbe0e123f0c7220c2bd1f40c66adf208652e3ce15', + 'data/FINAL.json':'f24baa73a60d084a6d613dad914f1237a5890a049a183b993af39c75dde99add', +} + +def module(path): + return SimpleNamespace(**runpy.run_path(str(path))) + + +def write(path, data): + path.write_text(json.dumps(data, sort_keys=True, indent=2)+'\n') + + +def patch(text, edits, history): + for before, after in edits: + assert text.count(before)==1, ('Expected one occurrence', before) + text = text.replace(before,after) + history.append(dict(before=before,after=after,occurrences=1)) + return text + + +def native_patches(c): + return [ + ("PATCHES=[]", "support=load('chart1062_support', ROOT/'word_checks.py')\nPATCHES=[]"), + (" routes=lambda w:{i:[tuple(e[2:4])for e in w['program']if e[0]=='MOVE'and e[1]==i]for i in range(w['public'])}", + " routes=lambda w:dict(enumerate(support.routes(w)))"), + (" report=[]", """ base=read(ROOT/'frozen-composition/7605-WORD.json.gz') + triples,_=support.chart_contract(base,word) + affected |= {pair for a,b,c in triples for pair in ((a,b),(b,c),(a,c))} + maps={} + report=[]"""), + (" actual=interpreter.recipe(recipe)", " actual=interpreter.recipe(recipe)\n maps[a,b]=actual"), + (" return {'all_affected_pairs':report", " composed=support.physical(interpreter,maps,triples)\n return {'composed_1062':composed,'all_affected_pairs':report"), + (" need(new==dict(peer,program=emitted),'Exact timed helper757 word and unchanged metadata')", + f""" baseline=read(ROOT/'frozen-composition/7605-WORD.json.gz') + need(baseline==dict(peer,program=emitted),'Exact timed helper757 word and unchanged metadata') + need(sha256(canonical(baseline)).hexdigest()=='{BASE}','Exact #7605 canonical word') + path=ROOT/'frozen-composition/EDITS.json' + need(sha256(path.read_bytes()).hexdigest()=='{c['edit_sha']}','Frozen #7605 patch') + tagged=support.reconstruct(baseline,read(path)) + need(new==dict(baseline,program=[e for _,e in tagged]),'Exact frozen edit on original #7605') + triples,expected_delta=support.chart_contract(baseline,new) + need(expected_delta=={c['delta']!r},'Expected native change from original routes')"""), + (" oldN,peerN,N=map(I.native,(old,peer,new))", """ oldN,peerN,baselineN,N=map(I.native,(old,peer,baseline,new)) + baseline_receipt=read(ROOT/'frozen-composition/7605-NATIVE.json') + need(normalized(baselineN)==baseline_receipt['native'] and baseline_receipt['word_canonical_sha256']==sha256(canonical(baseline)).hexdigest(),'Exact original #7605 inventory') + need(all(N[k]==baselineN[k]for k in('public','helpers','rises','owned_peak','lifetimes','bad_inputs')),'Fixed #7605 ownership and target contract') + need(delta(N['paid'],baselineN['paid'])==expected_delta,'Measured paid difference from #7605')"""), + ("delta(N['paid'],peerN['paid'])=={1:-2,2:1}", "delta(baselineN['paid'],peerN['paid'])=={1:-2,2:1}"), + ("delta(N['paid'],oldN['paid'])=={1:-7,2:-5,4:1,6:1,7:1}", "delta(baselineN['paid'],oldN['paid'])=={1:-7,2:-5,4:1,6:1,7:1}"), + ("len(new['program'])==len(old['program'])+164", f"len(baseline['program'])==len(old['program'])+164 and len(new['program'])=={c['length']}"), + (" forward,grid=audit.replay(new,list(enumerate(new['program'])),set())", " forward,grid,base_forward,protected=support.inspect_owned_contacts(baseline,new,tagged,audit)"), + (" controls={}", " controls=support.negatives(new,tagged,base_forward,protected,audit,I.native,rejects,triples)"), + ("native=N,forward=forward_receipt", "native=N,original_7605_operand_clocks=len(protected),original_7605_clear_rows=len(base_forward[2]),forward=forward_receipt"), + ("PASS_HELPER757_COMPLETE_NATIVE", "PASS_CHART1062_COMPLETE_NATIVE"), + ] + + +def signed_patches(c): + return [ + ("PASS_HELPER757_COMPLETE_NATIVE","PASS_CHART1062_COMPLETE_NATIVE"), + ("PASS_HELPER757_COMPLETE_SIGNED_APPLICATION","PASS_CHART1062_COMPLETE_SIGNED_APPLICATION"), + (" assert delta=={1:-102,2:-51,3:17,4:17,5:17} and after['T']==before['T']", + """ bword=read(FROZEN/'7605-WORD.json.gz') + bnative=ind.native(bword) + assert sha256(canonical(bword)).hexdigest()=='""" + BASE + """' and normal(bnative)==read(FROZEN/'7605-NATIVE.json')['native'] and not bnative['bad_inputs'] + binvoice=ind.invoices(bword,C,bnative) + prior=read(FROZEN/'7605-SIGNED.json')['price'] + assert normal(binvoice)==prior['after'] and after['T']==binvoice['T']==before['T'] + assert binvoice['S']==1424 and not binvoice['empty_root_credits'] + def diff(x,y):return {r:x.get(r,0)-y.get(r,0) for r in set(x)|set(y) if x.get(r,0)!=y.get(r,0)} + assert diff(binvoice['P'],before['P'])=={1:-102,2:-51,3:17,4:17,5:17} + assert diff(after['P'],binvoice['P'])==""" + repr({r:17*n for r,n in c['delta'].items()})), + ("sum(after['P'].values())==110366",f"sum(binvoice['P'].values())==110366 and sum(after['P'].values())=={c['paid']}"), + ("{r:after['P'].get(r,0)-peer_invoice['P'].get(r,0)for r in ranks if after['P'].get(r,0)!=peer_invoice['P'].get(r,0)}=={1:-34,2:17}","diff(binvoice['P'],peer_invoice['P'])=={1:-34,2:17}"), + (" public_claim=Q('0.0036504442446')",f""" public_claim=Q({c['claim']!r}) + assert Q(prior['gate']['raw_bracket'][1])0 + assert len(native['charts']['composed_1062'])=={len(c['triples'])} + assert partial['crossing_probe_rejected'] + return dict(status='PASS_CHART1062_FINAL_APPLICATION', claim={c['claim']!r}, + original_canonical_sha256={BASE!r}, original_7605_raw=base['raw_crossing'], + complete_paid_delta={repr({r:17*n for r,n in c['delta'].items()})}, + ordinary_change_over_7605=ordinary-base['ordinary_bound'], + tape_change_over_7605={{k:tape[k]-base['tape'][k] for k in fields}},"""), + ("paid_calls=110366",f"paid_calls={c['paid']}"), + ],history) + + +def prepare(args,root): + assert not root.exists() + u=module(HERE/'word_checks.py') + for path, pin in PINS.items(): + assert u.digest((args.package/path).read_bytes())==pin, path + app=module(args.package/'application.py') + baseline=app.authenticate() + word=app.read(args.word) + assert u.digest(app.canonical(baseline))==BASE and u.digest(app.canonical(word))==args.sha + assert u.digest(args.incumbent.read_bytes())=='7d54c1ec036d4c096526dd95e06892ca99210812d51a503b22f6d78243330ca9', 'Pinned #7645 incumbent invoice' + edits=app.read(args.edits) + tagged=u.reconstruct(baseline,edits) + assert dict(baseline,program=[e for _,e in tagged])==word + triples,delta=u.chart_contract(baseline,word) + old_bill=app.read(args.package/'data/invoice-new.json') + bill=app.read(args.invoice) + assert {k:v for k,v in old_bill.items() if k!='paid'}=={k:v for k,v in bill.items() if k!='paid'} + assert u.differences({int(r):n for r,n in bill['paid'].items()}, + {int(r):n for r,n in old_bill['paid'].items()})=={r:17*n for r,n in delta.items()} + assert Q(args.claim)>Q(app.read(args.package/'data/FINAL.json')['raw_crossing'][1]) + c=dict(sha=args.sha,edit_sha=u.digest(args.edits.read_bytes()),claim=args.claim,triples=triples,delta=delta, + paid=sum(bill['paid'].values()),length=len(word['program']),package=str(args.package.resolve())) + app.prepare(root,word) + f=root/'frozen-composition' + shutil.copyfile(HERE/'word_checks.py',root/'word_checks.py') + for name,out in [('word.json.gz','7605-WORD.json.gz'),('NATIVE.json','7605-NATIVE.json'), + ('SIGNED.json','7605-SIGNED.json'),('FINAL.json','7605-FINAL.json')]: + shutil.copyfile(args.package/'data'/name,f/out) + for path,out in [(args.word,'CANDIDATE-WORD.json.gz'),(args.edits,'EDITS.json'),(args.invoice,'CANDIDATE-INVOICE.json'),(args.incumbent,'7645-INVOICE.json')]: + shutil.copyfile(path,f/out) + shutil.copyfile(args.word,root/'producer54/reroute/WORD.json.gz') + history={} + for stage,edits in [('native',native_patches(c)),('signed',signed_patches(c))]: + path=root/f'producer54/validation_{stage}/run.py' + original=path.read_text() + records=[] + new=patch(original,edits,records) + compile(new,str(path),'exec') + path.write_text(new) + history[stage]=dict(original=u.digest(original.encode()),adapted=u.digest(new.encode()),edits=records) + records=[] + source=final_source(app,c,records) + path=root/'final_application.py' + compile(source,str(path),'exec') + path.write_text(source) + history['final']=dict(adapted=u.digest(source.encode()),edits=records) + write(root/'CHART1062-ADAPTATION.json',history) + pinned=[p for p in f.iterdir() if p.is_file()]+[root/'word_checks.py',root/'final_application.py', + root/'producer54/reroute/WORD.json.gz',root/'producer54/validation_native/run.py', + root/'producer54/validation_signed/run.py',root/'CHART1062-ADAPTATION.json'] + c['prepared_pins']={str(p.relative_to(root)):u.digest(p.read_bytes()) for p in pinned} + write(root/'FROZEN.json',c) + print(json.dumps({k:v for k,v in c.items() if k!='prepared_pins'}),flush=True) + + +def price_check(root,app,c): + """Independent integer interval prices for old and new; signed stage separately checks log/exp.""" + engine=module(Path(c['package'])/'retained/pricing/evaluate_recursive_power.py') + old,_=engine.load_invoice(Path(c['package'])/'data/invoice-new.json') + new,_=engine.load_invoice(root/'frozen-composition/CANDIDATE-INVOICE.json') + incumbent7645,_=engine.load_invoice(root/'frozen-composition/7645-INVOICE.json') + zero=dict(new,paid={},targets={}) + signed=app.read(root/'producer54/validation_signed/RESULT.json') + lo,hi=map(Q,signed['price']['gate']['raw_bracket']) + claim=Q(c['claim']) + certs={} + for label,invo,k,sign in [('incumbent_at_claim',old,claim,'new_cost_higher'),('7645_at_claim',incumbent7645,claim,'new_cost_higher'),('claim',new,claim,'new_cost_lower'), + ('tested',new,claim+Q(7,10**14),'new_cost_lower'),('lower',new,lo,'new_cost_lower'), + ('upper',new,hi,'new_cost_higher')]: + bound=engine.evaluate(zero,invo,1-k,bits=256) + assert bound['classification']==sign,label + certs[label]={'kappa':str(k),'integer_bounds':bound} + # A separate directed log/exp interval engine compares both literal invoices. + interval_path=Path(c['package'])/'retained/role902/engines/interval_gate.py' + assert module(HERE/'word_checks.py').digest(interval_path.read_bytes())=='60a743d13f668ef86db4b8215b4d5d04430a671ba6f1fe06d9c1c4c3dfe86da5' + directed=module(interval_path) + def signed_hist(path): + invo=app.read(path) + ranks=set(invo['paid']) | set(invo['targets']) + return {int(r):invo['targets'].get(r,0)-invo['paid'].get(r,0) for r in ranks} + old_h=signed_hist(root/'frozen-composition/7645-INVOICE.json') + new_h=signed_hist(root/'frozen-composition/CANDIDATE-INVOICE.json') + old_interval=directed.moment(old_h,claim) + new_interval=directed.moment(new_h,claim) + assert old_interval[1]<0 and new_interval[0]>0, 'Directed decimal interval #7645 comparison' + certs['logexp_7645_at_claim']={'kappa':str(claim), 'incumbent_interval':list(map(str,old_interval)), + 'candidate_interval':list(map(str,new_interval)), 'scale':'10^80'} + write(root/'DIRECTED-PRICE.json',certs) + + +def launch(stage,root,package=None,timeout=480): + c=json.loads((root/'FROZEN.json').read_bytes()) + u=module(HERE/'word_checks.py') + for name,pin in c['prepared_pins'].items(): + assert u.digest((root/name).read_bytes())==pin,name + pkg=(package or Path(c['package'])).resolve() + c['package']=str(pkg) + for name,pin in PINS.items(): + assert u.digest((pkg/name).read_bytes())==pin,name + app=module(pkg/'application.py') + assert u.digest(app.canonical(app.authenticate()))==BASE + if stage=='signed': + native_record=app.read(root/'native.receipt.json') + assert native_record['exit']==0 and native_record['candidate']==c['sha'] + native=root/'producer54/validation_native/NATIVE-RESULT.json' + assert native_record['result_sha256']==u.digest(native.read_bytes()) + assert app.read(native)['word_canonical_sha256']==c['sha'] + assert not (root/f'{stage}.receipt.json').exists() + cache=root/'isolated/pycache' + script=root/f'producer54/validation_{stage}/run.py' + command=[sys.executable,'-I','-B','-X',f'pycache_prefix={cache}',str(script)] + environment=dict(os.environ,TMPDIR=str(root/'isolated'),PYTHONPYCACHEPREFIX=str(cache), + OMP_NUM_THREADS='1',OPENBLAS_NUM_THREADS='1',MKL_NUM_THREADS='1',VECLIB_MAXIMUM_THREADS='1') + def interrupted(signum, _frame): + raise KeyboardInterrupt(f'signal {signum}') + signal.signal(signal.SIGTERM, interrupted) + started=datetime.now(timezone.utc).isoformat(); tick=time.monotonic() + with (root/f'{stage}.stdout').open('x') as out,(root/f'{stage}.stderr').open('x') as err: + proc=subprocess.Popen(command,cwd=root,env=environment,stdout=out,stderr=err,start_new_session=True) + try: + code=proc.wait(timeout=timeout) + except subprocess.TimeoutExpired: + os.killpg(proc.pid,signal.SIGTERM) + try: + proc.wait(timeout=5) + except subprocess.TimeoutExpired: + os.killpg(proc.pid,signal.SIGKILL);proc.wait() + code=124 + except BaseException: + # The scientific child starts a separate session. Never leave it alive + # when the supervising driver is interrupted. Reap before propagating. + try: + os.killpg(proc.pid, signal.SIGKILL) + except ProcessLookupError: + pass + proc.wait() + raise + receipt=dict(stage=stage,exit=code,seconds=time.monotonic()-tick,started=started, + ended=datetime.now(timezone.utc).isoformat(),candidate=c['sha'],command=command) + if code==0: + record=root/f'producer54/validation_{stage}'/('NATIVE-RESULT.json' if stage=='native' else 'RESULT.json') + receipt['result_sha256']=u.digest(record.read_bytes()) + write(root/f'{stage}.receipt.json',receipt) + print(json.dumps(receipt),flush=True) + if code: + sys.stderr.write((root/f'{stage}.stderr').read_text()) + raise SystemExit(code) + if stage=='signed': + namespace=vars(app).copy() + namespace.update(NATIVE_MARKER='PASS_CHART1062_COMPLETE_NATIVE',SIGNED_MARKER='PASS_CHART1062_COMPLETE_SIGNED_APPLICATION') + source=root/'final_application.py' + exec(compile(source.read_text(),str(source),'exec'),namespace) + result=namespace['final_application'](root) + assert result['candidate_canonical_sha256']==c['sha'] + price_check(root,app,c) + write(root/'FINAL.json',result) + print(json.dumps(result,sort_keys=True),flush=True) + + +def main(): + assert __debug__ and sys.version_info[:2]==(3,12) and sys.dont_write_bytecode, 'Use Python 3.12 -I -B' + parser=argparse.ArgumentParser(description=__doc__) + parser.add_argument('stage',choices=('prepare','native','signed')) + parser.add_argument('--work',type=Path,default=HERE/'work') + parser.add_argument('--package',type=Path,help='Exact original #7605 research/p104-timed-helper757 directory') + parser.add_argument('--word',type=Path) + parser.add_argument('--sha') + parser.add_argument('--edits',type=Path) + parser.add_argument('--invoice',type=Path) + parser.add_argument('--incumbent',type=Path,help='Exact #7645 candidate invoice') + parser.add_argument('--claim') + parser.add_argument('--timeout',type=int,default=480,help='Per-stage process timeout, at most 1800 seconds') + args=parser.parse_args() + assert 1 <= args.timeout <= 1800 + root=args.work.resolve() + assert root.is_relative_to(HERE) and root!=HERE + if args.stage=='prepare': + assert all((args.package,args.word,args.sha,args.edits,args.invoice,args.incumbent,args.claim)) + prepare(args,root) + else: + launch(args.stage,root,args.package,args.timeout) + +if __name__=='__main__': + main() diff --git a/research/p104-original74-courier226/src/word_checks.py b/research/p104-original74-courier226/src/word_checks.py new file mode 100644 index 0000000000..396fe1b613 --- /dev/null +++ b/research/p104-original74-courier226/src/word_checks.py @@ -0,0 +1,145 @@ +# SPDX-License-Identifier: Apache-2.0 +"""Proof checks added to Ali Romman's #7605 application for the #7611 chart-1062 component. +Retained compiler, interpreter, and application keep their original authors and attribution. +""" +from collections import Counter +from copy import deepcopy +from hashlib import sha256 +import json + + +def digest(blob): + return sha256(blob).hexdigest() + + +def differences(left, right): + out = Counter(left) + out.subtract(right) + return {key: n for key, n in out.items() if n} + + +def reconstruct(base, edits): + tape = base['program'] + deletes = dict(edits['delete']) + inserts = dict(edits['insert_before']) + assert len(deletes) == len(edits['delete']) and len(inserts) == len(edits['insert_before']) + assert not edits['append'] and edits.get('base_events', len(tape)) == len(tape) + assert all(type(i) is int and 0 <= i < len(tape) and tape[i] == e for i, e in deletes.items()) + assert all(type(i) is int and 0 <= i < len(tape) for i in inserts) + added, tagged = 0, [] + for i, old in enumerate(tape): + for event in inserts.get(i, ()): + added += 1 + tagged.append((-added, event)) + if i not in deletes: + tagged.append((i, old)) + return tagged + + +def routes(word): + out = [[] for _ in range(word['public'])] + for op in word['program']: + if op[0] == 'MOVE' and not op[4]: + out[op[1]].append(tuple(op[2:4])) + return out + + +def chart_contract(base, word): + # Exact fixed #7644 role-82/185 paths plus isolated #7611 role-46 path. + old, new = routes(base), routes(word) + paths = {82:(740,1062,1071), 185:(401,1062,922), 46:(513,914,245,127), 226:(719,907,127)} + changed = [i for i in range(base['public']) if old[i] != new[i]] + assert set(changed) == set(paths), 'All and only declared paid routes' + paid = Counter() + triples=[] + for role in changed: + path=paths[role] + hops=list(zip(path,path[1:])) + matches=[i for i in range(len(old[role])) if old[role][i:i+len(hops)]==hops] + assert len(matches)==1, ('Unique old route',role) + at=matches[0] + assert old[role][:at]+[(path[0],path[-1])]+old[role][at+len(hops):]==new[role] + dims=[len(base['frames'][j]) for j in path] + ranks=[y-x for x,y in zip(dims,dims[1:])] + assert all(x>0 for x in ranks) + paid[dims[-1]-dims[0]]+=1 + for rank in ranks: paid[rank]-=1 + # 3-hop composition is two exact 2-hop identities; intermediate recipe required. + triples.extend((path[0],path[i],path[i+1]) for i in range(1,len(path)-1)) + return triples, {r:v for r,v in paid.items() if v} + + +def inspect_owned_contacts(base, word, tagged, audit): + original = list(enumerate(base['program'])) + def protected(items): + result = {} + for i,e in items: + operands = e[1:3] if e[0] in ('ADD','COPY') else e[1:2] + if any(r >= base['public'] for r in operands): + result[i] = e + return result + contacts = protected(original) + assert list(contacts.items()) == list(protected(tagged).items()), 'All owned operand clocks and literal events' + checked = {i for i,e in contacts.items() if e[0] in ('ADD','COPY','SCALE')} + before, base_grid = audit.replay(base, original, checked) + after, grid = audit.replay(word, tagged, checked) + assert len(before[0]) == 1569 and len(before[2]) == 74 + assert before == after, 'Exact endpoints, protected source versions, all ordered erasures, guarded COPY products, owned lifetimes and owned MOVE events' + return after, grid, before, checked + + +def physical(v, recipes, triples): + counts = [] + for a,b,c in triples: + via = recipes[a,b] + recipes[b,c] + direct = recipes[a,c] + for left,right in ((via,direct),(v.adjoint(via),v.adjoint(direct))): + v.equal(left,right,'Composed signed action and absolute phase') + for column in range(512): + assert v.state(left,column) == v.state(right,column), 'All composed Gaussian columns' + counts.append({'frames':[a,b,c], 'forward_columns':512, 'adjoint_columns':512}) + return counts + + +def negatives(word, tagged, baseline, checked, audit, native, rejects, triples): + controls = {} + # Keep source's original roles and add the actual final role-46 direct move. + for role,a,b,c in ((82,740,1062,1071),(185,401,1062,922),(46,513,245,127),(226,719,907,127)): + event = next(e for e in word['program'] if e[0] == 'MOVE' and not e[4] and e[2:4] == [a,c] and e[1] == role) + assert word['program'].count(event) == 1 + for fault in ('missing', 'wrong_source'): + bad = deepcopy(word) + idx = bad['program'].index(event) + if fault == 'missing': + del bad['program'][idx] + else: + bad['program'][idx][2] = b + controls[f'{fault}_role_{role}_direct_move'] = rejects(lambda: native(bad)) + scalar_index = next(i for i,(origin,e) in enumerate(tagged) if origin < 0 and e[:2] == ['ADD',185]) + mutant = tagged[:scalar_index]+tagged[scalar_index+1:] + def check_removed(): + result, _ = audit.replay(dict(word,program=[e for _,e in mutant]), mutant, checked) + assert result == baseline, 'Exact protected rows and return functions' + controls['removed_role185_compensation'] = rejects(check_removed) + # Every new role-46 local correction must be independently observable. + for event in (["ADD",145,818,"-1",914], ["ADD",588,818,"1",245], + ["ADD",1456,818,"-1",245]): + hits=[i for i,(origin,e) in enumerate(tagged) if origin < 0 and e == event] + assert len(hits)==1, ('Unique inserted role-46 correction',event) + i=hits[0] + mutant=tagged[:i]+tagged[i+1:] + def check_omitted(): + result,_=audit.replay(dict(word,program=[e for _,e in mutant]),mutant,checked) + assert result==baseline, 'Exact protected rows and return functions' + controls[f'removed_role46_correction_{event[1]}_{event[4]}']=rejects(check_omitted) + # Each newly added courier operation must matter to the full protected replay. + for event in (["ADD",990,226,"-1",719], ["ADD",990,226,"1",127]): + hits=[i for i,(origin,e) in enumerate(tagged) if origin < 0 and e == event] + assert len(hits)==1, ('Unique courier correction',event) + i=hits[0] + mutant=tagged[:i]+tagged[i+1:] + def check_omitted_courier(): + result,_=audit.replay(dict(word,program=[e for _,e in mutant]),mutant,checked) + assert result==baseline, 'Exact protected rows and return functions' + controls[f'removed_courier_correction_{event[3]}_{event[4]}']=rejects(check_omitted_courier) + return controls diff --git a/research/p104-original74-courier226/verify.py b/research/p104-original74-courier226/verify.py new file mode 100644 index 0000000000..6ef5816a42 --- /dev/null +++ b/research/p104-original74-courier226/verify.py @@ -0,0 +1,202 @@ +#!/usr/bin/env python3 +"""Offline, staged #7644-to-main46 reconstruction and application replay.""" +import hashlib +import json +import os +from pathlib import Path, PurePosixPath +import secrets +import shutil +import subprocess +import sys +import tarfile +import tempfile + +PACKAGE = Path(__file__).resolve().parent +DATA = PACKAGE / 'data' +SOURCE_SHA = 'a1bbe4897942e6e22ae947d39803e7db821e2774e25b3164b470ade7406f9835' +BASELINE_SHA = '6c52b2fba7c20343a50cb92ed4b997aa9921c78f212ac6428d13fff2bcd014cf' +CANDIDATE_SHA = '450c7e544efb5258c4b8b4858b49cbd7482d14f206cdda1a71833fc73343ac66' +CLAIM = '0.0036524238117' +EXTERNAL = { + 'retained/pr7605/retained/role902/upstream/inputs/pr7480/inputs/pr7334.tar.gz': + ('pr7334.tar.gz', '721f839cc48605cccd3629d11456e1fcbb3810a624803ad27e99a1bfd6246211'), + 'retained/pr7605/retained/two-contractions/published/replay.zip': + ('replay.zip', '0bf0082cab9b6d2bb6657903a4169a3d04c380927982fc4672a6a44edda79a2a'), +} +SOURCE_PINS = {'build_candidate.py': 'd01c8a66b787b5203b4eaea2a0d9fb7b485466bd73471622dd121bcae5c8f712', 'combined.py': '02bf9ae9aabf50a894fa841d8d6177edac743999ef1fca1b9d705003067f4a9b', 'generate.py': 'f3cd924e6fc0a4a24ebb26cd42e42d9199a3b34e1c68ade3ab075bc4c3e87cce', 'compose_edits.py': '47c935668585e888729ec19594461fd70b488a22fd781939e57dbe2d26f0d537', 'paired.py': '82762c73e49dbb95ca5c3b20a33fb4e15fe94889c65b328e971e014c06abcab5', 'word_checks.py': '91c98e69926c6e2c3d285e3a2116a6919c7b12746c845f36770ea2ebfad071a9', 'run.py': 'df989c97e7d566929388f4e9cdb31958a83a3171e771a776bcd17df095f7ab3e'} +IDENTITY = hashlib.sha256(str(PACKAGE).encode()).hexdigest()[:16] +POINTER = Path(tempfile.gettempdir()) / ('p104-courier226-%s-%s.json' % (os.getuid(), IDENTITY)) + + +def require(condition, message): + if not condition: + raise ValueError(message) + + +def digest(data): + return hashlib.sha256(data).hexdigest() + + +def execute(script, *arguments): + command = [sys.executable, '-I', '-B', str(script), *map(str, arguments)] + subprocess.run(command, check=True) + + +def workspace(): + require(POINTER.is_file() and not POINTER.is_symlink(), 'missing or unsafe replay pointer') + require(POINTER.stat().st_uid == os.getuid(), 'unsafe replay pointer owner') + record = json.loads(POINTER.read_text()) + root = Path(record['workspace']) + require(root.is_dir() and not root.is_symlink() and root.parent == Path(tempfile.gettempdir()).resolve(), 'unsafe workspace') + require(root.name.startswith('p104-original74-work-') and root.stat().st_uid == os.getuid(), 'workspace ownership') + marker = root / '.replay-owner.json' + require(marker.is_file() and not marker.is_symlink() and marker.stat().st_uid == os.getuid(), 'unsafe workspace marker') + require(json.loads(marker.read_text()) == {'token': record['token'], 'package': str(PACKAGE)}, 'workspace identity mismatch') + return root + + +def extract_source(root): + archive = DATA / 'source7644-remainder.tar.gz' + manifest = json.loads((DATA / 'source-manifest.json').read_text()) + require(digest(archive.read_bytes()) == SOURCE_SHA == manifest['archive_sha256'], 'source archive pin') + files = manifest['files'] + require(len(files) == 156 and manifest['retained_7605_closure_files'] == 138, 'source inventory') + target = root / 'source7644' + target.mkdir(mode=0o700) + seen = set() + with tarfile.open(archive, mode='r:gz') as bundle: + for member in bundle: + name = member.name + parts = PurePosixPath(name) + require(member.isfile() and not parts.is_absolute() and '..' not in parts.parts and name in files and name not in seen, 'unexpected archive member') + payload = bundle.extractfile(member).read() + require(digest(payload) == files[name], 'source file hash: ' + name) + path = target.joinpath(*parts.parts) + path.parent.mkdir(parents=True, exist_ok=True) + with path.open('xb') as stream: + stream.write(payload) + seen.add(name) + external = manifest['external_blobs'] + require(external == {name: item[0] for name, item in EXTERNAL.items()} and not (seen & set(external)), 'external source inventory') + for name, local_name in external.items(): + parts = PurePosixPath(name) + require(not parts.is_absolute() and '..' not in parts.parts and name in files, 'external destination') + require(local_name in ('pr7334.tar.gz', 'replay.zip'), 'external filename') + payload = (DATA / local_name).read_bytes() + require(digest(payload) == files[name] == EXTERNAL[name][1], 'external source hash: ' + name) + path = target.joinpath(*parts.parts) + path.parent.mkdir(parents=True, exist_ok=True) + with path.open('xb') as stream: + stream.write(payload) + seen.add(name) + require(seen == set(files), 'incomplete source archive') + + +def create_workspace(): + flags = os.O_CREAT | os.O_EXCL | os.O_WRONLY + if hasattr(os, 'O_NOFOLLOW'): + flags |= os.O_NOFOLLOW + descriptor = os.open(POINTER, flags, 0o600) + root = Path(tempfile.mkdtemp(prefix='p104-original74-work-')).resolve() + token = secrets.token_hex(32) + (root / '.replay-owner.json').write_text(json.dumps({'token': token, 'package': str(PACKAGE)})) + with os.fdopen(descriptor, 'w') as stream: + json.dump({'workspace': str(root), 'token': token}, stream) + return root + + +def check_package_sources(): + for name, pin in SOURCE_PINS.items(): + require(digest((PACKAGE / 'src' / name).read_bytes()) == pin, 'package source pin: ' + name) + + +def prepare(): + check_package_sources() + execute(PACKAGE / 'controls.py') + root = create_workspace() + print('REPLAY_WORKSPACE', root, flush=True) + extract_source(root) + for name in ('build_candidate.py', 'combined.py', 'generate.py', 'compose_edits.py', 'paired.py', 'word_checks.py'): + shutil.copyfile(PACKAGE / 'src' / name, root / name) + application = root / 'application' + application.mkdir() + shutil.copyfile(PACKAGE / 'src' / 'word_checks.py', application / 'word_checks.py') + source = (PACKAGE / 'src' / 'run.py').read_text() + runtime_edits = [('start_new_session=True', 'start_new_session=False'), + ('os.killpg(proc.pid,signal.SIGTERM)', 'proc.terminate()'), + ('os.killpg(proc.pid,signal.SIGKILL)', 'proc.kill()'), + ('os.killpg(proc.pid, signal.SIGKILL)', 'proc.kill()')] + for before, after in runtime_edits: + require(source.count(before) == 1, 'runtime adapter anchor: ' + before) + source = source.replace(before, after) + compile(source, str(application / 'run.py'), 'exec') + (application / 'run.py').write_text(source) + execute(root / 'source7644' / 'build.py') + execute(root / 'build_candidate.py') + execute(root / 'combined.py') + import gzip + require(digest(gzip.decompress((root / 'candidate.json.gz').read_bytes())) == BASELINE_SHA, 'baseline word') + (root / 'candidate.json.gz').rename(root / 'baseline.json.gz') + (root / 'combined-edits.json').rename(root / 'baseline-edits.json') + (root / 'candidate-invoice.json').rename(root / 'baseline-invoice.json') + require(digest((root / 'baseline-invoice.json').read_bytes()) == '7d54c1ec036d4c096526dd95e06892ca99210812d51a503b22f6d78243330ca9', 'baseline invoice') + execute(root / 'generate.py') + require(digest(gzip.decompress((root / 'candidate.json.gz').read_bytes())) == CANDIDATE_SHA, 'candidate word') + execute(root / 'compose_edits.py') + invoice = json.loads((root / 'baseline-invoice.json').read_text()) + for rank, delta in {'1': -17, '2': -17, '3': 17}.items(): + invoice['paid'][rank] += delta + (root / 'candidate-invoice.json').write_text(json.dumps(invoice, indent=2, sort_keys=True) + '\n') + require(digest((root / 'candidate-invoice.json').read_bytes()) == 'fa0c37a9e67d0a82850c4fcfd5cbdb3bd88e1f8db329176e5669da6c7788f6a2', 'candidate invoice') + execute(application / 'run.py', 'prepare', '--work', application / 'work', + '--package', root / 'source7644' / 'retained' / 'pr7605', + '--word', root / 'candidate.json.gz', '--sha', CANDIDATE_SHA, + '--edits', root / 'combined-edits.json', '--invoice', root / 'candidate-invoice.json', + '--incumbent', root / 'baseline-invoice.json', '--claim', CLAIM) + print('PASS_STRICT74_PREPARE', CANDIDATE_SHA, flush=True) + + +def run_stage(stage): + check_package_sources() + root = workspace() + for name in ('paired.py', 'word_checks.py'): + require(digest((root / name).read_bytes()) == SOURCE_PINS[name], 'workspace source pin: ' + name) + application = root / 'application' + if stage == 'native': + execute(root / 'paired.py') + result = json.loads((root / 'paired.json').read_text()) + require(result['status'] == 'PASS_PAIRED_EXACT_STRICT74' and result['source_sha256'] == BASELINE_SHA and result['candidate_sha256'] == CANDIDATE_SHA and result['observations'] == 630 and result['ordered_clears'] == 74 and result['copies'] == 1, 'strict original interface') + controls = json.loads((root / 'controls.json').read_text()) + require(all(controls[name]['rejected'] for name in ('wrong_encode_sign', 'decode_before_990_arrives')), 'negative controls') + # The registered hook enforces the stage process-group limit. Its + # group-wide termination includes the attached scientific child. + timeout = 1800 + execute(application / 'run.py', stage, '--work', application / 'work', + '--package', root / 'source7644' / 'retained' / 'pr7605', '--timeout', timeout) + if stage == 'signed': + final = json.loads((application / 'work' / 'FINAL.json').read_text()) + require(final['status'] == 'PASS_CHART1062_FINAL_APPLICATION' and final['candidate_canonical_sha256'] == CANDIDATE_SHA and final['claim'] == CLAIM and final['paid_calls'] == 110281 and final['productive_calls'] == 22461 and final['tape']['native_invocations'] == 17 and final['outer']['BIT_just_below_effective_rejected'] and final['outer']['strict_count'] == 54, 'full final receipt') + require((application / 'work' / 'DIRECTED-PRICE.json').is_file(), 'directed price') + print('PASS_STRICT74_COMPLETE', CANDIDATE_SHA, flush=True) + shutil.rmtree(root) + POINTER.unlink() + else: + print('PASS_STRICT74_NATIVE', CANDIDATE_SHA, flush=True) + + +def main(): + require(sys.version_info[:2] == (3, 12) and sys.dont_write_bytecode and __debug__, 'use Python 3.12 -I -B') + require(len(sys.argv) == 2 and sys.argv[1] in ('prepare', 'native', 'signed', 'cleanup'), 'expected prepare, native, signed or cleanup') + stage = sys.argv[1] + if stage == 'prepare': + prepare() + elif stage == 'cleanup': + root = workspace() + shutil.rmtree(root) + POINTER.unlink() + else: + run_stage(stage) + + +if __name__ == '__main__': + main()