diff --git a/research/centre-prefix-fanout-obstruction-seed2803b7/OVERLAP.json b/research/centre-prefix-fanout-obstruction-seed2803b7/OVERLAP.json new file mode 100644 index 0000000000..40333b8990 --- /dev/null +++ b/research/centre-prefix-fanout-obstruction-seed2803b7/OVERLAP.json @@ -0,0 +1,94 @@ +{ + "status": "POSSIBLE_OVERLAP_NOT_A_NOVELTY_CERTIFICATE", + "command": "python3 scripts/find_overlap.py --task centre-path-sharing --refresh --json --limit 1000", + "searched_at": "2026-10-14T18:39:00.632930+00:00", + "current_main_at_review": "7c1e7811c730b17fe0eeef6c82ef011318b0465e (priority revision 4; centre-path-sharing remains active)", + "research_assignment_base": "e112d71c8d7bb32435debcc54df932593dd8223a (priority revision 3)", + "coverage": { + "open_prs": { + "fetched_at": "2026-10-14T18:36:22.513427+00:00", + "complete_pagination": true, + "records": 347 + }, + "discussions": { + "fetched_at": "2026-10-14T18:39:00.524976+00:00", + "complete_pagination": true, + "records": 721 + } + }, + "warnings": [], + "limits": "Remote PR scope is open PRs including drafts. Closed work is searched through local READMEs, TASK metadata and ledger only. No code diffs or arbitrary package files are searched. Recheck relevant heads before submission.", + "matches_total": 382, + "nearby": [ + { + "kind": "discussion", + "number": 1516, + "title": "CLAIM: can the centre path be hosted on idle coordinates like helper residuals? (ctoth, expires 05:00Z)", + "url": "https://github.com/CrocSwap/integer-mult-bounds/discussions/1516", + "updated_at": "2026-10-14T13:08:49Z", + "matched_terms": [ + "centre-path-sharing", + "centre path", + "shared centre" + ] + }, + { + "kind": "pr", + "number": 2048, + "title": "Scoped proof: PR1918's selected centre-source minor lifts to native rank 8192 (no new kappa)", + "state": "open", + "head": "a0e55f357344f1742f72942f94ae2a6f13ff7065", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/2048", + "updated_at": "2026-10-14T18:10:41Z", + "matched_terms": [ + "centre-path-sharing", + "complex-local-word-ceiling", + "proofs" + ] + }, + { + "kind": "pr", + "number": 2052, + "title": "Research: multi-pair schedules cannot beat the nine-stage template (Theorem S, no new κ)", + "state": "open", + "head": "79cb4818d633ec0bef6e4c13106b7f29ed084ea5", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/2052", + "updated_at": "2026-10-14T18:17:14Z", + "matched_terms": [ + "centre path", + "complex-local-word-ceiling" + ] + }, + { + "kind": "discussion", + "number": 1963, + "title": "CLAIM: nonadjacent centre-path sharing with role permutation (seed 146930b1)", + "url": "https://github.com/CrocSwap/integer-mult-bounds/discussions/1963", + "updated_at": "2026-10-14T15:39:14Z", + "matched_terms": [ + "centre-path-sharing" + ] + }, + { + "kind": "discussion", + "number": 2058, + "title": "CLAIM: nonadjacent selected centre-source fanout window (seed 2803b7f3)", + "url": "https://github.com/CrocSwap/integer-mult-bounds/discussions/2058", + "updated_at": "2026-10-14T18:29:29Z", + "matched_terms": [ + "centre-path-sharing" + ] + }, + { + "kind": "discussion", + "number": 1884, + "title": "Ten-instance independent research session: interface and verifier audits", + "url": "https://github.com/CrocSwap/integer-mult-bounds/discussions/1884", + "updated_at": "2026-10-14T18:10:44Z", + "matched_terms": [ + "centre-path-sharing" + ] + } + ], + "distinction": "PR #2052 covers simultaneous multi-pair stage schedules. This package tests a different zero-storage temporal move: commute one selected centre scatter across the complete forward scalar prefix in the pinned word." +} diff --git a/research/centre-prefix-fanout-obstruction-seed2803b7/README.md b/research/centre-prefix-fanout-obstruction-seed2803b7/README.md new file mode 100644 index 0000000000..9c2e8b5326 --- /dev/null +++ b/research/centre-prefix-fanout-obstruction-seed2803b7/README.md @@ -0,0 +1,38 @@ +# Exact centre-prefix fanout obstruction (seed 2803b7) + +**Scoped negative result; no new bound or supplier claim.** + +## Question and result + +The `centre-path-sharing` card asks whether the selected profile's center path can be shared or reduced. The optimistic aligned two-call profile would reduce center charge from 64 to 32 per call (32 saved), giving an ideal complex-side multiplier of 1.90; the unchanged bit-side ceiling limits the whole-bound gain to about 3.45%. The exact actual-profile overhead budget is pinned in [`centre-sharing-overhead-budget`](../centre-sharing-overhead-budget/README.md). This screen assumes no added carry, copy, restoration, frame, precision, or hosting cost. Before pricing a more elaborate schedule, this package tests the necessary zero-storage timing move: can one center contribution be placed before the selected forward scalar prefix without changing the endpoint? + +For each of the eight center outputs, the verifier injects the exact pinned 22-row canonical scatter at the beginning of the selected forward program, suppresses that center output at its native event, and replays every scalar instruction with `fractions.Fraction`. It keeps all 19,693 scalar events and compares all 704 local-role endpoints. In this common-frame scalar projection, the endpoint differs in 34, 34, 36, 36, 54, 54, 56, and 56 roles for the eight basis outputs. One exact witness is `normal - early = 1/4` at local role 114 for center channel 0. + +This closes only the tested early-fanout timing route in the common-frame scalar projection. Native frame transport, climbs, adapters, persistent storage, phase reordering, changed interfaces, supplier adoption, and kappa are not established or ruled out. Because the required endpoint identity already fails, no copy/storage/precision/hosting invoice for a surviving schedule is claimed. + +The report is pinned to base `e112d71c8d7bb32435debcc54df932593dd8223a`, selected-record SHA256 `10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32`, and the source/archive pins in [SOURCES.json](SOURCES.json). Overlap was refreshed before the claim; related work includes [PR #1708](https://github.com/CrocSwap/integer-mult-bounds/pull/1708), [PR #1748](https://github.com/CrocSwap/integer-mult-bounds/pull/1748), [PR #1791](https://github.com/CrocSwap/integer-mult-bounds/pull/1791), [PR #1829](https://github.com/CrocSwap/integer-mult-bounds/pull/1829), [PR #1838](https://github.com/CrocSwap/integer-mult-bounds/pull/1838), [PR #2048](https://github.com/CrocSwap/integer-mult-bounds/pull/2048), and the scoped [Discussion #1963](https://github.com/CrocSwap/integer-mult-bounds/discussions/1963). The present result tests a distinct necessary timing condition and does not duplicate those claims. + +## Reproduce + +From the repository root: + +```sh +python3 scripts/research_package.py --package research/centre-prefix-fanout-obstruction-seed2803b7 --check-only +python3.12 scripts/research_package.py --package research/centre-prefix-fanout-obstruction-seed2803b7 +``` + +The direct verifier prints the same pass marker. To regenerate the result at a new path, run: + +```sh +python3 -B research/centre-prefix-fanout-obstruction-seed2803b7/verify.py --write-result /tmp/centre-prefix-result.json +``` + +All arithmetic is exact rational arithmetic. Controls check a commuting identity prefix, a noncommuting target-read prefix, and rejection of a mutated canonical scatter coefficient. + +## Open next questions + +Can a specific full-call phase reordering or persistent center bank share one selected center result while preserving every dirty helper endpoint and keeping its fully charged cost below the 32-per-call ideal saving? This matters because such a schedule could avoid the failed early timing move while retaining some center saving. The feasible first step is to specify one exact call pair, all saved center components, source/target owner windows, and the complete copy, restoration, frame, precision, and hosting invoice. The blocker is that no such selected pair and carry-state contract has yet passed both the endpoint and budget screens. + +## Credit + +Prepared by Cinna Davis. Substantial OpenAI Codex assistance was used in scope selection, derivation, implementation, exact replay, and writing; no independent human review or proof-assistant formalization is claimed. Predecessor attribution is retained above. New work is Apache-2.0. diff --git a/research/centre-prefix-fanout-obstruction-seed2803b7/RESULT.json b/research/centre-prefix-fanout-obstruction-seed2803b7/RESULT.json new file mode 100644 index 0000000000..1054d2ae5e --- /dev/null +++ b/research/centre-prefix-fanout-obstruction-seed2803b7/RESULT.json @@ -0,0 +1,100 @@ +{ + "archive_sha256": "f1da80610bf33c58527f18ad63b4350d0b864e1d4486141ee17ac9bed4d529d6", + "base_commit": "e112d71c8d7bb32435debcc54df932593dd8223a", + "basis_domain": "the eight formal center outputs c_0,...,c_7; exact Fraction coefficients", + "channel_results": [ + { + "center_source_role": 92, + "channel": 0, + "different_endpoint_roles": 34, + "first_different_role": [ + "L", + 114 + ], + "role_114_normal_minus_early": "1/4" + }, + { + "center_source_role": 57, + "channel": 1, + "different_endpoint_roles": 34, + "first_different_role": [ + "L", + 113 + ], + "role_114_normal_minus_early": "1/4" + }, + { + "center_source_role": 81, + "channel": 2, + "different_endpoint_roles": 36, + "first_different_role": [ + "L", + 112 + ], + "role_114_normal_minus_early": "0" + }, + { + "center_source_role": 224, + "channel": 3, + "different_endpoint_roles": 36, + "first_different_role": [ + "L", + 112 + ], + "role_114_normal_minus_early": "0" + }, + { + "center_source_role": 11, + "channel": 4, + "different_endpoint_roles": 54, + "first_different_role": [ + "L", + 113 + ], + "role_114_normal_minus_early": "0" + }, + { + "center_source_role": 240, + "channel": 5, + "different_endpoint_roles": 54, + "first_different_role": [ + "L", + 116 + ], + "role_114_normal_minus_early": "0" + }, + { + "center_source_role": 9, + "channel": 6, + "different_endpoint_roles": 56, + "first_different_role": [ + "L", + 114 + ], + "role_114_normal_minus_early": "1/4" + }, + { + "center_source_role": 256, + "channel": 7, + "different_endpoint_roles": 56, + "first_different_role": [ + "L", + 113 + ], + "role_114_normal_minus_early": "-1/4" + } + ], + "comparison": "normal center scatter at its selected event versus the same canonical 176-entry scatter injected before the forward program and all center outputs suppressed", + "conclusion": "The no-storage early-fanout timing move fails exact endpoint equality in every basis channel in this pinned scalar projection. This is not a result about native frame transport, persistent storage, reordered full-call phases, other schedules, suppliers, or kappa.", + "controls": { + "identity_prefix_commutes": true, + "mutated_canonical_cut_rejected": true, + "target_read_before_center_does_not_commute": true + }, + "model": "exact Q-linear common-frame projection of all 19693 scalar events in the selected forward program; all 704 local roles are compared, with zero coordinates implicit; native frame, climb and adapter events are omitted", + "seed": "2803b7f39d0d886af6d0a63cd1521a40", + "selected_record_sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32", + "status": "SCOPED_NEGATIVE_RESULT", + "task_id": "centre-path-sharing", + "track": "recursive-interfaces" +} diff --git a/research/centre-prefix-fanout-obstruction-seed2803b7/SOURCES.json b/research/centre-prefix-fanout-obstruction-seed2803b7/SOURCES.json new file mode 100644 index 0000000000..1ab1873cb7 --- /dev/null +++ b/research/centre-prefix-fanout-obstruction-seed2803b7/SOURCES.json @@ -0,0 +1,48 @@ +{ + "schema_version": 1, + "base_commit": "e112d71c8d7bb32435debcc54df932593dd8223a", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "input", + "git_blob": "ae6a99f28aa468649eb66a361e764d769363bf11", + "sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "06c96f5579bb67ed1b86d334e78fbed7da6945f1", + "sha256": "6686ad58f1fbdbc87134a78901b60fd53a20d3984355e91defbbebc9e9fa8075" + }, + { + "path": "docs/research/community-batch1099-review.md", + "usage": "input", + "git_blob": "6cb6ec061a071a06a2d18cd4dc3e9a2b05d28099", + "sha256": "7e76d2c38e5fce30587835b7251df1430488ae4dd372611ef69a3f03f476b6cb" + }, + { + "path": "research/community-frontier1094-audit/ASSEMBLY.json", + "usage": "input", + "git_blob": "5fd676df060f3b450782fdf5ff5f6beb63a5eeb0", + "sha256": "1122cb3a575f8c788345fc1bf4c108ac7c3250fb81a5988671f5eb04b3ab3045" + }, + { + "path": "research/community-frontier1094-audit/SELECTED-SOURCE.json", + "usage": "input", + "git_blob": "6a75493790b4eff9c4a98051ef8b01d6aad0d5a8", + "sha256": "79b3de5db3dbcb9829789ba58e9e45758926031e2a7d80667a08429d369be53b" + }, + { + "path": "research/community-frontier1094-audit/selected-replay.tar.gz", + "usage": "input", + "git_blob": "c24daf067f9c543421d89ca2eeaa4eb78a57fb6f", + "sha256": "f1da80610bf33c58527f18ad63b4350d0b864e1d4486141ee17ac9bed4d529d6" + }, + { + "path": "research/centre-sharing-overhead-budget/README.md", + "usage": "provenance", + "git_blob": "a10a8364cf9e4cb50bb6612fc0a82e45d3ae8c77", + "sha256": "ec4eaa7c968d95ca188e645dc58f06beaa7257b735e71914ab657f60ce66d1d2" + } + ] +} diff --git a/research/centre-prefix-fanout-obstruction-seed2803b7/TASK.json b/research/centre-prefix-fanout-obstruction-seed2803b7/TASK.json new file mode 100644 index 0000000000..6e3983b180 --- /dev/null +++ b/research/centre-prefix-fanout-obstruction-seed2803b7/TASK.json @@ -0,0 +1,74 @@ +{ + "schema_version": 1, + "task_id": "centre-path-sharing", + "priority_revision": 3, + "base_commit": "e112d71c8d7bb32435debcc54df932593dd8223a", + "original_card": { + "id": "centre-path-sharing", + "question": "Can the 64-per-call centre path (eight rank-8 COPY/ERASE totals through the private temporary) be shared across calls or shrunk?", + "starting_points": [ + "research/complex-local-word-ceiling/README.md", + "research/split-centres-global/proofs/PR386-BIT-GEOMETRY.txt", + "certificates/selected-result.json" + ], + "methods": [ + "Derive a fully charged favorable relaxation for sharing one centre path across k calls, including restoration, hosting and precision.", + "Prove a lower bound on copied information per call for the selected decoder contract." + ], + "acceptance_gate": "Show the changed centre charge and copy profile per call with every added restoration or hosting cost charged, and its ceiling via ceiling.ceiling(centre=...).", + "first_step": { + "command": [ + "python3", + "-B", + "research/complex-local-word-ceiling/verify.py" + ], + "expected": "PASS_COMPLEX_LOCAL_WORD_CEILING", + "inspect": "Read the selected word's per-call local profile, its packing ceiling and the lever table; run levers.py for the ideal budget of the lever you target.", + "scope": "Positive control and planning budget only; this is not a new construction or full cold replay." + }, + "first_experiment": "Write the per-call centre charge and copy children for sharing across k = 2 calls, charge the sharing overhead, and screen it; stop this route if even the ideal sharing gains under 10%. Ideal budgets: free 2.80x, shared by two 1.90x (levers.py).", + "bottleneck_link": "The centre path consumes 64 of about 99.6 unpaid coordinates per call, i.e. about 64% of the raw deficit.", + "allowed_variations": [ + "One sharing pattern across a fixed number of calls.", + "One reduced copied-total contract for the existing decoder.", + "If the coverage law, template or guard changes, derive an applicable fully charged replacement bound instead of applying the incumbent ceiling outside its scope." + ], + "scope_change_triggers": [ + "Removing copies without a replacement contract for the decoder's copied totals." + ], + "overlap_terms": [ + "centre path", + "copied totals", + "private temporary", + "shared centre", + "batching" + ] + }, + "scope_status": "refined", + "actual_scope": "Exact Q-linear common-frame projection test of the zero-storage temporal move: inject one selected center contribution from its canonical 22-row scatter at the start of the pinned forward scalar program, suppress that center output at its selected event, and compare all 704 local-role endpoints for each basis output c_k in Q^8. The replay keeps all 19,693 scalar events and omits native frame/climb/adapter events.", + "scope_change_reason": "The broad nonadjacent-pair search depends on this necessary timing step. The existing local fanout shares two aligned center phases, but a nonadjacent schedule cannot use the second result at its original cut without storing it. I narrowed to the exact zero-storage early-fanout mechanism and its first local falsifier before spending on a 144-call census.", + "bottleneck_link": "If valid, the two-call local profile would change eight rank-8 center children and center charge 64 per call to four rank-8 children and charge 32 per call; the ideal complex ceiling multiplier is 1.90. The unchanged bit side limits a whole-bound gain to about 3.45%. Exact actual-profile overhead budgets: research/centre-sharing-overhead-budget/README.md, pinned as provenance in SOURCES.json.", + "budget_minutes": 60, + "stop_rule": "For the exact common-frame scalar projection, one basis-channel endpoint mismatch is sufficient to terminate the no-storage early-fanout route. The pinned run finds mismatch in all eight channels (8/8 basis columns) and no persistent storage or full-phase-reordering alternative is tested. This finite result is not generalized beyond the stated projection.", + "outcome": "negative-result", + "evidence": "research/centre-prefix-fanout-obstruction-seed2803b7/verify.py and RESULT.json. Pinned exact replay gives 34,34,36,36,54,54,56,56 differing local roles across c_0..c_7; for c_0, normal-minus-early at L114 is 1/4. Positive identity-prefix and negative read-before-center fixtures pass, and a mutated cut is rejected. No supplier, full native-frame endpoint, storage schedule, or kappa is established. Final live overlap refresh at 2026-10-14T18:39:00.632930+00:00 found no exact match; revision 4 retains this card.", + "author": "Cinna Davis", + "ai_assistance": "Substantial OpenAI Codex assistance in scope selection, exact derivation, implementation, verification and writing; no independent human review or proof-assistant formalization is claimed.", + "open_questions": [ + { + "question": "Can a full-call phase reordering or persistent center bank share a center result across selected invocations while preserving dirty helper endpoints?", + "why_it_matters": "The local center-sharing ceiling is favorable, but temporal movement across the selected scalar prefix fails; a legal alternative could still realize some of the 32-unit-per-call center saving.", + "first_step": "Specify one exact pair, every saved center component, the source/target owner windows, and the full copy, restoration, frame, precision and hosting invoice before implementing a schedule.", + "blocked_by": "No selected pair or carry-state contract with a favorable fully charged budget has been established." + } + ], + "seed": "2803b7f39d0d886af6d0a63cd1521a40", + "track": "recursive-interfaces", + "catalog_sha256": "6686ad58f1fbdbc87134a78901b60fd53a20d3984355e91defbbebc9e9fa8075", + "selected_record_sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32", + "scope_key": "a55534776f5479f1686c", + "discussion_claim": "https://github.com/CrocSwap/integer-mult-bounds/discussions/2058", + "claim_expires_utc": "2026-10-14T20:25:00Z", + "overlap_snapshot": "research/centre-prefix-fanout-obstruction-seed2803b7/OVERLAP.json", + "selector_auxiliary_output": "Discarded lookup-only selector output 03e34d508bfe76f813570dfb27f6cca8; the accepted assignment seed remains 2803b7f39d0d886af6d0a63cd1521a40." +} diff --git a/research/centre-prefix-fanout-obstruction-seed2803b7/VERIFY.json b/research/centre-prefix-fanout-obstruction-seed2803b7/VERIFY.json new file mode 100644 index 0000000000..c4aace39e7 --- /dev/null +++ b/research/centre-prefix-fanout-obstruction-seed2803b7/VERIFY.json @@ -0,0 +1,24 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "certificates/selected-result.json", + "docs/research/community-batch1099-review.md", + "research/community-frontier1094-audit/ASSEMBLY.json", + "research/community-frontier1094-audit/SELECTED-SOURCE.json", + "research/community-frontier1094-audit/selected-replay.tar.gz" + ], + "commands": [ + { + "argv": [ + "{python}", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Checks selected-record, selected archive and member hashes; complete forward/backward program digests; the eight center events and all 176 canonical scatter coefficients; exact Fraction replay of the 704 local roles for all eight center basis outputs; three controls. Expected marker: PASS_CENTRE_PREFIX_FANOUT_OBSTRUCTION channels=8 mismatched=8 counts=34,34,36,36,54,54,56,56 center0_role114=1/4 controls=3 no_new_kappa." + } + ] +} diff --git a/research/centre-prefix-fanout-obstruction-seed2803b7/verify.py b/research/centre-prefix-fanout-obstruction-seed2803b7/verify.py new file mode 100644 index 0000000000..4ffaeadd98 --- /dev/null +++ b/research/centre-prefix-fanout-obstruction-seed2803b7/verify.py @@ -0,0 +1,282 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +"""Exact common-frame scalar test for early, no-storage centre fanout.""" +import argparse +import copy +from fractions import Fraction +import gzip +import hashlib +import json +from pathlib import Path +import tarfile + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +ARCHIVE = "research/community-frontier1094-audit/selected-replay.tar.gz" +BASE = "candidate/strict/global/base/providers/gauge44/" +RECORD_SHA256 = "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32" +ARCHIVE_SHA256 = "f1da80610bf33c58527f18ad63b4350d0b864e1d4486141ee17ac9bed4d529d6" +MEMBER_SHA256 = { + "CANONICAL-WORD.json.gz": "16bc0ebb04b4be6c0ade74badc6a0c0cdba4215eda86e4ff9f13abf8ecebd219", + "LOCAL-PROGRAMS.json.gz": "241fde27d4e43f5a9cb6b128f9f76c5131a53d09f0371676163f914d0b0fef3a", + "LOCAL-CHECKS.json": "2b8b1891a736598010232bfb26abc31973b265a53a2009a3fcfd9138b5ecadb4", +} +MEMBER_PAYLOAD_SHA256 = { + "CANONICAL-WORD.json.gz": "4ddb29fb9bc6f27e0c0fbfcf19a2a93a3496ad900d0f6d89059d0305c9576c0c", + "LOCAL-PROGRAMS.json.gz": "9f41d53659e9be84e20c661560c5687abbf5cd0660cdecbe01ad5eb29e6b8ee3", + "LOCAL-CHECKS.json": "2b8b1891a736598010232bfb26abc31973b265a53a2009a3fcfd9138b5ecadb4", +} +SOURCES = [92, 57, 81, 224, 11, 240, 9, 256] +FRAMES = list(range(415, 423)) + + +def need(ok, message): + if not ok: + raise ValueError(message) + + +def sha256(data): + return hashlib.sha256(data).hexdigest() + + +def canonical_digest(value): + return sha256(json.dumps(value, sort_keys=True, separators=(",", ":")).encode()) + + +def pinned_inputs(): + manifest = json.loads((HERE / "SOURCES.json").read_text()) + need(manifest["base_commit"] == "e112d71c8d7bb32435debcc54df932593dd8223a", + "research base changed") + paths = {} + for row in manifest["files"]: + if row["usage"] != "input": + continue + path = (ROOT / row["path"]).resolve() + need(path.is_relative_to(ROOT) and path.is_file(), "invalid/missing pinned source") + raw = path.read_bytes() + need(sha256(raw) == row["sha256"], "source pin mismatch: " + row["path"]) + paths[row["path"]] = path + need(paths.get("certificates/selected-result.json") is not None, + "selected record is not declared") + need(sha256(paths["certificates/selected-result.json"].read_bytes()) == RECORD_SHA256, + "selected-record identity changed") + need(paths.get(ARCHIVE) is not None, "selected replay archive is not declared") + need(sha256(paths[ARCHIVE].read_bytes()) == ARCHIVE_SHA256, "selected archive changed") + return paths[ARCHIVE] + + +def load_source_data(archive_path): + result = {} + with tarfile.open(archive_path, "r:gz") as archive: + for name, expected in MEMBER_SHA256.items(): + raw = archive.extractfile(BASE + name).read() + need(sha256(raw) == expected, "selected archive member bytes changed: " + name) + payload = gzip.decompress(raw) if name.endswith(".gz") else raw + need(sha256(payload) == MEMBER_PAYLOAD_SHA256[name], + "selected archive member payload changed: " + name) + result[name] = json.loads(payload) + return result + + +def cut_rows(canonical, source): + return [(row[1], Fraction(row[3], row[4])) + for row in canonical["cut"] if row[2] == source] + + +def validate_data(canonical, programs, checks): + need(canonical["v"] == 112 and canonical["centers"] == SOURCES and + canonical["center_frames"] == FRAMES, "selected centre inventory changed") + need(len(canonical["cut"]) == 176, "selected cut cardinality changed") + need(canonical["frames"][0] == [], "common frame is not the empty frame") + for phase in ("forward", "backward"): + need(canonical_digest(programs[phase]) == checks[phase]["sha256"], + "complete selected program digest changed: " + phase) + + events = programs["forward"] + centers = [(i, event) for i, event in enumerate(events) if event[0] == "center"] + need(len(centers) == 8, "forward centre event count changed") + for k, (i, event) in enumerate(centers): + need(event == ["center", k, FRAMES[k], 0, 8], "forward centre event changed") + block = events[i + 1:i + 23] + parsed = [] + for scalar in block: + need(scalar[0] == "scalar" and scalar[1][0] == "add", + "centre scatter is no longer 22 scalar additions") + op = scalar[1] + need(op[1] == ["L", op[1][1]] and op[2] == ["C", k], + "centre scatter address changed") + need(type(op[1][1]) is int and 0 <= op[1][1] < 704 and + type(op[3]) is int and type(op[4]) is int and op[4] != 0, + "invalid centre scatter scalar") + parsed.append((op[1][1], Fraction(op[3], op[4]))) + need(len(parsed) == 22 and parsed == cut_rows(canonical, SOURCES[k]), + "forward scatter differs from the pinned canonical cut") + need(events[i + 23] == ["scalar", ["clear", ["C", k]], 0], + "centre scratch is not cleared after scatter") + return events + + +def addr_key(addr): + need(isinstance(addr, list) and len(addr) == 2 and addr[0] in ("L", "C"), + "unexpected scalar address") + return addr[0], addr[1] + + +def scale(vector, q): + return {symbol: coefficient * q for symbol, coefficient in vector.items() + if coefficient * q} + + +def add(target, source, q): + out = dict(target) + for symbol, coefficient in source.items(): + out[symbol] = out.get(symbol, Fraction(0)) + q * coefficient + if not out[symbol]: + del out[symbol] + return out + + +def run_projection(events, canonical, channel, early): + """Keep exact scalar maps; phase/frame/native events are projected away.""" + state = {} + basis = ("c", channel) + if early: + for target, coefficient in cut_rows(canonical, SOURCES[channel]): + key = ("L", target) + state[key] = add(state.get(key, {}), {basis: Fraction(1)}, coefficient) + + for event in events: + tag = event[0] + if tag == "center": + k = event[1] + state[("C", k)] = {} if early or k != channel else {basis: Fraction(1)} + continue + if tag != "scalar": + continue + op = event[1] + target = addr_key(op[1]) + if op[0] == "clear": + state[target] = {} + elif op[0] == "copy": + state[target] = dict(state.get(addr_key(op[2]), {})) + elif op[0] == "scale": + state[target] = scale(state.get(target, {}), Fraction(op[2], op[3])) + elif op[0] == "add": + state[target] = add(state.get(target, {}), state.get(addr_key(op[2]), {}), + Fraction(op[3], op[4])) + else: + raise ValueError("unknown scalar operation: " + str(op[0])) + return {key: value for key, value in state.items() if value} + + +def fixture_controls(): + x, c = ("x", 0), ("c", 0) + + def compare(prefix, early_injection): + before = {("L", 0): {x: Fraction(1)}} + after = {k: dict(v) for k, v in before.items()} + for target, coefficient in early_injection: + key = ("L", target) + before[key] = add(before.get(key, {}), {c: Fraction(1)}, coefficient) + for op, target, coefficient in prefix: + before[target] = scale(before.get(target, {}), coefficient) if op == "scale" else before.get(target, {}) + if op == "scale" and not before[target]: + before.pop(target, None) + if op != "scale": + raise ValueError("bad control prefix") + for op, target, coefficient in prefix: + after[target] = scale(after.get(target, {}), coefficient) if op == "scale" else after.get(target, {}) + if op == "scale" and not after[target]: + after.pop(target, None) + if op != "scale": + raise ValueError("bad control prefix") + for target, coefficient in early_injection: + key = ("L", target) + after[key] = add(after.get(key, {}), {c: Fraction(1)}, coefficient) + return before == after + + need(compare([], [(1, Fraction(1, 3))]), "identity-prefix positive control failed") + need(not compare([("scale", ("L", 0), Fraction(2))], [(0, Fraction(1))]), + "read-before-center negative control failed") + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument("--write-result", type=Path) + args = parser.parse_args() + + archive = pinned_inputs() + data = load_source_data(archive) + canonical = data["CANONICAL-WORD.json.gz"] + programs = data["LOCAL-PROGRAMS.json.gz"] + checks = data["LOCAL-CHECKS.json"] + events = validate_data(canonical, programs, checks) + scalar_count = sum(event[0] == "scalar" for event in events) + need(scalar_count == 19693, "selected forward scalar event count changed") + fixture_controls() + + # A mutated coefficient must fail against the exact selected forward scatter. + mutated = copy.deepcopy(canonical) + mutated["cut"][0][3] += 1 + rejected = False + try: + validate_data(mutated, programs, checks) + except ValueError: + rejected = True + need(rejected, "mutated-cut negative control was accepted") + + channels = [] + for k in range(8): + normal = run_projection(events, canonical, k, early=False) + early = run_projection(events, canonical, k, early=True) + # Compare every local role explicitly; sparse zero vectors are equivalent to zeros. + different = [("L", role) for role in range(704) + if normal.get(("L", role), {}) != early.get(("L", role), {})] + different += [("C", role) for role in range(8) + if normal.get(("C", role), {}) != early.get(("C", role), {})] + need(different, "expected a noncommuting channel but found equality") + need(all(key[0] == "L" for key in different), "a center scratch differs at endpoint") + role114 = normal.get(("L", 114), {}).get(("c", k), Fraction(0)) - \ + early.get(("L", 114), {}).get(("c", k), Fraction(0)) + channels.append({ + "channel": k, + "center_source_role": SOURCES[k], + "different_endpoint_roles": len(different), + "first_different_role": list(different[0]), + "role_114_normal_minus_early": str(role114), + }) + counts = [row["different_endpoint_roles"] for row in channels] + need(counts == [34, 34, 36, 36, 54, 54, 56, 56], + "exact endpoint difference census changed") + need(channels[0]["role_114_normal_minus_early"] == "1/4", + "exact role-114 witness changed") + + result = { + "status": "SCOPED_NEGATIVE_RESULT", + "seed": "2803b7f39d0d886af6d0a63cd1521a40", + "track": "recursive-interfaces", + "task_id": "centre-path-sharing", + "base_commit": "e112d71c8d7bb32435debcc54df932593dd8223a", + "selected_record_sha256": RECORD_SHA256, + "archive_sha256": ARCHIVE_SHA256, + "model": "exact Q-linear common-frame projection of all 19693 scalar events in the selected forward program; all 704 local roles are compared, with zero coordinates implicit; native frame, climb and adapter events are omitted", + "comparison": "normal center scatter at its selected event versus the same canonical 176-entry scatter injected before the forward program and all center outputs suppressed", + "basis_domain": "the eight formal center outputs c_0,...,c_7; exact Fraction coefficients", + "channel_results": channels, + "controls": {"identity_prefix_commutes": True, + "target_read_before_center_does_not_commute": True, + "mutated_canonical_cut_rejected": True}, + "conclusion": "The no-storage early-fanout timing move fails exact endpoint equality in every basis channel in this pinned scalar projection. This is not a result about native frame transport, persistent storage, reordered full-call phases, other schedules, suppliers, or kappa.", + } + encoded = json.dumps(result, indent=2, sort_keys=True) + "\n" + if args.write_result: + out = args.write_result.resolve() + need(not out.exists(), "refusing to overwrite result path") + out.write_text(encoded) + print("PASS_CENTRE_PREFIX_FANOUT_OBSTRUCTION channels=8 mismatched=8 " + "counts=" + ",".join(map(str, counts)) + + " center0_role114=1/4 controls=3 no_new_kappa") + + +if __name__ == "__main__": + main()