From e10ccc9169b6b25103b20e4115523df06ad9bcd2 Mon Sep 17 00:00:00 2001 From: hyungi Date: Tue, 9 Jun 2026 12:58:36 +0900 Subject: [PATCH] =?UTF-8?q?fix(documents):=20g-measure=20junk=20=EA=B2=80?= =?UTF-8?q?=EC=B6=9C=20all-caps=20=EA=B3=BC=ED=83=90=20=EC=A0=9C=EA=B1=B0?= =?UTF-8?q?=20+=20verdict=3Dcoarse=20=EC=8A=A4=ED=81=AC=EB=A6=B0=20?= =?UTF-8?q?=EB=AA=85=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 전부-대문자 휴리스틱이 기술문서 정상 heading(GENERAL REQUIREMENTS/WELDING) 130건 과탐 → windowed/clean doc 거짓 A_better 강등. 회사-접미사(INC./LLC…)만, cover 영역(앞 4노드)+미stored 게이트. verdict 는 coarse 스크린(감사용)이고 실집행 결정 = 결정적 partition + 적대 워크플로임을 docstring 박제. Co-Authored-By: Claude Opus 4.8 (1M context) --- scripts/hier_outline_quality_gate.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/scripts/hier_outline_quality_gate.py b/scripts/hier_outline_quality_gate.py index b819e0c..cb25d0b 100644 --- a/scripts/hier_outline_quality_gate.py +++ b/scripts/hier_outline_quality_gate.py @@ -51,14 +51,10 @@ _FENCE_ANY = re.compile(r"(?m)^\s{0,3}(```|~~~)") def _looks_junk(title: str | None) -> bool: - if not title: - return False - if _JUNK_ORG.search(title): - return True - letters = [c for c in title if c.isalpha()] - if len(letters) >= 6 and sum(1 for c in letters if c.isupper()) / len(letters) >= 0.85: - return True - return False + """cover/TOC org-이름 junk. ★전부-대문자 휴리스틱은 폐기(2026-06-09): 기술문서의 정상 + all-caps heading('GENERAL REQUIREMENTS'/'WELDING')을 130건 과탐해 windowed/clean doc 을 거짓 + A_better 강등시켰음. 명시적 회사-접미사만 junk 로 본다(그것도 호출측이 cover 위치+미stored 로 게이트).""" + return bool(title and _JUNK_ORG.search(title)) def _make_engine(): @@ -102,10 +98,14 @@ async def _measure_doc(session, doc_id): res["hash_stable_99"] = False stored_titles = {s["section_title"] for s in stored if s["section_title"]} - res["junk_b"] = any(_looks_junk(n.section_title) and n.section_title not in stored_titles for n in nodes) + # junk = cover 영역(앞쪽 노드)의 신규 org-이름 heading 만 (positional). 본문 전반의 정상 heading 무관. + res["junk_b"] = any(_looks_junk(n.section_title) and n.section_title not in stored_titles for n in nodes[:4]) - # verdict 휴리스틱 (high-recall junk 보호 + absent-structure → A_better). - # MEASURE2 가 canonical 분포를 이미 박제 — 이 verdict 는 재현/감사용. 애매(notes:ambiguous)는 PASS 미차단. + # verdict 휴리스틱 = coarse 스크린(재현/감사용). ★2026-06-09 실집행의 authoritative 결정은 이게 아니라: + # (a) 결정적 partition: pure_benefit(n_a<=2)/comparable(0.85<=ratio<=2) = 자동 INCLUDE, + # overseg(ratio>2)/absent(ratio<0.85) = 적대 검증 대상. + # (b) 적대 워크플로(judge+refute)가 위험 후보를 stored vs build 제목으로 per-doc INCLUDE/EXCLUDE 확정. + # 이 휴리스틱 단독으로 destructive re-decompose 리스트를 만들지 말 것(junk 과탐·threshold 과적합 이력). # ★ 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):