core: outside-influence fast path for swept samples (L138, output = v236)

Column-cache census matches assembler/world (the L77 share rise was relative, not more calls). Reuses the TN
predicate and skips relief/mouth/shell work for stamped samples outside the 1.053 m influence. vs assembler/world:
whole view -0.5..-4.0% on all layers; near-ready Surface World +0.3/+1.7, Floating Islands -4.3/+2.9, Tunnel Network
-2.5/+2.9, Vertical Shafts +4.7/+3.3 (A/A ±1%). 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 04:10:56 +01:00
1 parent 98c2c8e1c5
commit fa4417aad0
7 files changed
+545 -5

No files matched your search

@@ -0,0 +1,74 @@
#!/usr/bin/env python3
"""Compare L138 Clang/GCC composed hashes at W1, W8, and W12."""
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/l138/determinism"
DATA = ROOT / "Standalone/data/regression/owner_world_2strate_l61.json"
BINARIES = {
"clang": ROOT / "Saved/Linux/l138/bin/VoxelForgeCoreHeadless-l138-clang",
"gcc": ROOT / "Saved/Linux/l138/bin/VoxelForgeCoreHeadless-l138-gcc",
}
STAMP = "9aade4e6cb33e86c36b89440644d9ef5d440288fb6ff0af03af128291c95f93f"
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 L138 determinism binary or owner fixture")
OUT.mkdir(parents=True, exist_ok=True)
rows = []
reference: tuple[str, ...] | None = None
for compiler, binary in BINARIES.items():
for workers in (1, 8, 12):
name = f"determinism-{compiler}-w{workers}"
log = OUT / f"{name}.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:
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 = STAMP_RE.search(content)
hashes = tuple(HASH_RE.findall(content))
passed = (proc.returncode == 0 and stamp is not None
and stamp.group(1) == STAMP and len(hashes) >= 4)
if reference is None and passed:
reference = hashes
elif reference is not None:
passed = passed and hashes == reference
row = {"compiler": compiler, "workers": workers, "exit": proc.returncode,
"stamp": stamp.group(1) if stamp else None, "hash_lines": len(hashes),
"hashes_match_first": hashes == reference, "passed": bool(passed),
"elapsed_s": round(time.monotonic() - started, 3),
"log": str(log.relative_to(ROOT))}
rows.append(row)
print("[L138DeterminismRun] " + 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"[L138DeterminismSummary] runs={len(rows)} stamp={STAMP} status=PASS")
return 0
if __name__ == "__main__":
raise SystemExit(main())