feat(m02): 사전조합 담은로직에 단가산출 로직 줄 허용 — 51-11 서버

- 줄 = {참조, 수량, 메모} | {로직, 입력값, 메모, 수량} · 수량 기본 {손: 1}
- 검사 = 일위대가 labor.clean 같은 길(모르는 로직 · 같은 로직 · 같은 참조 두 번 · 입력값 꼴)
- 펼침 계산 = 로직 줄 run_line 기준 ÷ 배 × 수량 · 안 줄에 로직 줄
- 로직 지우기 검사에 사전조합 포함 · 굳힘 로직 목록에 사전조합 로직 포함
- 시험 test_m02_labor_ref 22 통과(섞인 사전조합 합 = 손셈 · 지우기 409)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYJJRCfHfdCGNhmXTjQKV7
This commit is contained in:
2026-10-05 20:29:39 +09:00
co-authored by Claude Opus 5.5
parent 9e2ce4ed2c
commit 31874ea3a6
3 changed files with 102 additions and 35 deletions
+5 -5
View File
@@ -222,20 +222,20 @@ def check_saved(files: dict, changed: list[str], book: dict, narrowed=None) -> l
def _labor_files() -> list[tuple[str, Path]]:
"""모든 층(마스터 · 회사 · 개인)의 일위대가 `labor/<열>.json` · 단가승격 `promote/<키>.json`
— (어디, 파일)."""
· 사전조합 `precombo/<키>.json`(51-11) — (어디, 파일)."""
from M02_MasterTemplete import M02_Template_Layers as layers # M02 가 M01 을 부름 — 늦게
return [
(f"{what} {where}", path)
for kind, what in (("labor", "일위대가"), ("promote", "단가승격"))
for kind, what in (("labor", "일위대가"), ("promote", "단가승격"), ("precombo", "사전조합"))
for where, path in layers.layer_files(kind)
]
def labor_errors(whole) -> list[str]:
"""일위대가 · 단가승격 문서가 담은 로직이 마스터에 없음(39-1d · 50-3) — 로직 지우기를 막음 ·
어디서 쓰는지 알림 · 참조 줄(로직 없음)은 건너뜀. 전부터 깨진 것은 `save` 가 고치기 전 검사와
견주어 뺌."""
"""일위대가 · 단가승격 · 사전조합 문서가 담은 로직이 마스터에 없음(39-1d · 50-3) —
로직 지우기를 막음 · 어디서 쓰는지 알림 · 참조 줄(로직 없음)은 건너뜀. 전부터 깨진 것은
`save` 가 고치기 전 검사와 견주어 뺌."""
out = []
for where, path in _labor_files():
try: