wip: L174 Design50 steps 0-2 in progress (interrupted for a power cut)
Audits collect gates and run seams (landing discs + end runs, LOD0/1), tagged uncapped failures, separate exempt counts, self-overlap census; level end runs; overlap/turn constraints. Partial sweep: end runs pass 3/3 per seed; 1-2 end-turn violations per seed; 50-110k tagged seam mismatches per seed (real vs audit artefact not yet decided). Not verified; resume L174. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016dhxM43dnWvUu2B5Ph1iG1
This commit is contained in:
1 parent
b09728354d
commit
dee53c8d2a
9 files changed
+2155
-257
No files matched your search
@@ -0,0 +1,104 @@
|
||||
# Design50 — why the tunnel landings fail, and the plan (review 2026-11-03)
|
||||
|
||||
A read-only review (Claude Opus 5.5, extra-high effort) of `wip/combined-cave` (b097283), with the L133–L173 history and
|
||||
the L173 logs. The orchestrator verified R6 and R7a in the code.
|
||||
|
||||
**Headline:** one wrong assumption, that a tunnel end is a separate 2-D "landing chamber" owned by the tube, the layer
|
||||
and the audits at once. The plan replaces it with a level end run of the same spline plus the Design49 stamp,
|
||||
applied last.
|
||||
|
||||
## Root causes
|
||||
|
||||
- **R1:** the chamber plane and the tube's 1-D h(s) disagree off the centreline (up to 1.3 m at the 7.5 m rim on FI).
|
||||
- **R2:** the departure tube descends from the disc centre and undercuts its own landing. Unsupported samples: upper
|
||||
chambers 316, lower 0 (L173); L159 upper pads 96/96 failing, lower 2/96.
|
||||
- **R3:** the passage composer overrides the host:
|
||||
- a forced-solid chamber floor slab (`ShapeWorldInternal.h` ~1665);
|
||||
- shell walls filled over host air (~1869–1898);
|
||||
- per-layer corridor exemptions only (Surface World, planned tunnels);
|
||||
- the liminal route stamp re-applied after the carve (~1997, the L146 refill).
|
||||
- **R4:** planner self-overlap. The FI helix pitch (3.2–3.9 m) is less than the bore height (~5.8 m), with 2,738
|
||||
overlapping control-point pairs. Upper and lower mouths share XY, so 32/32 final junctions turn 107–178°
|
||||
(curl-back).
|
||||
- **R5:** the passage picks the landing height, not the layer. FI departures land inside the FI→TN transition band.
|
||||
- **R6 (bug, verified):** `floorProfileIncludesLandingChambers` (set for every passage) makes
|
||||
`PassageFlatFloorCenterZSubvoxels` return early, skipping both blends.
|
||||
- **R7 (audits):**
|
||||
- (a) **verified:** the composed audit returns 10 before the seam audit, so seams were never measured;
|
||||
- (b) audits re-model chambers (L159's interior-air 0/16 was a phantom);
|
||||
- (c) exempt probes count as supported; zero-coverage gates pass;
|
||||
- (d) only 8 failures are printed;
|
||||
- (e) the TN and VS sweeps are the same 4-strata world.
|
||||
|
||||
## Model
|
||||
|
||||
1. **One spline, one floor:** h(s) is level and straight for the first and last a ≥ R+1 m.
|
||||
2. **The landing = the end run:** a flat disc radius R at P = h(end); the descent starts outside the disc.
|
||||
3. **One composition order:** layer content (including liminal decks) → bore carve (air only, plus a floor shell under
|
||||
the bore where the host is air) → Design49 clamp stamp last, masked by the bore → edits. No walls or roofs over
|
||||
host air; no corridor exemptions.
|
||||
4. **Who sets P:** fixed-ground layers (SW, FI, liminal) propose the site and P; for carved layers (TN, VS) the passage
|
||||
picks P and the cave planner connects.
|
||||
|
||||
**Keep:**
|
||||
- the spline, h(s) and the grade audit;
|
||||
- the interior-air gate;
|
||||
- cave binding to the end anchors;
|
||||
- the L148 envelope, the L156 band fit and the L130 bounds;
|
||||
- `l159-pad-stamp.patch` (stamp, bounds, LandingPadAudit plus 4 controls).
|
||||
|
||||
**Delete:**
|
||||
- the chamber records and their composition, and the slab return;
|
||||
- the corridor exemptions and the shell-over-air fills;
|
||||
- the flag and both floor blends;
|
||||
- the SW plane fit;
|
||||
- the chamber audits.
|
||||
|
||||
## Steps
|
||||
|
||||
- **0:** audits that measure:
|
||||
- collect gates, exit at the end;
|
||||
- seams over discs and end runs at LOD0/1;
|
||||
- tagged failing samples, with no 8-sample cap;
|
||||
- exempt probes counted separately, with a coverage minimum;
|
||||
- a self-overlap census;
|
||||
- Core-exported predicates.
|
||||
- **1:** level end runs.
|
||||
- **2:** no self-overlap or hairpins:
|
||||
- pitch ≥ bore height + 2 shells + margin;
|
||||
- lower mouth on the ring;
|
||||
- end turns ≤ 60°;
|
||||
- the helix kept out of the landing columns.
|
||||
- **3:** the composer and the audits together, with the stamp last.
|
||||
- **4:** site selection for fixed-ground layers.
|
||||
- **5:** verify (fast tier; TN/VS/native-FI sweeps 16/16; versioned hashes; Clang/GCC W1/W8/W12; captures).
|
||||
|
||||
**Owner look decisions:**
|
||||
- the disc radius, the end-run length, the cone angle (12°) and reach (8 m);
|
||||
- no walls on open-air landings;
|
||||
- headroom underground;
|
||||
- whether a FI landing may float or must sit on an island;
|
||||
- wider spirals (~6 m or more);
|
||||
- landings may move.
|
||||
|
||||
## Owner decisions (2026-11-03)
|
||||
|
||||
- Open-air landings: **no walls**.
|
||||
- Floating Islands landings: **add a landing island to the FI plan** at each tunnel end: top at P, footprint wider
|
||||
than the pad, normal island shaping at the edges. It's planned from the seed before generation, and the FI route
|
||||
connects to it. (Not pathfinding the tunnel to an existing island.)
|
||||
|
||||
## Owner decision: uniform layer planners (2026-11-03)
|
||||
|
||||
- **Planning side: a `LayerPlanner` parent with one child per layer type:**
|
||||
- `Plan(seed, settings)`;
|
||||
- `OnTunnelArrival(end)`, the landing hook: nothing (stamp only), a plan record (FI landing island, liminal walkway,
|
||||
cave connection), or a content request for Unreal;
|
||||
- `ProvideRouteAnchors()`;
|
||||
- `MakeDrawer()`.
|
||||
|
||||
Planning runs once per world, so virtual dispatch costs nothing there.
|
||||
- **Drawing side:** keep the `std::variant` adapters with a shared `densityAt` shape (no virtual call per sample;
|
||||
`ShapeWorldInternal.h` ~121), and choose the drawer once per tile.
|
||||
- **Migration:** one planner at a time; owner canonical hashes identical after each move (refactor only); the landing
|
||||
hook then implements step 4.
|
||||
@@ -0,0 +1,225 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Capture composed passage, route, shell, and seam attribution for seeds 0..15."""
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[4]
|
||||
DEFAULT_BIN = ROOT / "Standalone/bin/linux/VoxelForgeCoreHeadless-l174-step0-clang"
|
||||
DATA = ROOT / "Standalone/data/owner_world.json"
|
||||
STAMP_TOOL = ROOT / "Standalone/Tools/verify/source_stamp.py"
|
||||
STAMP_RE = re.compile(r"^\[VoxelForgeSourceStamp\] sha256=([0-9a-f]+)$", re.M)
|
||||
|
||||
GATES = {
|
||||
"passages": r"^\[ResolvedPassageAuditSummary\].*status=PASS$",
|
||||
"seams": r"^\[PassageTileSeamAudit\].*status=PASS$",
|
||||
"shell": r"^\[PassageShellAuditSummary\].*status=PASS$",
|
||||
"naturalness": r"^\[PassageNaturalnessSummary\].*status=PASS$",
|
||||
"mouth_profile": r"^\[PassageMouthProfileSummary\].*status=PASS$",
|
||||
"ripple": r"^\[PassageRippleAuditSummary\].*status=PASS$",
|
||||
"passage_interior": r"^\[PassageInteriorCapsuleAuditSummary\].*status=PASS$",
|
||||
"self_overlap": r"^\[PassageTubeSelfOverlapAuditSummary\].*status=PASS$",
|
||||
}
|
||||
|
||||
|
||||
def evaluate(content: str, expected_stamp: str, layout_path: Path,
|
||||
require_end_runs: bool = False) -> tuple[dict, dict, str | None]:
|
||||
stamp = STAMP_RE.search(content)
|
||||
checks = {name: re.search(pattern, content, re.M) is not None
|
||||
for name, pattern in GATES.items()}
|
||||
if require_end_runs:
|
||||
checks["end_runs"] = re.search(
|
||||
r"^\[PassageEndRunAuditSummary\].*status=PASS$", content, re.M) is not None
|
||||
checks["source_stamp"] = stamp is not None and stamp.group(1) == expected_stamp
|
||||
for kind, strate in (("tunnel_network", 2), ("vertical_shafts", 3)):
|
||||
route = re.compile(
|
||||
rf"^\[ResolvedStrateRouteAudit\] strate={strate} .*unsupported=0 "
|
||||
rf"grade_failures=0 .*status=PASS$", re.M)
|
||||
checks[f"{kind}_route"] = route.search(content) is not None
|
||||
checks[f"{kind}_blocked_route_control"] = re.search(
|
||||
rf"^\[{kind.title().replace('_', '')}BlockedRouteControl\].*"
|
||||
r"expected=FAIL status=PASS$", content, re.M) is not None
|
||||
checks["passage_count"] = len(re.findall(
|
||||
r"^\[ResolvedPassageAudit\] .*walkability=PASS$", content, re.M)) == 3
|
||||
checks["negative_controls"] = (
|
||||
len(re.findall(r"^\[ResolvedPassageInteriorNegativeControl\].*"
|
||||
r"detected=true status=PASS$", content, re.M)) == 3
|
||||
and len(re.findall(r"^\[ResolvedPassageBlockedControl\].*detected=true$",
|
||||
content, re.M)) == 3
|
||||
)
|
||||
attribution = {
|
||||
"seam_samples_by_tag": {
|
||||
tag: len(re.findall(rf"^\[PassageTileSeamSample\] tag={re.escape(tag)} ",
|
||||
content, re.M))
|
||||
for tag in ("disc", "rim", "end run", "body", "route")
|
||||
},
|
||||
"landing_support_failures_upper": len(re.findall(
|
||||
r"^\[PassageLandingSupportFailure\].*side=upper", content, re.M)),
|
||||
"landing_support_failures_lower": len(re.findall(
|
||||
r"^\[PassageLandingSupportFailure\].*side=lower", content, re.M)),
|
||||
"unsupported_walk_samples": len(re.findall(
|
||||
r"^\[ResolvedWalkDispatch\] kind=unsupported", content, re.M)),
|
||||
"shell_floor_samples": len(re.findall(
|
||||
r"^\[PassageShellAuditSample\]", content, re.M)),
|
||||
"shell_wall_samples": len(re.findall(
|
||||
r"^\[PassageShellAuditSample\].*kind=wall_missing", content, re.M)),
|
||||
"tube_self_overlap_rows": len(re.findall(
|
||||
r"^\[PassageTubeSelfOverlapAudit\]", content, re.M)),
|
||||
"tube_self_overlap_pairs": sum(int(value) for value in re.findall(
|
||||
r"^\[PassageTubeSelfOverlapAudit\].*overlap_pairs=(\d+)",
|
||||
content, re.M)),
|
||||
"tube_end_turn_violations": sum(int(value) for value in re.findall(
|
||||
r"^\[PassageTubeSelfOverlapAudit\].*end_turn_violations=(\d+)",
|
||||
content, re.M)),
|
||||
"tube_landing_column_violations": sum(int(value) for value in re.findall(
|
||||
r"^\[PassageTubeSelfOverlapAudit\].*landing_column_violations=(\d+)",
|
||||
content, re.M)),
|
||||
"end_run_failures": len(re.findall(
|
||||
r"^\[PassageEndRunAudit\].*status=FAIL$", content, re.M)),
|
||||
"end_run_measured": len(re.findall(
|
||||
r"^\[PassageEndRunAudit\].*measured_start_m=(?!0\.000)"
|
||||
r".*measured_end_m=(?!0\.000)", content, re.M)),
|
||||
}
|
||||
seam_summary = re.search(r"^\[PassageTileSeamAudit\].*$", content, re.M)
|
||||
if seam_summary:
|
||||
for key in ("candidates", "examined", "pairs", "lod0_pairs", "lod0_samples",
|
||||
"lod1_pairs", "lod1_samples", "landing_discs", "end_runs",
|
||||
"lod0_disc_samples", "lod1_disc_samples", "lod0_rim_samples",
|
||||
"lod1_rim_samples", "lod0_end_run_samples",
|
||||
"lod1_end_run_samples", "exempt_pairs", "mismatches"):
|
||||
match = re.search(rf"\b{key}=(\d+)", seam_summary.group(0))
|
||||
attribution[f"seam_{key}"] = int(match.group(1)) if match else None
|
||||
for key in ("landing_discs", "end_runs"):
|
||||
match = re.search(rf"\b{key}=(\d+)/(\d+)", seam_summary.group(0))
|
||||
if match:
|
||||
attribution[f"seam_{key}_covered"] = int(match.group(1))
|
||||
attribution[f"seam_{key}_required"] = int(match.group(2))
|
||||
attribution["seam_uncovered_disc_regions"] = len(re.findall(
|
||||
r"^\[PassageTileSeamCoverage\].*\bdisc_status=FAIL\b", content, re.M))
|
||||
attribution["seam_uncovered_end_run_regions"] = len(re.findall(
|
||||
r"^\[PassageTileSeamCoverage\].*\bend_run_status=FAIL\b", content, re.M))
|
||||
attribution["seam_uncovered_regions"] = (
|
||||
attribution["seam_uncovered_disc_regions"]
|
||||
+attribution["seam_uncovered_end_run_regions"])
|
||||
passage_summary = re.search(r"^\[ResolvedPassageAuditSummary\].*$", content, re.M)
|
||||
if passage_summary:
|
||||
for key in ("support_probes", "exempt_support_probes", "unsupported"):
|
||||
match = re.search(rf"\b{key}=(\d+)", passage_summary.group(0))
|
||||
if match:
|
||||
attribution[key] = int(match.group(1))
|
||||
identity = None
|
||||
try:
|
||||
if layout_path.is_file():
|
||||
identity = json.loads(layout_path.read_text(encoding="utf-8")).get(
|
||||
"stable_identity")
|
||||
except (OSError, json.JSONDecodeError):
|
||||
pass
|
||||
checks["layout_output"] = identity is not None
|
||||
return checks, attribution, identity
|
||||
|
||||
|
||||
def main() -> int:
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("--binary", type=Path, default=DEFAULT_BIN)
|
||||
parser.add_argument("--out", type=Path,
|
||||
default=ROOT / "Saved/Linux/l174/rebaseline-l173/seeds")
|
||||
parser.add_argument("--seed-start", type=int, default=0)
|
||||
parser.add_argument("--seed-stop", type=int, default=16,
|
||||
help="exclusive seed bound")
|
||||
parser.add_argument("--expected-stamp", type=str,
|
||||
help="source stamp embedded in an earlier binary")
|
||||
parser.add_argument("--require-end-runs", action="store_true",
|
||||
help="require the L174 end-run audit (use for post-Step-1 sweeps)")
|
||||
parser.add_argument("--no-resume", action="store_true",
|
||||
help="rerun even when both the log and layout already exist")
|
||||
args = parser.parse_args()
|
||||
if not args.binary.is_file() or not DATA.is_file():
|
||||
raise SystemExit(f"missing binary or owner fixture: {args.binary}")
|
||||
args.binary = args.binary.resolve()
|
||||
args.out = args.out.resolve()
|
||||
args.out.mkdir(parents=True, exist_ok=True)
|
||||
stamp = args.expected_stamp or subprocess.check_output(
|
||||
[sys.executable, str(STAMP_TOOL), "stamp", "--root", str(ROOT)], text=True).strip()
|
||||
results = []
|
||||
partial = args.out / "runs-partial.json"
|
||||
for seed in range(args.seed_start, args.seed_stop):
|
||||
log = args.out / f"seed{seed}.log"
|
||||
layout = args.out / f"seed{seed}.layout.json"
|
||||
exit_path = args.out / f"seed{seed}.exit"
|
||||
command = [
|
||||
"taskset", "-c", "0-11", "prlimit", "--as=6442450944", "--",
|
||||
"timeout", "1740s", str(args.binary), str(DATA),
|
||||
"--world-assembler-prototype", "--stream-benchmark", "--stream-pipeline",
|
||||
"--workers=8", "--clip-radius=3", "--max-clip-level=8", "--max-level=0",
|
||||
"--force-generate", f"--seed={seed}", "--recipe=surface-world",
|
||||
"--density-dispatch-report", "--audit-resolved-layout-passages",
|
||||
"--audit-passage-tile-seams", f"--resolved-layout-output={layout}",
|
||||
]
|
||||
started = time.monotonic()
|
||||
resumed = False
|
||||
if not args.no_resume and log.is_file() and layout.is_file():
|
||||
content = log.read_text(encoding="utf-8", errors="replace")
|
||||
if exit_path.is_file():
|
||||
code: int | str = int(exit_path.read_text().strip())
|
||||
elif ("[PipelineExactQueryHash]" in content
|
||||
and "[ResolvedPassageAuditSummary]" in content):
|
||||
code = 10 if re.search(r"^\[[^]]*(?:Summary|Audit)\].*status=FAIL$",
|
||||
content, re.M) else 0
|
||||
else:
|
||||
code = "NO_EXIT_RECORD"
|
||||
resumed = code != "NO_EXIT_RECORD"
|
||||
if not resumed:
|
||||
try:
|
||||
with log.open("w", encoding="utf-8") as output:
|
||||
proc = subprocess.run(command, cwd=ROOT, stdout=output,
|
||||
stderr=subprocess.STDOUT, check=False, timeout=1740)
|
||||
code = proc.returncode
|
||||
except subprocess.TimeoutExpired:
|
||||
code = "OUTER_TIMEOUT"
|
||||
if isinstance(code, int):
|
||||
exit_path.write_text(str(code) + "\n", encoding="utf-8")
|
||||
content = log.read_text(encoding="utf-8", errors="replace") if log.exists() else ""
|
||||
checks, attribution, identity = evaluate(
|
||||
content, stamp, layout, args.require_end_runs)
|
||||
passed = code == 0 and all(checks.values())
|
||||
failed = [name for name, ok in checks.items() if not ok]
|
||||
row = {
|
||||
"seed": seed,
|
||||
"verdict": "PASS" if passed else "FAIL",
|
||||
"exit": code,
|
||||
"failed_gates": failed,
|
||||
"checks": checks,
|
||||
"attribution": attribution,
|
||||
"source_stamp": stamp,
|
||||
"layout_identity": identity,
|
||||
"elapsed_s": round(time.monotonic() - started, 3),
|
||||
"log": str(log.relative_to(ROOT)),
|
||||
"layout": str(layout.relative_to(ROOT)),
|
||||
"resumed": resumed,
|
||||
}
|
||||
results.append(row)
|
||||
partial.write_text(json.dumps(results, indent=2) + "\n", encoding="utf-8")
|
||||
print("[L174CaveSeedSweep] " + json.dumps(row, sort_keys=True), flush=True)
|
||||
summary = {
|
||||
"source_stamp": stamp,
|
||||
"seeds": list(range(args.seed_start, args.seed_stop)),
|
||||
"passed": sum(row["verdict"] == "PASS" for row in results),
|
||||
"failed": sum(row["verdict"] != "PASS" for row in results),
|
||||
"results": results,
|
||||
}
|
||||
(args.out / "summary.json").write_text(
|
||||
json.dumps(summary, indent=2) + "\n", encoding="utf-8")
|
||||
print(f"[L174CaveSeedSweepSummary] passed={summary['passed']}/{len(results)} "
|
||||
f"failed={summary['failed']}", flush=True)
|
||||
return 0 if summary["failed"] == 0 else 1
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in new issue
Block a user