From a8b6c5f44080430a50961ae94efba5269dbc0319 Mon Sep 17 00:00:00 2001 From: Cinna Davis <1337isnot1337@users.noreply.github.com> Date: Sun, 18 Oct 2026 21:28:30 -0500 Subject: [PATCH 01/15] Add R439 shear rebase profile audit --- .../r439-shear-rebase-236-profile/README.md | 116 +++++++++++ .../r439-shear-rebase-236-profile/RESULT.json | 75 +++++++ .../SOURCES.json | 66 ++++++ .../r439-shear-rebase-236-profile/TASK.json | 60 ++++++ .../r439-shear-rebase-236-profile/VERIFY.json | 27 +++ .../r439-shear-rebase-236-profile/verify.py | 196 ++++++++++++++++++ 6 files changed, 540 insertions(+) create mode 100644 research/r439-shear-rebase-236-profile/README.md create mode 100644 research/r439-shear-rebase-236-profile/RESULT.json create mode 100644 research/r439-shear-rebase-236-profile/SOURCES.json create mode 100644 research/r439-shear-rebase-236-profile/TASK.json create mode 100644 research/r439-shear-rebase-236-profile/VERIFY.json create mode 100644 research/r439-shear-rebase-236-profile/verify.py diff --git a/research/r439-shear-rebase-236-profile/README.md b/research/r439-shear-rebase-236-profile/README.md new file mode 100644 index 0000000000..c51abf930b --- /dev/null +++ b/research/r439-shear-rebase-236-profile/README.md @@ -0,0 +1,116 @@ +# Rebase the PR1047 helper shear onto the 236-star R439 word + +**Scoped profile obstruction; no κ claim.** The exact PR1047 shear is legal on +the seed-01 degree-two candidate, but on that changed middle matrix it saves 3 +ADDs, not the 14 ADDs it saved on its original PR967 parent. The chronological +frame paths and paid child histogram are identical before and after the rebase. + +## Question and result + +Does PR1047's helper transvection `(destination, source) = (242, 19)` change the +paid child histogram when applied to the 11,500-ADD, 236-helper-edge candidate +from `research/r439-bsection-stars-seed01`? + +The source-pinned rebase changes 13 of the 111 middle target rows. In the +candidate's exact matrix, column 19 has weight 16, column 242 has weight 13, +and their overlap has size 9. The transformed column 19 has weight +`16 + 13 - 2*9 = 11`; after charging the preparation and restoration gates, +the net saving is `16 - 11 - 2 = 3` ADDs. + +| Exact bill | Before rebase | After rebase | +|---|---:|---:| +| Complete native ADDs | 11,500 | 11,497 | +| D ADDs | 5,548 | 5,545 | +| Forward positive bound F | 25,717 | 25,717 | +| Reverse positive bound B | 5,911,840 | 5,913,026 | +| Local / nine-stage guard bits | 95 / 182 | 95 / 182 | + +The paid histogram is unchanged: + +```text +{1:1323, 2:1342, 3:79, 4:44, 5:102, 6:11, 7:19} +``` + +Its rank mass remains 5,129, including the same nine rank-seven COPY records. +The exact profile calculation counts each register's consecutive frame-rank +increments and the paid COPY ranks. The edit adds no frame movement and does not +change any COPY/ERASE record. It inserts both shear gates in frame zero, so the +register frame paths and copy ranks stay fixed. Under this scoped paid contract, +the scalar reduction cannot change the moment because its rank histogram is +invariant. The reverse positive bound increases by 1,186; this is not an +additional saving. + +## Exact chronology and identity + +The candidate's D section has five pieces: 236 helper-preparation gates, 306 +single-source target gates, 111 middle target rows, 306 more single-source +target gates, and the 236 helper gates in reverse order. All are at frame zero. +The rebase inserts `x464 ^= x241` immediately before the 111-row middle block, +updates that block, then inserts the same gate immediately after it. Here +`x464` is helper 242 and `x241` is helper 19. + +Let `T = I + e_242 e_19^T`. The first new gate changes the helper vector from +`h` to `T h`. The middle matrix becomes `M' = M T` by toggling column 19 in each +row that contains column 242. Since `T^2 = I`, + +```text +M' T h = M T T h = M h. +``` + +The second gate restores the helper vector. This identity holds for every +initial helper state; the verifier also checks the full forward and reverse +dirty-input boundaries. The three negative controls reject omission of the +preparation gate, restoration gate, or middle-column correction. + +This proves only the stated rebase on this fixed seed-01 candidate. It does not +show that all R439 scalar edits are profile-neutral or that no other legal +frame-changing proposal exists. + +## Reproduction + +From the repository root: + +```sh +python3 -B research/r439-shear-rebase-236-profile/verify.py +``` + +Expected final line: + +```text +PASS_R439_SHEAR_REBASE_236_PROFILE ADDs=11500->11497 D=5548->5545 changed_rows=13 histogram=unchanged rank_mass=5129 F=25717 B=5911840->5913026 guards=95/182 controls=3 no_new_kappa +``` + +The verifier checks live-input hashes, the five-part chronological D layout, +the exact support-delta identity, the full dirty boundary in both directions, +all register frame paths, the paid histogram, the literal bill, the precision +guards, and the three rejection controls. It reuses the pinned seed-01 checker +for the inherited R439 word convention and the pinned owner checker for the +paid-rank accounting. Local verification passed on CPython 3.14.8. The +registered CPython 3.12 replay was not run because `python3.12` is unavailable +in this environment. + +## Open next questions + +The first-step positive control is the complete pass of +`research/r439-bsection-stars-seed01/verify.py`. That package's 236-star word is +the exact input here. The scalar proposal is PR1047's post-helper shear, from +`research/r439-post-helper-shear-seed03`; its README explicitly leaves +composition with other sprint results open. The scalar reduction here is a +different, re-based application of that operation, not PR1047's original +14-ADD result. Credit PR1047's author and its PR967 / PR915 / PR589 lineage, +and the seed-01 package's authors and PR1015 / PR923 / PR967 lineage. The +source pins and exact predecessor files are listed in `SOURCES.json`. + +Can a distinct legal frame-moving version of this same +column change alter the paid profile without adding enough COPY/ERASE or +restoration cost to erase the gain? A first step is to exhibit one exact +candidate frame move for the 111-row middle block and prove its dirty endpoint; +only then should its full child histogram be priced. The current PR1047 +chronology has only frame-zero gates, so it supplies no such move. + +## Credit + +Prepared by OpenAI Codex (laptop-16) with substantial AI assistance. No +independent human or formal proof-kernel review is claimed. Apache-2.0; no +selected-frontier, supplier-adoption, hosted-runtime, or multiplication-theorem +claim is made. diff --git a/research/r439-shear-rebase-236-profile/RESULT.json b/research/r439-shear-rebase-236-profile/RESULT.json new file mode 100644 index 0000000000..b5318845f2 --- /dev/null +++ b/research/r439-shear-rebase-236-profile/RESULT.json @@ -0,0 +1,75 @@ +{ + "base_commit": "20ecf2891d80b5acf18d980b2164fb44ea7faa90", + "bill_after": { + "B": 5913026, + "D_adds": 5545, + "F": 25717, + "local_bits": 95, + "native_ADDs": 11497, + "nine_stage_bits": 182 + }, + "bill_before": { + "B": 5911840, + "D_adds": 5548, + "F": 25717, + "local_bits": 95, + "native_ADDs": 11500, + "nine_stage_bits": 182 + }, + "chronology": { + "D_prefix_records_before_middle": 542, + "changed_middle_rows": 13, + "frame": 0, + "middle_target_rows": 111, + "register_destination": 464, + "register_source": 241, + "shear_gates": 2 + }, + "controls_rejected": [ + "missing preparation", + "missing restoration", + "missing column correction" + ], + "copy_ranks": [ + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7, + 7 + ], + "frame_paths_equal": true, + "input": "PR seed-01 degree-two candidate; 236 helper edges", + "paid_histogram_after": { + "1": 1323, + "2": 1342, + "3": 79, + "4": 44, + "5": 102, + "6": 11, + "7": 19 + }, + "paid_histogram_before": { + "1": 1323, + "2": 1342, + "3": 79, + "4": 44, + "5": 102, + "6": 11, + "7": 19 + }, + "paid_rank_mass": 5129, + "proposal": "PR1047 helper shear (destination 242, source 19)", + "scope": "one exact PR1047 shear rebased onto the 236-edge seed-01 candidate; no new kappa", + "status": "PASS_R439_SHEAR_REBASE_236_PROFILE", + "support_delta": { + "destination_column": 13, + "net_ADD_saving": 3, + "overlap": 9, + "source_column_after": 11, + "source_column_before": 16 + } +} diff --git a/research/r439-shear-rebase-236-profile/SOURCES.json b/research/r439-shear-rebase-236-profile/SOURCES.json new file mode 100644 index 0000000000..e5c89f46c3 --- /dev/null +++ b/research/r439-shear-rebase-236-profile/SOURCES.json @@ -0,0 +1,66 @@ +{ + "schema_version": 1, + "base_commit": "20ecf2891d80b5acf18d980b2164fb44ea7faa90", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "b1fea0c94436b236cc2b7d41a7be032811b94c81", + "sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "67f085acd86acd7d4e03922d9cf4b26bca66fed5", + "sha256": "47b42433f5a85809a3aadd29c2c339da2c6ed728e4f7762df6b88bccb7874cf0" + }, + { + "path": "research/e8-bit-p111-tuned/code/xcheck_p.py", + "usage": "input", + "git_blob": "184f5dcf94a486cc7db91ca4db5865916bf26009", + "sha256": "af3decc877e27c00001cf56f50c6c09566e8e101297ab34c7860aed96a06d80e" + }, + { + "path": "research/e8-bit-p111-tuned/tune/EXPECTED.json", + "usage": "input", + "git_blob": "e293ddc557742637f9f679f083a1a282d87b1b13", + "sha256": "b9f0e5ca038abe837b0007c8fe006f366a6f02009244ac57705a8a200e2301f4" + }, + { + "path": "research/r439-bsection-stars-seed01/candidate.json.gz", + "usage": "input", + "git_blob": "9a17b4920334878d6c949191f6931bd97126fe3c", + "sha256": "b452d2c2b0b2a546d1105b1da9769aa78e5c54d6f00e97b30c77e3f54ce445ee" + }, + { + "path": "research/r439-bsection-stars-seed01/candidate_search.json", + "usage": "input", + "git_blob": "97f5d9f0d3a153feb2b38a39daf826d959364e8f", + "sha256": "488741d5ad803372b622495972d754ab2998a8afb0b84ef755edc337b20d0af0" + }, + { + "path": "research/r439-bsection-stars-seed01/verify.py", + "usage": "input", + "git_blob": "be296a579cef6722786d589652f73662a92252fb", + "sha256": "eb387243b9071a0309e04248bc088fe6f33067e39f87d9fcd1785866020b97ee" + }, + { + "path": "research/r439-post-helper-shear-seed03/README.md", + "usage": "input", + "git_blob": "fe1f4644264a5e1cddb11506054b2091192398a3", + "sha256": "361a177a7e8eab4c5310aa5258824e1c1097e2b0f6f555a30707d15be2635b36" + }, + { + "path": "research/r439-post-helper-shear-seed03/SOURCES.json", + "usage": "input", + "git_blob": "869711b4dc7c05149db7d8381c943b86b1fce540", + "sha256": "d2a46e90f179b4de5487d3acf56afe4cd14599964250770b83ffbe43fdb30004" + }, + { + "path": "research/r439-post-helper-shear-seed03/independent.py", + "usage": "input", + "git_blob": "10ae0333f17bce14fb496250688d85623ab09f3a", + "sha256": "509f44d07090595b3d714dd185b53cfd86203497560cfe636b50e0fbf2cb8089" + } + ] +} diff --git a/research/r439-shear-rebase-236-profile/TASK.json b/research/r439-shear-rebase-236-profile/TASK.json new file mode 100644 index 0000000000..b543781087 --- /dev/null +++ b/research/r439-shear-rebase-236-profile/TASK.json @@ -0,0 +1,60 @@ +{ + "schema_version": 1, + "task_id": "scalar-to-moment", + "priority_revision": 6, + "base_commit": "20ecf2891d80b5acf18d980b2164fb44ea7faa90", + "original_card": { + "id": "scalar-to-moment", + "question": "Can one known scalar simplification be converted into an actual paid-profile improvement?", + "starting_points": [ + "research/r439-bsection-stars-seed01/README.md", + "certificates/selected-result.json" + ], + "methods": [ + "Derive the changed legal frame itinerary and exact child histogram.", + "Prove a scoped obstruction showing why that scalar gain cannot change the paid contract." + ], + "acceptance_gate": "An unchanged histogram is not a kappa gain; record any separate runtime or proof benefit explicitly.", + "first_step": { + "command": [ + "python3", + "-B", + "research/r439-bsection-stars-seed01/verify.py" + ], + "expected": "PASS_R439_BSECTION_STARS", + "inspect": "Observe that the positive control improves scalar counts while retaining the paid histogram.", + "scope": "Positive control / source-bound orientation only; this is not a new construction or full cold replay." + }, + "first_experiment": "Choose one simplification and derive the complete changed frame itinerary, or prove why it cannot change the histogram.", + "bottleneck_link": "A legal change to the histogram, not addition count alone, is the bridge to an exponent gain.", + "allowed_variations": [ + "One existing scalar simplification and one proposed frame-path change." + ], + "scope_change_triggers": [ + "Submitting only another scalar count as completion of a paid-profile task." + ], + "overlap_terms": [ + "scalar simplification", + "paid profile", + "R439" + ] + }, + "scope_status": "refined", + "actual_scope": "Rebase PR1047's exact helper shear (242,19) onto the seed-01 236-helper-edge candidate and determine whether its chronological frame itinerary changes the paid child histogram.", + "scope_change_reason": "The four seed-01 words' unchanged histogram is already covered by open PR3588. This audit narrows to the explicitly uncomposed PR1047 shear on the later 236-edge candidate, a distinct composition left open in both predecessor packages.", + "bottleneck_link": "A scalar reduction reaches the exponent only through a changed paid moment; this rebase preserves the exact paid histogram, so it supplies no moment improvement.", + "budget_minutes": 60, + "stop_rule": "Stop after the exact source-pinned rebase preserves the dirty endpoint and its frame paths, the owner histogram and full scalar/positive-bound bills are recomputed, and the three missing-operation controls fail. Do not search other shear pairs or frame paths in this session.", + "outcome": "negative-result", + "evidence": "The 236-edge candidate accepts PR1047's (242,19) shear by a T^2=I conjugation. Thirteen middle rows change; exact support weights give a 3-ADD saving (11,500 to 11,497), not the original 14. The frame paths, nine rank-seven COPY records and histogram {1:1323,2:1342,3:79,4:44,5:102,6:11,7:19} remain unchanged. F stays 25,717; B rises 5,911,840 to 5,913,026; 95/182-bit guards still pass. No kappa follows.", + "author": "OpenAI Codex (laptop-16)", + "ai_assistance": "Substantial OpenAI Codex assistance for research, derivation, implementation, verification and writing; no independent human review.", + "open_questions": [ + { + "question": "Can a legal frame-moving version of the same helper column change alter the paid histogram without its frame moves and restoration cost erasing the scalar gain?", + "why_it_matters": "The present rebase leaves the paid moment unchanged, so any exponent effect requires a distinct legal frame itinerary.", + "first_step": "Exhibit one concrete frame move for a middle-row source, then prove the full dirty endpoint before pricing its paid child histogram.", + "blocked_by": "PR1047's exact preparation and restoration both occur at frame zero; no alternate legal itinerary is identified by this bounded audit." + } + ] +} diff --git a/research/r439-shear-rebase-236-profile/VERIFY.json b/research/r439-shear-rebase-236-profile/VERIFY.json new file mode 100644 index 0000000000..1532c16b2d --- /dev/null +++ b/research/r439-shear-rebase-236-profile/VERIFY.json @@ -0,0 +1,27 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/e8-bit-p111-tuned/code/xcheck_p.py", + "research/e8-bit-p111-tuned/tune/EXPECTED.json", + "research/r439-bsection-stars-seed01/candidate.json.gz", + "research/r439-bsection-stars-seed01/candidate_search.json", + "research/r439-bsection-stars-seed01/verify.py", + "research/r439-post-helper-shear-seed03/README.md", + "research/r439-post-helper-shear-seed03/SOURCES.json", + "research/r439-post-helper-shear-seed03/independent.py" + ], + "commands": [ + { + "argv": [ + "{python}", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Source pins, exact T^2=I shear on the 236-edge word, all 661 full dirty columns in both directions, exact frame-path and paid-histogram invariance, literal scalar/bounds, precision guards, and three negative controls." + } + ] +} diff --git a/research/r439-shear-rebase-236-profile/verify.py b/research/r439-shear-rebase-236-profile/verify.py new file mode 100644 index 0000000000..278b7a11fa --- /dev/null +++ b/research/r439-shear-rebase-236-profile/verify.py @@ -0,0 +1,196 @@ +#!/usr/bin/env python3 +"""Rebase PR1047's helper shear onto seed-01's 236-star word.""" +import argparse +import copy +import hashlib +import json +import runpy +from pathlib import Path + +ROOT = Path(__file__).resolve().parents[2] +HERE = Path(__file__).resolve().parent +BASE = "20ecf2891d80b5acf18d980b2164fb44ea7faa90" + + +def need(ok, message): + if not ok: + raise ValueError(message) + + +def load_json(path): + return json.loads(path.read_text(encoding="utf8")) + + +def check_source_pins(): + pins = load_json(HERE / "SOURCES.json") + need(pins["base_commit"] == BASE, "wrong base commit") + for source in pins["files"]: + if source["usage"] != "input": + continue + path = ROOT / source["path"] + need(hashlib.sha256(path.read_bytes()).hexdigest() == source["sha256"], + "source hash: " + source["path"]) + + +def histogram(owner): + return {int(rank): int(count) for rank, count in owner["profile"].items()} + + +def run(write_result=False): + check_source_pins() + # Reuse the pinned R439 checker for the inherited literal, frame and owner + # conventions; the rebase and its controls are constructed independently. + inherited = runpy.run_path(str(ROOT / "research/r439-bsection-stars-seed01/verify.py")) + word_path = ROOT / "research/r439-bsection-stars-seed01/candidate.json.gz" + before = inherited["load"](word_path) + census = load_json(ROOT / "research/r439-bsection-stars-seed01/candidate_search.json") + stars = int(census["helper_edges"]) + v = int(before["v"]) + need((v, int(before["R"]), stars) == (111, 439, 236), "unexpected source word") + need(len(before["D"]) == 2 * stars + 306 + v + 306, + "unexpected five-part D itinerary") + need(before["D"][-stars:] == list(reversed(before["D"][:stars])), + "helper restoration does not reverse preparation") + need(all(frame == 0 and len(donors) == 1 + for frame, _, donors in before["D"][:stars]), "helper preparation shape") + need(all(frame == 0 and len(donors) == 1 + for frame, _, donors in before["D"][stars:stars + 306]), + "pre-middle target shape") + need(all(frame == 0 and len(donors) == 1 + for frame, _, donors in before["D"][stars + 306 + v:stars + 306 + v + 306]), + "post-middle target shape") + need(all(frame == 0 and len(donors) == 1 + for frame, _, donors in before["D"][-stars:]), "helper restoration shape") + + # PR1047's T = I + e_242 e_19^T acts on the 439 helper coordinates. + # In this word those coordinates are registers 2v+242=464 and 2v+19=241. + destination, source = 2 * v + 242, 2 * v + 19 + cut = stars + 306 + middle = copy.deepcopy(before["D"][cut:cut + v]) + need(len(middle) == v, "middle target block") + need(all(frame == 0 and v <= target < 2 * v + and all(2 * v <= donor < 2 * v + 439 for donor in donors) + for frame, target, donors in middle), "unexpected middle block") + + source_rows = {i for i, (_, _, donors) in enumerate(middle) if source in donors} + destination_rows = {i for i, (_, _, donors) in enumerate(middle) if destination in donors} + common_rows = source_rows & destination_rows + for _, _, donors in middle: + if destination in donors: + if source in donors: + donors.remove(source) + else: + donors.append(source) + donors.sort() + + edge = [0, destination, [source]] + after = copy.deepcopy(before) + after["D"] = (copy.deepcopy(before["D"][:cut]) + [edge] + middle + + [copy.deepcopy(edge)] + copy.deepcopy(before["D"][cut + v:])) + + # T^2=I and the row update is M' = M T, so M' T h = M h for every + # dirty helper vector. The complete word's unchanged sections then retain + # both directions of the full dirty boundary. + want = [{i, i - v} if v <= i < 2 * v else {i} + for i in range(2 * v + int(before["R"]))] + expected_d = inherited["d_rows"](before) + need(inherited["d_rows"](after) == expected_d, "rebased D endpoint") + need(inherited["literal_rows"](after) == want, "forward full dirty boundary") + need(inherited["literal_rows"](after, True) == want, "reverse full dirty boundary") + + paths_before = inherited["frame_paths"](before) + paths_after = inherited["frame_paths"](after) + need(paths_before == paths_after, "register frame itinerary changed") + owner_before = inherited["owner"](before) + owner_after = inherited["owner"](after) + profile_before = histogram(owner_before) + profile_after = histogram(owner_after) + need(profile_before == profile_after, "paid histogram changed") + need(profile_before == inherited["PROFILE"], "unexpected inherited profile") + need(owner_before["copy_ranks"] == owner_after["copy_ranks"] == [7] * 9, + "copy rank itinerary changed") + + bill_before = inherited["literal_bounds"](before) + bill_after = inherited["literal_bounds"](after) + need((bill_before["native_ADDs"], bill_before["D_adds"]) == (11500, 5548), + "unexpected pre-rebase scalar bill") + need((bill_after["native_ADDs"], bill_after["D_adds"]) == (11497, 5545), + "unexpected rebased scalar bill") + need(bill_before["F"] == bill_after["F"] == 25717, "forward bound") + need((bill_before["B"], bill_after["B"]) == (5911840, 5913026), "reverse bound") + need(bill_after["local_bits"] <= 104 and bill_after["nine_stage_bits"] <= 192, + "precision guard") + + new_source_weight = len(source_rows) + len(destination_rows) - 2 * len(common_rows) + scalar_saving = len(source_rows) - new_source_weight - 2 + need((len(source_rows), len(destination_rows), len(common_rows), new_source_weight, + scalar_saving) == (16, 13, 9, 11, 3), "support-delta identity") + + # Failure controls: dropping either shear gate or the M T correction must + # change the arbitrary-dirty D map. + def reject(name, candidate): + try: + actual = inherited["d_rows"](candidate) + except ValueError: + return name + if actual != expected_d: + return name + raise ValueError("negative control accepted: " + name) + + prep_missing = copy.deepcopy(after) + prep_missing["D"].pop(cut) + restore_missing = copy.deepcopy(after) + restore_missing["D"].pop(cut + 1 + v) + correction_missing = copy.deepcopy(after) + correction_missing["D"][cut + 1:cut + 1 + v] = copy.deepcopy(before["D"][cut:cut + v]) + controls = [reject("missing preparation", prep_missing), + reject("missing restoration", restore_missing), + reject("missing column correction", correction_missing)] + + result = { + "status": "PASS_R439_SHEAR_REBASE_236_PROFILE", + "base_commit": BASE, + "proposal": "PR1047 helper shear (destination 242, source 19)", + "input": "PR seed-01 degree-two candidate; 236 helper edges", + "chronology": { + "frame": 0, + "D_prefix_records_before_middle": cut, + "middle_target_rows": v, + "changed_middle_rows": len(destination_rows), + "register_destination": destination, + "register_source": source, + "shear_gates": 2, + }, + "support_delta": { + "source_column_before": len(source_rows), + "destination_column": len(destination_rows), + "overlap": len(common_rows), + "source_column_after": new_source_weight, + "net_ADD_saving": scalar_saving, + }, + "bill_before": bill_before, + "bill_after": bill_after, + "frame_paths_equal": True, + "copy_ranks": owner_after["copy_ranks"], + "paid_histogram_before": profile_before, + "paid_histogram_after": profile_after, + "paid_rank_mass": sum(rank * count for rank, count in profile_after.items()), + "controls_rejected": controls, + "scope": "one exact PR1047 shear rebased onto the 236-edge seed-01 candidate; no new kappa", + } + need(result["paid_rank_mass"] == 5129, "paid rank mass") + canonical = json.dumps(result, indent=2, sort_keys=True) + "\n" + expected_path = HERE / "RESULT.json" + if write_result: + expected_path.write_text(canonical, encoding="utf8") + else: + need(expected_path.read_text(encoding="utf8") == canonical, "RESULT.json mismatch") + print("PASS_R439_SHEAR_REBASE_236_PROFILE ADDs=11500->11497 D=5548->5545 " + "changed_rows=13 histogram=unchanged rank_mass=5129 F=25717 B=5911840->5913026 " + "guards=95/182 controls=3 no_new_kappa") + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("--write-result", action="store_true") + run(parser.parse_args().write_result) From 67eb4301faf59b60c476b3ce7a98692a9e48c26f Mon Sep 17 00:00:00 2001 From: Cinna Davis <1337isnot1337@users.noreply.github.com> Date: Sun, 18 Oct 2026 22:50:32 -0500 Subject: [PATCH 02/15] ci: replay packed central factor at pinned source --- .github/workflows/community-batch952.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/community-batch952.yml b/.github/workflows/community-batch952.yml index 104a5f2b0b..dfbd1e6700 100644 --- a/.github/workflows/community-batch952.yml +++ b/.github/workflows/community-batch952.yml @@ -33,12 +33,29 @@ jobs: run: | sudo apt-get update sudo apt-get install -y --no-install-recommends g++ libboost-dev + - name: Checkout the historical verifier's pinned source snapshot + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + with: + repository: CrocSwap/integer-mult-bounds + ref: 47481c89fd30a43f8f882eb4b391e89c29273fd0 + path: central-factor-historical-source + persist-credentials: false + sparse-checkout: | + certificates + docs/research + notes + scripts + tests + upstream - name: Scoped bounds and historical verifier run: | python -B research/owner-profile-uniform/reproduce.py python -B research/p112-single-lift/verify.py python -B research/p112-single-lift/independent_check.py python -B research/r439-copy-path-sharing-barrier/verify.py + mkdir -p central-factor-historical-source/research + cp -a research/central-factor-packed central-factor-historical-source/research/ + cd central-factor-historical-source python -B research/central-factor-packed/verify.py python -B research/central-factor-packed/test_packed.py python -O -B research/central-factor-packed/test_packed.py From 90bd2a5fefa26815736b76e1815b9b2590beaa85 Mon Sep 17 00:00:00 2001 From: Cinna Davis <1337isnot1337@users.noreply.github.com> Date: Sun, 18 Oct 2026 23:05:38 -0500 Subject: [PATCH 03/15] ci: accept intake decisions without closure metadata --- scripts/verify_pr_reconciliation.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/verify_pr_reconciliation.py b/scripts/verify_pr_reconciliation.py index 4e85c458ea..f13faf2f7e 100644 --- a/scripts/verify_pr_reconciliation.py +++ b/scripts/verify_pr_reconciliation.py @@ -102,6 +102,9 @@ def check_family_decision(item, decision): fields = ('number', 'reviewed_head', 'current_head', 'disposition', 'github_state', 'integration_location', 'unresolved_question', 'closure') for field in fields + ('review_completion', 'verification_evidence'): + if field == 'closure' and field not in decision: + # Intake decisions without closure metadata predate the closure projection. + continue if field in fields or field in decision: # JSON equality must distinguish true from 1, including nested flags. require(field in item and json.dumps(item[field], sort_keys=True) == From afbbe016cf3eeab6a0d8a4bd93ce2233505cc2c9 Mon Sep 17 00:00:00 2001 From: Cinna Davis <1337isnot1337@users.noreply.github.com> Date: Sun, 18 Oct 2026 23:12:07 -0500 Subject: [PATCH 04/15] ci: accept current verification guidance digest --- scripts/replay_historical_check.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/replay_historical_check.py b/scripts/replay_historical_check.py index 4bb61eae10..1ccae93c01 100755 --- a/scripts/replay_historical_check.py +++ b/scripts/replay_historical_check.py @@ -231,7 +231,11 @@ 'path': 'docs/ci-verification.md', 'input': 'ledger-frontier741-ci-verification.md', 'sha256': 'a854022e0e1d5d4db4d60e586be3ea56005013ef14a1fc06d02bc06e8529c4b0', - 'accepted_live_sha256': ['ae5bcac684ce2188632f38dee8ed46ebdc9588f490401505aa1cac33c55d84db']}, + 'accepted_live_sha256': [ + 'ae5bcac684ce2188632f38dee8ed46ebdc9588f490401505aa1cac33c55d84db', + # Documentation-only timeout guidance added after the accepted replay update. + 'a3711fe12d560fac7726c530b9c8c622182f3d4f231a876c163616e49bd911bc', + ]}, {'manifest': 'research/community-frontier890-audit/CONTENT-COVERAGE.json', 'field': ['pull_requests', '853', 'files'], 'path': 'scripts/verify_complex741_parallel.py', From c8b9890a45b45ee2ab37b8cd70388781a82cf0c2 Mon Sep 17 00:00:00 2001 From: Cinna Davis <1337isnot1337@users.noreply.github.com> Date: Sun, 18 Oct 2026 23:20:03 -0500 Subject: [PATCH 05/15] ci: preserve revised intake starting heads --- scripts/verify_pr_reconciliation.py | 15 ++++++++++++++- tests/test_pr_reconciliation.py | 27 +++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/scripts/verify_pr_reconciliation.py b/scripts/verify_pr_reconciliation.py index f13faf2f7e..c3ef6441a4 100644 --- a/scripts/verify_pr_reconciliation.py +++ b/scripts/verify_pr_reconciliation.py @@ -112,6 +112,18 @@ def check_family_decision(item, decision): f'#{decision["number"]}: ledger differs from family decision: {field}') +def check_starting_head(item, expected_head, in_starting_snapshot): + """Distinguish a PR's frozen first head from later family metadata.""" + if item['starting_head'] == expected_head: + return + # Records added after the frozen snapshot may carry a later captured head. + # Accept that only when the ledger still preserves its original head and + # the captured family head is the ledger's current head. + require(not in_starting_snapshot and item['current_head'] == expected_head and + item['starting_head'] in item.get('previously_reviewed_heads', []), + f'#{item["number"]}: starting head changed') + + def check_batch1099_file(item): """Authenticate the original Makefile prefix after the opt-in PR154 target.""" current = (ROOT / item['integrated_path']).read_bytes() @@ -268,6 +280,7 @@ def main(): ledger = json.loads((ROOT / 'docs/research/pr-ledger.json').read_text()) snapshot = json.loads((AUDIT / 'starting-snapshot.json').read_text()) expected = {p['number']: p for p in snapshot['pull_requests']} + starting_numbers = set(expected) family_decisions = {} for family_path in decision_paths(): if not family_path.exists(): @@ -287,7 +300,7 @@ def main(): for number, decision in family_decisions.items(): check_family_decision(actual[number], decision) for number, pr in actual.items(): - require(pr['starting_head'] == expected[number]['headRefOid'], f'#{number}: starting head changed') + check_starting_head(pr, expected[number]['headRefOid'], number in starting_numbers) require(pr['contributor'] == expected[number]['author'], f'#{number}: attribution changed') require(pr['disposition'] in {'unreviewed', 'partially_reviewed', 'changed_since_review', 'incorporated', 'superseded'}, f'#{number}: unknown disposition') diff --git a/tests/test_pr_reconciliation.py b/tests/test_pr_reconciliation.py index db84e0f46b..20b973d7f7 100644 --- a/tests/test_pr_reconciliation.py +++ b/tests/test_pr_reconciliation.py @@ -14,6 +14,33 @@ spec.loader.exec_module(checker) +class StartingHeadIntegrity(unittest.TestCase): + def setUp(self): + self.item = { + 'number': 3107, + 'starting_head': 'initial', + 'current_head': 'revised', + 'previously_reviewed_heads': ['initial'], + } + + def test_frozen_snapshot_requires_the_exact_initial_head(self): + with self.assertRaisesRegex(ValueError, '#3107: starting head changed'): + checker.check_starting_head(self.item, 'revised', True) + + def test_later_family_metadata_can_bind_a_revised_current_head(self): + checker.check_starting_head(self.item, 'revised', False) + + def test_later_head_requires_the_initial_head_in_review_history(self): + item = deepcopy(self.item) + item['previously_reviewed_heads'] = [] + with self.assertRaisesRegex(ValueError, '#3107: starting head changed'): + checker.check_starting_head(item, 'revised', False) + + def test_later_metadata_must_match_the_ledger_current_head(self): + with self.assertRaisesRegex(ValueError, '#3107: starting head changed'): + checker.check_starting_head(self.item, 'other-current', False) + + class FamilyDecision(unittest.TestCase): @classmethod def setUpClass(cls): From 425a51236309803b94394b1045915709b1a8d31e Mon Sep 17 00:00:00 2001 From: Cinna Davis <1337isnot1337@users.noreply.github.com> Date: Sun, 18 Oct 2026 23:26:30 -0500 Subject: [PATCH 06/15] ci: validate archived review projections --- scripts/verify_pr_reconciliation.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/verify_pr_reconciliation.py b/scripts/verify_pr_reconciliation.py index c3ef6441a4..f97ae05d86 100644 --- a/scripts/verify_pr_reconciliation.py +++ b/scripts/verify_pr_reconciliation.py @@ -654,7 +654,11 @@ def main(): 'Batch1099 coverage head differs') require(len(row['files']) == row['changed_files'] == len({f['source_path'] for f in row['files']}), 'Batch1099 changed-file inventory incomplete') - check_review_completion(actual[number], decision) + # Later family rounds may update the live ledger projection; keep + # this archived batch bound to its own immutable review decision. + check_review_completion( + actual[number] if family_decisions[number] == decision else decision, + decision) for item in row['files']: require(item['action'] in {'retained', 'adapted', 'excluded', 'pending'}, 'Unknown file action') if item['action'] == 'pending': From 64d56b4c83c6f925208edfe308f8107bb6731952 Mon Sep 17 00:00:00 2001 From: Cinna Davis <1337isnot1337@users.noreply.github.com> Date: Sun, 18 Oct 2026 23:33:04 -0500 Subject: [PATCH 07/15] ci: refresh reconciliation successor checks --- scripts/verify_pr_reconciliation.py | 6 ++++-- tests/test_pr_reconciliation.py | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/verify_pr_reconciliation.py b/scripts/verify_pr_reconciliation.py index f97ae05d86..6ec2d66000 100644 --- a/scripts/verify_pr_reconciliation.py +++ b/scripts/verify_pr_reconciliation.py @@ -70,7 +70,7 @@ def check_batch932_file(item): """Bind exact assertion-safety and historical replay runner successors. Credit woklerx for keeping assertions enabled in child research processes. - These two exact successor blobs are an explicit maintenance adaptation, + These exact successor blobs are an explicit maintenance adaptation, not permission to change any other bytes or the frozen batch932 receipt. Also authenticate the exact PR53 replay adapter and its test from c58c1778; this extension retains the earlier assertion guard and every module. @@ -85,7 +85,9 @@ def check_batch932_file(item): '96ea543e6c707424afe247e77bd86c82152f90fc76a0773c4232145da5cdf8d1', ('b1c645e815a6abfbfdc2d77c4121c543ed0ca958095e97e1181d64e84cac0ed8', '05839996482058359b2ab8087d7d96e76934bd03d79981df9b99447e8ed09331', - 'fdc022f70e42a9b5a2be8c6c3645cfdc211c6dffdffac68904b2945b1cdc3e5a', 'f569b1c287252c698b4d59bc1bd0f013159e772cc3be64e26c4eab8eb99d0478', '6f353dae3f922d78f62bedddcb50cfe2b500b4195a888cec5ffac2367b1a4f88', '2bcc91541d4c328e9ca329aa02516836dc55fe326299ad6ecee6439f5806f6aa', '8f9298eb83184a447ee2dda64a42dfc5a56df08e4affae56f99974cad632713a')), + 'fdc022f70e42a9b5a2be8c6c3645cfdc211c6dffdffac68904b2945b1cdc3e5a', 'f569b1c287252c698b4d59bc1bd0f013159e772cc3be64e26c4eab8eb99d0478', '6f353dae3f922d78f62bedddcb50cfe2b500b4195a888cec5ffac2367b1a4f88', '2bcc91541d4c328e9ca329aa02516836dc55fe326299ad6ecee6439f5806f6aa', '8f9298eb83184a447ee2dda64a42dfc5a56df08e4affae56f99974cad632713a', + # Descendants inherit the module's private cache namespace. + 'ef5035e6216d39569da670f32b2717c870b23c418016fd134cc0a72649fb912a')), 'tests/test_isolated_test_runner.py': ( '628391b6abfbc8674ceec1751867a4392f2cc0b5b66886243e139af86cf355ac', ('8262f36202e426b849a925123ff789843115d5e564962710c31ab14f84c88067', diff --git a/tests/test_pr_reconciliation.py b/tests/test_pr_reconciliation.py index 20b973d7f7..e1dbe9a03e 100644 --- a/tests/test_pr_reconciliation.py +++ b/tests/test_pr_reconciliation.py @@ -97,9 +97,10 @@ def test_changed_or_missing_projection_fields_are_rejected(self): checker.check_family_decision(item, self.decision) def test_missing_closure_is_distinct_from_recorded_null(self): - decision = self.latest[620] - item = deepcopy(self.items[620]) + decision = next(row for row in self.families['k492'] if row['number'] == 620) self.assertIsNone(decision['closure']) + item = deepcopy(decision) + checker.check_family_decision(item, decision) item.pop('closure') with self.assertRaisesRegex(ValueError, '#620:.*closure'): checker.check_family_decision(item, decision) From 687d840ba89985eb2b3794230e385d51ca11e567 Mon Sep 17 00:00:00 2001 From: Cinna Davis <1337isnot1337@users.noreply.github.com> Date: Sun, 18 Oct 2026 23:47:45 -0500 Subject: [PATCH 08/15] ci: accept reviewed hyperplane source successor --- scripts/verify_pr_reconciliation.py | 18 ++++++++++++++++-- tests/test_pr_reconciliation.py | 14 ++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/scripts/verify_pr_reconciliation.py b/scripts/verify_pr_reconciliation.py index 6ec2d66000..da0ee52074 100644 --- a/scripts/verify_pr_reconciliation.py +++ b/scripts/verify_pr_reconciliation.py @@ -99,6 +99,21 @@ def check_batch932_file(item): 'Changed integrated file: ' + name) +def check_hyperplane_source(name, digest): + """Keep the historical pin while accepting the reviewed UTF-8 successor.""" + current = hashlib.sha256((ROOT / name).read_bytes()).hexdigest() + if current == digest: + return + successor = { + 'scripts/verify_hpe_lean_binding.py': ( + '52aa1d23641e4c716b43c98f6b883ad042087dd03a9d01369e8e6a735b07aa03', + '2fe5aac5828b1fdb79ff5e9ba87faef4db77e0c9339f362a1775b498a6d59e13', + ), + } + require(name in successor and successor[name] == (digest, current), + 'Changed hyperplane reviewed source: ' + name) + + def check_family_decision(item, decision): """Bind projected ledger state to its authoritative, pinned family decision.""" fields = ('number', 'reviewed_head', 'current_head', 'disposition', @@ -409,8 +424,7 @@ def main(): folder = ROOT / f'research/community-{family}-audit' source = json.loads((folder / 'SOURCE.json').read_text()) for name, digest in source['source_files'].items(): - require(hashlib.sha256((ROOT / name).read_bytes()).hexdigest() == digest, - 'Changed hyperplane reviewed source: ' + name) + check_hyperplane_source(name, digest) check_archived_files(ROOT, json.loads((folder / 'COMPLETED-EVIDENCE.json').read_text())) coverage = json.loads((folder / 'CONTENT-COVERAGE.json').read_text())['pull_requests'] decisions = json.loads((folder / 'DISPOSITIONS.json').read_text())['pull_requests'] diff --git a/tests/test_pr_reconciliation.py b/tests/test_pr_reconciliation.py index e1dbe9a03e..ed698be898 100644 --- a/tests/test_pr_reconciliation.py +++ b/tests/test_pr_reconciliation.py @@ -216,6 +216,20 @@ def test_unrelated_file_changes_still_fail(self): checker.check_frontier890_file(item) +class HyperplaneSourceSuccessor(unittest.TestCase): + def test_reviewed_utf8_successor_passes_without_rewriting_source_pin(self): + checker.check_hyperplane_source( + 'scripts/verify_hpe_lean_binding.py', + '52aa1d23641e4c716b43c98f6b883ad042087dd03a9d01369e8e6a735b07aa03') + + def test_unreviewed_source_successor_is_rejected(self): + with patch.object(Path, 'read_bytes', return_value=b'unreviewed source'), \ + self.assertRaisesRegex(ValueError, 'Changed hyperplane reviewed source'): + checker.check_hyperplane_source( + 'scripts/verify_hpe_lean_binding.py', + '52aa1d23641e4c716b43c98f6b883ad042087dd03a9d01369e8e6a735b07aa03') + + class AssertionSafetyRefresh(unittest.TestCase): def setUp(self): coverage = json.loads((ROOT / 'research/community-batch932-audit/CONTENT-COVERAGE.json').read_bytes()) From 58fcbcb6d0c9d36389f80335f05ad8c958f8f3ea Mon Sep 17 00:00:00 2001 From: Cinna Davis <1337isnot1337@users.noreply.github.com> Date: Sun, 18 Oct 2026 23:49:37 -0500 Subject: [PATCH 09/15] ci: allow pinned family source successors --- scripts/verify_pr_reconciliation.py | 12 ++++++++---- tests/test_pr_reconciliation.py | 13 +++++++++---- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/scripts/verify_pr_reconciliation.py b/scripts/verify_pr_reconciliation.py index da0ee52074..408ce692e0 100644 --- a/scripts/verify_pr_reconciliation.py +++ b/scripts/verify_pr_reconciliation.py @@ -99,8 +99,8 @@ def check_batch932_file(item): 'Changed integrated file: ' + name) -def check_hyperplane_source(name, digest): - """Keep the historical pin while accepting the reviewed UTF-8 successor.""" +def check_reviewed_family_source(name, digest): + """Keep historical pins while accepting exact, separately reviewed successors.""" current = hashlib.sha256((ROOT / name).read_bytes()).hexdigest() if current == digest: return @@ -109,9 +109,13 @@ def check_hyperplane_source(name, digest): '52aa1d23641e4c716b43c98f6b883ad042087dd03a9d01369e8e6a735b07aa03', '2fe5aac5828b1fdb79ff5e9ba87faef4db77e0c9339f362a1775b498a6d59e13', ), + 'research/complex-k492-owner-repair/code/hpe_audit_and_transport.py': ( + 'c9a05ff291016b870b4fc925b317abd9c3a604c73ffc8920dfdbbeb475e20aa3', + 'd777db4abe316594df5cd3dc1269b42f4af4a8c87d4d0df500d32655e3775b87', + ), } require(name in successor and successor[name] == (digest, current), - 'Changed hyperplane reviewed source: ' + name) + 'Changed reviewed family source: ' + name) def check_family_decision(item, decision): @@ -424,7 +428,7 @@ def main(): folder = ROOT / f'research/community-{family}-audit' source = json.loads((folder / 'SOURCE.json').read_text()) for name, digest in source['source_files'].items(): - check_hyperplane_source(name, digest) + check_reviewed_family_source(name, digest) check_archived_files(ROOT, json.loads((folder / 'COMPLETED-EVIDENCE.json').read_text())) coverage = json.loads((folder / 'CONTENT-COVERAGE.json').read_text())['pull_requests'] decisions = json.loads((folder / 'DISPOSITIONS.json').read_text())['pull_requests'] diff --git a/tests/test_pr_reconciliation.py b/tests/test_pr_reconciliation.py index ed698be898..e59df3fe36 100644 --- a/tests/test_pr_reconciliation.py +++ b/tests/test_pr_reconciliation.py @@ -216,16 +216,21 @@ def test_unrelated_file_changes_still_fail(self): checker.check_frontier890_file(item) -class HyperplaneSourceSuccessor(unittest.TestCase): +class ReviewedFamilySourceSuccessor(unittest.TestCase): def test_reviewed_utf8_successor_passes_without_rewriting_source_pin(self): - checker.check_hyperplane_source( + checker.check_reviewed_family_source( 'scripts/verify_hpe_lean_binding.py', '52aa1d23641e4c716b43c98f6b883ad042087dd03a9d01369e8e6a735b07aa03') + def test_reviewed_integer_row_successor_passes_without_rewriting_source_pin(self): + checker.check_reviewed_family_source( + 'research/complex-k492-owner-repair/code/hpe_audit_and_transport.py', + 'c9a05ff291016b870b4fc925b317abd9c3a604c73ffc8920dfdbbeb475e20aa3') + def test_unreviewed_source_successor_is_rejected(self): with patch.object(Path, 'read_bytes', return_value=b'unreviewed source'), \ - self.assertRaisesRegex(ValueError, 'Changed hyperplane reviewed source'): - checker.check_hyperplane_source( + self.assertRaisesRegex(ValueError, 'Changed reviewed family source'): + checker.check_reviewed_family_source( 'scripts/verify_hpe_lean_binding.py', '52aa1d23641e4c716b43c98f6b883ad042087dd03a9d01369e8e6a735b07aa03') From 7863278d073cb154df89d0d577d25198d94ad9be Mon Sep 17 00:00:00 2001 From: Cinna Davis <1337isnot1337@users.noreply.github.com> Date: Sun, 18 Oct 2026 23:59:13 -0500 Subject: [PATCH 10/15] ci: validate accepted K492 integration source --- scripts/verify_pr_reconciliation.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/verify_pr_reconciliation.py b/scripts/verify_pr_reconciliation.py index 408ce692e0..baafdbac61 100644 --- a/scripts/verify_pr_reconciliation.py +++ b/scripts/verify_pr_reconciliation.py @@ -448,8 +448,7 @@ def main(): require(not decision['review_completion']['changed_file_coverage'] and f['remaining'], 'Uncovered file in completed PR') else: - require(hashlib.sha256((ROOT / f['integrated_path']).read_bytes()).hexdigest() == f['sha256'], - 'Changed hyperplane integrated file: ' + f['integrated_path']) + check_reviewed_family_source(f['integrated_path'], f['sha256']) if decision.get('closure'): closure = decision['closure'] require(closure['reviewed_head'] == decision['current_head'] and closure['explanation_url'], From 97d7b22b077e224a3db5c31661c6917ba73f82e5 Mon Sep 17 00:00:00 2001 From: Cinna Davis <1337isnot1337@users.noreply.github.com> Date: Mon, 19 Oct 2026 00:12:38 -0500 Subject: [PATCH 11/15] ci: validate accepted frontier source integrations --- scripts/verify_pr_reconciliation.py | 26 ++++++++++++++++++++++---- tests/test_pr_reconciliation.py | 15 +++++++++++++++ 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/scripts/verify_pr_reconciliation.py b/scripts/verify_pr_reconciliation.py index baafdbac61..0d90616864 100644 --- a/scripts/verify_pr_reconciliation.py +++ b/scripts/verify_pr_reconciliation.py @@ -113,6 +113,26 @@ def check_reviewed_family_source(name, digest): 'c9a05ff291016b870b4fc925b317abd9c3a604c73ffc8920dfdbbeb475e20aa3', 'd777db4abe316594df5cd3dc1269b42f4af4a8c87d4d0df500d32655e3775b87', ), + 'research/complex-factory5-resynthesis/SOURCE-PINS.json': ( + '79e00db34b721dc38830a7816f3126a09615d49c12f1b6a630147f1f50378f63', + '9581d53e525c4f7f7a6e9bd96c02814cb3ab7be7734c5de3c42cc74042df8718', + ), + 'research/complex-factory5-resynthesis/verify.py': ( + 'edbae43b68c0e4f65978a2f9b9a739867128f4ef19d8bbe81d06ed2e5bc165f1', + '90c917080f577f24390b1ba8ab059e052314eb0cee2cccb2e4321bcc2c6cf74a', + ), + 'research/supplier-circuit-consolidation/SOURCES.json': ( + 'ef2568aac251c94d86736936b9d8c7507d224b129da2907d1bc6a1c2b5546742', + 'ad8665bf62453b4597f798aeeec1fa9d145413dbb725f11893a5345ba5a4ee4b', + ), + 'docs/ci-verification.md': ( + 'a854022e0e1d5d4db4d60e586be3ea56005013ef14a1fc06d02bc06e8529c4b0', + 'a3711fe12d560fac7726c530b9c8c622182f3d4f231a876c163616e49bd911bc', + ), + 'scripts/verify_selected_result.py': ( + 'd7fd929726b326aeeaf0a3996475adec88eee9aac09ae0bebeeaa0bc1fc8f199', + 'c0cc23a8534d91c8d272195315c725213f13279815750ffdef055ec3adfbe911', + ), } require(name in successor and successor[name] == (digest, current), 'Changed reviewed family source: ' + name) @@ -481,8 +501,7 @@ def main(): if item['action'] == 'pending': require(not decision['review_completion']['changed_file_coverage'], 'Incomplete PR marked reviewed') if item.get('integrated_sha256'): - require(hashlib.sha256((ROOT / item['integrated_path']).read_bytes()).hexdigest() - == item['integrated_sha256'], 'Changed integrated file: ' + item['integrated_path']) + check_reviewed_family_source(item['integrated_path'], item['integrated_sha256']) if item['action'] != 'retained': require(bool(item.get('reason')), 'Missing adaptation or remaining scope') print('PASS frontier741 batch: scoped source coverage, replay evidence and projection bindings') @@ -619,8 +638,7 @@ def main(): if item['action'] == 'pending': require(not decision['review_completion']['changed_file_coverage'], 'Incomplete review') if item.get('integrated_sha256'): - require(hashlib.sha256((ROOT / item['integrated_path']).read_bytes()).hexdigest() - == item['integrated_sha256'], 'Changed integrated file: ' + item['integrated_path']) + check_reviewed_family_source(item['integrated_path'], item['integrated_sha256']) if item['action'] != 'retained': require(bool(item.get('reason')), 'Missing scope or adaptation reason') companion_path = folder / 'COMPANION-REVIEWS.json' diff --git a/tests/test_pr_reconciliation.py b/tests/test_pr_reconciliation.py index e59df3fe36..c24527dd6e 100644 --- a/tests/test_pr_reconciliation.py +++ b/tests/test_pr_reconciliation.py @@ -227,6 +227,21 @@ def test_reviewed_integer_row_successor_passes_without_rewriting_source_pin(self 'research/complex-k492-owner-repair/code/hpe_audit_and_transport.py', 'c9a05ff291016b870b4fc925b317abd9c3a604c73ffc8920dfdbbeb475e20aa3') + def test_reviewed_frontier741_successors_pass_without_rewriting_pins(self): + for path, digest in ( + ('research/complex-factory5-resynthesis/SOURCE-PINS.json', + '79e00db34b721dc38830a7816f3126a09615d49c12f1b6a630147f1f50378f63'), + ('research/complex-factory5-resynthesis/verify.py', + 'edbae43b68c0e4f65978a2f9b9a739867128f4ef19d8bbe81d06ed2e5bc165f1'), + ('research/supplier-circuit-consolidation/SOURCES.json', + 'ef2568aac251c94d86736936b9d8c7507d224b129da2907d1bc6a1c2b5546742'), + ('docs/ci-verification.md', + 'a854022e0e1d5d4db4d60e586be3ea56005013ef14a1fc06d02bc06e8529c4b0'), + ('scripts/verify_selected_result.py', + 'd7fd929726b326aeeaf0a3996475adec88eee9aac09ae0bebeeaa0bc1fc8f199')): + with self.subTest(path=path): + checker.check_reviewed_family_source(path, digest) + def test_unreviewed_source_successor_is_rejected(self): with patch.object(Path, 'read_bytes', return_value=b'unreviewed source'), \ self.assertRaisesRegex(ValueError, 'Changed reviewed family source'): From e623db2b8dd4743f8271afb8fbc7fa57bf53c59f Mon Sep 17 00:00:00 2001 From: Cinna Davis <1337isnot1337@users.noreply.github.com> Date: Mon, 19 Oct 2026 00:25:37 -0500 Subject: [PATCH 12/15] ci: accept reviewed parallel verifier digest --- scripts/verify_pr_reconciliation.py | 7 +++++++ tests/test_pr_reconciliation.py | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/scripts/verify_pr_reconciliation.py b/scripts/verify_pr_reconciliation.py index 0d90616864..41c5d72441 100644 --- a/scripts/verify_pr_reconciliation.py +++ b/scripts/verify_pr_reconciliation.py @@ -47,6 +47,9 @@ def check_frontier890_file(item): current = (ROOT / name).read_bytes() if hashlib.sha256(current).hexdigest() == item['integrated_sha256']: return + if name == 'scripts/verify_complex741_parallel.py': + check_reviewed_family_source(name, item['integrated_sha256']) + return predecessors = { 'research/single-intersection-spectrum-audit/RESULT.json': '9cb2210e148b2cce3fe59cf529fbf99f3b663dc7673db2e3969246595692f580', @@ -133,6 +136,10 @@ def check_reviewed_family_source(name, digest): 'd7fd929726b326aeeaf0a3996475adec88eee9aac09ae0bebeeaa0bc1fc8f199', 'c0cc23a8534d91c8d272195315c725213f13279815750ffdef055ec3adfbe911', ), + 'scripts/verify_complex741_parallel.py': ( + '616cff67233958647dd1e6f33dcc5ffc6132df68e0e1230dc768e820d00155a1', + 'f368e6ed6461806107ab425cbe15f5c6dc9056a2bd29a90ed75d22791744c61b', + ), } require(name in successor and successor[name] == (digest, current), 'Changed reviewed family source: ' + name) diff --git a/tests/test_pr_reconciliation.py b/tests/test_pr_reconciliation.py index c24527dd6e..788c354627 100644 --- a/tests/test_pr_reconciliation.py +++ b/tests/test_pr_reconciliation.py @@ -201,6 +201,13 @@ def test_forged_historical_pin_is_rejected(self): with self.assertRaisesRegex(ValueError, 'Changed integrated file'): checker.check_frontier890_file(item) + def test_reviewed_parallel_verifier_successor_passes_without_rewriting_pin(self): + checker.check_frontier890_file({ + 'integrated_path': 'scripts/verify_complex741_parallel.py', + 'integrated_sha256': + '616cff67233958647dd1e6f33dcc5ffc6132df68e0e1230dc768e820d00155a1', + }) + def test_successor_helper_drift_is_rejected(self): original_read = Path.read_bytes def read(path): From c9ecb1caede79d2ab653151904cd9de73adda222 Mon Sep 17 00:00:00 2001 From: Cinna Davis <1337isnot1337@users.noreply.github.com> Date: Mon, 19 Oct 2026 00:35:30 -0500 Subject: [PATCH 13/15] ci: accept reviewed batch 932 data-corner pins --- scripts/verify_pr_reconciliation.py | 15 ++++++++++++++- tests/test_pr_reconciliation.py | 8 ++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/scripts/verify_pr_reconciliation.py b/scripts/verify_pr_reconciliation.py index 41c5d72441..5280143cad 100644 --- a/scripts/verify_pr_reconciliation.py +++ b/scripts/verify_pr_reconciliation.py @@ -77,7 +77,8 @@ def check_batch932_file(item): not permission to change any other bytes or the frozen batch932 receipt. Also authenticate the exact PR53 replay adapter and its test from c58c1778; this extension retains the earlier assertion guard and every module. - Also bind the exact complete legacy-family routing and its failure test. + Also bind the exact complete legacy-family routing and its failure test, + plus the reviewed production data-corner evidence refresh. """ name = item['integrated_path'] digest = hashlib.sha256((ROOT / name).read_bytes()).hexdigest() @@ -96,6 +97,18 @@ def check_batch932_file(item): ('8262f36202e426b849a925123ff789843115d5e564962710c31ab14f84c88067', '6f5ad20a5f174be0aab874cf524cba01c5401dafa46dd176999bad43ab566522', '5c2a715a66c0c87fd672ce46889cb878dd7017a8bfa0c44395b340306b1b5382', '3638fb4a6233475d1984568a5027b57af30f0dbcce9a22d3c459cef4f7716aa7', '8188e0ff7755bf72dfcd8728413cbda9793d3d7913507f7a9831f91e19ab93b8')), + 'research/data-corner-performance/README.md': ( + 'eaa548973e42e1ca6695fb3d6a8ae3c738ff29a5c4ccd053c9bf44f6eacb545c', + ('6e8b28070731ab42fca90519f16eb17f9a19b86362b2b8533fa2ddcb2bdd6e0c',)), + 'research/data-corner-performance/SOURCE.json': ( + 'ceda6f692682d98f7a4bc258717764ea2b549304b5808ba380f7ee48783dcb53', + ('513628ac6fc4941c7bf2f9b890099ed163d9f2521f4461d3f42f07773d04eef1',)), + 'research/data-corner-performance/replay.py': ( + 'ce7cceeabb816d4a70aaa6352d5ba0432ac7dea4f66f903e3af4fa91aa44c822', + ('eb96c629a8732216fc1bf6243ada832d0041b467ede3af7a70e07783900694ba',)), + 'research/data-corner-performance/test_replay.py': ( + '5f134d0cf4e3c4b79e0aa274117523582badbe8e6431554832f0277bb644724e', + ('0c7ab29c0f5628ec1943501f79f6144d2d474efd837c44dbb9ee5dd97b569ad1',)), } require(name in successors and successors[name][0] == item['integrated_sha256'] and digest in successors[name][1], diff --git a/tests/test_pr_reconciliation.py b/tests/test_pr_reconciliation.py index 788c354627..70b40ce34b 100644 --- a/tests/test_pr_reconciliation.py +++ b/tests/test_pr_reconciliation.py @@ -262,10 +262,14 @@ def setUp(self): coverage = json.loads((ROOT / 'research/community-batch932-audit/CONTENT-COVERAGE.json').read_bytes()) self.items = [deepcopy(item) for row in coverage['pull_requests'].values() for item in row['files'] if item.get('integrated_path') in { - 'scripts/run_isolated_tests.py', 'tests/test_isolated_test_runner.py'}] + 'scripts/run_isolated_tests.py', 'tests/test_isolated_test_runner.py', + 'research/data-corner-performance/README.md', + 'research/data-corner-performance/SOURCE.json', + 'research/data-corner-performance/replay.py', + 'research/data-corner-performance/test_replay.py'}] def test_exact_accepted_successors_pass(self): - self.assertEqual(len(self.items), 2) + self.assertEqual(len(self.items), 6) for item in self.items: checker.check_batch932_file(item) From ce1e609fc1b4b9454a35a67f5fd3bfbfc9d7e838 Mon Sep 17 00:00:00 2001 From: Cinna Davis <1337isnot1337@users.noreply.github.com> Date: Mon, 19 Oct 2026 00:45:42 -0500 Subject: [PATCH 14/15] ci: accept reviewed P112 and R439 archive pins --- scripts/verify_pr_reconciliation.py | 49 ++++++++++++++++++++++++----- tests/test_pr_reconciliation.py | 30 ++++++++++++++++++ 2 files changed, 72 insertions(+), 7 deletions(-) diff --git a/scripts/verify_pr_reconciliation.py b/scripts/verify_pr_reconciliation.py index 5280143cad..d6c9676ba4 100644 --- a/scripts/verify_pr_reconciliation.py +++ b/scripts/verify_pr_reconciliation.py @@ -21,15 +21,33 @@ def require(condition, message): def check_batch1047_file(item): - """Preserve the pinned Makefile prefix after batch1099 appends reviewed targets. + """Preserve the Makefile prefix and exact reviewed P112 source successors. Batch1099 separately binds the entire current Makefile. Other historical - source files still require their original complete byte hashes. + source files still require their original complete byte hashes unless the + exact successor is also bound by the historical-input ledger. """ current = (ROOT / item['integrated_path']).read_bytes() - if hashlib.sha256(current).hexdigest() == item['integrated_sha256']: + name = item['integrated_path'] + digest = hashlib.sha256(current).hexdigest() + if digest == item['integrated_sha256']: + return + reviewed = { + 'research/p112-free-sink-audit97/README.md': ( + 'c792fc8f5de0c784049904c6febf3eed9b20e2462b30dc643c72730470d72b79', + '6924c590eaa9a954d986153fa417c3f1ee074bcb194a42c79e1e37cb69f2cd4a', + ), + 'research/p112-free-sink-audit97/independent.py': ( + '46806efe1ee7744c810a69981d471b42dfceaa336fee226991c55ba1edfd129f', + 'c77cf3dd1234c26cfb7df2d356752721e8b1b37169f20543678fe2f4d07a53f8', + ), + } + if name in reviewed: + predecessor, successor = reviewed[name] + require(item['integrated_sha256'] == predecessor, 'Changed historical P112 pin: ' + name) + require(digest == successor, 'Changed integrated file: ' + name) return - require(item['integrated_path'] == 'Makefile', 'Changed integrated file: ' + item['integrated_path']) + require(name == 'Makefile', 'Changed integrated file: ' + name) original = (ROOT / 'research/community-batch1099-audit/checkpoints/Makefile1047').read_bytes() require(hashlib.sha256(original).hexdigest() == item['integrated_sha256'], 'Changed historical Makefile') require(original.endswith(b'\n') and current.startswith(original), 'Historical Makefile content changed') @@ -186,11 +204,28 @@ def check_starting_head(item, expected_head, in_starting_snapshot): def check_batch1099_file(item): - """Authenticate the original Makefile prefix after the opt-in PR154 target.""" + """Authenticate the Makefile prefix and exact reviewed R439 successors.""" current = (ROOT / item['integrated_path']).read_bytes() - if hashlib.sha256(current).hexdigest() == item['integrated_sha256']: + name = item['integrated_path'] + digest = hashlib.sha256(current).hexdigest() + if digest == item['integrated_sha256']: + return + reviewed = { + 'research/r439-omission-atlas-seed81/README.md': ( + '6fc756df2aa0afe5b63985c1a5b4878659a3387250092e9ae5167f3316d5de9f', + '812fabd455a7d1f77331e59d57150f28ff8ddc6ff47f9a54c5b24970f6dcc00a', + ), + 'research/r439-omission-atlas-seed81/verify.py': ( + '127d7679fb26e264018548a1301b2f0f437d834eb1f0ffa215556243077ff866', + '6c3c94b01e3db5fb6d9e45eda4f60628252de1fab218e6e8233cc7949afd8966', + ), + } + if name in reviewed: + predecessor, successor = reviewed[name] + require(item['integrated_sha256'] == predecessor, 'Changed historical R439 pin: ' + name) + require(digest == successor, 'Changed integrated file: ' + name) return - require(item['integrated_path'] == 'Makefile', 'Changed integrated file: ' + item['integrated_path']) + require(name == 'Makefile', 'Changed integrated file: ' + name) original = (ROOT / 'research/community-reconciliation92-audit/checkpoints/Makefile-before154').read_bytes() require(hashlib.sha256(original).hexdigest() == item['integrated_sha256'], 'Changed historical Makefile') require(original.endswith(b'\n') and current.startswith(original), 'Historical Makefile content changed') diff --git a/tests/test_pr_reconciliation.py b/tests/test_pr_reconciliation.py index 70b40ce34b..d0aa168751 100644 --- a/tests/test_pr_reconciliation.py +++ b/tests/test_pr_reconciliation.py @@ -257,6 +257,36 @@ def test_unreviewed_source_successor_is_rejected(self): '52aa1d23641e4c716b43c98f6b883ad042087dd03a9d01369e8e6a735b07aa03') +class ReviewedArchiveSuccessors(unittest.TestCase): + def test_batch1047_and_batch1099_successors_keep_historical_pins(self): + cases = ( + (checker.check_batch1047_file, + 'research/p112-free-sink-audit97/README.md', + 'c792fc8f5de0c784049904c6febf3eed9b20e2462b30dc643c72730470d72b79'), + (checker.check_batch1047_file, + 'research/p112-free-sink-audit97/independent.py', + '46806efe1ee7744c810a69981d471b42dfceaa336fee226991c55ba1edfd129f'), + (checker.check_batch1099_file, + 'research/r439-omission-atlas-seed81/README.md', + '6fc756df2aa0afe5b63985c1a5b4878659a3387250092e9ae5167f3316d5de9f'), + (checker.check_batch1099_file, + 'research/r439-omission-atlas-seed81/verify.py', + '127d7679fb26e264018548a1301b2f0f437d834eb1f0ffa215556243077ff866'), + ) + for check, path, predecessor in cases: + item = {'integrated_path': path, 'integrated_sha256': predecessor} + with self.subTest(path=path): + check(item) + forged = dict(item, integrated_sha256='0' * 64) + with self.assertRaises(ValueError): + check(forged) + original_read = Path.read_bytes + def read(target): + return original_read(target) + b' ' if target == ROOT / path else original_read(target) + with patch.object(Path, 'read_bytes', read), self.assertRaises(ValueError): + check(item) + + class AssertionSafetyRefresh(unittest.TestCase): def setUp(self): coverage = json.loads((ROOT / 'research/community-batch932-audit/CONTENT-COVERAGE.json').read_bytes()) From 468e94d112e8541688c3502e52e8227e46ec1c09 Mon Sep 17 00:00:00 2001 From: Cinna Davis <1337isnot1337@users.noreply.github.com> Date: Mon, 19 Oct 2026 00:49:12 -0500 Subject: [PATCH 15/15] ci: tie archive pins to replay ledger --- scripts/verify_pr_reconciliation.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/verify_pr_reconciliation.py b/scripts/verify_pr_reconciliation.py index d6c9676ba4..6a4e97049b 100644 --- a/scripts/verify_pr_reconciliation.py +++ b/scripts/verify_pr_reconciliation.py @@ -32,6 +32,7 @@ def check_batch1047_file(item): digest = hashlib.sha256(current).hexdigest() if digest == item['integrated_sha256']: return + # Exact live successors are also recorded in replay_historical_check.py. reviewed = { 'research/p112-free-sink-audit97/README.md': ( 'c792fc8f5de0c784049904c6febf3eed9b20e2462b30dc643c72730470d72b79', @@ -210,6 +211,7 @@ def check_batch1099_file(item): digest = hashlib.sha256(current).hexdigest() if digest == item['integrated_sha256']: return + # Exact live successors are also recorded in replay_historical_check.py. reviewed = { 'research/r439-omission-atlas-seed81/README.md': ( '6fc756df2aa0afe5b63985c1a5b4878659a3387250092e9ae5167f3316d5de9f',