Files
VoxelForge/Standalone/Research/WorldAssemblerM3/Linux81/RunL81OwnerPassageAudits.py
T
Fr0zkaandClaude Opus 5.5 9cb5e53b17 passages: exact density-aware outer bound skips passage work beyond its reach (L81, v214)
The carve is max(source, -roughSDF/Q), so its reach grows with -source; the outer test uses
-d*Q + 0.24 m (wall relief 0.21 + margin) beyond the route radius, disabled in mouth-support
and column-overlap tiles. Skips 16% of passage iterations on the highest-activity tiles and
all of them on ordinary tiles. 84 candidate/full pairs identical in every hash; 0 changed samples.
Evaluator 214 for cache invalidation only. Cold LOD0-2 (L80 protocol): SW 1.30->1.25,
FI 3.59->2.93, TN 3.18->3.51 (noise?), VS 1.33->1.22 s. Fast tier PASS.

Note: the export's legacy 26-point root route owner_world.passages[0] fails a full-view
pre-audit (65 solid samples, unchanged since L70); the canonical 211-point route used by the
plan passes. Stale data to clean up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016dhxM43dnWvUu2B5Ph1iG1
2026-10-27 22:58:34 +01:00

64 lines
2.8 KiB
Python

#!/usr/bin/env python3
"""Run the resolved owner passage audit for both owner recipes."""
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/l81/audits"
DATA = ROOT / "Standalone/data/owner_world.json"
BINARY = ROOT / "Saved/Linux/l81/bin/VoxelForgeCoreHeadless-l81-clang"
RECIPE = re.compile(r"^\[WorldAssemblerRecipeAudit\] requested=([^ ]+) actual=([^ ]+).*status=PASS$", re.M)
PASSAGE = re.compile(r"^\[ResolvedPassageAudit\].*walkability=PASS$", re.M)
MOUTH = re.compile(r"^\[PassageMouthProfileAudit\].*status=PASS$", re.M)
SUMMARY = re.compile(r"^\[ResolvedPassageAuditSummary\].*status=PASS$", re.M)
def run(recipe: str) -> dict:
OUT.mkdir(parents=True, exist_ok=True)
log = OUT / f"owner-{recipe}.log"
command = [
"taskset", "-c", "0-11", "prlimit", "--as=6442450944", "--",
"env", "VOXELFORGE_L81_PASSAGE_BOUND_PADDING_VOXELS=0", "timeout", "1740s",
str(BINARY), str(DATA), "--workers=12", "--world-assembler-prototype",
"--stream-benchmark", "--stream-pipeline", "--force-generate", "--clip-radius=3",
"--max-clip-level=8", "--max-level=-1", f"--recipe={recipe}",
"--audit-resolved-layout-passages",
]
start = time.monotonic()
try:
with log.open("w", encoding="utf-8") as stream:
proc = subprocess.run(command, cwd=ROOT, stdout=stream,
stderr=subprocess.STDOUT, check=False, timeout=1740)
except subprocess.TimeoutExpired as exc:
raise RuntimeError(f"passage audit exceeded 1,740 seconds: {log}") from exc
content = log.read_text(encoding="utf-8", errors="replace")
passages = len(PASSAGE.findall(content))
mouths = len(MOUTH.findall(content))
passed = (proc.returncode == 0 and RECIPE.findall(content) == [(recipe, recipe)]
and passages >= 1 and mouths == passages and SUMMARY.search(content) is not None)
row = {"recipe": recipe, "exit_code": proc.returncode, "passages": passages,
"mouth_profiles": mouths, "status": "PASS" if passed else "FAIL",
"wall_s": round(time.monotonic() - start, 3), "log": str(log.relative_to(ROOT))}
print("[L81PassageAuditRun] " + json.dumps(row, sort_keys=True), flush=True)
if not passed:
raise RuntimeError(f"owner passage audit failed: {log}")
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(recipe) for recipe in ("surface-world", "floating-islands")]
(OUT / "summary.json").write_text(json.dumps(rows, indent=2) + "\n",
encoding="utf-8")
return 0
if __name__ == "__main__":
raise SystemExit(main())