BuildLinux.sh hashes a sorted manifest of compiled inputs into VOXELFORGE_SOURCE_STAMP, printed first by every executable; Standalone/Tools/verify/verify.py checks it before and after each tier and records binary/input hashes and the resolved recipe, style map and layout. Fast (163 s) runs on the canonical owner world only and asserts FI Style 2 / SW Style 1; medium (8 min) and full (26 min) add the style matrix, GCC, determinism and cost. Controls: stale source, mislabelled style-0 owner, all-black capture, L30/L31, L35/L36 and the L38 step are all rejected. No geometry change; owner hashes identical to L37. Research R6: leak table, generator contract and a 10-step metre-native migration plan. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016dhxM43dnWvUu2B5Ph1iG1
64 lines
2.6 KiB
Python
64 lines
2.6 KiB
Python
#!/usr/bin/env python3
|
|
"""Apply current ripple limits to retained L35 wall-rib and L36 washboard logs."""
|
|
from __future__ import annotations
|
|
|
|
import argparse
|
|
from pathlib import Path
|
|
import re
|
|
|
|
|
|
def records(path: Path) -> list[dict[str, float | str]]:
|
|
result = []
|
|
for line in path.read_text(encoding="utf-8", errors="replace").splitlines():
|
|
if "[PassageRippleAudit]" not in line:
|
|
continue
|
|
values = dict(re.findall(r"(?:^| )([a-z_]+)=([-0-9.]+)", line))
|
|
def ratio(key: str) -> str:
|
|
match = re.search(rf"(?:^| ){key}=([0-9]+)/([0-9]+)", line)
|
|
return (str(int(match.group(1)) / max(1, int(match.group(2))))
|
|
if match else "nan")
|
|
try:
|
|
item: dict[str, float | str] = {
|
|
"local_peak_amplitude_m": float(values.get(
|
|
"local_peak_amplitude_m", values.get("amplitude_m", "nan"))),
|
|
"floor_amplitude_m": float(values.get("floor_amplitude_m", "nan")),
|
|
"wall_coverage": float(ratio("coverage")),
|
|
"floor_coverage": float(ratio("floor_coverage")),
|
|
"status": "FAIL" if "status=FAIL" in line else "PASS",
|
|
}
|
|
except ValueError:
|
|
continue
|
|
result.append(item)
|
|
return result
|
|
|
|
|
|
def main() -> int:
|
|
parser = argparse.ArgumentParser(description=__doc__)
|
|
parser.add_argument("kind", choices=("wall-ribs", "floor-washboard"))
|
|
parser.add_argument("log", type=Path)
|
|
args = parser.parse_args()
|
|
entries = records(args.log)
|
|
if args.kind == "wall-ribs":
|
|
candidates = [entry for entry in entries if
|
|
float(entry["local_peak_amplitude_m"]) > 0.035
|
|
or float(entry["wall_coverage"]) < 0.75]
|
|
metric = max((float(entry["local_peak_amplitude_m"]) for entry in candidates),
|
|
default=0.0)
|
|
detail = f"max_wall_amplitude_m={metric:.4f} threshold_m=0.035"
|
|
else:
|
|
candidates = [entry for entry in entries if
|
|
float(entry["floor_amplitude_m"]) > 0.015
|
|
or float(entry["floor_coverage"]) < 0.75]
|
|
metric = max((float(entry["floor_amplitude_m"]) for entry in candidates),
|
|
default=0.0)
|
|
detail = f"max_floor_amplitude_m={metric:.4f} threshold_m=0.015"
|
|
detected = bool(candidates)
|
|
print(f"[HistoricalRippleControl] kind={args.kind} log={args.log} "
|
|
f"records={len(entries)} {detail} detected={str(detected).lower()} "
|
|
f"status={'PASS' if detected else 'FAIL'}")
|
|
return 0 if detected else 1
|
|
|
|
|
|
if __name__ == "__main__":
|
|
raise SystemExit(main())
|