diff --git a/research/pr4545-transport-census-check/README.md b/research/pr4545-transport-census-check/README.md new file mode 100644 index 0000000000..a0db94ec2d --- /dev/null +++ b/research/pr4545-transport-census-check/README.md @@ -0,0 +1,38 @@ +# Independent recount of #4545's transport census for PR4470 + +**Task:** independent-moment (independent source-bound coverage). **Base:** canonical main `f626db5c`. **No new κ.** + +Clear1nsight's #4545 (head `6034837d`) derives PR4470's required changed transports from its chronological words. It reports that each orientation has **3,302** persistent transport occurrences over **2,856** distinct pairs, and that **406** transport pairs are new. With 17 helper boundaries, these match 423 physical recipes, and all 408 helper owners are represented. + +This package recounts the transport census with its own frame tracking. Main's pinned #4470 constructor, run isolated on its 7 SHA256-pinned inputs, emits both the patched #4470 word and the pre-patch PR4447 word. Each persistent field keeps its current frame. A scalar contact or a warp entrance at a different frame, and the final exit, each need one transport `E → F`. + +## Results + +All recounted figures are confirmed. + +| | #4470 forward | #4470 backward | PR4447 word | +|---|---:|---:|---:| +| transport occurrences | **3,302** | **3,302** | 3,355 | +| distinct `(E, F)` pairs | **2,856** | **2,856** | 2,934 | + +- **New pairs.** There are **406** distinct transport pairs new relative to PR4447. They are compared by exact ordered frame bases, not frame indices, which differ between the two certificates. The same 406 arise in both orientations. +- **Helper owners.** There are 408 helper owners among 632 persistent fields. + +## Verify + +```text +python3 -B research/pr4545-transport-census-check/verify.py +``` + +This runs in about 2 s with the standard library only. + +## Limitations + +- **Not recounted.** #4545's 17 helper-boundary recipes and its matching against the 423 physical recipes depend on its adapter and recipe definitions. The physical recipes are not re-lowered here; the maintainers' #4470 review already lowers all final transports. +- **Counting only.** This checks the census, not phase-correct frame replacement. + +## Open next questions + +- None new. + +Credit: Clear1nsight (#4545), Cinna Davis (#4470), and the PR4447/#4441 retiming lineage. Prepared by Ryanson Jonathan with substantial Claude Code (Claude Opus 5.5) assistance. diff --git a/research/pr4545-transport-census-check/SOURCES.json b/research/pr4545-transport-census-check/SOURCES.json new file mode 100644 index 0000000000..6ed9bb7733 --- /dev/null +++ b/research/pr4545-transport-census-check/SOURCES.json @@ -0,0 +1,60 @@ +{ + "schema_version": 1, + "base_commit": "f626db5c3a3d781d8f7695038776c621651f75e1", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "ed33caef5c5827693e9572d252a66f99cbb73d40", + "sha256": "5732707cc1e460b090b53f2463162749ad860de878a18f7408938671d295a9d9" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "64bfc5af6709ed9811171e0a2108f05e1219cb65", + "sha256": "352a6184713b8843d96fd2c2071eb7aeaa655906b7c51d45ad444912666c8a96" + }, + { + "path": "research/kappa-rebuild/complex/full-identity-certificates/THREE-base-FULL-IDENTITY-CANONICAL.json.gz", + "usage": "input", + "git_blob": "4a8c4ed26e53a72362d571c972e65aff546be784", + "sha256": "6418ec3da24d548a57f5c3fe5b9062c26c9478e638504a61c387f5cfb5f4ed61" + }, + { + "path": "research/kappa-rebuild/complex/full-identity-certificates/THREE-base-FULL-IDENTITY-NATIVE.json.gz", + "usage": "input", + "git_blob": "b46d44c6ee624968dd57be928b0c15d9d45f3b2c", + "sha256": "c54b0a3e129d28e6dbf74fa731fc3bb70fe3c6705f07256750fbecddcc842d39" + }, + { + "path": "research/fresh-helper-boundary/native.py", + "usage": "input", + "git_blob": "1b36f6cb5f205c33bf48811e0b1b3621c55e8154", + "sha256": "9b55a2d3c3972148fae9d112e745d9244968166bd89bd900c938f429fc76ab29" + }, + { + "path": "research/fresh-helper-boundary/CHANGES.json", + "usage": "input", + "git_blob": "45744fedd0e28967aa72586048b8bc0c72f419a9", + "sha256": "cde73b8ff5b3c0d06e69e2293b991b24fd14a16dd4ccab7ff6b3439074a94624" + }, + { + "path": "research/missing-join-frame/PATCH.json", + "usage": "input", + "git_blob": "f96d295d40014d4dd503f58eb3cdabcbb4b8e101", + "sha256": "9ab5328245ff02c9d0be21d39bcc375f50bc5d7909e9f7b9a3a9a6f812f5bd6e" + }, + { + "path": "research/joint-helper-lattice/PATCH.json", + "usage": "input", + "git_blob": "51304a6601061ed4e698f910b09135ef109555e3", + "sha256": "296d0e8c58cc70febe042c681ef30d6bb469818c0835fbcaac8aa8d330f5b727" + }, + { + "path": "research/joint-helper-lattice/native_joint.py", + "usage": "input", + "git_blob": "0315f80e2fdef5e0eef13e3e9b8f72066238164d", + "sha256": "50869b1bcad7493e6b4cb2a4cd5d2fd9a193a5921100483fa2c3f2c999ddfd46" + } + ] +} diff --git a/research/pr4545-transport-census-check/TASK.json b/research/pr4545-transport-census-check/TASK.json new file mode 100644 index 0000000000..839ba8a989 --- /dev/null +++ b/research/pr4545-transport-census-check/TASK.json @@ -0,0 +1,100 @@ +{ + "schema_version": 1, + "task_id": "independent-moment", + "priority_revision": 7, + "base_commit": "f626db5c3a3d781d8f7695038776c621651f75e1", + "original_card": { + "id": "independent-moment", + "question": "Does a new paid-profile or mixture-ceiling claim have independent source-bound coverage of its actual changed ledger?", + "starting_points": [ + "docs/research/research-family-status.md", + "certificates/selected-result.json", + "research/staged544-mixed-fourth-entry/README.md", + "research/staged-fourth-mixture-ceiling/README.md", + "research/r437-two-window-carrier/README.md" + ], + "methods": [ + "Independently reconstruct one changed paid ledger or pooled dual with exact source and model binding.", + "Check a genuinely uncovered moment implication with a different enclosure method and semantic controls." + ], + "acceptance_gate": "Demonstrate independence, source binding, positive cases and semantic failure controls. Name the existing checks and the missing coverage. More digits or another equivalent evaluation of an unchanged root is not by itself new verification coverage.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Choose one uncovered implication in #4088 literal mixed fill, #4091 pooled dual/model binding or #4067 changed frame/host bill. #4091 pins an earlier #4088 head: validate word, capacity and stock equivalence before applying that ceiling to the later fill.", + "scope": "Source-binding orientation only; no scientific replay, theorem acceptance or supplier admission. Budget any heavy replay separately." + }, + "first_experiment": "Independently reconstruct one changed ledger or pooled certificate with a positive case and a semantic failure control. Compare exact sources and name what existing checks miss. Keep this separate from supplier-boundary-audit (ordinary/outer dispatch) and uniform-transfer-audit (all-size proof). Stop after the chosen implication; more digits of an unchanged root are not additional mechanism coverage.", + "bottleneck_link": "Independent pricing prevents unsupported frontier claims and can reveal genuine accounting slack.", + "allowed_variations": [ + "Reconstruct either a source ledger or a numeric enclosure with a different method." + ], + "scope_change_triggers": [ + "Importing the primary function and calling its output independent verification.", + "Calling an aggregate histogram or source archive an independently accepted physical supplier." + ], + "overlap_terms": [ + "independent moment", + "rank histogram", + "exact enclosure", + "2979", + "rank7 joint endframes", + "paired extraction", + "joint lowering", + "4088", + "4091", + "4067", + "staged544-mixed-fourth-entry", + "staged-fourth-mixture-ceiling", + "r437-two-window-carrier" + ], + "existing_checks": [ + { + "scope": "PR #4088: mixed local/owner/phase ledger and moment reported.", + "evidence": "research/staged544-mixed-fourth-entry/README.md", + "remaining": "Independent binding of changed construction to paid histogram, distinct from full admission.", + "status": "author-checked", + "source_commit": "72d7efc181edb21806a878f174847c96dd410ab0", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "PR #4091: sharp pooled ceiling proposed for fixed THREE/FOUR words and inventory.", + "evidence": "research/staged-fourth-mixture-ceiling/README.md", + "remaining": "Validate dual, exhaustive pattern scope and exact source equivalence before applying to newer fills.", + "status": "author-checked", + "source_commit": "a29bdd8f56cd18b805917775cdec09ff935eddc4", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "PR #4067: paid (2,2) to (1,3) exchange and fixed OQ4 host reported.", + "evidence": "research/r437-two-window-carrier/README.md", + "remaining": "Independent full cost delta; remaining caller/precision/stock obligations are separate.", + "status": "author-checked", + "source_commit": "a95f11c52e3ca1e4c5171b3c20d8f4b0815aee2e", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + } + ] + }, + "scope_status": "unchanged", + "actual_scope": "Does a new paid-profile or mixture-ceiling claim have independent source-bound coverage of its actual changed ledger?", + "scope_change_reason": null, + "bottleneck_link": "Independent coverage of the transport census behind PR4470's changed-pair recipe coverage.", + "budget_minutes": 20, + "stop_rule": "Stop at the transport census.", + "outcome": "completed", + "evidence": "Own frame tracking on main's #4470 constructor: 3,302 occurrences / 2,856 distinct pairs per orientation; 406 new pairs vs PR4447 (exact bases, both orientations); PR4447 3,355/2,934; 408 helper owners.", + "author": "Ryanson Jonathan, with Claude Code (Claude Opus 5.5) assistance", + "ai_assistance": "Substantial Claude Code (Claude Opus 5.5) assistance; no independent human review.", + "open_questions": [ + { + "question": "None new.", + "why_it_matters": "Helper-boundary recipes remain #4545's.", + "first_step": "n/a", + "blocked_by": "None." + } + ] +} diff --git a/research/pr4545-transport-census-check/VERIFY.json b/research/pr4545-transport-census-check/VERIFY.json new file mode 100644 index 0000000000..459b959b6f --- /dev/null +++ b/research/pr4545-transport-census-check/VERIFY.json @@ -0,0 +1,28 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "certificates/selected-result.json", + "docs/research/agent-task-catalog.json", + "research/fresh-helper-boundary/CHANGES.json", + "research/fresh-helper-boundary/native.py", + "research/joint-helper-lattice/PATCH.json", + "research/joint-helper-lattice/native_joint.py", + "research/kappa-rebuild/complex/full-identity-certificates/THREE-base-FULL-IDENTITY-CANONICAL.json.gz", + "research/kappa-rebuild/complex/full-identity-certificates/THREE-base-FULL-IDENTITY-NATIVE.json.gz", + "research/missing-join-frame/PATCH.json" + ], + "commands": [ + { + "argv": [ + "{python}", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Own transport census of #4470 and PR4447 words from the pinned constructor: occurrences, distinct pairs, 406 new pairs, helper owners." + } + ] +} diff --git a/research/pr4545-transport-census-check/verify.py b/research/pr4545-transport-census-check/verify.py new file mode 100644 index 0000000000..e19d5dd754 --- /dev/null +++ b/research/pr4545-transport-census-check/verify.py @@ -0,0 +1,83 @@ +#!/usr/bin/env python3 +"""Independent recount of the transport census in PR #4545 (Clear1nsight) for PR4470's chronological words. + +Main's pinned #4470 constructor (research/joint-helper-lattice/native_joint.py, run isolated) emits both the patched +#4470 certificate/word and the pre-patch PR4447 certificate/word. With this file's own frame tracking (each +persistent field keeps its current frame; a scalar contact or warp entrance at a different frame, and the final exit, +each require one transport E -> F), it checks: + * 3,302 transport occurrences over 2,856 distinct (E, F) pairs in each orientation of the #4470 word; + * 406 distinct pairs new relative to the PR4447 word, comparing exact ordered frame bases (not frame indices, + which differ between the two certificates); the PR4447 word itself has 3,355 occurrences over 2,934 pairs; + * 408 helper owners (632 persistent fields). +#4545's 17 helper-boundary recipes depend on its adapter-recipe definitions and are not recounted. +Ryanson Jonathan with Claude Code (Claude Opus 5.5) assistance. Apache-2.0. +""" +from collections import Counter +import json +from pathlib import Path +import subprocess +import sys +import tempfile + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] + + +def need(condition, message): + if not condition: + raise AssertionError(message) + + +def roles(e): + g = e[1] + return g[1:3] if g[0] in ("add", "copy") else g[1:2] + + +def transports(cert, program): + frames = cert["frames"] + state, occ = list(cert["start"]), Counter() + for e in program: + if e[0] == "scalar": + for r in roles(e): + if r[0] == "L" and state[r[1]] != e[2]: + occ[tuple(frames[state[r[1]]]), tuple(frames[e[2]])] += 1 + for r in roles(e): + if r[0] == "L": + state[r[1]] = e[2] + elif e[0] == "warp": + r = e[1][1] + if state[r] != e[3]: + occ[tuple(frames[state[r]]), tuple(frames[e[3]])] += 1 + state[r] = e[4] + for r, f in enumerate(cert["final"]): + if state[r] != f: + occ[tuple(frames[state[r]]), tuple(frames[f])] += 1 + return occ + + +def main(): + with tempfile.TemporaryDirectory(prefix="census-cache-") as cache: + code = ("import json,sys;sys.path.insert(0,sys.argv[1]);import native_joint;" + "c,p,b,o,n=native_joint.construct();print(json.dumps({'c':c,'p':p,'b':b,'o':o}))") + run = subprocess.run([sys.executable, "-I", "-B", "-X", "pycache_prefix=" + cache, "-c", code, + str(ROOT / "research/joint-helper-lattice")], capture_output=True, check=True, timeout=120) + d = json.loads(run.stdout) + new, old = d["c"], d["b"] + need(new["R"] == 408 and len(new["final"]) == 632, "408 helper owners, 632 persistent fields") + counts = {} + for orient in ("forward", "backward"): + occ = transports(new, d["p"][orient]) + need(sum(occ.values()) == 3302 and len(occ) == 2856, f"#4470 {orient}: 3,302 occurrences over 2,856 pairs") + counts[orient] = occ + old_occ = transports(old, d["o"]["forward"]) + need(sum(old_occ.values()) == 3355 and len(old_occ) == 2934, "PR4447 word: 3,355 occurrences over 2,934 pairs") + fresh = set(counts["forward"]) - set(old_occ) + need(len(fresh) == 406, "406 distinct transport pairs new relative to PR4447") + need(set(counts["backward"]) - set(transports(old, d["o"]["backward"])) == fresh, "same 406 in the backward word") + print(json.dumps({"status": "PASS_PR4545_TRANSPORT_CENSUS_CHECK", "occurrences_per_orientation": 3302, + "distinct_pairs": 2856, "new_pairs_vs_pr4447": 406, "pr4447_occurrences": 3355, + "pr4447_distinct_pairs": 2934, "helper_owners": 408, "new_kappa_claimed": False}, indent=1)) + + +if __name__ == "__main__": + sys.exit(main())