Files
Pier_v1/Code/교각모델링앱/tools/test_saejae.py
T
ahnyongjooandClaude Sonnet 5.5 964a841de1 chore(rebar): Pier_T_rebar 작업 폴더 초기 구성 및 외부 의존 파일 통합
- Code\rebar_pipeline, review_pipeline, pier-program을 정션에서 실제 폴더로 전환
- Code\rhino_mcp 및 CLAUDE_rhino배경.md 추가, .mcp.json은 PYTHONPATH로 새 위치 사용
- pier-program 내부 .git 제거(이력은 backup\pier-program_20261028.bundle에 보관)
- worktree 가이드 반영(CLAUDE.local.md, HANDOFF.md)
- D:\Rhino-MCP 경로 참조를 새 위치로 치환

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-28 11:20:18 +09:00

38 lines
2.0 KiB
Python

"""Saejae-1 P1 form test (2026-10-15), no Rhino: engine gate reports of data/새재1교P1 (G1 + G5) PASS with negatives detected,
the pier exists with its template, reference piers unchanged (검증/open19_snapshot_after.json)."""
import json
import sys
from pathlib import Path
APP = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(APP))
sys.path.insert(0, str(APP / "tools"))
from open19_snapshot import snapshot # noqa: E402
ok = True
def check(name, cond, detail=""):
global ok
ok &= bool(cond)
print("PASS" if cond else "FAIL", name, str(detail)[:300], flush=True)
ref = json.loads((APP / "검증" / "open19_snapshot_after.json").read_text(encoding="utf-8"))
now = snapshot()
for k in ref:
check(f"{k}: table records / proposals unchanged", ref[k]["records"] == now[k]["records"] and ref[k]["proposals"] == now[k]["proposals"])
D = APP / "data" / "새재1교P1"
P = json.loads((D / "params.json").read_text(encoding="utf-8"))
X = json.loads((D / "expected.json").read_text(encoding="utf-8"))
check("scope G1 + G2 + G3 + G4 + G5, checker g1_pedestal.py", P["scope"] == ["G1", "G2", "G3", "G4", "G5"] and X["checkers"]["G1"] == "g1_pedestal.py")
check("spread footing (no piles), 10 bearings on 5 shared pedestals", "piles" not in P and len(P["bearing_seats"]["bearings"]) == 10
and len(P["bearing_seats"]["pedestals"]) == 5)
check("saved template", (APP / "data" / "_템플릿" / "새재1교P1형" / "params.json").exists())
for g, n, tot in (("G1", 138, 138), ("G2", 41, 41), ("G3", 72, 76), ("G4", 189, 189), ("G5", 183, 183)): # G3: 4 planned FAIL (B5~B8 count 51 vs 53)
r = json.loads((D / "runs" / "current" / f"{g}_gate.json").read_text(encoding="utf-8"))
check(f"{g} gate PASS {n}/{tot}, negatives detected", r["verdict"] == "PASS" and r["summary"]["passed"] == n and r["summary"]["total"] == tot
and all(v["detected"] for v in r["negative"].values()), r["summary"])
print("RESULT", "PASS" if ok else "FAIL")
sys.exit(0 if ok else 1)