fix(core): smooth tunnel entrance floor; verifier keeps baselines out of /tmp (L47); research R14

The demo tunnel's hard floor cap used a vertical Z - floorZ on a sloped Bezier floor, which is not a signed
distance, so marching cubes produced a staircase through the first 7 m (40-51 mm ripple, 82 mm steps). The
cap now uses the grade-normalised signed distance with a floor-adjacent bore re-application fading over the
entrance; mesh tile Z bounds include cavern bounds. New three-rail entrance audit: L46 fails, L47 passes.
verify: the cost baseline exports only build inputs into Saved/Linux/<out>/baseline-<commit> and removes it;
/tmp unchanged after a full tier. Demo off: owner hashes identical to L46. fast/medium/full PASS.
Known: sawtooth at the tunnel wall foot (next round). Research R14: Windows/MSVC readiness review.

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-24 12:54:39 +02:00
1 parent e016f6a20f
commit c091e4434f
13 files changed
+839 -27

No files matched your search

+27 -11
View File
@@ -3,6 +3,7 @@
from __future__ import annotations
import argparse
import atexit
import hashlib
import json
import math
@@ -22,6 +23,7 @@ import zlib
ROOT = Path(__file__).resolve().parents[3]
VERIFY_DIR = ROOT / "Standalone/Tools/verify"
LINUX37 = ROOT / "Standalone/Research/WorldAssemblerM3/Linux37"
LINUX47 = ROOT / "Standalone/Research/WorldAssemblerM3/Linux47"
OWNER = ROOT / "Standalone/data/owner_world.json"
OUT_DEFAULT = ROOT / "Saved/Linux/l42"
@@ -221,6 +223,16 @@ def run_landmark_reachability(runner: VerificationRunner,
runner.require(f"{name}:continuous-tunnel-ripple",
all_match(output, r"^\[CavernTunnelRipple\] layout=L46 .*floor_limit_m=0\.015 .*wall_limit_m=0\.035 status=PASS$"),
"floor and wall ripple remain below L36/L35 limits")
entrance_floor = re.search(
r"^\[CavernEntranceFloorAudit\] layout=L46 samples=(\d+) "
r"distance_m=0\.000\.\.10\.000 rails=3 max_step_m=([0-9.]+) "
r"step_limit_m=0\.050 ripple_peak_m=([0-9.]+) "
r"ripple_limit_m=0\.015 status=PASS$", output, re.M)
runner.require(f"{name}:entrance-floor-ripple-and-steps",
bool(entrance_floor and int(entrance_floor.group(1)) >= 150
and float(entrance_floor.group(2)) <= 0.05
and float(entrance_floor.group(3)) <= 0.015),
"three floor rails cover the first 10 m from the entrance; step<=0.05 m and ripple<=0.015 m")
runner.require(f"{name}:buried-l43-control",
all_match(output, r"^\[LandmarkReachabilityControl\] layout=L43-buried .*"
r"result=FAIL expected=FAIL status=PASS$"),
@@ -356,13 +368,13 @@ def run_hash_pairs(runner: VerificationRunner,
runner.require(f"{name}:hash-count", len(values) == 12,
f"hashes={len(values)}/12")
same = hashes[1] == hashes[12]
baseline = ROOT / "Saved/Linux/l37" / f"determinism-l25-clang-{recipe}-w12.log"
baseline = ROOT / "Saved/Linux/l46" / f"owner-hash-{recipe}-style{style}-w12.log"
old_hashes = tuple(HASH_RE.findall(baseline.read_text(encoding="utf-8", errors="replace")))
same_l37 = hashes[12] == old_hashes and len(old_hashes) == 12
same_l46 = hashes[12] == old_hashes and len(old_hashes) == 12
runner.require(f"owner-hash-{recipe}-w1-w12", same,
"W1 and W12 each produced identical 12-hash signatures")
runner.require(f"owner-hash-{recipe}-matches-l37", same_l37,
f"current owner hashes match {baseline.name}; hashes={len(old_hashes)}")
runner.require(f"owner-hash-{recipe}-matches-l46", same_l46,
f"demo-off owner hashes match L46 {baseline.name}; hashes={len(old_hashes)}")
class _SplitMix64:
@@ -695,15 +707,16 @@ def run_captures_and_mesh_audits(runner: VerificationRunner) -> None:
script_inputs=[overview_script, VERIFY_DIR / "capture_quality.py",
OUT / "owner-fi-ground-mouth.vfmesh"])
landmark_script = ROOT / "Standalone/Research/WorldAssemblerM3/Linux46/CaptureLandmarkL46.py"
landmark_script = LINUX47 / "CaptureLandmarkL47.py"
landmark_layout = OUT / "layouts" / "landmark-reachability-clang.json"
runner.run_stage("capture-landmark-l46", landmark_script,
runner.run_stage("capture-landmark-l47", landmark_script,
["--layout", str(landmark_layout), "--artifact-dir", str(OUT),
"--capture-dir", str(ROOT / "Standalone/Research/WorldAssemblerM3/Linux46/captures"),
"--capture-dir", str(LINUX47 / "captures"),
"--data", str(OWNER)],
binary=CLANG, data=OWNER, recipe="surface-world", style=1,
layout_path=landmark_layout, env=env_for(capture=True),
script_inputs=[landmark_script, VERIFY_DIR / "capture_quality.py",
script_inputs=[landmark_script, LINUX47 / "MeasureEntranceL47.py",
VERIFY_DIR / "capture_quality.py",
LINUX37 / "AuditMouthShapeL37.py",
ROOT / "Standalone/Research/WorldAssemblerM3/Linux32/AuditRingTerraceL32.py"])
@@ -777,16 +790,18 @@ def prepare_cost_baseline(runner: VerificationRunner) -> tuple[Path, str]:
baseline_commit = resolved.stdout.strip()
if not re.fullmatch(r"[0-9a-f]{40,64}", baseline_commit):
raise VerificationFailure(f"git returned an invalid baseline commit: {baseline_commit!r}")
temp = Path(f"/tmp/voxelforge-cost-baseline-{baseline_commit[:12]}")
temp = OUT / f"baseline-{baseline_commit}"
if temp.exists():
shutil.rmtree(temp)
temp.mkdir(parents=True)
atexit.register(shutil.rmtree, temp, ignore_errors=True)
tarball = temp / "baseline.tar"
archive = bounded_run(["git", "archive", "-o", str(tarball),
baseline_commit, "Standalone"], timeout=120)
baseline_commit, "Standalone/Core", "Standalone/Source",
"Standalone/Compat"], timeout=120)
if archive is None or archive.returncode != 0 or not tarball.is_file():
raise VerificationFailure(
f"could not export Standalone from cost baseline commit {baseline_commit}")
f"could not export build inputs from cost baseline commit {baseline_commit}")
extract = bounded_run(["tar", "-xf", str(tarball), "-C", str(temp)], timeout=120)
if extract is None or extract.returncode != 0:
raise VerificationFailure("cost baseline source extraction failed")
@@ -794,6 +809,7 @@ def prepare_cost_baseline(runner: VerificationRunner) -> tuple[Path, str]:
base = temp / "Standalone"
(base / "Tools/verify").mkdir(parents=True, exist_ok=True)
shutil.copy2(ROOT / "Standalone/Build.ps1", base / "Build.ps1")
shutil.copy2(ROOT / "Standalone/BuildLinux.sh", base / "BuildLinux.sh")
shutil.copy2(VERIFY_DIR / "source_stamp.py", base / "Tools/verify/source_stamp.py")
shutil.copy2(ROOT / "Standalone/Source/SourceStamp.h", base / "Source/SourceStamp.h")