wip(assembler): round L32 -- smooth Gradient interface at full amplitude (no rings, not flat)

Band faces now use signed distance to the displaced solid intervals, continuous across bands, so
MC interpolates the interface instead of terracing at density levels. The Gradient amplitude is
restored to width/8 (about 4 m peak-to-peak at 16 m). Ring/terrace audit at LOD0-8 on the FI floor and SW
ceiling passes; negative controls: L30 (rings) and L31 (flat) both fail. Hole/interface audits,
16 passage rows and 24/24 determinism pass. Evaluator 20. Cost vs L31 SW +1.9%, FI +1.5%.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CSFYgsdW8ejZSyiMf4qRSX
This commit is contained in:
Fr0zkaandClaude Opus 5.5 committed 2026-10-21 20:27:29 +02:00
1 parent 28069f0d98
commit d0158c6019
31 files changed
+2207 -111

No files matched your search

@@ -0,0 +1,120 @@
#!/usr/bin/env python3
"""Run the recipe-stamped L31 passage audit matrix and reject mislabeled runs."""
import json
import re
import subprocess
import time
from pathlib import Path
ROOT = Path(__file__).resolve().parents[4]
OUT = ROOT / "Saved/Linux/l32"
OUT.mkdir(parents=True, exist_ok=True)
BINARIES = {
"clang": OUT / "bin/VoxelForgeCoreHeadless-l32-clang-v20",
"gcc": OUT / "bin/VoxelForgeCoreHeadless-l32-gcc-v20",
}
MARKERS = (
"[ResolvedPassageAuditSummary]",
"[PassageOpenAirAuditSummary]",
"[PassageNaturalnessSummary]",
"[PassageNoLongBridgeAudit]",
"[PassageRockColumnAuditSummary]",
)
rows = []
failed = False
for recipe in ("surface-world", "floating-islands"):
for style in range(4):
data = ROOT / f"Saved/Linux/linux25-owner-{recipe}-style{style}.json"
for compiler, binary in BINARIES.items():
name = f"passage-{recipe}-style{style}-{compiler}"
logfile = OUT / f"{name}.log"
command = [
"taskset", "-c", "0-11", "prlimit", "--as=6442450944", "--", 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",
]
started = time.monotonic()
try:
with logfile.open("w", encoding="utf-8") as stream:
result = subprocess.run(command, stdout=stream, stderr=subprocess.STDOUT,
timeout=900, check=False)
except subprocess.TimeoutExpired:
result = None
elapsed = time.monotonic() - started
text = logfile.read_text(encoding="utf-8", errors="replace")
stamps = re.findall(
r"^\[WorldAssemblerRecipeAudit\] requested=([^ ]+) actual=([^ ]+).*status=([^ ]+)$",
text, re.M)
recipe_ok = stamps == [(recipe, recipe, "PASS")]
markers_ok = all(re.search(re.escape(marker) + r".*status=PASS", text)
for marker in MARKERS)
capsule_ok = bool(re.search(
r"^\[ResolvedPassageAudit\].* blocked=0 support_samples=\d+ "
r"unsupported=0 grade_failures=0 mouth_content=2/2 mouth_radius=2/2 "
r"walkability=PASS$", text, re.M))
island_route_ok = (recipe != "floating-islands" or bool(re.search(
r"^\[FloatingIslandRouteAudit\].* blocked=0 support_samples=\d+ "
r"unsupported=0 grade_failures=0 status=PASS$", text, re.M)))
binding_ok = bool(re.search(
r"\[ResolvedPassageAuditSummary\].*route_bindings=[1-9][0-9]* "
r"route_binding_failures=0 .*status=PASS", text))
walk_ok = "[Walkability] PASS" in text
if recipe == "floating-islands":
control_ok = "[PassageColumnDisconnectedEndControl]" in text and bool(
re.search(r"\[PassageColumnDisconnectedEndControl\].*detected=true", text))
else:
control_ok = True
ok = (result is not None and result.returncode == 0 and recipe_ok
and markers_ok and capsule_ok and island_route_ok and binding_ok
and walk_ok and control_ok)
actual_recipe = stamps[0][1] if len(stamps) == 1 else "MISSING"
rows.append((recipe, actual_recipe, style, compiler, elapsed,
result.returncode if result else "TIMEOUT", ok))
print(f"{name} elapsed={elapsed:.1f}s exit={result.returncode if result else 'TIMEOUT'} "
f"recipe={stamps[0][1] if stamps else 'MISSING'} "
f"capsule={'PASS' if capsule_ok and island_route_ok else 'FAIL'} "
f"column_control={'PASS' if control_ok else 'FAIL'} {'PASS' if ok else 'FAIL'}",
flush=True)
if not ok:
failed = True
summary = OUT / "passage-audit-matrix.csv"
summary.write_text(
"requested_recipe,actual_recipe,style,compiler,elapsed_seconds,exit_code,status\n" +
"".join(f"{requested},{actual},{style},{compiler},{elapsed:.3f},{code},"
f"{'PASS' if ok else 'FAIL'}\n"
for requested, actual, style, compiler, elapsed, code, ok in rows), encoding="utf-8")
control_log = OUT / "recipe-mismatch-control.log"
control_owner = OUT / "recipe-mismatch-control-owner.json"
control_owner_data = json.loads(
(ROOT / "Saved/Linux/linux25-owner-surface-world-style0.json").read_text(encoding="utf-8"))
top_owner_stratum = max(control_owner_data["strates"], key=lambda stratum: stratum["top_chunk_z"])
top_owner_stratum["asset"]["GeneratorType"] = 6 # ECaveGeneratorType::FloatingIslands
control_owner.write_text(json.dumps(control_owner_data, separators=(",", ":")), encoding="utf-8")
control_command = [
"taskset", "-c", "0-11", "prlimit", "--as=6442450944", "--", str(BINARIES["clang"]),
str(control_owner),
"--workers=12", "--world-assembler-prototype", "--stream-benchmark",
"--stream-pipeline", "--force-generate", "--clip-radius=3",
"--max-clip-level=8", "--max-level=-1", "--recipe=surface-world",
"--audit-resolved-layout-passages",
]
with control_log.open("w", encoding="utf-8") as stream:
control = subprocess.run(control_command, stdout=stream, stderr=subprocess.STDOUT,
timeout=900, check=False)
control_text = control_log.read_text(encoding="utf-8", errors="replace")
control_ok = (control.returncode == 2 and
"[WorldAssemblerRecipeAudit] requested=surface-world actual=floating-islands "
"top_generator=FloatingIslands " in control_text and
"floating_islands_stratum=present status=FAIL" in control_text)
print(f"[L32RecipeMismatchControl] requested=surface-world actual=floating-islands "
f"exit={control.returncode} detected={'true' if control_ok else 'false'} "
f"{'PASS' if control_ok else 'FAIL'}", flush=True)
print(f"[L32PassageMatrix] runs={len(rows)} pass={sum(row[-1] for row in rows)} "
f"fail={sum(not row[-1] for row in rows)} summary={summary}", flush=True)
raise SystemExit(1 if failed or not control_ok or len(rows) != 16 else 0)