fix: enforce Revit roof views and orphan geometry gates
Some checks failed
ci / test (macos-latest, 3.10) (push) Has been cancelled
ci / test (macos-latest, 3.12) (push) Has been cancelled
ci / test (ubuntu-latest, 3.10) (push) Has been cancelled
ci / test (ubuntu-latest, 3.12) (push) Has been cancelled
ci / test (windows-latest, 3.10) (push) Has been cancelled
ci / test (windows-latest, 3.12) (push) Has been cancelled
ci / browser-smoke (push) Has been cancelled
Some checks failed
ci / test (macos-latest, 3.10) (push) Has been cancelled
ci / test (macos-latest, 3.12) (push) Has been cancelled
ci / test (ubuntu-latest, 3.10) (push) Has been cancelled
ci / test (ubuntu-latest, 3.12) (push) Has been cancelled
ci / test (windows-latest, 3.10) (push) Has been cancelled
ci / test (windows-latest, 3.12) (push) Has been cancelled
ci / browser-smoke (push) Has been cancelled
This commit is contained in:
@@ -316,6 +316,26 @@ def preflight_waiver_targets(
|
||||
]
|
||||
|
||||
|
||||
def multi_frame_source_files(source_report: dict[str, Any]) -> list[str]:
|
||||
"""Return source drawings that require a detector-backed frame ledger.
|
||||
|
||||
A single modelspace can contain several floor plans. In that case a
|
||||
hand-written extraction config is not enough evidence: every detected
|
||||
frame must be mapped or explicitly discarded. Accept either the structured
|
||||
count or the compatible warning emitted by older source inspectors.
|
||||
"""
|
||||
required: list[str] = []
|
||||
for item in source_report.get("files", []) or []:
|
||||
if not isinstance(item, dict) or item.get("status") != "ok":
|
||||
continue
|
||||
warnings = [str(value) for value in item.get("warnings", []) or []]
|
||||
if int(item.get("plan_title_count", 0) or 0) >= 2 or any(
|
||||
"multi_frame_sheet" in warning for warning in warnings
|
||||
):
|
||||
required.append(str(item.get("file", "?")))
|
||||
return required
|
||||
|
||||
|
||||
def available_port() -> int:
|
||||
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as stream:
|
||||
stream.bind(("127.0.0.1", 0))
|
||||
@@ -534,6 +554,14 @@ def run_pipeline(args: argparse.Namespace) -> int:
|
||||
file=sys.stderr,
|
||||
)
|
||||
return 3
|
||||
multi_frame_files = multi_frame_source_files(report)
|
||||
if multi_frame_files and not frame_inputs:
|
||||
print(
|
||||
"GATE FAIL [frame_ledger_required]: multi-plan source drawing(s) require "
|
||||
"detect_sheet_frames output via --frames: " + ", ".join(multi_frame_files),
|
||||
file=sys.stderr,
|
||||
)
|
||||
return 3
|
||||
out_dir = Path(args.out_dir).resolve()
|
||||
out_dir.mkdir(parents=True, exist_ok=True)
|
||||
pipeline = Pipeline(
|
||||
|
||||
Reference in New Issue
Block a user