audit: passage interior must be air for every capsule sample (L146)

Root cause of liminal seed 5 (measured): passage carve makes the bore air (+3.52), then the liminal route fill stamp
re-solidifies it (-0.16) where the deck crosses the tube. Three fixes cleared the bore but left 28-29 road stations
unsupported; none kept. New gate: zero solid samples inside any passage interior, with no-passage negative controls.
Owner v227 hashes and fast tier pass.

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-11-01 13:02:31 +01:00
1 parent 7d654ff861
commit 4290672d1c
3 files changed
+300 -6

No files matched your search

@@ -0,0 +1,46 @@
# L146 report
**Result:** No production fix is retained. The cause is measured: the liminal route fill pass runs after the passage carve and makes part of the bore solid again. The new passage-interior capsule audit catches the seed-5 defect. After three fixes cleared the bore but failed the liminal road support gate, work stopped as required by `AGENTS.md`.
## Root cause
Measured at `(-16.087, 2.915, -722.743) m`, seed 5, Clang W1, composed L145 fixture:
- Before passage composition, density was `-3.62890625`.
- The passage SDF reported `union_distance_m=-0.879889786`; carving changed density to `+3.51955914` (air).
- The subsequent liminal route stamp changed it to `-0.16169475` (solid).
The diagnostic directly identifies the post-carve route-fill pass as the cause. The resolved route/deck geometry indicates the fill overlaps the bore there; that specific deck overlap is inferred from the layout. The half-pipe/open-air path, carve reach, and carve blend are not the cause at this sample: the passage carver ran and produced positive air density before the route stamp.
Trace: `Saved/Linux/l146/logs/diagnostic-seed05-clang-w1.log`.
## Fix attempts
All were temporary and have been reverted; production composition and evaluator version remain at L145 / v227.
1. Move fill stamps before passage carving: passage probes cleared, but the liminal road had 29 unsupported stations.
2. Suppress route fills inside the passage interior: same result, 29 unsupported stations.
3. Reroute the southern deck around the crossing: passage probes cleared, but 28 road stations remained unsupported.
The three seed-5 runs are `probe-seed05-clang-w1.log`, `probe-masked-seed05-clang-w1.log`, and `route-seed05-clang-w1.log` under `Saved/Linux/l146/logs/`.
The shared premise that changing stamp order or locally moving the deck could preserve both bore air and road support failed twice. The route adjustment also failed the support gate, so no fourth fix was attempted.
## Audit and checks
`StreamBenchmarkPipeline.h` now classifies each tested player-capsule sample against its passage interior and requires zero solid interior samples. A no-passage negative control uses the same interior classification and must detect solid samples for every passage.
On the final source, the seed-5 audit measured 50,904 interior capsule samples and 289 solid samples for passage 1-2. Both negative controls detected solid interior samples (165,769 and 49,612). The shell summary passed with zero floor or wall violations, and the liminal road audit passed. The composed passage audit exited 10 as expected because the new interior-air gate detected the defect.
The final-source evidence is `Saved/Linux/l146/logs/audit-seed05-clang-w1.log`.
- Clang W1 final-source build: passed; log `Saved/Linux/l146/fast/logs/build-fast-clang-final.log`.
- Fast verification tier: passed in 362.5 s; summary `Saved/Linux/l146/fast/fast-summary.json`.
- Owner canonical v227 hash rows: passed for both pinned owner worlds; W1 and W12 signatures matched.
- `git diff --check`: passed.
- The 32-run pad matrix and the liminal Clang/GCC W1/W8/W12 matrix were not run because the three-failed-fix stop condition was reached. The 16-seed cave-planner sweep is not on this branch.
- No Unreal `Source/` files changed.
## Remaining risk
The seed-5 passage interior remains partly solid in production. A new design must define how route floor support and passage air share their overlap before changing composition again. No passage-composition change or owner hash change is retained.
@@ -0,0 +1,197 @@
#!/usr/bin/env python3
"""Run L146's composed liminal audits and the worker/compiler identity matrix."""
from __future__ import annotations
import argparse
import json
import os
from pathlib import Path
import re
import subprocess
import sys
import time
ROOT = Path(__file__).resolve().parents[4]
OUT = ROOT / "Saved/Linux/l146"
FIXTURE = OUT / "fixtures/core-liminal-field-3-strata.json"
LIMIT = ["taskset", "-c", "0-11", "prlimit", "--as=6442450944", "--"]
AUDIT_FLAGS = ("--audit-resolved-layout-passages", "--audit-liminal-road-walk",
"--audit-passage-tile-seams")
VARIANTS = ("flatField-monolith", "periodicHills",
"road-over-cloud-floor", "pillar-grid")
PASSAGE_RE = re.compile(r"^\[ResolvedPassageAudit\].*walkability=PASS$", re.M)
SHELL_RE = re.compile(r"^\[PassageShellAudit\].*status=PASS$", re.M)
sys.path.insert(0, str(ROOT / "Standalone/Tools/verify"))
from runner import current_stamp, first_stamp
def parse_seeds(value: str) -> list[int]:
result: set[int] = set()
for token in value.split(","):
token = token.strip()
if not token:
continue
if "-" in token:
first, last = (int(part) for part in token.split("-", 1))
if first > last:
raise argparse.ArgumentTypeError(f"reversed seed range: {token}")
result.update(range(first, last + 1))
else:
result.add(int(token))
if not result or min(result) < 0:
raise argparse.ArgumentTypeError("seeds must be nonnegative and nonempty")
return sorted(result)
def validate_audit(output: str, seed: int, compiler: str, workers: int) -> None:
checks = {
"landing-pad negative control":
"[LandingPadNegativeControl] uncertified_rejected=true status=PASS" in output,
"passage walk audits": len(PASSAGE_RE.findall(output)) == 2,
"passage interior capsule audit": len(re.findall(
r"^\[ResolvedPassageAudit\].*passage_interior_capsule_samples=[1-9]\d* "
r"passage_interior_solid_samples=0 interior_air=PASS .*walkability=PASS$",
output, re.M)) == 2,
"passage interior negative controls": len(re.findall(
r"^\[ResolvedPassageInteriorNegativeControl\].*interior_solid_samples=[1-9]\d* "
r"detected=true status=PASS$", output, re.M)) == 2,
"passage interior audit summary": bool(re.search(
r"^\[PassageInteriorCapsuleAuditSummary\].*status=PASS$", output, re.M)),
"passage shell audits": len(SHELL_RE.findall(output)) == 2,
"passage ripple audits": len(re.findall(
r"^\[PassageRippleAudit\].*status=PASS$", output, re.M)) == 2,
"masked ripple sampling controls": len(re.findall(
r"^\[PassageRippleSamplingControl\].*status=PASS$", output, re.M)) == 2,
"passage shell summary": bool(re.search(
r"^\[PassageShellAuditSummary\].*status=PASS$", output, re.M)),
"liminal walk audit": bool(re.search(
r"^\[LiminalLayerWalkAudit\].*status=PASS$", output, re.M)),
"liminal negative control":
"[LiminalLayerNegativeControl] altered_departure_rejected=true status=PASS" in output,
"passage summary": bool(re.search(
r"^\[ResolvedPassageAuditSummary\].*status=PASS$", output, re.M)),
"seam audit": bool(re.search(
r"^\[PassageTileSeamAudit\].*status=PASS$", output, re.M)),
}
failed = [name for name, passed in checks.items() if not passed]
if failed:
raise RuntimeError(
f"seed={seed} compiler={compiler} workers={workers} failed checks: "
+ ", ".join(failed))
def run_audit(seed: int, compiler: str, workers: int, *, audit: bool = True) -> dict:
binary = OUT / "fast/bin" / f"VoxelForgeCoreHeadless-fast-{compiler}"
if not binary.is_file():
raise RuntimeError(f"missing binary: {binary}")
expected_stamp = current_stamp()
probe = subprocess.run([str(binary), "--print-source-stamp"], cwd=ROOT,
capture_output=True, text=True, timeout=15, check=False)
if probe.returncode != 0 or first_stamp(probe.stdout) != expected_stamp:
raise RuntimeError(f"stale executable: {binary}")
tag = f"seed{seed:02d}-{compiler}-w{workers}"
log = OUT / "logs" / f"audit-{tag}.log"
manifest = OUT / "manifests" / f"audit-{tag}.json"
layout = OUT / "layouts" / f"audit-{tag}.json"
manifest.parent.mkdir(parents=True, exist_ok=True)
layout.parent.mkdir(parents=True, exist_ok=True)
command = [str(binary), str(FIXTURE), f"--workers={workers}",
"--world-assembler-prototype", "--stream-benchmark", "--stream-pipeline",
"--force-generate", "--clip-radius=1", "--max-clip-level=0", "--max-level=0",
"--render-distance-chunks=0", "--camera=0,0,-540,0,0", f"--seed={seed}",
f"--world-assembler-manifest-output={manifest}",
f"--resolved-layout-output={layout}"]
if audit:
command.extend(AUDIT_FLAGS)
env = os.environ.copy()
env["VOXELFORGE_VERIFY_OUT"] = str(OUT)
env["VOXELFORGE_OWNER_DATA"] = str(ROOT / "Standalone/data/owner_world.json")
env["LP_NUM_THREADS"] = "12"
env["XDG_CACHE_HOME"] = str(OUT / "xdg-cache")
started = time.monotonic()
with log.open("w", encoding="utf-8") as stream:
result = subprocess.run([*LIMIT, "timeout", "1740s", *command],
cwd=ROOT, env=env, stdout=stream, stderr=subprocess.STDOUT,
timeout=1745, check=False)
output = log.read_text(encoding="utf-8", errors="replace")
if result.returncode != 0:
raise RuntimeError(f"{tag} exit={result.returncode}; see {log}")
if first_stamp(output) != expected_stamp or current_stamp() != expected_stamp:
raise RuntimeError(f"{tag} source stamp changed during run; see {log}")
if audit:
validate_audit(output, seed, compiler, workers)
if not manifest.is_file() or not layout.is_file():
raise RuntimeError(f"{tag} omitted canonical manifest or layout")
manifest_value = json.loads(manifest.read_text(encoding="utf-8"))
layout_value = json.loads(layout.read_text(encoding="utf-8"))
identity = {
"seed": seed,
"variant": VARIANTS[seed % len(VARIANTS)],
"compiler": compiler,
"workers": workers,
"manifest_hash": manifest_value["content_hash"],
"resolved_layout_identity": layout_value["stable_identity"],
"log": str(log.relative_to(ROOT)),
"elapsed_s": round(time.monotonic() - started, 3),
"audited": audit,
}
print(f"[L146AuditRun] seed={seed} variant={identity['variant']} compiler={compiler} "
f"workers={workers} manifest={identity['manifest_hash']} "
f"layout={identity['resolved_layout_identity']} "
f"elapsed_s={identity['elapsed_s']:.3f} status=PASS", flush=True)
return identity
def main() -> int:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--seeds", default="0-31", type=parse_seeds,
help="audit seeds, e.g. 0-31 or 0,1,2,3")
parser.add_argument("--determinism", action="store_true",
help="also compare seed 0 on Clang/GCC at W1/W8/W12")
parser.add_argument("--only-determinism", action="store_true",
help="run only the Clang/GCC seed-0 W1/W8/W12 identity matrix")
args = parser.parse_args()
if not FIXTURE.is_file():
raise SystemExit(f"missing fixture: {FIXTURE}; build the L145 liminal fixture first")
records = []
if not args.only_determinism:
for seed in args.seeds:
records.append(run_audit(seed, "clang", 1))
if args.determinism or args.only_determinism:
matrix = [run_audit(0, compiler, workers)
for compiler in ("clang", "gcc") for workers in (1, 8, 12)]
identities = {(row["manifest_hash"], row["resolved_layout_identity"])
for row in matrix}
if len(identities) != 1:
raise RuntimeError(f"Clang/GCC W1/W8/W12 identity mismatch: {matrix}")
records.extend(matrix)
summary = {
"audit_seeds": args.seeds if not args.only_determinism else [],
"variant_counts": {
name: sum(1 for seed in args.seeds if seed % len(VARIANTS) == index)
for index, name in enumerate(VARIANTS)
} if not args.only_determinism else {},
"records": records,
"determinism_pass": bool(args.determinism or args.only_determinism),
"status": "PASS",
}
summary_path = OUT / "l146-audit-matrix-summary.json"
summary_path.parent.mkdir(parents=True, exist_ok=True)
summary_path.write_text(json.dumps(summary, indent=2) + "\n", encoding="utf-8")
print(f"[L146AuditMatrix] records={len(records)} summary={summary_path} status=PASS",
flush=True)
return 0
if __name__ == "__main__":
try:
raise SystemExit(main())
except Exception as error:
print(f"[L146AuditMatrix] status=FAIL error={error}", file=sys.stderr, flush=True)
raise SystemExit(1)
+57 -6
View File
@@ -2828,6 +2828,7 @@ namespace StandaloneStreamBenchmark
struct FWalkAudit
{
std::uint64_t segments=0,centers=0,capsuleSamples=0,blocked=0;
std::uint64_t passageInteriorCapsuleSamples=0,passageInteriorSolidSamples=0;
std::uint64_t supportSamples=0,unsupported=0,gradeFailures=0;
std::uint64_t supportOverlapSkips=0;
std::array<std::array<double,4>,8> firstBlocked{};
@@ -2841,7 +2842,8 @@ namespace StandaloneStreamBenchmark
double supportStartMetres,double supportStepMetres,
double supportMaximumMetres,std::uint32_t minimumSupportProbes,
double supportProbeRadiusMetres,
const std::function<bool(double,double,double)>& supportExemption={})
const std::function<bool(double,double,double)>& supportExemption={},
const std::function<bool(double,double,double)>& passageInteriorPredicate={})
{
FWalkAudit audit;
if(path.size()<2)return audit;
@@ -2854,10 +2856,14 @@ namespace StandaloneStreamBenchmark
const auto solidAt=[&](double xMetres,double yMetres,double zMetres)
{
++audit.capsuleSamples;
const bool inPassageInterior=passageInteriorPredicate
&&passageInteriorPredicate(xMetres,yMetres,zMetres);
if(inPassageInterior)++audit.passageInteriorCapsuleSamples;
const VoxelForgeCore::Vec3d position{xMetres/coreMetres,yMetres/coreMetres,zMetres/coreMetres};
const float density=Field.densityAt(position);
if(density<0.0f)
{
if(inPassageInterior)++audit.passageInteriorSolidSamples;
if(audit.firstBlockedCount<audit.firstBlocked.size())
{
audit.firstBlocked[audit.firstBlockedCount++]={xMetres,yMetres,zMetres,density};
@@ -3544,7 +3550,8 @@ namespace StandaloneStreamBenchmark
}
const auto passageInteriorWinsAt=[&](double xMetres,double yMetres,
double zMetres,std::size_t ignoredPassage=std::numeric_limits<std::size_t>::max(),
std::size_t ignoredSegment=std::numeric_limits<std::size_t>::max())
std::size_t ignoredSegment=std::numeric_limits<std::size_t>::max(),
std::size_t selectedPassage=std::numeric_limits<std::size_t>::max())
{
constexpr double CornerBlendMetres=0.50;
constexpr double WallReliefMetres=0.21;
@@ -3558,6 +3565,8 @@ namespace StandaloneStreamBenchmark
for(std::size_t passageIndex=0;
passageIndex<ResolvedLayout->passages.size();++passageIndex)
{
if(selectedPassage!=std::numeric_limits<std::size_t>::max()
&&passageIndex!=selectedPassage)continue;
const auto& passage=ResolvedLayout->passages[passageIndex];
if(passage.controlPoints.size()<2)continue;
const auto& route=allPassageSmoothRoutes[passageIndex];
@@ -4857,6 +4866,8 @@ namespace StandaloneStreamBenchmark
&&zUm<stratum->content.topMicrometres;
};
std::uint64_t passageCount=0,passagePasses=0,blockedControls=0,naturalPasses=0;
std::uint64_t passageInteriorCapsuleSamples=0,passageInteriorSolidSamples=0;
std::uint64_t passageInteriorControls=0;
std::uint64_t mouthProfilePasses=0,ripplePasses=0,rippleControlsDetected=0;
std::uint64_t floorRippleControlsDetected=0,floorStepRippleControlsDetected=0;
std::uint64_t shellAudits=0,shellFloorSamples=0,shellFloorViolations=0;
@@ -4880,8 +4891,18 @@ namespace StandaloneStreamBenchmark
const std::function<bool(double,double,double)> passageSupportExemption=
[&](double x,double y,double z)
{return passageInteriorWinsAt(x,y,z-0.25);};
const std::function<bool(double,double,double)> passageInteriorPredicate=
[&](double x,double y,double z)
{return passageInteriorWinsAt(x,y,z,
std::numeric_limits<std::size_t>::max(),
std::numeric_limits<std::size_t>::max(),passageIndex);};
const FWalkAudit passageAudit=auditPlayerPath(Shape,path,0.375,0.125,
1.125,3,0.45,passageSupportExemption);
1.125,3,0.45,passageSupportExemption,passageInteriorPredicate);
const bool passageInteriorAirPassed=
passageAudit.passageInteriorCapsuleSamples>0
&&passageAudit.passageInteriorSolidSamples==0;
passageInteriorCapsuleSamples+=passageAudit.passageInteriorCapsuleSamples;
passageInteriorSolidSamples+=passageAudit.passageInteriorSolidSamples;
const FPassageNaturalnessAudit naturalAudit=
auditPassageNaturalness(Shape,passageIndex);
const auto lowerProfileStratum=std::find_if(ResolvedLayout->strates.begin(),
@@ -4940,13 +4961,17 @@ namespace StandaloneStreamBenchmark
rippleControlsDetected+=rippleAudit.controlDetected;
floorRippleControlsDetected+=rippleAudit.floorControlDetected;
floorStepRippleControlsDetected+=rippleAudit.floorStepControlDetected;
passagePasses+=passageAudit.passed&&mouthsInRadius&&mouthsInContent
passagePasses+=passageAudit.passed&&passageInteriorAirPassed
&&mouthsInRadius&&mouthsInContent
&&naturalAudit.passed&&mouthProfileAudit.passed&&rippleAudit.passed;
std::printf("[ResolvedPassageAudit] id=%s interface=%d-%d control_points=%zu center_samples=%llu capsule_samples=%llu blocked=%llu support_samples=%llu support_overlap_skips=%llu unsupported=%llu grade_failures=%llu mouth_content=%d/2 mouth_radius=%d/2 walkability=%s\n",
std::printf("[ResolvedPassageAudit] id=%s interface=%d-%d control_points=%zu center_samples=%llu capsule_samples=%llu blocked=%llu passage_interior_capsule_samples=%llu passage_interior_solid_samples=%llu interior_air=%s support_samples=%llu support_overlap_skips=%llu unsupported=%llu grade_failures=%llu mouth_content=%d/2 mouth_radius=%d/2 walkability=%s\n",
passage.stableId.c_str(),passage.upperStrateIndex,passage.lowerStrateIndex,
passage.controlPoints.size(),static_cast<unsigned long long>(passageAudit.centers),
static_cast<unsigned long long>(passageAudit.capsuleSamples),
static_cast<unsigned long long>(passageAudit.blocked),
static_cast<unsigned long long>(passageAudit.passageInteriorCapsuleSamples),
static_cast<unsigned long long>(passageAudit.passageInteriorSolidSamples),
passageInteriorAirPassed?"PASS":"FAIL",
static_cast<unsigned long long>(passageAudit.supportSamples),
static_cast<unsigned long long>(passageAudit.supportOverlapSkips),
static_cast<unsigned long long>(passageAudit.unsupported),
@@ -5239,13 +5264,38 @@ namespace StandaloneStreamBenchmark
path.push_back({point.x/coreMetres,point.y/coreMetres,
playerZ/coreMetres});
}
const std::function<bool(double,double,double)> passageInteriorPredicate=
[&](double x,double y,double z)
{return passageInteriorWinsAt(x,y,z,
std::numeric_limits<std::size_t>::max(),
std::numeric_limits<std::size_t>::max(),passageIndex);};
const FWalkAudit blockedAudit=auditPlayerPath(blockedWorld,path,
0.125,0.125,0.25,3,0.45);
0.125,0.125,0.25,3,0.45,{},passageInteriorPredicate);
blockedControls+=blockedAudit.blocked>0&&!blockedAudit.passed;
const bool passageInteriorControlDetected=
blockedAudit.passageInteriorCapsuleSamples>0
&&blockedAudit.passageInteriorSolidSamples>0;
passageInteriorControls+=passageInteriorControlDetected;
std::printf("[ResolvedPassageBlockedControl] id=%s blocked_capsule_samples=%llu detected=%s\n",
passage.stableId.c_str(),static_cast<unsigned long long>(blockedAudit.blocked),
blockedAudit.blocked>0&&!blockedAudit.passed?"true":"false");
std::printf("[ResolvedPassageInteriorNegativeControl] id=%s passage_interior_capsule_samples=%llu interior_solid_samples=%llu detected=%s status=%s\n",
passage.stableId.c_str(),
static_cast<unsigned long long>(blockedAudit.passageInteriorCapsuleSamples),
static_cast<unsigned long long>(blockedAudit.passageInteriorSolidSamples),
passageInteriorControlDetected?"true":"false",
passageInteriorControlDetected?"PASS":"FAIL");
}
const bool passageInteriorAuditPassed=passageCount>0
&&passageInteriorCapsuleSamples>0&&passageInteriorSolidSamples==0
&&passageInteriorControls==passageCount;
std::printf("[PassageInteriorCapsuleAuditSummary] interfaces=%llu capsule_samples=%llu solid_samples=%llu negative_controls=%llu/%llu status=%s\n",
static_cast<unsigned long long>(passageCount),
static_cast<unsigned long long>(passageInteriorCapsuleSamples),
static_cast<unsigned long long>(passageInteriorSolidSamples),
static_cast<unsigned long long>(passageInteriorControls),
static_cast<unsigned long long>(passageCount),
passageInteriorAuditPassed?"PASS":"FAIL");
const bool shellAuditPassed=shellAudits==passageCount
&&shellFloorViolations==0&&shellWallViolations==0
&&shellInteriorViolations==0&&shellOpenAirSamples>0;
@@ -5285,6 +5335,7 @@ namespace StandaloneStreamBenchmark
floorStepRippleControlsDetected==passageCount?"DETECTED":"MISSED",
ripplePasses==passageCount?"PASS":"FAIL");
const bool auditPassed=passageCount>0&&passagePasses==passageCount
&&passageInteriorAuditPassed
&&naturalPasses==passageCount&&l23SmoothWallDetected
&&mouthProfilePasses==passageCount&&l23TerraceControlDetected
&&ripplePasses==passageCount