"""Individual gate run after a batch run (2026-10-12): the previous gate has no fingerprint (batch mode saves no per-gate model), so the unchanged check must be skipped instead of raising; save + reload still run. Uses the run folder left by test_web_batch.py (검증/web_batch_test_data/배치P1). """ import sys from pathlib import Path APP = Path(__file__).resolve().parents[1] sys.path.insert(0, str(APP)) from engine.gates import run_gate # noqa: E402 d = APP / "검증" / "web_batch_test_data" / "배치P1" rep = run_gate("G3", d / "params.json", d / "expected.json", d / "runs" / "current", log=lambda m: None) ok = rep["verdict"] == "PASS" and rep["reload"]["ok"] is True and rep["unchanged"]["ok"] is None print("PASS" if ok else "FAIL", "individual G3 after batch:", rep["verdict"], "reload", rep["reload"]["ok"], "unchanged", rep["unchanged"].get("skipped")) sys.exit(0 if ok else 1)