core: chamber floors planned into the passage h(s) profile (L152, v239; surface landing support open)
Seed 2 planned grades 9.58/6.58/8.28 deg (were 19 deg); 0 solid in 320,355 passage interior samples; 0 shell, chamber, wall violations; envelope audit clean. Open: the upper Surface World landing plane, fitted to the surface route, leaves 5 route + 2 chamber support samples unsupported. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016dhxM43dnWvUu2B5Ph1iG1
This commit is contained in:
1 parent
5bd158d4eb
commit
11b59a9a9e
12 files changed
+1315
-81
No files matched your search
@@ -0,0 +1,91 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Compare L152 hashes and layout identity at Clang/GCC W1, W8, and W12."""
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import re
|
||||
import subprocess
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
from PassageEnvelopeAudit import audit_layout
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[4]
|
||||
OUT = ROOT / "Saved/Linux/l152/determinism"
|
||||
DATA = ROOT / "Standalone/data/owner_world.json"
|
||||
BINARIES = {
|
||||
"clang": ROOT / "Standalone/bin/linux/VoxelForgeCoreHeadless-l152-clang",
|
||||
"gcc": ROOT / "Standalone/bin/linux/VoxelForgeCoreHeadless-l152-gcc",
|
||||
}
|
||||
STAMP = "b299076d814ff7cc098aa373cdc3a26533ed8bfe1ef6df1ea9de4d400d231b25"
|
||||
CAMERA = "-20.062500,-5.068359,-900.353516,0,0"
|
||||
HASH_RE = re.compile(
|
||||
r"^\[Pipeline(?:FullDetailHash|WholeViewHash|LODHash|ExactQueryHash)\].*$",
|
||||
re.M)
|
||||
STAMP_RE = re.compile(r"^\[VoxelForgeSourceStamp\] sha256=([0-9a-f]+)$", re.M)
|
||||
|
||||
|
||||
def main() -> int:
|
||||
if any(not path.is_file() for path in (DATA, *BINARIES.values())):
|
||||
raise SystemExit("missing L152 Clang/GCC binary or composed owner fixture")
|
||||
OUT.mkdir(parents=True, exist_ok=True)
|
||||
rows = []
|
||||
partial = OUT / "runs-partial.json"
|
||||
for compiler, binary in BINARIES.items():
|
||||
for workers in (1, 8, 12):
|
||||
name = f"determinism-{compiler}-w{workers}"
|
||||
log, layout = OUT / f"{name}.log", OUT / f"{name}.json"
|
||||
command = ["taskset", "-c", "0-11", "prlimit", "--as=6442450944", "--",
|
||||
"timeout", "1740s", str(binary), str(DATA), "--world-assembler-prototype",
|
||||
"--stream-benchmark", "--stream-pipeline", f"--workers={workers}",
|
||||
"--clip-radius=3", "--max-clip-level=8", "--max-level=0",
|
||||
f"--camera={CAMERA}", "--stream-hash", "--force-generate", "--seed=2",
|
||||
"--recipe=surface-world", "--render-distance-chunks=0",
|
||||
"--density-dispatch-report", f"--resolved-layout-output={layout}"]
|
||||
started = time.monotonic()
|
||||
with log.open("w", encoding="utf-8") as output:
|
||||
proc = subprocess.run(command, cwd=ROOT, stdout=output,
|
||||
stderr=subprocess.STDOUT, check=False, timeout=1740)
|
||||
content = log.read_text(encoding="utf-8", errors="replace")
|
||||
stamp_match = STAMP_RE.search(content)
|
||||
stamp = stamp_match.group(1) if stamp_match else None
|
||||
hashes = tuple(HASH_RE.findall(content))
|
||||
identity = (json.loads(layout.read_text(encoding="utf-8")).get("stable_identity")
|
||||
if layout.is_file() else None)
|
||||
envelope_audit = (audit_layout(json.loads(layout.read_text(encoding="utf-8")))
|
||||
if layout.is_file() else None)
|
||||
row = {"compiler": compiler, "workers": workers, "exit": proc.returncode,
|
||||
"stamp": stamp, "source_stamp_matches": stamp == STAMP,
|
||||
"hash_lines": len(hashes), "hashes": hashes,
|
||||
"layout_identity": identity,
|
||||
"envelope_audit": envelope_audit,
|
||||
"elapsed_s": round(time.monotonic() - started, 3),
|
||||
"log": str(log.relative_to(ROOT)), "layout": str(layout.relative_to(ROOT))}
|
||||
rows.append(row)
|
||||
partial.write_text(json.dumps(rows, indent=2) + "\n", encoding="utf-8")
|
||||
print("[L152DeterminismRun] " + json.dumps(row, sort_keys=True), flush=True)
|
||||
valid = [row for row in rows if row["exit"] == 0 and row["source_stamp_matches"]
|
||||
and row["hash_lines"] == 12 and row["layout_identity"]]
|
||||
reference_hashes = valid[0]["hashes"] if valid else []
|
||||
reference_identity = valid[0]["layout_identity"] if valid else None
|
||||
deterministic = len(valid) == 6 and all(
|
||||
row["hashes"] == reference_hashes and row["layout_identity"] == reference_identity
|
||||
for row in valid)
|
||||
envelope_pass = all(row["envelope_audit"] and row["envelope_audit"]["passed"]
|
||||
and row["envelope_audit"]["negative_controls"] == 1
|
||||
for row in rows)
|
||||
summary = {"status": "PASS" if deterministic else "FAIL",
|
||||
"deterministic": deterministic, "envelope_pass": envelope_pass,
|
||||
"source_stamp": STAMP, "layout_identity": reference_identity, "runs": rows}
|
||||
summary["status"] = "PASS" if deterministic and envelope_pass else "FAIL"
|
||||
(OUT / "summary.json").write_text(json.dumps(summary, indent=2) + "\n",
|
||||
encoding="utf-8")
|
||||
print(f"[L152DeterminismSummary] runs={len(rows)} deterministic="
|
||||
f"{'PASS' if deterministic else 'FAIL'} envelope="
|
||||
f"{'PASS' if envelope_pass else 'FAIL'} status={summary['status']}", flush=True)
|
||||
return 0 if summary["status"] == "PASS" else 1
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in new issue
Block a user