diag: passage source-floor clamp rejected (L91); field has steep non-distance tails

Clamping the passage-composition source density at -c (c=2..6 voxels, diagnostic, default off)
changes the surface far beyond the bar: c=6 still 65 sign flips, up to 165 cm displacement, 120 deg
normal change (downstream composition consumes deep values). Source gradient at crossings is
distance-like at the median but has huge tails (FI p90 |grad| 512, max 894 vox/vox), so the
density-dependent passage reach is inflated by non-distance values. No world change.

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-28 05:50:11 +01:00
1 parent a7a03d42b4
commit 8805291d3e
9 files changed
+937 -11

No files matched your search

@@ -0,0 +1,80 @@
#!/usr/bin/env python3
"""Measure source-floor effects across one owner stratum's complete near view."""
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/l91/clamp-effects"
DATA = ROOT / "Standalone/data/owner_world.json"
BINARY = ROOT / "Saved/Linux/l91/bin/VoxelForgeCoreHeadless-l91-clang19"
STRATA = {
"S0": {"camera": (8.0, 16.0, -372.2626953125), "near": 1408},
"FI": {"camera": (25.8369140625, 3.19921875, -737.0), "near": 1216},
"TN": {"camera": (19.166015625, -14.2001953125, -753.3740234375), "near": 1344},
"S3": {"camera": (-20.0625, -5.068359375, -900.353515625), "near": 1344},
}
STAMP = re.compile(r"^\[VoxelForgeSourceStamp\] sha256=(\S+)$", re.M)
COVERAGE = re.compile(r"^\[L91PassageClampCoverage\] (.*)$", re.M)
SUMMARY = re.compile(r"^\[L91PassageClampSummary\] (.*)$", re.M)
GRADIENT = re.compile(r"^\[L91PassageSourceGradient\] (.*)$", re.M)
AUDIT = re.compile(r"^\[L91PassageClampAudit\] (.*)$", re.M)
FIELDS = re.compile(r"([a-zA-Z0-9_]+)=([^ ]+)")
def run(stratum: str) -> dict:
OUT.mkdir(parents=True, exist_ok=True)
spec = STRATA[stratum]
camera = ",".join(f"{value:.12f}" for value in spec["camera"]) + ",0,0"
log = OUT / f"{stratum.lower()}-effects.log"
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=2", f"--camera={camera}", "--audit-passage-source-clamp",
]
started = 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=1750)
content = log.read_text(encoding="utf-8", errors="replace")
coverage = COVERAGE.search(content)
summaries = [dict(FIELDS.findall(match.group(1))) for match in SUMMARY.finditer(content)]
gradient = GRADIENT.search(content)
audit = AUDIT.search(content)
row = {
"stratum": stratum,
"exit_code": result.returncode,
"wall_s": round(time.monotonic() - started, 3),
"expected_near_tiles": spec["near"],
"coverage": dict(FIELDS.findall(coverage.group(1))) if coverage else None,
"floors": summaries,
"source_gradient": dict(FIELDS.findall(gradient.group(1))) if gradient else None,
"audit": dict(FIELDS.findall(audit.group(1))) if audit else None,
"source_stamp": STAMP.search(content).group(1) if STAMP.search(content) else None,
"log": str(log.relative_to(ROOT)),
}
(OUT / f"{stratum.lower()}-effects.json").write_text(
json.dumps(row, indent=2) + "\n", encoding="utf-8")
print("[L91ClampEffectsRun] " + json.dumps(row, sort_keys=True), flush=True)
return row
def main() -> int:
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--stratum", choices=tuple(STRATA), required=True)
args = parser.parse_args()
if not BINARY.is_file() or not DATA.is_file():
raise SystemExit(f"missing input: {BINARY} or {DATA}")
run(args.stratum)
return 0
if __name__ == "__main__":
raise SystemExit(main())