feat(마스터엔진): 고르기 조건에 로직 입력 변수 허용 확인·옛 {변수} 참조 20줄 이관

엔진은 이미 됐음 — run() 이 조건 칸을 fill() 로 채우고 static() 이 검사에서 뺌.
표본으로 확인한 뒤 22줄 가운데 20줄을 고르기 조건으로 옮김(MT 19 · 고무링 1).
못 옮긴 2줄 — VR관(자재 단위 「본」 대 호표 「m」 환산 미확정) ·
커플링밴드(자재품목 표기 두 갈래라 규격으로 접속티와 못 가름).

검사 넓힘 — check_logic 이 조건 칸 {이름} 이 입력·중간인지 봄 ·
check_pick 이 구분 자체가 {입력} 이면 건너뜀(옛 코드는 「후보 0」 오탐).

앞뒤 견주기 — 시험 계산 통과 1,291 · 멈춤 63 그대로 · 금액 달라진 로직 0(1,354 전수) ·
check_master 전부 같음 · 로직의 MT 직접 참조 19 → 0 · MP 160 → 158.
This commit is contained in:
2026-09-22 00:41:55 +09:00
parent 75603e3620
commit ded5456671
8 changed files with 141 additions and 26 deletions
@@ -156,7 +156,7 @@ def check_unit(master: mf.Master, where: str, cond: dict, unit: str | None) -> l
rows = master.index.get(MARKET, {})
rep = str(cond.get("대표") or "")
if not unit or set(cond) - set(PICK_KEYS) or not cond.get("구분"):
return []
return [] # 구분·규격이 `{입력}` 이면 좁힐 것이 없어 여기서 뺌
if rep in rows:
if plain_unit(rows[rep].get("단위")) != plain_unit(unit):
return [
@@ -174,6 +174,8 @@ def check_pick(master: mf.Master, where: str, cond: dict, unit: str | None = Non
if set(cond) - set(PICK_KEYS) or not cond.get("구분"):
return [f"{where} · 재료 고르기 조건 모양 「{cond}」 — {' · '.join(PICK_KEYS)}"]
cond = static(cond)
if not cond.get("구분"): # 구분 자체가 `{입력}` — 계산 때 채워져 여기서 좁힐 것이 없음
return []
out, rows = [], master.index.get(MARKET, {})
for slot in ("구분", "상세구분"):
if cond.get(slot) and not any(r.get(slot) == cond[slot] for r in rows.values()):