Golden gate: Linux baselines, canonical save, gate hardening (D521-D532)

Linux reference-frame set for all 21 levels and the cross-platform golden
rule (D521); golden tooling made non-destructive (D524); the gate pins a
canonical in-tree save (D529) and the PRNG seed (D532); the capture tool's
per-level re-pin bug fixed and the Linux set re-captured under the
canonical save (D530, D531); no-arg verify.sh exits non-zero. README and
docs visual/consolidation passes; the 15 MB preview gif replaced by stills.

Refs: D521 D523 D524 D525 D526 D527 D528 D529 D530 D531 D532
This commit is contained in:
James Dansereau committed 2026-10-06 18:35:43 -04:00
1 parent aa5a1b81fe
commit 452fa1025a
203 files changed
+2046 -433995

No files matched your search

+67
View File
@@ -0,0 +1,67 @@
#!/usr/bin/env python3
# P7 (2026-10-04): cross-platform golden table.
# For every level, compare tools_pc/golden/<level>/linux/ against
# tools_pc/golden/<level>/win/ with framediff.py in both modes:
# --exact --tol 2 -> per-pixel share over tol (the rendering delta)
# default (structural) -> worst grid-cell dmean, nonclear delta, phash
# Prints one line per (level, frame) plus a per-level verdict.
#
# Path-agnostic: the repo root is the parent of this script's directory
# (tools_pc/), so it can be invoked from anywhere; no absolute path, no
# '~', no machine default.
import os
import subprocess
import json
ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
FD = os.path.join(ROOT, "tools_pc", "framediff.py")
LEVELS = [("dam","33"),("facility","34"),("runway","35"),("surface1","36"),
("bunker1","09"),("silo","20"),("frigate","26"),("surface2","43"),
("bunker2","27"),("statue","22"),("archives","24"),("streets","29"),
("depot","30"),("train","25"),("jungle","37"),("control","23"),
("caverns","39"),("cradle","41"),("aztec","28"),("egypt","32"),
("cuba","54")]
def run(args):
p = subprocess.run(args, capture_output=True, text=True)
out = p.stdout + p.stderr
i = out.find("{")
if i < 0:
return None, p.returncode, out
try:
d, _ = json.JSONDecoder().raw_decode(out[i:])
except Exception:
return None, p.returncode, out
return d, p.returncode, out
rows = []
for name, num in LEVELS:
lin = os.path.join(ROOT, "tools_pc", "golden", name, "linux")
win = os.path.join(ROOT, "tools_pc", "golden", name, "win")
ex, rcx, ox = run(["python3", FD, lin, "--golden", win,
"--exact", "--tol", "2", "--json"])
st, rcg, og = run(["python3", FD, lin, "--golden", win, "--json"])
if ex is None or st is None:
rows.append((name,"ERR","framediff failed", rcx, rcg))
continue
per = {}
for r in ex["results"]:
per.setdefault(r["frame"], {})["exact"] = r
for r in st["results"]:
per.setdefault(r["frame"], {})["struct"] = r
for f in sorted(per):
e = per[f].get("exact", {}); s = per[f].get("struct", {})
rows.append((name, f.replace("frame_",""),
"%.3f%%" % e.get("diff_pct", 0.0),
str(s.get("worst_cell","")), str(s.get("phash_hamming","")),
e.get("status",""), s.get("status","")))
print("%-9s exact rc=%d struct rc=%d" % (name, rcx, rcg))
print()
print("level frame over% worst_cell phash exact struct")
for r in rows:
if len(r) == 7:
print("%-10s %-6s %7s %10s %5s %6s %6s" % r[:7])
else:
print("%-10s %s" % (r[0], r[1]))