Repository navigation
Isolate explicit historical receipt adapters from P104 research - #4103
Clear1nsight wants to merge 1 commit into
Conversation
Preserve exact reviewed bytes from 3088a09 on current canonical main. Keep P112 repair in PR3885 and P104 research separate. No frozen scientific inputs or selected frontier changed. Prepared by Clear1nsight with substantial OpenAI assistance.
Integrate the exact nine-file adapter patch from PR CrocSwap#4103 at 161ce1b to repair the two registered-package source-drift failures exposed by PR CrocSwap#4102 CI. Retain original intake/ledger repairs byte-for-byte, authenticate frozen receipt pins and evidence, and keep the generic live-input checker strict. Historical-only replay does not validate current ledger/contributor state. Preserve both published extraction commits without rewriting history. No P112 workflow, P104 scientific input or selected-frontier changes. Prepared by Clear1nsight with substantial OpenAI assistance.
|
Independent scoped audit of the historical receipt adapter package at Code-disjoint checks; does not import package What passes (9 of 9):
Not covered: live isolated-Git historical receipt replay; registered-package CI; scientific κ / merge / close. This is a finite replay of committed wiring, not a formal proof and not live-input approval. check_4103.py#!/usr/bin/env python3
"""Independent finite controls for PR4103 (historical receipt adapters).
Checks VERIFY/SOURCES wiring, PASS_HISTORICAL honesty labels, 36 regression
tests, and byte-identity of all nine PR paths versus #4102 union head.
Does not import package scripts as acceptance oracles / run isolated Git replay.
Package head 161ce1b96288349fd67ecda1734d2f96850a2ee9 via GitHub API.
James Reed (@rcfc-jreed), with substantial AI assistance (Claude, in Cursor).
Apache-2.0.
"""
from __future__ import annotations
import argparse, json, re, sys
from pathlib import Path
HEAD = "161ce1b96288349fd67ecda1734d2f96850a2ee9"
BASE_PR1 = "d8e0f83f00191df62174b641e9fff055c357f641"
BASE_PR636 = "1f7a934975e5eacaf83511c9ac870263bf095e05"
PATHS = [
"docs/research/research-package-guide.md",
"research/pr1-retention-receipt/README.md",
"research/pr1-retention-receipt/SOURCES.json",
"research/pr1-retention-receipt/VERIFY.json",
"research/pr636-family-witness-manifest-receipt/README.md",
"research/pr636-family-witness-manifest-receipt/SOURCES.json",
"research/pr636-family-witness-manifest-receipt/VERIFY.json",
"scripts/replay_historical_receipt.py",
"tests/test_research_historical_receipts.py",
]
results = []
def check(name, ok, detail=""):
results.append((name, bool(ok), detail))
print(("PASS " if ok else "FAIL ") + name + ((": " + str(detail)) if detail else ""), flush=True)
return bool(ok)
def load(path: Path):
return json.loads(path.read_text(encoding="utf-8"))
def run(pkg: Path):
from4102 = pkg / "from4102"
bad = [rel for rel in PATHS if (pkg / rel).read_bytes() != (from4102 / rel).read_bytes()]
check("A1 all nine #4103 paths byte-identical to #4102 union head 1588e746…",
not bad and len(PATHS) == 9, bad)
v1 = load(pkg / "research/pr1-retention-receipt/VERIFY.json")
v636 = load(pkg / "research/pr636-family-witness-manifest-receipt/VERIFY.json")
check("I1 both VERIFY ready; first argv is replay_historical_receipt.py",
v1["status"] == v636["status"] == "ready"
and v1["commands"][0]["argv"][2].endswith("replay_historical_receipt.py")
and v636["commands"][0]["argv"][2].endswith("replay_historical_receipt.py"))
s1 = load(pkg / "research/pr1-retention-receipt/SOURCES.json")
s636 = load(pkg / "research/pr636-family-witness-manifest-receipt/SOURCES.json")
check("I2 PR1 SOURCES base d8e0f83f… ×11 provenance; PR636 base 1f7a9349… ×4",
s1["base_commit"] == BASE_PR1 and len(s1["files"]) == 11
and s636["base_commit"] == BASE_PR636 and len(s636["files"]) == 4
and all(f["usage"] == "provenance" and f.get("sha256") and f.get("git_blob")
for f in s1["files"] + s636["files"]))
adapter = (pkg / "scripts/replay_historical_receipt.py").read_text(encoding="utf-8")
check("H1 adapter labels PASS_HISTORICAL_RECEIPT_ONLY / METADATA_ONLY with live_inputs_validated=false",
'label = "PASS_HISTORICAL_METADATA_ONLY" if check_only else "PASS_HISTORICAL_RECEIPT_ONLY"' in adapter
and 'live_inputs_validated=false' in adapter)
guide = (pkg / "docs/research/research-package-guide.md").read_text(encoding="utf-8")
check("H2 guide documents PASS_HISTORICAL_RECEIPT_ONLY and live_inputs_validated=false",
"PASS_HISTORICAL_RECEIPT_ONLY" in guide and "live_inputs_validated=false" in guide)
tests = (pkg / "tests/test_research_historical_receipts.py").read_text(encoding="utf-8")
names = re.findall(r"^\s*def (test_\w+)", tests, re.M)
check("T1 exactly 36 adapter regression tests", len(names) == 36, len(names))
check("T2 includes positive replay + default live-validation failure",
"test_positive_historical_replay_keeps_live_bytes_and_git_unchanged" in names
and "test_default_live_validation_still_fails" in names)
check("N1 finite scope: no live isolated-Git PR1/PR636 replay asserted; no new κ",
"PASS_HISTORICAL_RECEIPT_ONLY" in adapter
and "kappa" not in adapter.lower())
failed = [name for name, ok, _ in results if not ok]
print(f"\n{len(results) - len(failed)}/{len(results)} PASS", flush=True)
if failed:
print("FAILED:", ", ".join(failed), flush=True)
return 1
return 0
def main():
ap = argparse.ArgumentParser()
ap.add_argument("--pkg", required=True)
ap.add_argument("--expect-head", default=HEAD)
args = ap.parse_args()
check("HEAD pin recorded (API fetch)", args.expect_head == HEAD, args.expect_head)
return run(Path(args.pkg))
if __name__ == "__main__":
sys.exit(main())James Reed (@rcfc-jreed), with substantial AI assistance (Claude, in Cursor). |
Scope
Isolate nine historical source/credit receipt adapter files from #3577. Exact head:
161ce1b96288349fd67ecda1734d2f96850a2ee9.Only the PR1 and PR636 receipt packages receive explicit historical-only wrappers, alongside one adapter, its regression suite and guide. Their README/SOURCES/VERIFY wrappers change deliberately; original manifest pins, verifier and evidence bytes are authenticated unchanged from the frozen commit. The default generic live-input contract is unchanged. PASS_HISTORICAL_RECEIPT_ONLY means original source/credit validation, never present-day ledger approval, closure, or theorem acceptance.
Bounded validation
Python 3.12.14 with warnings treated as errors: all 36 synthetic positive/rejection controls pass normally and all 36 pass under -O. The suite exercises Git-free/isolated materialization, hash and tree bindings, exact wrapper transforms, assertion enforcement and mutation guards. Both SOURCES wrapper comparisons preserve every original commit/blob/SHA256 pin. Changed Python compiles. The extraction review itself ran synthetic controls only; subsequent real upstream hosted replay is recorded below. No broad mathematical replay is claimed.
Consolidation and boundaries
Extracted byte-for-byte from the shared repair portion of #3577 at
3088a09c77fe5353218df861e34b0fe67dbf1b6b, independently based on canonicalbb4bccbf42844d2801487450727c2f63e10d1d0f. The dedicated P112 parse repair remains in #3885; no duplicate P112 change is bundled here. The 11 P104 scientific files are absent. Existing research branch heads remain untouched until maintainers incorporate an effective shared base. No upstream merge, force-push, source repinning, selected-result update or scientific acceptance is proposed.Current AGENTS.md, CONTRIBUTING.md, autoresearch.md and linked procedure were read. Delta-only intake refresh fetched canonical main but could not authenticate its gh CLI queue read; exact-head GitHub connector reads supplied targeted status instead. This is an explicit user-assigned repair, not a queue review or ledger acceptance decision.
Credit and limitations
Existing source authors, original repair attribution and Apache-2.0 notices are retained. Consolidation by Clear1nsight with substantial OpenAI assistance. Green checks validate only their stated coverage, not the multiplication theorem or current scientific approval. Draft pending independent substantive tooling review. Canonical main still contains the inherited P112 parse problem until #3885 is incorporated; an inherited zero-job fork failure must not be mistaken for failure of the scoped tests.
Original push CI status (2026-10-19 UTC)
The receipt branch has no registered research-package workflow triggered by push. Its only run is the inherited zero-job P112 parse failure, pending #3885. The 72 successful local synthetic controls are not a claim that either real receipt has passed hosted replay at this new head.
Upstream hosted replay and integration follow-up
Registered research packages run 39323750955 passes at this exact adapter head
161ce1b96288349fd67ecda1734d2f96850a2ee9. Both real receipts reportPASS_HISTORICAL_RECEIPT_ONLYwithlive_inputs_validated=false; each job also passes the 36 adapter regression controls and the committed-input mutation gate. This supersedes the earlier pending-hosted status while preserving its historical push-only evidence.The ledger-only proposal #4102 initially selected these receipts and failed their original live-input drift checks. Its new additive merge
1588e746871c5f1f197dbc034db2bfadbad0b646includes this nine-file patch unchanged, alongside the original 11 ledger/reconciliation files. #4102 is now a 20-file combined integration proposal, while this PR retains the focused nine-file adapter review. Neither proposal has been merged upstream.