diff --git a/scripts/hier_outline_quality_gate.py b/scripts/hier_outline_quality_gate.py index 656671a..b819e0c 100644 --- a/scripts/hier_outline_quality_gate.py +++ b/scripts/hier_outline_quality_gate.py @@ -106,7 +106,14 @@ async def _measure_doc(session, doc_id): # verdict 휴리스틱 (high-recall junk 보호 + absent-structure → A_better). # MEASURE2 가 canonical 분포를 이미 박제 — 이 verdict 는 재현/감사용. 애매(notes:ambiguous)는 PASS 미차단. - n_a = sum(1 for s in stored if s["is_leaf"]) + # ★ apples-to-apples: 양쪽 모두 JUMP-TARGET 수로 비교(stored leaf 전수 X — window-child 가 n_a 를 부풀려 + # windowed doc 을 거짓 A_better 로 떨구는 bias 제거). stored jump-target = (비-window leaf OR %_split) + 제목. + def _stored_is_jt(s): + st = (s["is_leaf"] and s["node_type"] != "window") or bool( + s["node_type"] and s["node_type"].endswith("_split")) + return st and bool(s["section_title"]) + n_a = sum(1 for s in stored if _stored_is_jt(s)) + res["a_jumptarget"] = n_a n_b = res["b_jumptarget"] if n_b == 0: res["verdict"] = "A_better" # B 개요 없음(빈 jump-target)