Repository navigation
Share closed primitive engines to remove parent parking at child calls - #4167
Clear1nsight wants to merge 1 commit into
Conversation
|
Independent scoped audit of the QQ16 shared closed-primitive engines package at Code-disjoint reimplementation; does not import package Defect (D1):
What passes (15 of 15 with D1 asserting the defect):
Not covered: live This is a finite replay of committed receipts, not a formal proof. Suggested fix: rebind check_4167.py#!/usr/bin/env python3
"""Independent finite controls for PR4167 (QQ16 protocol comparison / shared engines).
Recomputes census rank masses and package seals. Does not import package verify.py.
Package head 6749e458800f461535d64cc91c017552d9f55e5f via GitHub API.
Package scientific_main is e40a7b45… (not 12fa8c5c…).
James Reed (@rcfc-jreed), with substantial AI assistance (Claude, in Cursor).
Apache-2.0.
"""
from __future__ import annotations
import argparse, hashlib, json, sys
from pathlib import Path
HEAD = "6749e458800f461535d64cc91c017552d9f55e5f"
BASE = "e40a7b454da6a0df53e358aa3265b9c1c39de2c8"
KAPPA = "836330098538459/500000000000000000"
PRED = "0b082d22a0e9a442d264ab0633e35ef26c790630"
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(pkg, name):
return json.loads((pkg / name).read_text(encoding="utf-8"))
def sha(path: Path):
return hashlib.sha256(path.read_bytes()).hexdigest()
def mass(ranks):
return sum(int(r) * int(c) for r, c in ranks.items())
def run(pkg: Path):
sources = load(pkg, "SOURCES.json")
result = load(pkg, "RESULT.json")
bill = load(pkg, "BILL.json")
review = load(pkg, "REVIEW.json")
verify = load(pkg, "VERIFY.json")
manifest = load(pkg, "inputs/PR4166-MANIFEST.json")
check("I1 SOURCES/RESULT scientific_main == e40a7b45… (package pin)",
sources["base_commit"] == BASE == result["scientific_main"])
check("I2 RESULT PASS_QQ16_PROTOCOL_COMPARISON; VERIFY ready; kappa unchanged",
result["status"] == "PASS_QQ16_PROTOCOL_COMPARISON"
and verify["status"] == "ready"
and result["unchanged_kappa"] == KAPPA)
check("I3 predecessor_head pin; REVIEW reports no unresolved blocking defect",
result["predecessor_head"] == PRED
and "no unresolved blocking defect" in review["status"])
check("I4 qq16_decision / bill sign keep incremental affordability conditional",
"conditional" in result["qq16_decision"].lower()
and "unresolved" in bill["qq16_incremental_sign"].lower())
# Seals
impl_bad = [k for k, d in result["implementation_sha256"].items() if sha(pkg / k) != d]
proof_bad = [k for k, d in result["proof_sha256"].items() if sha(pkg / k) != d]
check("S1 implementation_sha256 matches package bytes (7 scripts)",
not impl_bad and len(result["implementation_sha256"]) == 7, impl_bad)
check("S2 proof_sha256 matches package bytes (7 docs/json)",
not proof_bad and len(result["proof_sha256"]) == 7, proof_bad)
frozen_bad = []
for rel, dig in review.get("frozen_files", {}).items():
p = pkg / Path(rel).name
if not p.exists() or sha(p) != dig:
frozen_bad.append(rel)
# Packaging defect: TASK.json updated (metadata_supplement) without rebinding frozen_files.
meta = review.get("metadata_supplement") or {}
task_actual = sha(pkg / "TASK.json")
check("D1 REVIEW.frozen_files TASK.json stale vs package (packaging defect)",
frozen_bad == ["TASK.json"]
and meta.get("file") == "TASK.json"
and meta.get("sha256") == task_actual
and review["frozen_files"]["TASK.json"] != task_actual,
{"sealed": review["frozen_files"]["TASK.json"],
"actual": task_actual,
"meta_sha256": meta.get("sha256")})
check("A1 inputs/PR4166.tar sha256 matches MANIFEST.tar_sha256",
sha(pkg / "inputs/PR4166.tar") == manifest["tar_sha256"]
== "c872e08c06a6897164c2ce9a19d5623dea8230ca5f59bfc887d62527614c9e31")
check("A2 MANIFEST.commit == predecessor_head",
manifest["commit"] == PRED == result["predecessor_head"])
cen = bill["census"]
bad_m = []
for key in ("A_original", "B_protocol_only", "B_shared_protocol_only", "C_D_root",
"retained", "retained_prefix", "retained_suffix", "changed_core_retained_calls",
"same_payload_external_calls"):
row = cen[key]
if row["rank_mass"] != mass(row["ranks"]) or row["calls"] != sum(row["ranks"].values()):
bad_m.append(key)
check("C1 census rank_mass/calls match ranks for all profile rows", not bad_m, bad_m)
a, cd, ret = cen["A_original"], cen["C_D_root"], cen["retained"]
check("C2 A=510662/1041408; C_D=+16/−96; retained=510646; changed_core=6972",
a["calls"] == 510662 and a["rank_mass"] == 1041408
and cd["calls"] - a["calls"] == 16 and a["rank_mass"] - cd["rank_mass"] == 96
and ret["calls"] == 510646
and cen["changed_core_retained_calls"]["calls"] == 6972)
check("C3 B profiles identical to A; prefix+suffix == retained",
cen["B_protocol_only"]["ranks"] == a["ranks"] == cen["B_shared_protocol_only"]["ranks"]
and cen["retained_prefix"]["calls"] + cen["retained_suffix"]["calls"] == ret["calls"])
check("C4 removed 16 / added 32 literal occurrence lists; same_payload 503674",
len(cen["removed_literal_occurrences"]) == 16
and len(cen["added_literal_occurrences"]) == 32
and cen["same_payload_external_calls"]["calls"] == 503674)
check("N1 remaining excludes production RootLayer / new supplier / exponent",
any("RootLayer" in x for x in result["remaining"])
and any("supplier" in x or "exponent" in x for x in result["remaining"]))
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). |
Result and scope
After #4166, avoiding parent parking could appear to pay for QQ16 recovery, but the missing fair baseline was original arithmetic using a compatible external-call protocol. This package implements that baseline with one original numerical pipeline and a second controller bank. The controllers lend the same closed scalar/leaf/monomial/Ordinary objects sequentially, preserving literal allocator history and encoded slot identities. It adds 1,023 fixed controller tapes, with a conservative 66,496 read/write/unit-move action setup/terminal-retirement bill; no second Ordinary engine is constructed.
This is one class-C enabling mechanism plus a quantified complete-root source-action comparison. It is not another QQ16 caller installation, proof that recovery is affordable, unrestricted Turing-step/runtime dominance, all-node recursive substitution, or a new κ. The source/native/ordinary/Compact/hosting/long-record and row-stock premises remain explicit.
Constructive comparison
A retains original selected arithmetic and embedded calls. B retains exactly that arithmetic and uses the shared-primitive external controller. C/D are the frozen #4166 fixed/adopted publication variants. The same external RootLayer ports and continuation boundary are preserved; recursive descendants remain original C.
The exact complex park/restore cost is
56S+22r+11actions, including loop tests, append checks, markers, empty cases and rewinds. A source-derived injection proves that the full 15-tape capsule has lengthC<=S, the parked parent body sum. Literal root flags, ancestor stack translation, headers, first-use markers and unmatched terminal returns are handled explicitly; equal ranks alone permit no cancellation.Across all 510662Γ original root calls, including 493097Γ later calls, the conservative unit-action saving is
B_bankis the complete parent-bank bit length, already including Γ. Separate coordinate bounds are positive too, so every fixed positive weighting of reads/writes/unit moves improves within this source tariff. Separately compiled finite-control costs retain their stated threshold; elapsed timing is not this theorem.A new guarded internal child-return ownership exchange saves 11n+4 actions per returned n-bit packet, less finite rebinding control. It updates all packet/private/parked/parking/backend-output bindings and preserves public ports. The same optimisation is available to compatible variants. It is distinct from #4166’s already credited whole-bank
11B_bank+4-c_Rsaving.What changes for QQ16
The fair decomposition is
T_D-T_A=(T_B-T_A)+(T_D-T_B). Avoided full-parent serialization is a generic protocol benefit and cannot be credited exclusively to recovery.The independent literal census binds every source occurrence, target/rank and installed position. Of 510646Γ retained calls, 503674Γ have matched payloads under #4166’s semantic refinement and 6972Γ are changed-core calls. The matching-payload header component adds 14,102,872Γ actions, including 13,806,716Γ later suffix actions.
A real gap in the proposed separate-engine proof was found: closed native arenas retain free-slot order, with slot IDs encoded in words. Sharing the actual primitive bundle closes this for B. Frozen D’s signed nonheader context residual remains explicit, together with changed-core differences, 336Γ service calls, 32Γ added producer calls, 16Γ removed centres and complete nonchild work. No negative-cost theorem for independent engines is inferred. A paid canonical six-arena reset on new fair variants is the next discriminating experiment.
Evidence and limits
Production O73 payloads and complete RootLayer.run were not executed. All-size applicability is a written source refinement, not inferred from reduced fixtures. Historical backing survives erasure and role exchange. Selected κ stays
836330098538459/500000000000000000.Sources and coordination
Scientific main
e40a7b454da6a0df53e358aa3265b9c1c39de2c8, priority6; frozen #41660b082d22a0e9a442d264ab0633e35ef26c790630and #4129e708f02bf78c3ed6d770cedf00724ebc5ce928d1. New review/publication heads are recorded separately. The canonical #3985 handoff preserves prior results and the active checkpoint. Bounded all-state searches and named heads/reviews/Discussions were refreshed; capped/cache-limited searches and unavailable helper remote coverage do not prove novelty.Credit Jose Manuel/#3385 and retained numerical/physical/Compact/ordinary authors; Sagar Thakrar/#3464 for compatible parent restoration; Tekalign/#3380 for the ownership-exchange idea, adapted at a new site with a new proof/bill; Ali Romman/QQ16, Arham Tahir, ywz65 and #3985/#4015/#4106/#4109/#4129/#4166. All requested compatibility decisions and original notices are retained. Chris R/Clear1nsight with substantial coordinated OpenAI Codex assistance. At most this one integrated PR; no frontier or merge action.
Final local publication receipts at
6749e458800f461535d64cc91c017552d9f55e5f: registered primary and all 6 boundary groups PASS (252.471seconds); committed-byte/source-history PASS for 106 files; official export/check PASS for 106 payload files plus manifest. Actual committed read-only Git-free ordinary/optimized replays PASS in 124.643/122.214 seconds, with empty stderr and unchanged contents, modes, mtimes and inodes. Archive SHA256b9ffc464b72905fa1f789782ebab06269e1e0bff9d7342eed19903f4d51a4518. Metadata clarification was checked after the scientific freeze; executable/proof bytes are unchanged. Hosted CI is pending at publication and is a separate status.Start with PROOF, whole-root comparison, resources and canonical handoff/history.
Assigned task
joint-query-controller, scope key42581d429acc9509d503; scope changed to the specifically assigned physical-protocol continuation after #4166. The original card remains pinned in TASK.json. This mechanism resolves the actual caller/context and budget bottleneck; it is not an unrelated task selection.Submission refresh: canonical main
12fa8c5c844be21bfefb38a19503fbd867a11244, live priority revision 7, was fetched and read before submission. Its updated QQ16 card explicitly asks for the #4166 whole-caller protocol comparison, retaining every later root call. Standing instructions, selected result and physical controller are unchanged. The scientific priority-6 base/card and source inputs remain frozen; this class-C result stops recovery expansion at the explicit unpriced threshold.Open next questions
The smallest next experiment is fitted Ordinary execution from two different legal closed arena free-slot orders, followed by a paid canonical six-arena reset or a literal codec-equivariance proof. Include every validation and finite-control charge and preserve actual borrowed bytes/heads. That can close the same-payload native-context residual for explicitly named new variants. Then price the 6972Γ changed-core calls, complete recovery service and nonchild difference against fair B; only a favorable complete comparison justifies a recovery-specific benefit.