The shared boundary-cap path now emits a cap wherever the field is solid just below a strate's configured top (it previously required a solid-to-air crossing there) and checks a 5x5 perimeter grid before suppressing a fallback cap. Strict audit: 0 misses / 0 edge gaps, LOD0-8. farHorizonVersion 3 -> 4. SurfaceWorld LOD0-2, full detail and exact queries unchanged; 28/28 matrix plus 14/14 crossing; route parity and proofs pass. Ledges: the lower stratum's terrain at the FI/SW interface, seen through the FI void, sampled at 0.5/1/2 m at LOD1-3 (up to 1.5 m / 7.7 m ring steps). Fix deferred to the units/layers round. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CSFYgsdW8ejZSyiMf4qRSX
89 lines
4.2 KiB
Python
89 lines
4.2 KiB
Python
#!/usr/bin/env python3
|
|
"""Run the L19 W1/W8/W12 x5 matrix under inherited taskset limits."""
|
|
import os
|
|
import re
|
|
import signal
|
|
import subprocess
|
|
import time
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[4]
|
|
OUT = ROOT / "Saved/Linux/l19-matrix"
|
|
OUT.mkdir(parents=True, exist_ok=True)
|
|
if not os.sched_getaffinity(0).issubset(set(range(12))):
|
|
raise SystemExit("run under taskset -c 0-11")
|
|
BINARIES = {
|
|
"clang-off": ROOT / "Standalone/bin/linux/VoxelForgeCoreHeadless-linux19-clang",
|
|
"gcc-default": ROOT / "Standalone/bin/linux/VoxelForgeCoreHeadless-linux19-gcc",
|
|
}
|
|
RECIPES = {
|
|
"floating-islands": "-22,-19,-22.8,0,-4",
|
|
"surface-world": "0,-35,-487.94,0,-22",
|
|
}
|
|
PATTERN = re.compile(r"^\[Pipeline(?:FullDetailHash|WholeViewHash|LODHash|ExactQueryHash)\].*$", re.M)
|
|
RUNS = [(1, 1), (8, 1), (12, 1), (12, 2), (12, 3), (12, 4), (12, 5)]
|
|
passed = True
|
|
for recipe, camera in RECIPES.items():
|
|
for compiler, binary in BINARIES.items():
|
|
if not binary.exists():
|
|
raise SystemExit(f"missing binary: {binary}")
|
|
reference = None
|
|
for workers, repeat in RUNS:
|
|
name = f"{recipe}-{compiler}-w{workers}-r{repeat}"
|
|
logfile = OUT / f"{name}.log"
|
|
command = ["prlimit", "--as=6442450944", "--", str(binary),
|
|
str(ROOT / "Standalone/data/owner_world.json"),
|
|
"--world-assembler-prototype", "--stream-benchmark", "--stream-pipeline",
|
|
"--stream-hash", "--force-generate", "--clip-radius=3",
|
|
"--max-clip-level=8", f"--workers={workers}", f"--camera={camera}",
|
|
f"--recipe={recipe}"]
|
|
started = time.monotonic()
|
|
peak_rss = 0
|
|
timed_out = False
|
|
with logfile.open("w", encoding="utf-8") as stream:
|
|
process = subprocess.Popen(command, stdout=stream, stderr=subprocess.STDOUT,
|
|
start_new_session=True)
|
|
while process.poll() is None:
|
|
pending, seen = [process.pid], set()
|
|
while pending:
|
|
pid = pending.pop()
|
|
if pid in seen:
|
|
continue
|
|
seen.add(pid)
|
|
try:
|
|
pending.extend(int(value) for value in
|
|
Path(f"/proc/{pid}/task/{pid}/children").read_text().split())
|
|
for line in Path(f"/proc/{pid}/status").read_text().splitlines():
|
|
if line.startswith("VmRSS:"):
|
|
peak_rss = max(peak_rss, int(line.split()[1]))
|
|
break
|
|
except (FileNotFoundError, PermissionError, ProcessLookupError, ValueError):
|
|
pass
|
|
if time.monotonic() - started > 900:
|
|
os.killpg(process.pid, signal.SIGTERM)
|
|
try:
|
|
process.wait(timeout=5)
|
|
except subprocess.TimeoutExpired:
|
|
os.killpg(process.pid, signal.SIGKILL)
|
|
process.wait()
|
|
timed_out = True
|
|
passed = False
|
|
break
|
|
time.sleep(0.1)
|
|
code = process.wait()
|
|
elapsed = time.monotonic() - started
|
|
hashes = PATTERN.findall(logfile.read_text(encoding="utf-8", errors="replace"))
|
|
ok = code == 0 and not timed_out and len(hashes) == 12
|
|
if reference is None:
|
|
reference = hashes
|
|
elif hashes != reference:
|
|
ok = False
|
|
print(f"[MatrixMismatch] {name}", flush=True)
|
|
passed &= ok
|
|
print(f"[MatrixRun] {name} exit={code} seconds={elapsed:.3f} "
|
|
f"peak_rss_kib={peak_rss} hash_rows={len(hashes)} "
|
|
f"status={'PASS' if ok else 'FAIL'}", flush=True)
|
|
print(f"[MatrixSummary] rows={len(RECIPES)*len(BINARIES)*len(RUNS)} expected=28 "
|
|
f"result={'PASS' if passed else 'FAIL'} path={OUT}", flush=True)
|
|
raise SystemExit(0 if passed else 1)
|