"""Archive closed follow-up gates and exact review/build inputs, without binaries.""" import datetime import hashlib import json from pathlib import Path import shutil source = Path(__file__).resolve().parent root = source.parents[1] target = root / "harness/experiments/text-navigation-followup-20260911" names = ["inputs3.json", "inputs3.zip", "inputs3-readback.json", "inputs4.json", "inputs4.zip", "inputs4-readback.json", "run-focused3.ps1", "run-focused4.ps1", "build_gui.py", "gui-build.json", "gui-build-messages.jsonl", "gui-build-stderr.log"] for label in ("focused3", "clippy3", "focused4", "clippy4"): names.extend([label + ".log", label + "-status.json"]) names += [p.relative_to(source).as_posix() for p in sorted((source / "review-final").rglob("*")) if p.is_file()] assert all((source / name).is_file() for name in names) for label in ("focused3", "clippy3", "focused4", "clippy4"): assert json.loads((source / (label + "-status.json")).read_text(encoding="utf-8-sig"))["exitCode"] == 0 for label in ("inputs3", "inputs4"): assert json.loads((source / (label + "-readback.json")).read_text(encoding="utf-8"))["passed"] target.mkdir(exist_ok=False) for name in names: destination = (target / name).resolve() assert destination.is_relative_to(target) destination.parent.mkdir(parents=True, exist_ok=True) shutil.copy2(source / name, destination) assert destination.read_bytes() == (source / name).read_bytes() (target / ".gitattributes").write_text("* -text\n", encoding="utf-8", newline="\n") (target / "README.md").write_text("""# Source navigation follow-up gates Codex-9e8r6t /root, Windows 2026-09-11. These exact records complement [the initial desktop gates](../text-navigation-desktop-20260911/README.md) and [the integrated evaluation](../../release-text-navigation-integrated-20260911.md). Linux/WSL remains user-paused. `inputs3` covers ordinary Escape cleanup; focused179 and strict all-target Clippy passed, but review then found the captured-modal-input activation gap. `inputs4` extends the single captured-Escape bridge under ordinary Text modals, avoids the separate architecture route, and tests the real App subscription using a captured event from a mounted TextInput. Its terminal results are in `focused4` and `clippy4`. Both raw source snapshots read back unchanged. The original GUI build passed from inputs2 and was never launched. Its preserved Cargo JSON and receipt identify binary9FA1457E...53CB66; that binary is omitted and superseded for native acceptance. The helper is preserved unchanged with its original private paths. These records do not establish a newer GUI/native pass. Reviews retain their original findings and exact source hashes: review.md is against inputs2, review-escape.md against inputs3. Later corrections do not turn those earlier findings into passes. Any later source review has its own scope. `manifest.json` indexes all payload bytes including this README and attributes; `readback.json` pins the manifest. Root verifies raw Git-index bytes on staging. """, encoding="utf-8", newline="\n") entries = [] for path in sorted(target.rglob("*")): if path.is_file(): raw = path.read_bytes() entries.append({"path": path.relative_to(target).as_posix(), "bytes": len(raw), "sha256": hashlib.sha256(raw).hexdigest()}) manifest = {"atUtc": datetime.datetime.now(datetime.timezone.utc).isoformat(), "files": entries} with (target / "manifest.json").open("x", encoding="utf-8", newline="\n") as out: json.dump(manifest, out, indent=2) out.write("\n") for entry in entries: path = target / entry["path"] assert path.stat().st_size == entry["bytes"] assert hashlib.sha256(path.read_bytes()).hexdigest() == entry["sha256"] receipt = {"atUtc": datetime.datetime.now(datetime.timezone.utc).isoformat(), "payloadFiles": len(entries), "payloadBytes": sum(e["bytes"] for e in entries), "sourceCopiesVerified": len(names), "manifestSha256": hashlib.sha256((target / "manifest.json").read_bytes()).hexdigest(), "passed": True} with (target / "readback.json").open("x", encoding="utf-8", newline="\n") as out: json.dump(receipt, out, indent=2) out.write("\n") print(json.dumps(receipt))