feat(B09 일위대가): 고친 칸 덮개 셈 — 사용자 값 daega_cover · 블록 cover · 줄 cid · 파이썬·TS 짝 (PLAN 702-2)

- 덮개 자리 = B09 사용자 값(user_values.json · 화면 캐시와 같은 user) {블록 cover: {줄 cid: {qty · 노 · 재 · 경 단가}}} · 원본 층 · 사본 파일 안 건드림(브레인 승인)
- 블록 cover = 조합 S:사본 폴더 · 서고 L:폴더 · 사전조합 C:참조 · 품셈 P:로직+입력 해시 · 줄 cid = 줄 정체(코드 · 산근 로직 · 부른 대가 로직) + n번째 — 내용 해시 밖(호표 id 그대로)
- 셈 짝 Calc_Labor.py · .ts — 고친 칸만 셈 값 대신 · 줄 base(품셈 값) · covered · 짝 잃은 덮개 daega_orphans(지우지 않음) · 데이터 점검 알림
- [저장] = 서버가 덮개 입력값만 받아 다시 셈(Store.clean_cover 수만) · 노임 새 판 · [재적용] 뒤에도 남음
- B08 구조물도 카드용 고친 칸 수 cover_count
- 시험 test_702_b09_daega_cover(거울 · 판 바꿈 · 재적용 꼴 · 다듬기) · test_145_2 _ts 덮개 인자

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-31 12:41:22 +09:00
co-authored by Claude Opus 5.5
parent 935bd7d04e
commit 969d7f74f3
7 changed files with 401 additions and 23 deletions
+7 -1
View File
@@ -106,7 +106,9 @@ def compute_sheets(root: Path, inputs: dict[str, Any], user: dict[str, Any]) ->
base = compute_base(inputs, user)
sg = sangeun.build(root, base, user) # 145-1 — 굳힌 단가로 풀이(+ 166-2 손 줄 로직)
by_key = {row["key"]: row for row in sg["sg_list"]}
labor = compute_labor(inputs.get("daega"), {**base, "gaps": []}, by_key)
labor = compute_labor(
inputs.get("daega"), {**base, "gaps": []}, by_key, user.get("daega_cover")
)
books = {"daega": labor["daega"], "sg_list": sg["sg_list"], "sg_hand": sg["sg_hand"]}
sheets = compute_estimation(inputs, user, lambda owner: daega_price(labor, owner), books)
sheets.update(sg)
@@ -187,6 +189,10 @@ async def payload(
inputs["daega"] = await asyncio.to_thread(daega_inputs, root)
library.fix_keys(calc, inputs["daega"].get("libs") or {}) # 263-2 바뀐 사본 = 그 블록
sheets, summary = await asyncio.to_thread(compute_twice, root, inputs, calc)
if lost := len(sheets.get("daega_orphans") or []): # 702-2 데이터 점검 알림
notes.append(
f"짝 잃은 고친 칸 {lost} — 일위대가 줄이 바뀌어 붙을 줄 없음 · 고친 값은 남겨 둠"
)
if schedule_draft:
schedule_draft.attach(inputs, sheets, user)
return {