import json import sys from pathlib import Path sys.stdout.reconfigure(encoding='utf-8') # Load updated master with open('resources/data_work_item_master/work_item_master_2026-01-01.json', 'r', encoding='utf-8') as f: master = json.load(f) tables = {} for wi in master['work_items']: for t in wi.get('tables', []): tid = t.get('pum_table_id') if tid: tables[tid] = t # Check the critical 34 lost rules from round 2 test_targets = [ ('F0251', '고철공제', '9-8-1 철근절단 T=30cm 미만'), ('F0252', '고철공제', '9-8-2 철근절단 T=30cm 이상'), ('F0088', '100%를 가산', '4-3 위험목 베기 인력 가산'), ('F0086', '30%를 할증', '4-2-1 벌채 관목 할증'), ('F0086', '20%를 할증', '4-2-1 벌채 조재 할증'), ('F0191', '10%', '7-11 트랙터 집재 주행/잔존목 할증'), ('F0080', '1-4-5', '3-6 산물 임내정리 경사도 할증'), ('F0164', '1-4-3', '6-6 가지치기 할증 연계'), ('F0173', '1-4-5', '7-2 수라집재 할증 연계') ] print("=== 2바퀴 34건 계수 절단 복원 여부 점검 ===") for tid, keyword, desc in test_targets: t = tables.get(tid) if not t: print(f"[{tid}] {desc}: TABLE NOT FOUND") continue notes = t.get('notes', []) notes_str = " ".join(notes) if keyword in notes_str: print(f"[{tid}] {desc}: [복원됨/포함됨] ({len(notes)} notes)") else: print(f"[{tid}] {desc}: [여전히 잘려있음/누락] ({len(notes)} notes)") if notes: print(f" 현재 notes: {notes[:2]}") else: print(f" 현재 notes: [] (공백)")