core: per-tile passage route IDs and empty-feature early outs (L136, output = v236)

Passage visits -78..-89% near-ready; composer worker time back to baseline on Tunnel Network; v239 is 2-4% faster
than v236 in 7/8 cells but still +4.3..+13.3% near-ready vs assembler/world. Surface World composer time equals
baseline yet near-ready is +4-6%: unexplained. 16/16 seeds, fast tier, Clang/GCC green.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016dhxM43dnWvUu2B5Ph1iG1
This commit is contained in:
Fr0zkaandClaude Opus 5.5 committed 2026-11-01 01:15:09 +01:00
1 parent 2d89023933
commit 08cc3bd89b
6 files changed
+469 -17

No files matched your search

@@ -0,0 +1,75 @@
#!/usr/bin/env python3
"""Check exact-stamp Clang/GCC cave-path 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/l136/determinism"
DATA = ROOT / "Standalone/data/regression/owner_world_2strate_l61.json"
BINARIES = {
"clang": ROOT / "Saved/Linux/l136/fast/bin/VoxelForgeCoreHeadless-fast-clang",
"gcc": ROOT / "Saved/Linux/l136/fast/bin/VoxelForgeCoreHeadless-fast-gcc",
}
STAMP = "ebe6b32a7cd96c5aa69c6dc64ae6b9c6ff4bc18bc484efc5148611c48723c28f"
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 L136 determinism binary or owner fixture")
OUT.mkdir(parents=True, exist_ok=True)
rows = []
baseline: tuple[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 found_stamp.group(1) == STAMP and len(hashes) >= 4)
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("[L136DeterminismRun] " + json.dumps(row, sort_keys=True), flush=True)
if not passed:
(OUT / "summary.json").write_text(json.dumps(
{"status": "FAIL", "stamp": STAMP, "runs": rows}, indent=2) + "\n")
raise SystemExit(f"determinism mismatch; see {log}")
(OUT / "summary.json").write_text(json.dumps(
{"status": "PASS", "stamp": STAMP, "runs": rows}, indent=2) + "\n")
print(f"[L136DeterminismSummary] runs={len(rows)} stamp={STAMP} status=PASS")
return 0
if __name__ == "__main__":
raise SystemExit(main())