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:
1 parent
a7a03d42b4
commit
8805291d3e
9 files changed
+937
-11
No files matched your search
@@ -0,0 +1,57 @@
|
||||
# Linux 91 — passage source floor
|
||||
|
||||
## Acceptance bar declared before measurement
|
||||
|
||||
For every owner stratum and LOD0–2: zero density sign flips, maximum edge-interpolated surface displacement ≤1 cm, maximum paired mesh-vertex normal-angle change ≤2°, and all passage audits passing. Capture and inspect moved surfaces. Measure source-field gradients at surface crossings. Apply any candidate floor only to the source passed into passage composition, preserving other field features.
|
||||
|
||||
## Result
|
||||
|
||||
**No tested floor is acceptable; stop before the census and prototype.** The comparison clamped only the passage-composition source. Each floor changed samples and meshes, so this is not a no-op. Each stratum covered its full desired near set at LOD0–2: S0 1,408 tiles (512/448/448); FI 1,216 (512/448/256); TN 1,344 (512/448/384); S3 1,344 (512/448/384). There were 174,736,448 total density samples per floor across the four strata.
|
||||
|
||||
The 0.25 m core voxel makes the proposed reach `c·Q + 0.24 m`: c=2/3/4/6 gives 0.74/0.99/1.24/1.74 m. No smallest acceptable c exists.
|
||||
|
||||
| c (vox) | Stratum | Changed samples | Sign flips | Max / mean displacement (cm) | Max normal change (°) | Changed mesh tiles |
|
||||
|---:|:---|---:|---:|---:|---:|---:|
|
||||
| 2 | S0 | 22.17M | 212 | 89.72 / 1.62 | 36.65 | 237 |
|
||||
| 2 | FI | 25.76M | 124 | 91.67 / 1.06 | 84.80 | 155 |
|
||||
| 2 | TN | 16.46M | 124 | 95.01 / 1.54 | 79.33 | 164 |
|
||||
| 2 | S3 | 4.03M | 0 | 185.92 / 9.47 | 116.43 | 198 |
|
||||
| 3 | S0 | 21.98M | 121 | 71.62 / 0.81 | 34.46 | 210 |
|
||||
| 3 | FI | 25.66M | 54 | 72.08 / 0.47 | 80.24 | 147 |
|
||||
| 3 | TN | 16.36M | 54 | 76.92 / 0.67 | 80.24 | 151 |
|
||||
| 3 | S3 | 4.01M | 0 | 180.36 / 6.60 | 118.75 | 189 |
|
||||
| 4 | S0 | 21.79M | 91 | 58.19 / 0.38 | 35.29 | 141 |
|
||||
| 4 | FI | 25.55M | 6 | 59.35 / 0.16 | 82.15 | 107 |
|
||||
| 4 | TN | 16.27M | 6 | 62.94 / 0.24 | 82.15 | 134 |
|
||||
| 4 | S3 | 3.99M | 0 | 175.11 / 4.60 | 120.47 | 189 |
|
||||
| 6 | S0 | 21.40M | 65 | 38.24 / 0.08 | 35.24 | 121 |
|
||||
| 6 | FI | 1.67M | 0 | 43.78 / 0.04 | 81.05 | 101 |
|
||||
| 6 | TN | 2.52M | 0 | 43.78 / 0.05 | 81.05 | 128 |
|
||||
| 6 | S3 | 2.23M | 0 | 165.43 / 1.88 | 120.10 | 180 |
|
||||
|
||||
The route-near moved-crossing classifier tagged wall/floor/mouth changes at every floor. Totals across strata (wall, floor, mouth, other) were: c2 (4,806, 2,527, 7,587, 96,946); c3 (3,547, 2,046, 7,343, 81,736); c4 (2,215, 1,371, 7,252, 70,981); c6 (665, 272, 2,461, 33,139). These region labels use nearest-route-chord heuristics. Normal maxima compare index-paired vertices; normal changes in tiles with incompatible vertex/index pairing were unmeasured (183/151/141/112 tiles for c2/c3/c4/c6).
|
||||
|
||||
The source gradient is near distance-like at the median, but has steep outliers. Central differences use a 1-voxel step at source `|d|≤2` crossings outside the approximate passage region:
|
||||
|
||||
| Stratum | Samples | p50 / p90 / max `|∇d|` (vox/vox) |
|
||||
|:---|---:|---:|
|
||||
| S0 | 7,137 | 1.205 / 1.815 / 4.741 |
|
||||
| FI | 1,929 | 1.001 / 511.674 / 893.726 |
|
||||
| TN | 2,142 | 0.993 / 1.047 / 893.726 |
|
||||
| S3 | 3,079 | 0.932 / 1.036 / 444.254 |
|
||||
|
||||
Thus the distance-field hypothesis holds around the median, not across the measured tails. Even c6 still has 65 sign flips overall, up to 165.43 cm displacement, and up to 120.47° paired normal change. S3 has zero flips at every floor but substantial crossing motion, showing that sign preservation alone does not bound the surface change.
|
||||
|
||||
Matched baseline/c6 captures were generated for all four strata at the audit cameras: [S0](../../../../Saved/Linux/l91/captures/s0-c0.png), [FI](../../../../Saved/Linux/l91/captures/fi-c0.png), [TN](../../../../Saved/Linux/l91/captures/tn-c0.png), [S3](../../../../Saved/Linux/l91/captures/s3-c0.png), with corresponding `*-c6.png` files beside them. The views are qualitative and do not resolve the measured local shifts.
|
||||
|
||||
## Census, prototype, readiness
|
||||
|
||||
The L90 census was not rerun at 2 m or 4 m bricks because no acceptable c was found. The compiled evaluator prototype on `passage/1-2/0` and W8/W12 LOD0–2 timing were not run. Passage walkability audits were not run after the effect gate failed. No production clamp was adopted; its diagnostic floor defaults off and is confined to passage composition. Therefore no version bump, hash repin, or fast-tier/same-world adoption run was made. Same-world peers and cross-compiler equality remain unmeasured for the rejected candidate. Existing production hashes/default behavior were not intentionally changed.
|
||||
|
||||
## Runs and evidence
|
||||
|
||||
- Clang 19 standalone build passed; source stamp: `93fac418c7497299b43bd183625ba2117ec8096b2daeb6ea2f74f0171b348597`.
|
||||
- All four clamp audits covered the expected complete near tile sets, with zero generation failures and invalid comparisons. Their exit code 14 marks the threshold failure, not a crash.
|
||||
- All 16 baseline/c6 export and capture steps passed. No process exceeded 30 minutes. All headless runs used `taskset -c 0-11` and `prlimit --as=6442450944`.
|
||||
- The first standalone build launch failed before compiling because its log directory did not exist; after creating it, the Clang build passed. No Unreal build was run because the clamp failed the effect gate before production integration.
|
||||
- Detailed counts/logs: `Saved/Linux/l91/clamp-effects/`; captures/logs: `Saved/Linux/l91/captures/`; census runner remains unexecuted at `RunL91CandidateCensus.py`.
|
||||
@@ -0,0 +1,182 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Rerun the L90 candidate census at a measured source floor and two brick sizes."""
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import re
|
||||
import subprocess
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[4]
|
||||
OUT = ROOT / "Saved/Linux/l91/candidate-census"
|
||||
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},
|
||||
}
|
||||
FIELDS = re.compile(r"([a-zA-Z0-9_]+)=([^ ]+)")
|
||||
BUILD = re.compile(r"^\[L90PassageCandidateBuild\] (.*)$", re.M)
|
||||
CENSUS = re.compile(r"^\[L90PassageCandidateTile\] (.*)$", re.M)
|
||||
NEAR = re.compile(r"^\[WorldAssemblerNearLODReady\] lods=0-2 tiles=(\d+)/(\d+) cold_ready_s=([0-9.]+)$", re.M)
|
||||
STAMP = re.compile(r"^\[VoxelForgeSourceStamp\] sha256=(\S+)$", re.M)
|
||||
HISTS = ("carve_hist", "tread_hist", "clearance_hist", "mouth_column_hist")
|
||||
SEMANTICS = tuple(name.removesuffix("_hist") for name in HISTS)
|
||||
|
||||
|
||||
def parse_fields(line: str) -> dict[str, str]:
|
||||
return dict(FIELDS.findall(line))
|
||||
|
||||
|
||||
def histogram(value: str) -> list[int]:
|
||||
items = [int(item) for item in value.split(",")]
|
||||
if len(items) != 17:
|
||||
raise ValueError(f"expected 17 histogram bins, got {len(items)}")
|
||||
return items
|
||||
|
||||
|
||||
def percentile(values: list[int], p: float, active: bool = False) -> int:
|
||||
start = 1 if active else 0
|
||||
population = sum(values[start:])
|
||||
target = max(1, int(p * population + 0.999999999))
|
||||
seen = 0
|
||||
for size in range(start, len(values)):
|
||||
seen += values[size]
|
||||
if seen >= target:
|
||||
return size
|
||||
return 16
|
||||
|
||||
|
||||
def run(stratum: str, floor: float, brick: float) -> dict:
|
||||
OUT.mkdir(parents=True, exist_ok=True)
|
||||
spec = STRATA[stratum]
|
||||
reach = floor * 0.25 + 0.24
|
||||
camera = ",".join(f"{value:.12f}" for value in spec["camera"]) + ",0,0"
|
||||
log = OUT / f"{stratum.lower()}-c{floor:g}-b{brick:g}m-w8.log"
|
||||
command = [
|
||||
"taskset", "-c", "0-11", "prlimit", "--as=6442450944", "--", "env",
|
||||
"VOXELFORGE_L90_PASSAGE_CANDIDATE_CENSUS=1",
|
||||
"VOXELFORGE_L81_PASSAGE_BOUND_PADDING_VOXELS=0",
|
||||
f"VOXELFORGE_L91_PASSAGE_SOURCE_FLOOR_VOXELS={floor:g}",
|
||||
f"VOXELFORGE_L90_PASSAGE_REACH_METRES={reach:.6f}",
|
||||
f"VOXELFORGE_L90_PASSAGE_BRICK_METRES={brick:g}",
|
||||
"timeout", "1740s", str(BINARY), str(DATA), "--world-assembler-prototype",
|
||||
"--stream-benchmark", "--stream-pipeline", "--workers=8", "--clip-radius=3",
|
||||
"--max-clip-level=8", "--max-level=8", f"--camera={camera}",
|
||||
"--profile-lod-work", "--profile-passage-composer",
|
||||
]
|
||||
started = time.monotonic()
|
||||
try:
|
||||
with log.open("w", encoding="utf-8") as stream:
|
||||
result = subprocess.run(command, cwd=ROOT, stdout=stream,
|
||||
stderr=subprocess.STDOUT, check=False, timeout=1750)
|
||||
except subprocess.TimeoutExpired:
|
||||
result = None
|
||||
content = log.read_text(encoding="utf-8", errors="replace")
|
||||
builds = [parse_fields(match.group(1)) for match in BUILD.finditer(content)]
|
||||
near = NEAR.search(content)
|
||||
rows = []
|
||||
for match in CENSUS.finditer(content):
|
||||
fields = parse_fields(match.group(1))
|
||||
if int(fields["lod"]) > 2:
|
||||
continue
|
||||
rows.append(fields)
|
||||
histograms = {name.removesuffix("_hist"): [0] * 17 for name in HISTS}
|
||||
fallback_ns = query_ns = 0
|
||||
for row in rows:
|
||||
fallback_ns += int(row["fallback_ns"])
|
||||
query_ns += int(row["query_ns"])
|
||||
for name in HISTS:
|
||||
values = histogram(row[name])
|
||||
key = name.removesuffix("_hist")
|
||||
histograms[key] = [a + b for a, b in zip(histograms[key], values)]
|
||||
metrics = {}
|
||||
for name, values in histograms.items():
|
||||
metrics[name] = {
|
||||
"queries": sum(values),
|
||||
"active_p90": percentile(values, 0.90, active=True),
|
||||
"active_p95": percentile(values, 0.95, active=True),
|
||||
"all_p90": percentile(values, 0.90),
|
||||
"histogram_0_to_15_plus": values,
|
||||
}
|
||||
row = {
|
||||
"stratum": stratum, "floor_vox": floor, "reach_m": round(reach, 6),
|
||||
"brick_m": brick, "workers": 8,
|
||||
"exit_code": result.returncode if result is not None else "timeout",
|
||||
"wall_s": round(time.monotonic() - started, 3),
|
||||
"near_tiles": spec["near"],
|
||||
"near_complete": bool(near and int(near.group(1)) == spec["near"]
|
||||
and int(near.group(2)) == spec["near"]),
|
||||
"lod02_ready_s": float(near.group(3)) if near else None,
|
||||
"census_rows": len(rows), "census_queries": sum(v["queries"] for v in metrics.values()) // 4,
|
||||
"fallback_ns": fallback_ns, "query_ns": query_ns,
|
||||
"fallback_share": fallback_ns / query_ns if query_ns else None,
|
||||
"histograms": metrics, "build": builds[-1] if builds else None,
|
||||
"source_stamp": STAMP.search(content).group(1) if STAMP.search(content) else None,
|
||||
"log": str(log.relative_to(ROOT)),
|
||||
}
|
||||
print("[L91CandidateCensusRun] " + json.dumps(row, sort_keys=True), flush=True)
|
||||
return row
|
||||
|
||||
|
||||
def aggregate(rows: list[dict]) -> dict:
|
||||
output = {}
|
||||
for brick in sorted({row["brick_m"] for row in rows}):
|
||||
selected = [row for row in rows if row["brick_m"] == brick]
|
||||
combined = {name: [0] * 17 for name in SEMANTICS}
|
||||
fallback_ns = query_ns = 0
|
||||
for row in selected:
|
||||
fallback_ns += row["fallback_ns"]
|
||||
query_ns += row["query_ns"]
|
||||
for name in SEMANTICS:
|
||||
values = row["histograms"][name]["histogram_0_to_15_plus"]
|
||||
combined[name] = [a + b for a, b in zip(combined[name], values)]
|
||||
distributions = {name: {
|
||||
"queries": sum(values),
|
||||
"all_p90": percentile(values, 0.90),
|
||||
"active_p90": percentile(values, 0.90, active=True),
|
||||
"active_p95": percentile(values, 0.95, active=True),
|
||||
"histogram_0_to_15_plus": values,
|
||||
} for name, values in combined.items()}
|
||||
weighted_fallback = fallback_ns / query_ns if query_ns else 1.0
|
||||
stratum_fallback = {row["stratum"]: row["fallback_share"] for row in selected}
|
||||
p90_ok = distributions["carve"]["active_p90"] <= 6 \
|
||||
and distributions["mouth_column"]["active_p90"] <= 6
|
||||
fallback_ok = weighted_fallback < 0.10 and all(
|
||||
value is not None and value < 0.10 for value in stratum_fallback.values())
|
||||
output[str(brick)] = {
|
||||
"strata": [row["stratum"] for row in selected],
|
||||
"weighted_fallback_share": weighted_fallback,
|
||||
"stratum_fallback_share": stratum_fallback,
|
||||
"weighted_semantics": distributions,
|
||||
"p90_pass": p90_ok, "fallback_pass": fallback_ok,
|
||||
"census_pass": p90_ok and fallback_ok and len(selected) == 4
|
||||
and all(row["near_complete"] and row["exit_code"] == 0 for row in selected),
|
||||
}
|
||||
return output
|
||||
|
||||
|
||||
def main() -> int:
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--floor", type=float, required=True)
|
||||
parser.add_argument("--bricks", type=float, nargs="+", default=[2.0, 4.0])
|
||||
parser.add_argument("--strata", nargs="+", choices=tuple(STRATA), default=tuple(STRATA))
|
||||
args = parser.parse_args()
|
||||
if not BINARY.is_file() or not DATA.is_file():
|
||||
raise SystemExit(f"missing input: {BINARY} or {DATA}")
|
||||
rows = [run(stratum, args.floor, brick)
|
||||
for brick in args.bricks for stratum in args.strata]
|
||||
payload = {"floor_vox": args.floor, "reach_m": args.floor * 0.25 + 0.24,
|
||||
"runs": rows, "aggregates_by_brick_m": aggregate(rows)}
|
||||
(OUT / "summary.json").write_text(json.dumps(payload, indent=2) + "\n",
|
||||
encoding="utf-8")
|
||||
return 0 if all(value["census_pass"]
|
||||
for value in payload["aggregates_by_brick_m"].values()) else 1
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
@@ -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())
|
||||
@@ -0,0 +1,91 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Capture matched baseline and c=6 near-LOD views for each owner stratum."""
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import subprocess
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[4]
|
||||
OUT = ROOT / "Saved/Linux/l91/captures"
|
||||
DATA = ROOT / "Standalone/data/owner_world.json"
|
||||
BINARY = ROOT / "Saved/Linux/l91/bin/VoxelForgeCoreHeadless-l91-clang19"
|
||||
CAPTURE = ROOT / "Saved/Linux/l91/bin/VoxelForgeOffscreenCapture-l91-clang19"
|
||||
STRATA = {
|
||||
"S0": (8.0, 16.0, -372.2626953125),
|
||||
"FI": (25.8369140625, 3.19921875, -737.0),
|
||||
"TN": (19.166015625, -14.2001953125, -753.3740234375),
|
||||
"S3": (-20.0625, -5.068359375, -900.353515625),
|
||||
}
|
||||
|
||||
|
||||
def export(stratum: str, floor: float) -> dict:
|
||||
name = f"{stratum.lower()}-c{floor:g}"
|
||||
scene = OUT / f"{name}.vfmesh"
|
||||
log = OUT / f"{name}-export.log"
|
||||
camera = ",".join(f"{value:.12f}" for value in STRATA[stratum]) + ",0,0"
|
||||
command = [
|
||||
"taskset", "-c", "0-11", "prlimit", "--as=6442450944", "--", "env",
|
||||
"VOXELFORGE_L81_PASSAGE_BOUND_PADDING_VOXELS=0",
|
||||
f"VOXELFORGE_L91_PASSAGE_SOURCE_FLOOR_VOXELS={floor:g}",
|
||||
"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}",
|
||||
"--capture-skip-walkability", "--mesh-coverage", f"--mesh-export={scene}",
|
||||
]
|
||||
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)
|
||||
return {"name": name, "stratum": stratum, "floor_vox": floor,
|
||||
"exit_code": result.returncode, "wall_s": round(time.monotonic() - started, 3),
|
||||
"scene": str(scene.relative_to(ROOT)), "log": str(log.relative_to(ROOT)),
|
||||
"scene_bytes": scene.stat().st_size if scene.exists() else 0}
|
||||
|
||||
|
||||
def render(stratum: str, floor: float) -> dict:
|
||||
name = f"{stratum.lower()}-c{floor:g}"
|
||||
scene = OUT / f"{name}.vfmesh"
|
||||
image = OUT / f"{name}.png"
|
||||
log = OUT / f"{name}-capture.log"
|
||||
x, y, z = STRATA[stratum]
|
||||
command = [
|
||||
"taskset", "-c", "0-11", "prlimit", "--as=6442450944", "--", "timeout",
|
||||
"1740s", str(CAPTURE), str(scene), str(image), "--size=1600x900",
|
||||
"--fov-deg=90", f"--camera-m={x:.12g},{y:.12g},{z:.12g}",
|
||||
"--yaw-deg=0", "--pitch-deg=0", "--shade=readable", "--height-tint=on",
|
||||
]
|
||||
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)
|
||||
return {"name": name, "stratum": stratum, "floor_vox": floor,
|
||||
"exit_code": result.returncode, "wall_s": round(time.monotonic() - started, 3),
|
||||
"image": str(image.relative_to(ROOT)), "log": str(log.relative_to(ROOT)),
|
||||
"image_bytes": image.stat().st_size if image.exists() else 0}
|
||||
|
||||
|
||||
def main() -> int:
|
||||
OUT.mkdir(parents=True, exist_ok=True)
|
||||
rows = []
|
||||
for stratum in STRATA:
|
||||
for floor in (0.0, 6.0):
|
||||
row = export(stratum, floor)
|
||||
rows.append(row)
|
||||
if row["exit_code"] != 0 or row["scene_bytes"] == 0:
|
||||
break
|
||||
row = render(stratum, floor)
|
||||
rows.append(row)
|
||||
if row["exit_code"] != 0 or row["image_bytes"] == 0:
|
||||
break
|
||||
if rows[-1]["exit_code"] != 0:
|
||||
break
|
||||
(OUT / "summary.json").write_text(json.dumps(rows, indent=2) + "\n",
|
||||
encoding="utf-8")
|
||||
print("[L91CaptureSummary] " + json.dumps(rows, sort_keys=True), flush=True)
|
||||
return 0 if len(rows) == 16 and all(row["exit_code"] == 0 for row in rows) else 1
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in new issue
Block a user