feat(B09): 새 인계 칸 둘 수용 + 예시 서식 우회 제거(원천이 이김)

- 계약 시험이 **제 일을 했음** — 「인계가 보내는데 안 읽는 칸: spec_class,
  spec_class_basis」로 깨짐. 둘 다 읽고, 갈래 판정 근거(`spec_class_basis`)는
  **B08 문구 그대로** 줄 비고에 이음
- 예시 서식 거르기를 뺌 — B08 이 **마스터 원천에서** 거름(8건).
  두 곳에서 같은 것을 거르면 나중에 한쪽만 고쳐짐
- 짝 시험은 남기되 모양을 바꿈 — 인공 표 대신 **실물 마스터에서 그 8공종이
  자원으로 서지 않는지**. 원천이 바뀌면 이 시험이 알려 줌

검증: pytest 211 통과. 못 맞춘 자원 497(원천 필터 뒤 값과 일치)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-08 06:17:29 +09:00
co-authored by Claude Opus 5
parent dfb92ca952
commit cdbc932717
3 changed files with 12 additions and 8 deletions
@@ -96,6 +96,10 @@ class HandoffWorkItem:
#: 갈래 축·원본값 — 「stone_cm」·「60~80」. **키 문자열은 우리가 만든다**(두 창 합의).
variant_axis: str = ""
variant_value: str = ""
#: 규격 갈래를 B08 이 판정해 보낸 것(「철근구조물」)과 그 근거 문구.
#: **근거는 산출근거 칸에 그대로 적는다** — 우리가 다시 지어내지 않는다.
spec_class: str = ""
spec_class_basis: str = ""
@property
def display_name(self) -> str:
@@ -243,6 +247,8 @@ def parse_handoff(payload: dict[str, Any]) -> tuple[list[HandoffWorkItem], list[
blocked_kind=row.get("blocked_kind") or "",
variant_axis=row.get("variant_axis") or "",
variant_value=str(row.get("variant_value") or ""),
spec_class=row.get("spec_class") or "",
spec_class_basis=row.get("spec_class_basis") or "",
)
for row in payload["work_items"]
]
@@ -140,6 +140,9 @@ def _leaf_row(
quantity=item.quantity,
in_bill=item.in_bill,
)
if item.spec_class_basis:
# 갈래 판정 근거는 **B08 문구를 그대로** 쓴다(두 벌로 짜지 않는다).
row.note = " / ".join(part for part in (row.note, item.spec_class_basis) if part)
if item.application_ratio_pct is not None:
# ⚠ 곱하지 않는다 — B08 이 이미 곱한 값이다. 산출근거로만 적는다.
row.note = f"반영률 {item.application_ratio_pct}% 적용 후 수량"
@@ -357,14 +357,9 @@ def match_table(
result: AxisResult,
) -> None:
"""표 하나에 자원 축을 붙인다. 값이 안 서면 `unmatched` 로 보낸다."""
# ⚠ **예시 서식 표는 자원 표가 아니다.** 품셈이 「ha당 …단가산출서(예시)」처럼
# **빈 서식**을 실어 두는데(4-2 · 3-2 등), 그것을 읽으려 들면 구간 라벨·항목명이
# 자원 이름으로 오해돼 못 맞춘 목록이 못 쓰게 된다(2026-09-08 실측 39줄).
# 값이 있는데 안 서는 자리가 아니라 **애초에 값이 없는 표**다.
headers = " ".join(str(c) for c in (table.get("condition_note") or []))
if "단가산출서" in headers or "예시" in headers:
result.skipped_forms["example_form"] = result.skipped_forms.get("example_form", 0) + 1
return
# 예시 서식(「ha당 …단가산출서(예시)」)은 **B08 이 마스터 원천에서 거른다**(8건).
# 두 곳에서 같은 것을 거르면 **나중에 한쪽만 고쳐진다** — 원천이 이긴다.
# ⚠ 짝 시험은 남겨 둔다(예시 서식이 자원으로 안 서는지) — 원천이 바뀌면 그것이 알려 준다.
from B09_Estimation.B09_Estimation_CrewOutput import match_crew_table