passages: exact relief skip + per-tile BVH node masks (L82); FI/TN LOD0-2 -12%

- Wall relief noise is skipped when its hard-bounded contribution cannot change the final max;
  mouth surface/tread noise only on paths that use it.
- Exact active BVH-node masks cached per tile/passage/segment range; no per-sample lower_bound.
- Full-view audit imports the exported Core plan (not the stale 26-point root route): 21,425/21,425
  walkability samples pass.
Cold (L80 protocol, medians) LOD0-2: SW 1.16->1.11, FI 2.86->2.51, TN 2.88->2.54, VS 1.23->1.22 s.
Passage share FI 64.6->58.7%, TN 65.4->58.4%. Hashes identical (v214). TN "slowdown" from L81
not reproduced (5 pairs, 3.08 -> 2.75 s). Fast tier PASS; Linux UE host builds.

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-10-27 23:46:15 +01:00
1 parent 9cb5e53b17
commit f572108dc4
10 files changed
+665 -41

No files matched your search

@@ -0,0 +1,73 @@
#!/usr/bin/env python3
"""Repeat the L77 FI/TN phase census on the L82 passage implementation."""
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/l82/census"
DATA = ROOT / "Standalone/data/owner_world.json"
BINARY = ROOT / "Saved/Linux/l82/profile-bin/VoxelForgeCoreHeadless-clang19"
CAMERAS = {
"FI": (25.8369140625, 3.19921875, -737.0),
"TN": (19.166015625, -14.2001953125, -753.3740234375),
}
SAMPLE = re.compile(r"^\[L77Sample\] .*?lod=(\d+) .*?phase=(\S+) .*?weight=(\d+)$", re.M)
SAMPLER = re.compile(r"^\[L77Sampler\] action=stop .*?samples=(\d+).*?status=PASS$", re.M)
def run(world: str, rep: int) -> dict:
OUT.mkdir(parents=True, exist_ok=True)
log = OUT / f"l82-phase-{world.lower()}-r{rep}.log"
camera = ",".join(f"{value:.12f}" for value in CAMERAS[world]) + ",0,0"
command = [
"taskset", "-c", "0-11", "prlimit", "--as=6442450944", "--",
"env", "VOXELFORGE_L81_PASSAGE_BOUND_PADDING_VOXELS=0", "timeout", "1740s",
str(BINARY), str(DATA), "--world-assembler-prototype", "--stream-benchmark",
"--stream-pipeline", "--workers=8", "--clip-radius=3", "--max-clip-level=8",
"--max-level=8", f"--camera={camera}", "--profile-lod-work", "--linux77-profile",
]
start = time.monotonic()
with log.open("w", encoding="utf-8") as stream:
result = subprocess.run(command, cwd=ROOT, stdout=stream,
stderr=subprocess.STDOUT, check=False, timeout=1740)
output = log.read_text(encoding="utf-8", errors="replace")
matches = [(int(lod), phase, int(weight)) for lod, phase, weight in SAMPLE.findall(output)]
sampler = SAMPLER.search(output)
if result.returncode or not matches or sampler is None:
raise RuntimeError(f"census failed: exit={result.returncode} {log}")
near = [row for row in matches if row[0] <= 2]
passage = sum(weight for _, phase, weight in near if phase == "passages")
total = sum(weight for _, _, weight in near)
row = {
"world": world, "replicate": rep, "exit_code": result.returncode,
"wall_s": round(time.monotonic() - start, 3),
"sampler_samples": int(sampler.group(1)), "near_lod_samples": len(near),
"near_lod_weighted_ticks": total, "near_lod_passage_weighted_ticks": passage,
"near_lod_passage_share_pct": 100.0 * passage / total if total else 0.0,
"log": str(log.relative_to(ROOT)),
}
print("[L82CensusRun] " + json.dumps(row, sort_keys=True), flush=True)
return row
def main() -> int:
if not BINARY.is_file() or not DATA.is_file():
raise SystemExit(f"missing input: {BINARY} or {DATA}")
rows = [run(world, rep) for world in CAMERAS for rep in (1, 2, 3)]
by_world = {}
for world in CAMERAS:
values = [row["near_lod_passage_share_pct"] for row in rows if row["world"] == world]
by_world[world] = {"runs_pct": values, "mean_pct": sum(values) / len(values)}
(OUT / "summary.json").write_text(json.dumps(
{"runs": rows, "near_lod_passage_share": by_world}, indent=2) + "\n",
encoding="utf-8")
return 0
if __name__ == "__main__":
raise SystemExit(main())