core: cave planner holds for 16 seeds; mouth joints planned from the resolved mouth (L135, v236)
Mouth floor/profile carried into the first/last edges (fixes seeds 1 and 2); fixed a Q16/Q32 scale bug in the mouth clearance scorer; shortest grade-safe handles; bounded cave AABBs and hoisted edge-BVH normalisation. Seeds 0-15 pass all composed audits and negative controls; fast tier, Clang/GCC W1/W8/W12 green. Near-ready still +3.9..+13.7% vs assembler/world (Surface World +3.9..+8.2% with no caves). Not for merge. 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
a3c8e3687d
commit
2d89023933
25 files changed
+2516
-235
No files matched your search
@@ -0,0 +1,79 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Check Clang/GCC cave-path pipeline hashes at 1, 8, and 12 workers."""
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import re
|
||||
import subprocess
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[4]
|
||||
OUT = ROOT / "Saved/Linux/l135"
|
||||
DATA = ROOT / "Standalone/data/regression/owner_world_2strate_l61.json"
|
||||
BINARIES = {
|
||||
"clang": OUT / "bin/VoxelForgeCoreHeadless-clang-l135",
|
||||
"gcc": OUT / "bin/VoxelForgeCoreHeadless-gcc-l135",
|
||||
}
|
||||
CAMERA = "-4.688214,38.662384,-505.781342,-28.446,0"
|
||||
HASH_RE = re.compile(
|
||||
r"^\[Pipeline(?:FullDetailHash|WholeViewHash|MaterialHash|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 L135 determinism binary or owner fixture")
|
||||
OUT.mkdir(parents=True, exist_ok=True)
|
||||
rows = []
|
||||
baseline: tuple[str, ...] | None = None
|
||||
stamp: str | None = None
|
||||
for compiler, binary in BINARIES.items():
|
||||
for workers in (1, 8, 12):
|
||||
label = f"determinism-{compiler}-w{workers}"
|
||||
log = OUT / f"{label}.log"
|
||||
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=0",
|
||||
"--max-level=0", f"--camera={CAMERA}", "--stream-hash-tiles",
|
||||
"--force-generate", "--recipe=surface-world", "--render-distance-chunks=0",
|
||||
"--landmark-chamber-demo", "--ore-veins-demo"]
|
||||
started = time.monotonic()
|
||||
with log.open("w", encoding="utf-8") as output:
|
||||
result = subprocess.run(command, cwd=ROOT, stdout=output,
|
||||
stderr=subprocess.STDOUT, check=False, timeout=1740)
|
||||
content = log.read_text(encoding="utf-8", errors="replace")
|
||||
found_stamp = STAMP_RE.search(content)
|
||||
hashes = tuple(HASH_RE.findall(content))
|
||||
passed = result.returncode == 0 and found_stamp is not None and len(hashes) >= 4
|
||||
if found_stamp is not None:
|
||||
if stamp is None:
|
||||
stamp = found_stamp.group(1)
|
||||
passed &= stamp == found_stamp.group(1)
|
||||
if baseline is None and passed:
|
||||
baseline = hashes
|
||||
elif baseline is not None:
|
||||
passed &= hashes == baseline
|
||||
row = {"compiler": compiler, "workers": workers,
|
||||
"exit": result.returncode, "stamp": found_stamp.group(1)
|
||||
if found_stamp else None,
|
||||
"hash_lines": len(hashes), "hashes_match_first": hashes == baseline,
|
||||
"passed": bool(passed), "elapsed_s": round(time.monotonic() - started, 3),
|
||||
"log": str(log.relative_to(ROOT))}
|
||||
rows.append(row)
|
||||
print("[L135DeterminismRun] " + json.dumps(row, sort_keys=True), flush=True)
|
||||
if not passed:
|
||||
(OUT / "determinism-summary.json").write_text(json.dumps(
|
||||
{"status": "FAIL", "runs": rows}, indent=2) + "\n")
|
||||
raise SystemExit(f"determinism mismatch; see {log}")
|
||||
summary = {"status": "PASS", "stamp": stamp, "runs": rows}
|
||||
(OUT / "determinism-summary.json").write_text(
|
||||
json.dumps(summary, indent=2) + "\n", encoding="utf-8")
|
||||
print(f"[L135DeterminismSummary] runs={len(rows)} stamp={stamp} status=PASS")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in new issue
Block a user