from __future__ import annotations import subprocess import sys import os from pathlib import Path PROJECT_ROOT = Path(__file__).resolve().parent.parent SCRIPT_DIR = PROJECT_ROOT / "scripts" CASES: tuple[tuple[str, tuple[str, ...]], ...] = ( ( "Hole/slot cylindrical first-level topology and plan guards", ("verify_cylindrical_first_level_topology.py",), ), ( "Hole diameter, axis, suppress and blind-depth local rebuilds", ("verify_hole_resize.py",), ), ( "Slot width, depth, arc, axis and obround local rebuilds", ("verify_slot_resize.py",), ), ( "Hole/slot isolated worker execution and logical-id retention", ("verify_hole_slot_isolated_edit.py",), ), ( "Hole/slot recognition summary and editable action grouping", ("verify_feature_recognition_summary.py",), ), ( "Unified first-level fact graph includes holes and slots", ("verify_first_level_fact_graph.py",), ), ( "Property editor keeps generic Face edits out of hole/slot features", ("verify_property_editor_specs.py",), ), ) def main() -> int: env = os.environ.copy() env.setdefault("PYTHONIOENCODING", "utf-8") env.setdefault("PYTHONUTF8", "1") for index, (label, command) in enumerate(CASES, start=1): print(f"\n[{index}/{len(CASES)}] {label}", flush=True) subprocess.run( (sys.executable, str(SCRIPT_DIR / command[0]), *command[1:]), cwd=PROJECT_ROOT, env=env, check=True, ) print("\nHole/slot edit suite passed.", flush=True) return 0 if __name__ == "__main__": raise SystemExit(main())