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/phase-b-54-batches/CERTIFICATE.json b/research/phase-b-54-batches/CERTIFICATE.json new file mode 100644 index 0000000000..7b04dda07c --- /dev/null +++ b/research/phase-b-54-batches/CERTIFICATE.json @@ -0,0 +1,1141 @@ +{ + "schema_version": 1, + "phase": "B", + "batch_size": 16, + "batches": [ + { + "gap": 0, + "event_ids": [ + 12760, + 12762, + 12764, + 12766, + 12768, + 12770, + 12772, + 12774, + 12776, + 12778, + 12780, + 12782, + 12784, + 12786, + 12788, + 12790 + ] + }, + { + "gap": 0, + "event_ids": [ + 12792, + 12794, + 12798, + 12800, + 12804, + 12806, + 12810, + 12812, + 12816, + 12818, + 12820, + 12822, + 12824, + 12827, + 12829, + 12831 + ] + }, + { + "gap": 1387, + "event_ids": [ + 14555, + 14552, + 14556, + 14553, + 14549, + 14546, + 14550, + 14547, + 14543, + 14540, + 14544, + 14541, + 14537, + 14534, + 14538, + 14535 + ] + }, + { + "gap": 0, + "event_ids": [ + 12833, + 12836, + 12838, + 12840, + 12842, + 12844, + 12846, + 12848, + 12850, + 12852, + 12854, + 12856, + 12858, + 12872, + 12874, + 12876 + ] + }, + { + "gap": 0, + "event_ids": [ + 12878, + 12892, + 12894, + 12896, + 12898, + 12928, + 12948, + 12966, + 12968, + 12989, + 13003, + 13007, + 13022, + 13025, + 13039, + 13041 + ] + }, + { + "gap": 1309, + "event_ids": [ + 14439, + 14442, + 14427, + 14430, + 14514, + 14511, + 14466, + 14472, + 14451, + 14457, + 14526, + 14481, + 14523, + 14478, + 14448, + 14496 + ] + }, + { + "gap": 2200, + "event_ids": [ + 15531, + 15534, + 15530, + 15533, + 15540, + 15543, + 15566, + 15569, + 15576, + 15579, + 15602, + 15605, + 15612, + 15615, + 15638, + 15641 + ] + }, + { + "gap": 2150, + "event_ids": [ + 15458, + 15461, + 15468, + 15471, + 15494, + 15497, + 15504, + 15507, + 15648, + 15651, + 15674, + 15677, + 15684, + 15687, + 15710, + 15713 + ] + }, + { + "gap": 2204, + "event_ids": [ + 15541, + 15544, + 15720, + 15723, + 15746, + 15749, + 15756, + 15759, + 15782, + 15785, + 15792, + 15795, + 15818, + 15821, + 15828, + 15831 + ] + }, + { + "gap": 600, + "event_ids": [ + 13503, + 13507, + 13506, + 13501, + 13504, + 13500, + 13553, + 13549, + 13610, + 13606, + 13993, + 13992, + 13998, + 14002, + 14001, + 13996 + ] + }, + { + "gap": 185, + "event_ids": [ + 13044, + 13060, + 13062, + 13064, + 13066, + 13080, + 13082, + 13084, + 13086, + 13100, + 13102, + 13104, + 13106, + 13352, + 13354, + 13360 + ] + }, + { + "gap": 2208, + "event_ids": [ + 15550, + 15552, + 15854, + 15857, + 15864, + 15867, + 15890, + 15893, + 15900, + 15903, + 15926, + 15929, + 15936, + 15939, + 15962, + 15965 + ] + }, + { + "gap": 639, + "event_ids": [ + 13560, + 13564, + 13563, + 13558, + 13561, + 13557, + 13999, + 13995, + 13667, + 13663, + 14037, + 14042, + 14046, + 14036, + 14045, + 14040 + ] + }, + { + "gap": 678, + "event_ids": [ + 13617, + 13621, + 13620, + 13615, + 13618, + 13614, + 14043, + 14039, + 14083, + 14082, + 14088, + 14092, + 14091, + 14086, + 14089, + 14129 + ] + }, + { + "gap": 717, + "event_ids": [ + 13674, + 13678, + 13677, + 13672, + 13675, + 13671, + 14085, + 14134, + 14138, + 14128, + 13724, + 14137, + 14132, + 14135, + 14131, + 13720 + ] + }, + { + "gap": 2212, + "event_ids": [ + 15558, + 15560, + 15972, + 15975, + 15998, + 16001, + 16008, + 16011, + 16034, + 16037, + 16044, + 16047, + 16070, + 16073, + 16080, + 16083 + ] + }, + { + "gap": 1128, + "event_ids": [ + 14445, + 14493, + 14499, + 14505, + 14484, + 14490, + 14463, + 14460, + 14424, + 14421, + 14436, + 14433, + 14532, + 14529, + 14520, + 14517 + ] + }, + { + "gap": 2216, + "event_ids": [ + 15567, + 15570, + 16106, + 16109, + 16116, + 16119, + 16142, + 16145, + 16152, + 16155, + 16178, + 16181, + 16188, + 16191, + 16214, + 16217 + ] + }, + { + "gap": 516, + "event_ids": [ + 13358, + 13366, + 13458, + 13462, + 13456, + 13404, + 13406, + 13468, + 13411, + 13438, + 13440, + 13417, + 13446, + 13452, + 13389, + 13387 + ] + }, + { + "gap": 1390, + "event_ids": [ + 14867, + 14864, + 14849, + 14846, + 14861, + 14858, + 14855, + 14852, + 14862, + 14859, + 14856, + 14853, + 14868, + 14865, + 14850, + 14847 + ] + }, + { + "gap": 2220, + "event_ids": [ + 15577, + 15580, + 16224, + 16227, + 16250, + 16253, + 16260, + 16263, + 16286, + 16289, + 16296, + 16299, + 16322, + 16325, + 16332, + 16335 + ] + }, + { + "gap": 756, + "event_ids": [ + 13731, + 13735, + 13734, + 13729, + 13732, + 13728, + 13838, + 14175, + 14180, + 14184, + 14174, + 13834, + 14217, + 14222, + 14226, + 14183 + ] + }, + { + "gap": 619, + "event_ids": [ + 13527, + 13533, + 13530, + 13539, + 13536, + 13542, + 13547, + 14178, + 14181, + 14216, + 14177, + 14225, + 14220, + 14223, + 14219, + 13604 + ] + }, + { + "gap": 795, + "event_ids": [ + 13788, + 13792, + 13791, + 13786, + 13789, + 13785, + 13895, + 14259, + 14264, + 14268, + 14258, + 14267, + 14262, + 14265, + 14261, + 13891 + ] + }, + { + "gap": 658, + "event_ids": [ + 13584, + 13590, + 13587, + 13593, + 13596, + 13599, + 13661, + 14301, + 14306, + 14310, + 14300, + 14304, + 14307, + 14309, + 14303, + 13718 + ] + }, + { + "gap": 2224, + "event_ids": [ + 15586, + 15588, + 16358, + 16361, + 16368, + 16371, + 16394, + 16397, + 16404, + 16407, + 16430, + 16433, + 16440, + 16443, + 15599, + 15609 + ] + }, + { + "gap": 526, + "event_ids": [ + 13375, + 13394, + 13423, + 13400, + 13421, + 13428, + 13434, + 13377, + 13383, + 13472, + 13474, + 13480, + 13486, + 13398, + 13381, + 13496 + ] + }, + { + "gap": 2228, + "event_ids": [ + 15594, + 15596, + 15598, + 15608, + 15619, + 15618, + 15627, + 15626, + 15635, + 15645, + 15634, + 15671, + 15644, + 15655, + 15681, + 15654 + ] + }, + { + "gap": 1710, + "event_ids": [ + 15455, + 15465, + 15454, + 15464, + 15475, + 15474, + 15483, + 15482, + 15491, + 15490, + 15501, + 15500, + 15511, + 15510, + 15527, + 15537 + ] + }, + { + "gap": 2232, + "event_ids": [ + 15603, + 15606, + 15663, + 15670, + 15662, + 15680, + 15691, + 15690, + 15699, + 15698, + 15707, + 15717, + 15706, + 15743, + 15716, + 15727 + ] + }, + { + "gap": 115, + "event_ids": [ + 13184, + 13370, + 13372, + 13350, + 13368, + 13362, + 13385, + 13492, + 13356, + 13402, + 13432, + 13460, + 13379, + 13419, + 13436, + 13490 + ] + }, + { + "gap": 2236, + "event_ids": [ + 15613, + 15616, + 15753, + 15726, + 15735, + 15742, + 15734, + 15752, + 15763, + 15762, + 15771, + 15770, + 15779, + 15789, + 15778, + 15815 + ] + }, + { + "gap": 1710, + "event_ids": [ + 15519, + 15518, + 15526, + 15536, + 15547, + 15546, + 15555, + 15554, + 15563, + 15573, + 15562, + 15572, + 15583, + 15582, + 15591, + 15590 + ] + }, + { + "gap": 2240, + "event_ids": [ + 15622, + 15624, + 15788, + 15799, + 15825, + 15798, + 15807, + 15814, + 15806, + 15824, + 15835, + 15834, + 15843, + 15842, + 15851, + 15887 + ] + }, + { + "gap": 2244, + "event_ids": [ + 15630, + 15632, + 15897, + 15861, + 15850, + 15860, + 15871, + 15870, + 15886, + 15907, + 15879, + 15878, + 15896, + 15915, + 15923, + 15906 + ] + }, + { + "gap": 2248, + "event_ids": [ + 15639, + 15642, + 15914, + 15933, + 15959, + 15943, + 15969, + 15922, + 15958, + 15932, + 15942, + 15951, + 15968, + 15979, + 15950, + 15978 + ] + }, + { + "gap": 775, + "event_ids": [ + 13755, + 13761, + 13758, + 13764, + 13767, + 13770, + 13781, + 13777, + 13775, + 13832, + 13889, + 14032, + 14074, + 14078, + 14120, + 14124 + ] + }, + { + "gap": 2252, + "event_ids": [ + 15649, + 15652, + 15987, + 15986, + 15995, + 16031, + 16041, + 16005, + 15994, + 16004, + 16015, + 16014, + 16030, + 16051, + 16023, + 16022 + ] + }, + { + "gap": 1375, + "event_ids": [ + 15155, + 15185, + 15179, + 15157, + 15187, + 15181, + 15205, + 15235, + 15229, + 15137, + 15140, + 15131, + 15134, + 15113, + 15116, + 15203 + ] + }, + { + "gap": 2256, + "event_ids": [ + 15658, + 15660, + 16040, + 16059, + 16067, + 16050, + 16103, + 16058, + 16113, + 16077, + 16087, + 16066, + 16102, + 16123, + 16076, + 16112 + ] + }, + { + "gap": 2260, + "event_ids": [ + 15666, + 15668, + 16131, + 16139, + 16086, + 16095, + 16122, + 16175, + 16094, + 16130, + 16185, + 16149, + 16159, + 16138, + 16174, + 16195 + ] + }, + { + "gap": 2264, + "event_ids": [ + 15675, + 15678, + 16148, + 16184, + 16203, + 16211, + 16158, + 16167, + 16194, + 16247, + 16166, + 16202, + 16257, + 16221, + 16231, + 16210 + ] + }, + { + "gap": 2268, + "event_ids": [ + 15685, + 15688, + 16246, + 16267, + 16220, + 16256, + 16275, + 16283, + 16230, + 16239, + 16266, + 16319, + 16238, + 16274, + 16329, + 16293 + ] + }, + { + "gap": 2272, + "event_ids": [ + 15694, + 15696, + 16303, + 16282, + 16318, + 16339, + 16292, + 16328, + 16347, + 16355, + 16302, + 16311, + 16338, + 16310, + 16346, + 16365 + ] + }, + { + "gap": 2276, + "event_ids": [ + 15702, + 15704, + 16391, + 16375, + 16354, + 16401, + 16390, + 16364, + 16374, + 16383, + 16382, + 16400, + 16411, + 16410, + 16419, + 16418 + ] + }, + { + "gap": 1350, + "event_ids": [ + 15107, + 15110, + 15233, + 15227, + 15161, + 15164, + 15209, + 15212, + 15281, + 15284, + 15275, + 15278, + 15257, + 15260, + 15251, + 15254 + ] + }, + { + "gap": 834, + "event_ids": [ + 13845, + 13849, + 13848, + 13843, + 13846, + 13842, + 14166, + 14170, + 14920, + 14922, + 14926, + 14918, + 14932, + 14930, + 14872, + 14874 + ] + }, + { + "gap": 1855, + "event_ids": [ + 15245, + 15239, + 15248, + 15242, + 16427, + 16426, + 16437, + 16436, + 16447, + 16446, + 16455, + 16454, + 15197, + 15191, + 15200, + 15194 + ] + }, + { + "gap": 873, + "event_ids": [ + 13902, + 13906, + 13905, + 13900, + 13903, + 13899, + 14928, + 14878, + 14870, + 14924, + 14884, + 14882, + 14880, + 14876, + 14904, + 14906 + ] + }, + { + "gap": 814, + "event_ids": [ + 13812, + 13818, + 13815, + 13821, + 13824, + 13827, + 14910, + 14902, + 14916, + 14914, + 14888, + 14890, + 14912, + 14894, + 14886, + 14908 + ] + }, + { + "gap": 697, + "event_ids": [ + 13641, + 13647, + 13644, + 13653, + 13650, + 13656, + 14900, + 14898, + 14896, + 14984, + 14986, + 14990, + 14892, + 14982, + 14996, + 14994 + ] + }, + { + "gap": 736, + "event_ids": [ + 13698, + 13704, + 13701, + 13710, + 13707, + 13713, + 14992, + 14988, + 14936, + 14938, + 14942, + 14934, + 14948, + 14946, + 14944, + 14940 + ] + }, + { + "gap": 1196, + "event_ids": [ + 15269, + 15263, + 15272, + 15266, + 15149, + 15143, + 15152, + 15146, + 15221, + 15215, + 15224, + 15218, + 15101, + 15095, + 15104, + 15098 + ] + }, + { + "gap": 853, + "event_ids": [ + 13869, + 13875, + 13872, + 13881, + 13878, + 13884, + 14952, + 14954, + 14958, + 14950, + 14964, + 14962, + 14960, + 14956, + 15080, + 15082 + ] + } + ] +} diff --git a/research/phase-b-54-batches/README.md b/research/phase-b-54-batches/README.md new file mode 100644 index 0000000000..11c2f207d0 --- /dev/null +++ b/research/phase-b-54-batches/README.md @@ -0,0 +1,186 @@ +# A 54-batch phase-B witness for the fixed gauge44 word + +This construction and verifier were produced by Nick Petalas. Apache-2.0. + +Claim type: **finite certificate with a scoped substitution proof**. Each of +both frozen gauge44 orientations admits 54 disjoint batches of sixteen +rank-one climbs in phase B. This raises the known feasible count from the +52 batches reported by Josie Elliston's [PR #1817](https://github.com/CrocSwap/integer-mult-bounds/pull/1817) +to 54. The exact maximum remains in **[54, 67]**. + +The new witness uses 864 of the 1,072 phase-B rank-one climbs. Its reordered +word preserves every original event, the non-rank-one skeleton and all 712 +shared-role occurrence traces of each 24,767-event orientation. The two new +word hashes are generated by the verifier. No physical rank-16 child, +recursive saving, new kappa or selected-frontier change is claimed. + +## Contract + +The input is the historical #1094 gauge44 provider retained in +`research/community-frontier1094-audit/selected-replay.tar.gz`, member +`candidate/strict/global/base/providers/gauge44/LOCAL-PROGRAMS.json.gz`. +The archive and member SHA256 values are hard-pinned in `verify.py`. +`SOURCES.json` pins the archive and the predecessor documentation/code. + +Only rank-one climb occurrences may move. They stay in phase B and may +cross only events that touch no register of their own. All other events +retain their order. Each batch has sixteen different destinations and no +climb belongs to two batches. The witness groups the original climbs; it +does not replace them with a native rank-16 operation. + +`CERTIFICATE.json` gives the skeleton gap and sixteen original global event +indices for each batch. Gap zero precedes the first non-rank-one event of +phase B. Gap g follows exactly g such events. Indices refer to the original +whole program, starting at zero. One table works for both orientations; +the verifier checks each orientation separately. + +## Construction and proof + +Delete the rank-one climbs from phase B to obtain the fixed skeleton. For +a climb at original gap g on register r, its legal interval begins just +after the last skeleton event touching r before g. It ends just before the +first skeleton event touching r at or after g. Both endpoints are legal +gaps. These are the legal windows introduced by #1817. + +The new deterministic pass considers every original right endpoint. At each +endpoint, it selects the sixteen available climbs with shortest window +width, then earliest right endpoint, then original event index. It chooses +the candidate group with least total window width, breaking ties by gap, +and removes those climbs. It repeats until no group remains. The first pass +produced 54 groups. No further search was made for a larger result. + +The verifier's default path checks the committed certificate without +running this heuristic. It reconstructs all legal windows from source +bytes, checks event uniqueness, window membership and distinct +destinations, emits batches before unbatched climbs at each gap, and checks +that every batch is contiguous in the resulting word. Unbatched climbs +retain their original gaps and order. The phase-B skeleton has 2,630 events. +Exactly 208 rank-one climbs remain unbatched. + +The checker then compares the complete ordered list of original occurrence +indices touching each role, including scalar reads and writes, all adapters +and centre roles. It also checks the whole event permutation, skeleton and +unchanged events outside phase B. Equality of these traces proves that the +new word is a linear extension of the original shared-role dependency order. +To transform one order into the other, move each next desired event left +across intervening events. None can share a role with it, since that would +reverse their common-role trace. Thus each swap commutes as a complete +logical operation on disjoint registers. Induction proves the same map on +arbitrary inputs under the retained logical operation semantics. + +This substitution criterion also appears in ToikY's +[PR #1833](https://github.com/CrocSwap/integer-mult-bounds/pull/1833). +Here it is applied only to the new witness. The predecessor's hosting +projection result is not extended or replayed. Shared physical scratch, +native compilation and tape behavior require their own implementation +contracts. + +The cardinality bound is floor(1072/16)=67. The certificate supplies the +lower bound 54. No optimum or exclusion of counts 55 through 67 is claimed. + +## Reproduce + +From the repository root, with CPython 3.12 and its standard library: + +```sh +/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -W error -B research/phase-b-54-batches/verify.py --check-discovery +/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -O -W error -B research/phase-b-54-batches/verify.py +/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/research_package.py --package research/phase-b-54-batches +/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/check_research_commit.py --package research/phase-b-54-batches --check-source-history +``` + +Another CPython 3.12 executable may replace the absolute path. The direct +marker is `PASS_PHASE_B_54_BATCHES`; the package marker is +`PASS_REGISTERED_RESEARCH_PACKAGE`. The generated stdout receipt binds every +package file, the frozen archive/member and both new logical word hashes. +Default verification writes no files. `--check-discovery` additionally +reconstructs the deterministic witness and compares it to the certificate. +`--write-certificate /external/scratch/NEW.json` regenerates the certificate +at an unoccupied path and refuses to overwrite an existing file. + +Eight rejection controls run on each orientation: a short batch, reused +climb, out-of-range gap, non-rank-one event, cross-phase climb, a gap outside +a climb's legal window, repeated destination and a climb swapped across its own preceding +operation. Checks use explicit exceptions and remain active under `-O`. + +## Scope and engineering notes + +This is a historical scheduling side result under a changed +`complex-rank-shape-decoder` scope. Current selected #7000 at +kappa 0.00363005817 is unchanged. The actual paid profile is unchanged because +all original climbs remain. A batching invoice would require a legal new +child and a complete bill. No old zero-charge ceiling is transferred to the +current supplier. The advance exact-optimum goal was narrowed in the +[scope update](https://github.com/CrocSwap/integer-mult-bounds/discussions/1166#discussioncomment-19601520) +after this first improvement. + +No predecessor scientific verifier, native or selected cold replay, physical +hosting/precision/compiler check, Lean or Docker build was run. The complete +multiplication theorem, five inherited assumptions, independent human review +and formal proof-kernel review remain outside the result. + +New functions are shorter than sixty lines and use bounded nonrecursive +loops. Source inputs are authenticated before parsing. Archive and payload +sizes are capped at eight MiB, the compressed member at one MiB, the +certificate at 64 KiB, and each orientation at 25,000 events. Discovery has +at most floor(N/16) rounds, N candidate endpoints and N interval tests per +endpoint, for N phase-B climbs. All direct check failures raise exceptions; +file handles close on every exit. Warning-strict normal and optimized runs +supply the available Python diagnostics. No optional linter or static type +checker is installed in the reproduction interpreter. + +Power of Ten rule 3 requires a managed-runtime deviation: Python and its +standard JSON, tar and gzip readers allocate dynamically. This is confined +to the authenticated fixed input and bounded witness above; no service loop +or unbounded queue exists. Fixed-capacity buffers would require replacing +those standard readers and are outside this research package. The finite +input/loop bounds and replay are the compensating controls. A future +untrusted or variable-size interface must revisit that allocation contract. + +## Open next questions + +1. What is the exact phase-B maximum in [54,67]? An exact interval-packing + optimization with an independently checkable upper-bound witness is the + first step. No such upper-bound certificate is supplied here. +2. Can a changed native/encoding contract realize one batch with a favorable + complete bill? #1833 already points to a separate support/volume obstruction + for the proposed monomial child. State the changed hypothesis first, then + charge native realization, gathering, owned storage, precision and dirty + restoration for one exact batch. That child and a complete caller remain + missing. + +## Credit and related work + +Josie Elliston / JosieElliston #1817 supplied the legal retiming model, +window construction, original 52-batch phase-B lower bound and exact-maximum +question. Her head is `ac3a759e874e8e526bc884fc2cb8eb114695b063`. +The new contribution is the 54-group witness, its deterministic discovery +pass and its source-bound checker. Classical interval heuristics and +shared-role dependency arguments are not claimed as new general theorems. + +Credit Jose Manuel / jmbarrancoml, published through 1337isnot1337 #1779, +for the diagonal batching proposal; ToikY #1833 for the retained substitution +and hosting-boundary discussion; Arham Tahir #1605 for the charge model; +Douglas Colkitt #1240 for the historical ceiling; Sagar Thakrar #1012 for the +coverage law; and the icekylinx / #514 / #433, Rohan Arun / #1094 and retained +geometry, native, controller and supplier contributors. Ross Richardson and Greer Guthrie / #679 retain credit for the separate +native support/volume obstruction referenced by #1833. No predecessor source +or credit line is changed. + +Related open work: + +- [#1836](https://github.com/CrocSwap/integer-mult-bounds/pull/1836) studies + higher-rank pairs at one ADD on the same historical word. This certificate + groups rank-one climbs and does not combine its proposed profile. +- [#1865](https://github.com/CrocSwap/integer-mult-bounds/pull/1865) schedules + nonconsecutive commuting C3 fanouts on that word. Its three-destination + shear groups differ from the sixteen climb occurrences here. + +Canonical base is `e54523517d0f03e58352e647c403a5af3e525a57`. +Live open PRs and Discussion claims, targeted merged searches, recent +account work and main README searches were checked. The overlap cache +covered 846 open PRs, 7,478 Discussion records and all 10,178 main note paths. +The bulk closed-PR refresh timed out; targeted merged queries and main +searches were used separately. Unpublished work and arbitrary historical +diffs remain coverage limits. These searches do not establish universal +novelty. diff --git a/research/phase-b-54-batches/SOURCES.json b/research/phase-b-54-batches/SOURCES.json new file mode 100644 index 0000000000..b00d8362b5 --- /dev/null +++ b/research/phase-b-54-batches/SOURCES.json @@ -0,0 +1,42 @@ +{ + "schema_version": 1, + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "75d77b328ea02ded535e7f23aee5b1e55d0bb1a8", + "sha256": "154c3d30455d778fd3343b6b4851f0fa4665f0f7625b0adb3675e2bafbbf6bf1" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec", + "sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81" + }, + { + "path": "research/community-frontier1094-audit/selected-replay.tar.gz", + "usage": "input", + "git_blob": "c24daf067f9c543421d89ca2eeaa4eb78a57fb6f", + "sha256": "f1da80610bf33c58527f18ad63b4350d0b864e1d4486141ee17ac9bed4d529d6" + }, + { + "path": "research/diagonal-batch-commutation/README.md", + "usage": "provenance", + "git_blob": "f5e00678bdbe42a52229d2243392c52fae79bf17", + "sha256": "1d62404d271b93db056ca4104436cec239bb64f32197b5c7a8c96cea68ab0083" + }, + { + "path": "research/diagonal-batch-commutation/batch.py", + "usage": "provenance", + "git_blob": "e8c7c25d1a200aabdcb707fb800e579c93046dd8", + "sha256": "c9f0cbe4337e9c443ac2a10512111f60ab8d0459d2aae9de5176305d3a3bddc5" + }, + { + "path": "research/diagonal-retiming-host-boundary/README.md", + "usage": "provenance", + "git_blob": "af5fa5c62a5f177e9fdf0d3e83c8d0b864f9d365", + "sha256": "9f482b63fab85bd2baaf4168f806620a6e02914c669a8aa6d6fe32ac344d2951" + } + ] +} diff --git a/research/phase-b-54-batches/TASK.json b/research/phase-b-54-batches/TASK.json new file mode 100644 index 0000000000..8f49076bb7 --- /dev/null +++ b/research/phase-b-54-batches/TASK.json @@ -0,0 +1,100 @@ +{ + "schema_version": 1, + "task_id": "complex-rank-shape-decoder", + "priority_revision": 8, + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "original_card": { + "id": "complex-rank-shape-decoder", + "question": "Can a legal decoder or coframe change improve the full signed moment, including changed helper targets?", + "starting_points": [ + "docs/research/current-priorities.md", + "docs/research/research-family-status.md", + "certificates/selected-result.json", + "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md", + "docs/research/recursive-invoice-preflight.md" + ], + "methods": [ + "Construct and independently check one source-bound instance of the stated first experiment.", + "Seek an exact counterexample or target-specific complete-budget obstruction to that same proposed change." + ], + "acceptance_gate": "A source-bound arbitrary-input identity and legal producer/consumer boundary with the complete paid and productive target invoice, including restoration, ownership, native alignment and extra charges. Price under the actual current model; historical ceiling.py assumptions must be established before use. A favorable optimistic relaxation keeps a route open but is not a completed supplier. A scoped local result remains useful; expansion requires the family-level budget gate.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_selected_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read revision 8, the selected review and live exact-source handoffs. Then follow this card's bounded first_experiment.", + "scope": "Source-bound orientation only, not a supplier replay or theorem proof." + }, + "first_experiment": "Price one complete changed itinerary with both paid and productive histograms. Check #5693/#5698 for overlap and their exact hypotheses before another coframe search. Use the signed invoice preflight where its boundary contract agrees; an inconclusive concave comparison is not a power crossing. Stop if an optimistic complete budget fails at the chosen target or native delivery remains unspecified.", + "bottleneck_link": "Judge the actual current supplier contract and complete signed target/paid bill; frozen-profile ceilings require an applicability proof.", + "allowed_variations": [ + "One exact source head, helper/cut region or quantified proposition and changed hypothesis; check live handoffs first. Different seeds are not different scopes." + ], + "scope_change_triggers": [ + "Changing source head, helper/cut domain, operation alphabet or caller boundary without recording the new scope.", + "Treating an archived proposal or local numerical pass as complete supplier admission." + ], + "overlap_terms": [ + "coframe", + "signed moment", + "5693", + "5698" + ], + "existing_checks": [ + { + "scope": "Selected PR5599: complete helper-subspace construction and independent caller replay; five framework assumptions remain.", + "evidence": "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md", + "remaining": "The next experiment must identify uncovered source-specific work. Successor archive intake does not transfer this admission.", + "status": "reviewed", + "source_commit": "09dd0965711ca7eeb169057a420abab1c9052137", + "selected_record_sha256": "2a0220e866417774606e0f991e41b9c1d26b1f43b97857238cf478dbc7d330b5" + } + ] + }, + "scope_status": "changed", + "actual_scope": "Construct a new finite phase-B packing for the historical gauge44 local programs under the fixed non-rank-one skeleton and shared-role dependency order; improve the cited 52-batch witness without claiming the optimum.", + "scope_change_reason": "The current card seeks a completed signed-moment decoder improvement. This explicitly open historical scheduling subproblem is a bounded side result. The first new 54-batch witness is packaged before attempting an exact optimum; no current supplier budget is inferred.", + "bottleneck_link": "Local batch availability is one prerequisite for a changed recursive delivery contract. This certificate improves that availability bound, but gives no physical delivery, favorable invoice or current kappa gain.", + "budget_minutes": 60, + "stop_rule": "Stop at the first verified original improvement; do not continue searching for an optimum or compose an invoice.", + "outcome": "completed", + "evidence": "CERTIFICATE.json and verify.py certify 54 disjoint batches of 16 on each orientation, with 864 distinct climbs, legal windows, preserved skeleton and all 712 complete shared-role traces of each 24767-event word. Eight rejecting controls are checked on each orientation. The optional deterministic generator reproduces the witness.", + "author": "Nick Petalas", + "ai_assistance": "Independent human and formal proof-kernel review are unclaimed.", + "open_questions": [ + { + "question": "What is the exact phase-B maximum between 54 and 67?", + "why_it_matters": "The new certificate leaves thirteen possible additional batches unresolved.", + "first_step": "Build an exact interval-packing optimization and an independently checkable upper-bound witness for these fixed legal windows.", + "blocked_by": "No optimality certificate or better packing is supplied." + }, + { + "question": "Can a changed native/encoding contract realize one batch with a favorable complete bill?", + "why_it_matters": "Logical co-location of climbs alone provides no recursive saving.", + "first_step": "Name the hypothesis changed from the monomial-child support/volume obstruction referenced by #1833; then price native realization, gathering, owned storage, precision and dirty restoration for one exact batch.", + "blocked_by": "No legal physical rank-16 implementation or compatible complete caller is supplied." + } + ], + "claim_type": "finite_certificate", + "claim_url": "https://github.com/CrocSwap/integer-mult-bounds/discussions/1166#discussioncomment-19601500", + "scope_update_url": "https://github.com/CrocSwap/integer-mult-bounds/discussions/1166#discussioncomment-19601520", + "environment": { + "python": "CPython 3.12.15", + "implementation": "standard library only", + "platform": "macOS 27.0.1 arm64" + }, + "overlap": { + "canonical_main": "e54523517d0f03e58352e647c403a5af3e525a57", + "open_prs": 846, + "discussion_records": 7478, + "head_note_paths": 10178, + "complete_open_pr_pagination": true, + "complete_discussion_pagination": true, + "limits": "Closed-PR bulk refresh timed out; targeted merged searches, exact main README searches and the account recent-PR list were checked separately. Unpublished work and arbitrary historical diffs are not covered.", + "open_pr_snapshot_utc": "2026-11-13T22:35:58.937004+00:00", + "discussion_snapshot_utc": "2026-11-13T22:37:28.824015+00:00" + } +} diff --git a/research/phase-b-54-batches/VERIFY.json b/research/phase-b-54-batches/VERIFY.json new file mode 100644 index 0000000000..d111d3934b --- /dev/null +++ b/research/phase-b-54-batches/VERIFY.json @@ -0,0 +1,37 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/community-frontier1094-audit/selected-replay.tar.gz" + ], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-W", + "error", + "-B", + "{package}/verify.py", + "--check-discovery" + ], + "timeout_seconds": 120, + "checks": "Regenerate the new witness, authenticate the frozen input, and verify each complete event trace and sixteen rejection controls." + }, + { + "argv": [ + "{python}", + "-I", + "-O", + "-W", + "error", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Check the committed witness and all controls with Python assertions disabled." + } + ] +} diff --git a/research/phase-b-54-batches/verify.py b/research/phase-b-54-batches/verify.py new file mode 100644 index 0000000000..f6f626cee1 --- /dev/null +++ b/research/phase-b-54-batches/verify.py @@ -0,0 +1,328 @@ +#!/usr/bin/env python3 +"""Check the new 54-batch phase-B witness without importing a search engine.""" +from __future__ import annotations + +import argparse +import bisect +import collections +import copy +import gzip +import hashlib +import io +import json +import tarfile +from pathlib import Path + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +ARCHIVE = ROOT / "research/community-frontier1094-audit/selected-replay.tar.gz" +ARCHIVE_SHA = "f1da80610bf33c58527f18ad63b4350d0b864e1d4486141ee17ac9bed4d529d6" +MEMBER = "candidate/strict/global/base/providers/gauge44/LOCAL-PROGRAMS.json.gz" +MEMBER_SHA = "241fde27d4e43f5a9cb6b128f9f76c5131a53d09f0371676163f914d0b0fef3a" +PACKAGE_FILES = ("README.md", "TASK.json", "SOURCES.json", "VERIFY.json", + "CERTIFICATE.json", "verify.py") +BATCH_SIZE = 16 +BATCH_COUNT = 54 +MAX_EVENTS = 25000 + + +def require(condition, message): + if not condition: + raise ValueError(message) + + +def bounded_read(path, limit): + require(path.stat().st_size <= limit, "input size limit") + with path.open("rb") as stream: + data = stream.read(limit + 1) + require(len(data) <= limit, "input size limit") + return data + + +def digest(data): + return hashlib.sha256(data).hexdigest() + + +def canonical(value): + return json.dumps(value, sort_keys=True, separators=(",", ":")).encode() + + +def load_programs(): + raw = bounded_read(ARCHIVE, 8 * 1024 * 1024) + require(digest(raw) == ARCHIVE_SHA, "archive hash") + with tarfile.open(fileobj=io.BytesIO(raw), mode="r:gz") as archive: + member = archive.getmember(MEMBER) + require(member.isfile() and member.size <= 1024 * 1024, "member size/type") + stream = archive.extractfile(member) + require(stream is not None, "member absent") + with stream: + data = stream.read(member.size + 1) + require(len(data) == member.size and digest(data) == MEMBER_SHA, "member hash") + payload = gzip.decompress(data) + require(len(payload) <= 8 * 1024 * 1024, "program payload size") + programs = json.loads(payload) + require(set(programs) == {"forward", "backward"}, "orientations") + for events in programs.values(): + require(type(events) is list and len(events) <= MAX_EVENTS, "event bound") + return programs + + +def roles(event): + tag = event[0] + if tag in ("climb", "adapter", "residual_adapter"): + return {("L", event[2])} + if tag == "center": + return {("C", event[1])} + if tag == "scalar": + operation = event[1] + require(operation[0] in {"scale", "copy", "add", "clear"}, "scalar tag") + result = {tuple(operation[1])} + if operation[0] in {"copy", "add"}: + result.add(tuple(operation[2])) + return result + require(tag == "phase", "unknown event tag") + return set() + + +def is_rank_one(event): + return event[0] == "climb" and event[5] == 1 + + +def phase_span(events): + starts = [i + 1 for i, event in enumerate(events) if event == ["phase", "B"]] + require(len(starts) == 1, "unique phase B") + start = starts[0] + stops = [i for i in range(start, len(events)) if events[i][0] == "phase"] + require(bool(stops), "phase B terminal marker") + return start, stops[0] + + +def windows(events): + start, stop = phase_span(events) + skeleton = [i for i in range(start, stop) if not is_rank_one(events[i])] + touch_positions = collections.defaultdict(list) + for position, event_id in enumerate(skeleton): + for role in roles(events[event_id]): + touch_positions[role].append(position) + result = {} + gap = 0 + for event_id in range(start, stop): + event = events[event_id] + if not is_rank_one(event): + gap += 1 + continue + require(event[1] == "B", "climb phase") + positions = touch_positions[("L", event[2])] + j = bisect.bisect_left(positions, gap) + lower = positions[j - 1] + 1 if j else 0 + upper = positions[j] if j < len(positions) else len(skeleton) + require(lower <= gap <= upper, "original interval membership") + result[event_id] = (lower, upper, event[2], gap) + require(gap == len(skeleton), "skeleton length") + return result, skeleton, start, stop + + +def check_batches(certificate, table, skeleton_size): + require(set(certificate) == {"schema_version", "phase", "batch_size", "batches"}, + "certificate keys") + require(certificate["schema_version"] == 1 and certificate["phase"] == "B", + "certificate scope") + require(certificate["batch_size"] == BATCH_SIZE, "batch size field") + batches = certificate["batches"] + require(type(batches) is list and len(batches) == BATCH_COUNT, "batch count") + used = set() + for batch in batches: + require(set(batch) == {"gap", "event_ids"}, "batch keys") + gap, ids = batch["gap"], batch["event_ids"] + require(type(gap) is int and 0 <= gap <= skeleton_size, "gap range") + require(type(ids) is list and len(ids) == BATCH_SIZE, "batch cardinality") + require(all(type(i) is int and i in table for i in ids), "phase-B rank-one ids") + require(len(set(ids)) == BATCH_SIZE and not used.intersection(ids), + "disjoint event ids") + require(len({table[i][2] for i in ids}) == BATCH_SIZE, "distinct destinations") + require(all(table[i][0] <= gap <= table[i][1] for i in ids), "legal window") + used.update(ids) + return used + + +def reordered_ids(events, certificate, table, skeleton, start, stop, used): + batches_at = collections.defaultdict(list) + for batch in certificate["batches"]: + batches_at[batch["gap"]].extend(batch["event_ids"]) + stay_at = collections.defaultdict(list) + for event_id, (_, _, _, gap) in table.items(): + if event_id not in used: + stay_at[gap].append(event_id) + order = list(range(start)) + for gap in range(len(skeleton) + 1): + order.extend(batches_at[gap]) + order.extend(stay_at[gap]) + if gap < len(skeleton): + order.append(skeleton[gap]) + order.extend(range(stop, len(events))) + require(sorted(order) == list(range(len(events))), "event permutation") + require(order[:start] == list(range(start)) and + order[stop:] == list(range(stop, len(events))), "outside phase unchanged") + require([i for i in order[start:stop] if not is_rank_one(events[i])] == skeleton, + "skeleton order") + return order + + +def role_traces(events, order): + traces = collections.defaultdict(list) + for event_id in order: + for role in roles(events[event_id]): + traces[role].append(event_id) + return dict(traces) + + +def check_trace_order(events, order): + original = role_traces(events, range(len(events))) + require(role_traces(events, order) == original, "complete shared-role traces") + return len(original) + + +def check_contiguous_batches(order, certificate): + positions = {event_id: i for i, event_id in enumerate(order)} + for batch in certificate["batches"]: + ids = batch["event_ids"] + start = positions[ids[0]] + require(order[start:start + BATCH_SIZE] == ids, "contiguous batch") + + +def check_orientation(events, certificate): + table, skeleton, start, stop = windows(events) + used = check_batches(certificate, table, len(skeleton)) + order = reordered_ids(events, certificate, table, skeleton, start, stop, used) + role_count = check_trace_order(events, order) + check_contiguous_batches(order, certificate) + return { + "events": len(events), "roles": role_count, "phase_B_climbs": len(table), + "phase_B_skeleton": len(skeleton), "batches": len(certificate["batches"]), + "batched_climbs": len(used), "unbatched_climbs": len(table) - len(used), + "cardinality_upper_bound": len(table) // BATCH_SIZE, + "changed_positions": sum(i != event_id for i, event_id in enumerate(order)), + "original_word_sha256": digest(canonical(events)), + "reordered_word_sha256": digest(canonical([events[i] for i in order])), + } + + +def discover(table): + """Reproduce the first witness, with no attempt to improve it further.""" + remaining = set(table) + endpoints = sorted({upper for _, upper, _, _ in table.values()}) + batches = [] + for _ in range(len(table) // BATCH_SIZE): + choices = [] + for gap in endpoints: + available = [i for i in remaining if table[i][0] <= gap <= table[i][1]] + if len(available) < BATCH_SIZE: + continue + available.sort(key=lambda i: (table[i][1] - table[i][0], table[i][1], i)) + take = available[:BATCH_SIZE] + require(len({table[i][2] for i in take}) == BATCH_SIZE, + "discovery requires distinct active destinations") + width_sum = sum(table[i][1] - table[i][0] for i in take) + choices.append((width_sum, gap, take)) + if not choices: + break + _, gap, take = min(choices) + batches.append({"gap": gap, "event_ids": take}) + remaining.difference_update(take) + return {"schema_version": 1, "phase": "B", "batch_size": BATCH_SIZE, + "batches": batches} + + +def expect_rejection(events, certificate, message): + try: + check_orientation(events, certificate) + except ValueError as error: + require(str(error) == message, "unexpected rejection: " + str(error)) + else: + raise ValueError("accepted faulty witness: " + message) + + +def negative_controls(events, certificate): + controls = [] + changed = copy.deepcopy(certificate) + changed["batches"][0]["event_ids"].pop() + controls.append((changed, "batch cardinality")) + changed = copy.deepcopy(certificate) + changed["batches"][1]["event_ids"][0] = changed["batches"][0]["event_ids"][0] + controls.append((changed, "disjoint event ids")) + changed = copy.deepcopy(certificate) + changed["batches"][0]["gap"] = -1 + controls.append((changed, "gap range")) + table, skeleton, _, _ = windows(events) + changed = copy.deepcopy(certificate) + changed["batches"][0]["event_ids"][0] = skeleton[0] + controls.append((changed, "phase-B rank-one ids")) + changed = copy.deepcopy(certificate) + changed["batches"][0]["event_ids"][0] = next( + i for i, event in enumerate(events) if is_rank_one(event) and event[1] == "A") + controls.append((changed, "phase-B rank-one ids")) + changed = copy.deepcopy(certificate) + first = changed["batches"][0] + illegal = next(g for g in range(len(skeleton) + 1) + if any(not table[i][0] <= g <= table[i][1] for i in first["event_ids"])) + first["gap"] = illegal + controls.append((changed, "legal window")) + changed = copy.deepcopy(certificate) + first_ids = changed["batches"][0]["event_ids"] + same_register = next(i for i in table if i not in first_ids and + table[i][2] == table[first_ids[0]][2]) + first_ids[1] = same_register + controls.append((changed, "distinct destinations")) + for faulty, message in controls: + expect_rejection(events, faulty, message) + check_forbidden_swap(events) + return len(controls) + 1 + + +def check_forbidden_swap(events): + start, stop = phase_span(events) + site = next(i for i in range(start + 1, stop) if is_rank_one(events[i]) and + roles(events[i]).intersection(roles(events[i - 1]))) + order = list(range(len(events))) + order[site - 1], order[site] = order[site], order[site - 1] + try: + check_trace_order(events, order) + except ValueError as error: + require(str(error) == "complete shared-role traces", "wrong swap rejection") + else: + raise ValueError("accepted climb crossing its own preceding operation") + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--check-discovery", action="store_true") + parser.add_argument("--write-certificate", type=Path) + args = parser.parse_args() + programs = load_programs() + if args.write_certificate: + candidate = discover(windows(programs["forward"])[0]) + for events in programs.values(): + check_orientation(events, candidate) + with args.write_certificate.open("x", encoding="utf-8") as stream: + stream.write(json.dumps(candidate, indent=2) + "\n") + certificate = json.loads(bounded_read(HERE / "CERTIFICATE.json", 64 * 1024)) + if args.check_discovery: + require(discover(windows(programs["forward"])[0]) == certificate, + "deterministic discovery equality") + summaries = {} + controls = 0 + for orientation, events in sorted(programs.items()): + summaries[orientation] = check_orientation(events, certificate) + controls += negative_controls(events, certificate) + receipt = { + "status": "PASS_PHASE_B_54_BATCHES", "claim_type": "finite_certificate", + "orientations": summaries, "rejected_controls": controls, + "archive_sha256": ARCHIVE_SHA, "member_sha256": MEMBER_SHA, + "package_sha256": {name: digest(bounded_read(HERE / name, 512 * 1024)) + for name in PACKAGE_FILES}, + } + print(json.dumps(receipt, indent=2, sort_keys=True)) + + +if __name__ == "__main__": + main()