docs: pin fresh-proof routing defect and repair20 direction

This commit is contained in:
Takeshi
2026-10-15 00:28:52 +09:00
parent 3c65c71494
commit 7e66b6c753
8 changed files with 168 additions and 4 deletions
File diff suppressed because one or more lines are too long
@@ -0,0 +1,27 @@
{
"input_candidate": "f5f85ae08c1c6c9c1ec511f13a7215170d7d8d49",
"checker_sha256": "bc6bc7109bc754ad8f9c46e6492e044264226545a3c9e823a519ab9f0dd23c88",
"native_index_sha256": "2cbb251414ce5bff46538c9fc59c7eed82b83324f4e24a293d53cd71744fe10c",
"call": "check(frozen_f5f85ae_worktree, actual_native_f5f85ae_r16)",
"actual_deficits": [
"R09 reuse candidate"
],
"diagnosis": "Historical R09 pins exist and check() selects R09 reuse by existence, so genuine fresh index with current commit is rejected before evaluating required fresh proof. Fresh screenshot branch supports PNG only while actual CUA screenshots are unmodified JPEG bytes. Neither issue can be solved by fake old version binding or transcoding evidence.",
"formal_acceptance": false,
"unit_credit": 0,
"controlled_full_stop": {
"output": "/Users/korizatou114/Projects/とりにく工房ゲーム制作部/artifacts/original-completion-2026-10-02/p08-03-final-regression-f5f85ae-r01",
"owner_pid": 88736,
"signal": "SIGINT after command identity verification",
"actual_suites_attempted": 14,
"passed": false,
"strict_accepted_checks": 649,
"error": "AssertionError: first strict failed phase stops without retry: 013",
"cleanup_errors": [],
"guard_errors": [],
"ended_sha256": "288ee910a325fcb73cde4a1798966ef22a71ee01f47457e0c4f4ed7bf57d4d50",
"interpretation": "Run interrupted by Root at phase013 to avoid continuing before the required checker repair. Missing marker is not a product chapel-defect claim; no full-regression acceptance."
},
"registered_validation_failure": "f2d59df6a3c34c0e93b15b1a05cfa533",
"next": "Existing task normal transition repair20, actual Opus direction requested; no new task or duplicate implementation. Checker/tests/docs only, keep fixture19 and product unchanged."
}
@@ -0,0 +1,25 @@
{
"scope": "Root-only evidence orchestration; no source/product/contract change; no OS input or ACK performed by preparation",
"original_unit_credit": 0,
"controllers": [
{
"path": "docs/plans/original-completion-2026-10-02/execution/p08-03/root_collect_fresh_os.py",
"sha256": "b542beaf0c6a907eac14f196669a243b90bf94fb1434702e7c66bae2ddebaae3"
},
{
"path": "docs/plans/original-completion-2026-10-02/execution/p08-03/root_ack_os_receipt.py",
"sha256": "1657db469f0c1117684b6264c11a447889ec6b80b44b09b2b59b8807f4ad2ff1"
}
],
"syntax": "Both files passed Python compile() without generating bytecode",
"guards": [
"same committed clean source and native source map",
"fresh output and private OS profiles",
"default-player protection",
"actual CUA tool IDs newer than current request",
"actual target PID still alive",
"original screenshot byte preservation",
"no former attempt splicing"
],
"pending": "Execute only after final submitted checker route is verified; actual bar geometry helper, fresh continuous OS proof, checker/independent review/final integration remain required"
}
@@ -0,0 +1,47 @@
"""Bind actually completed Root CUA actions to one live OS request."""
import argparse, pathlib, json, hashlib, os, time, shutil, datetime
parser = argparse.ArgumentParser()
parser.add_argument("--output", type=pathlib.Path, required=True)
parser.add_argument("--request-folder", required=True)
parser.add_argument("--session-log", type=pathlib.Path, required=True)
a = parser.parse_args()
root = a.output.resolve(); folder = root / "os-pair" / a.request_folder
assert folder.resolve().is_relative_to(root / "os-pair")
q = folder / "request.json"; request = json.loads(q.read_text())
assert not (folder / "ack.json").exists()
assert all((folder / n).is_file() for n in ("screen-before.png", "screen-after.png", "cua-actions.json"))
os.kill(request["target_pid"], 0)
events = json.loads((folder / "cua-actions.json").read_text()); assert events
with a.session_log.open("rb") as log:
log.seek(max(0, a.session_log.stat().st_size - 6000000))
lines = log.read().splitlines()
calls, anchored = [], False
for line in lines:
try: value = json.loads(line)
except (ValueError, UnicodeError): continue
try:
called_at = datetime.datetime.fromisoformat(value["timestamp"].replace("Z", "+00:00")).timestamp()
except (KeyError, ValueError, TypeError): continue
if called_at < q.stat().st_mtime - 2: continue
item = value.get("payload", {})
arguments = item.get("arguments", "")
if item.get("type") != "function_call" or item.get("name") != "js": continue
if not any(s in arguments for s in ("godot.", "performOsRequest(", "performPaletteReveal(", "progressConstruction(")): continue
if a.request_folder in arguments:
calls, anchored = [], True
if anchored: calls.append(item["call_id"])
assert calls, "actual CUA tool call absent"
collector = root / "root-ack-controller.py"
if not collector.exists(): shutil.copy2(__file__, collector)
receipt = {"method":"native_os", "target_pid":request["target_pid"], "timestamp_ns":time.time_ns(), "collector_pid":os.getpid(), "tool_name":"mcp__cua_repl.js", "tool_call_id":calls[-1], "tool_calls":calls, "events":events, "raw_result":"actual CUA action completed; post-action AX/screenshot inspected", "collector_source":"root-ack-controller.py"}
(folder / "input-receipt.json").write_text(json.dumps(receipt, ensure_ascii=False, indent=2) + "\n")
ack = {"target_pid":request["target_pid"], "sequence":request["sequence"], "request_sha256":hashlib.sha256(q.read_bytes()).hexdigest(), "input_receipt":str((folder / "input-receipt.json").relative_to(root)), "screen_before":str((folder / "screen-before.png").relative_to(root)), "screen_after":str((folder / "screen-after.png").relative_to(root))}
(folder / "ack.json").write_text(json.dumps(ack, ensure_ascii=False, indent=2) + "\n")
print(json.dumps({"acknowledged":request["sequence"], "target_pid":request["target_pid"]}), flush=True)
deadline = time.monotonic() + 5
while time.monotonic() < deadline:
pending = [p for p in sorted((root / "os-pair").glob("*/request.json")) if not (p.parent / "ack.json").exists()]
if pending:
value = json.loads(pending[0].read_text()); keys = ("action", "direction", "ctrl", "move_mode", "screen", "world_cell", "sequence", "target_pid", "node", "bar", "thumb_rect", "viewport_to_screen")
print(json.dumps({k:value[k] for k in keys if k in value})); break
time.sleep(.1)
@@ -0,0 +1,46 @@
"""Root CUA collection only; reuse a byte-identical native stage, never splice OS."""
import argparse, pathlib, json, importlib.util, subprocess, os, sys
sys.dont_write_bytecode = True
parser = argparse.ArgumentParser()
parser.add_argument("--project-root", type=pathlib.Path, required=True)
parser.add_argument("--native-root", type=pathlib.Path, required=True)
parser.add_argument("--output", type=pathlib.Path, required=True)
parser.add_argument("--commit", required=True)
a = parser.parse_args()
root, native, out = a.project_root.resolve(), a.native_root.resolve(), a.output.resolve()
def module(name, path):
spec = importlib.util.spec_from_file_location(name, path)
value = importlib.util.module_from_spec(spec)
spec.loader.exec_module(value)
return value
r = module("p08_fresh_standard", root / "tools/run_all_tests.py")
d = module("p08_fresh_native", root / "tools/run_p08_normal_placement.py")
outer = r.module("p08_fresh_owned", r.SUPPORT / "owned_outer.py")
index, started = r.read(native / "index.json"), r.read(native / "runner-input.json")
refs = r.source_refs(root)
r.require(a.commit == index["commit"] == subprocess.check_output(["git", "rev-parse", "HEAD"], cwd=root, text=True).strip(), "same frozen submitted commit")
r.require(not subprocess.check_output(["git", "status", "--porcelain"], cwd=root, text=True), "clean frozen source")
r.require(index["collection_error"] is None, "successful native collection")
r.require({n:v["sha256"] for n,v in refs.items()} == index["source_map"], "exact native source reuse")
r.require(r.default_player(root) == started["default_player"], "unchanged default player")
r.require(not out.exists() and not out.is_relative_to(root), "fresh independent OS evidence")
out.mkdir(); (out / "pair").mkdir()
for f in (native / "pair").rglob("*"):
if f.is_file():
target = out / "pair" / f.relative_to(native / "pair")
target.parent.mkdir(parents=True, exist_ok=True)
r.copy_source(f, target)
r.copy_source(pathlib.Path(__file__).resolve(), out / "root-controller.py")
r.write(out / "os-resume-started.json", {"commit":a.commit, "native_index":str(native / "index.json"), "native_index_sha256":r.sha(native / "index.json"), "source_map":index["source_map"], "owner_pid":os.getpid(), "native_handler_runs_repeated":0, "controller_sha256":r.sha(__file__)})
error, phases = None, []
try:
phases = d.collect_os(r, root, out, native / "stage", started["engine"], a.commit, refs, started["default_player"], outer)
except BaseException as caught:
error = type(caught).__name__ + ": " + str(caught)
finally:
cleanup, cleanup_errors = outer.finish_captured(outer.OWNED)
r.write(out / "os-resume-ended.json", {"error":error, "phases":phases, "cleanup":cleanup, "cleanup_errors":cleanup_errors, "native_handler_runs_repeated":0})
print(json.dumps({"error":error, "phases":phases, "cleanup_errors":cleanup_errors}), flush=True)
if error or cleanup_errors:
sys.exit(1)
r.write(out / "os-proof.json", {"source_map":index["source_map"], "inputs":index["inputs"], "input_method":"native_os", "observer_mutations":[], "phases":phases, "directory":"os-pair"})