@chrono-meta/fh-gate 3.8.0 → 3.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/.claude/regression/probes_live.yaml +108 -6
  2. package/.claude-plugin/marketplace.json +4 -4
  3. package/docs/OUTPUT_EVIDENCE.md +2 -1
  4. package/knowledge/shared/harness-core/governance_engineering_definition.md +7 -3
  5. package/knowledge/shared/learnings/subagent_invocations_log.yaml +211 -0
  6. package/package.json +3 -1
  7. package/plugins/fh-commons/.claude-plugin/plugin.json +1 -1
  8. package/plugins/fh-meta/.claude-plugin/plugin.json +1 -1
  9. package/plugins/fh-meta/CHANGELOG.md +84 -0
  10. package/plugins/fh-meta/skills/frontier-digest/SKILL.md +1 -1
  11. package/plugins/fh-meta/skills/frontier-digest/SKILL_detail.md +18 -1
  12. package/plugins/fh-preprep/.claude-plugin/plugin.json +1 -1
  13. package/plugins/fh-preprep/skills/preprep/SKILL.md +7 -1
  14. package/plugins/fh-preprep/skills/preprep/fixtures/font_revert_probe.py +6 -4
  15. package/plugins/fh-preprep/skills/preprep/lane_font.py +105 -16
  16. package/plugins/fh-preprep/skills/preprep/test_lane_font.py +170 -21
  17. package/plugins/fh-qp/.claude-plugin/plugin.json +1 -1
  18. package/scripts/com.forge-harness.live-eval.plist +5 -2
  19. package/scripts/probe_live_eval.sh +117 -3
  20. package/scripts/probe_live_eval_lib.py +178 -5
  21. package/scripts/selfcheck.sh +23 -0
  22. package/scripts/test_precommit_gitlink_lanes.sh +142 -0
  23. package/scripts/test_probe_live_eval_lanes.sh +271 -10
  24. package/scripts/test_temper_check_lanes.sh +307 -0
  25. package/scripts/test_utterance_intake_lanes.sh +131 -0
  26. package/scripts/utterance_intake.sh +115 -4
  27. package/templates/.git-hooks/pre-commit +47 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fh-preprep",
3
- "version": "3.8.0",
3
+ "version": "3.10.0",
4
4
  "engines": {
5
5
  "claudeCode": ">=1.0.0"
6
6
  },
@@ -200,10 +200,16 @@ python3 "$SKILL/preprep.py"
200
200
  같은 85건이 있다**(해시 동일, 2026-09-11 실측). 저자는 그 글자를 찍은 적이 없다. 진짜 이탈은 3런
201
201
  하나뿐이었고(코드 데모의 고정폭 서체) 그건 «의도»였다. ⇒ 판별자는 **영역 + 템플릿 해시 대조**이지
202
202
  서체 이름이 아니다. 뒤집으면, 템플릿에서 **갈라진** 마스터·레이아웃은 반대로 **저자 책임**이라 그
203
- 사실을 따로 보고한다. 코드: `lane_font.py` · self-test: `test_lane_font.py`(21항) · 레인 래퍼 `scripts/test_preprep_font_lanes.sh`
203
+ 사실을 따로 보고한다. 코드: `lane_font.py` · self-test: `test_lane_font.py`(**42항** — 5라운드에서 30→42) · 레인 래퍼 `scripts/test_preprep_font_lanes.sh`
204
204
  (되돌림 프로브 `fixtures/font_revert_probe.py`). known-negative 가 «서체 하나뿐인 덱»이 아니라
205
205
  **«마스터에 이질 서체가 있지만 템플릿과 동일한 덱»** 인 것이 핵심이다 — 그게 실제로 틀렸던 자리다.
206
206
 
207
+ 🟥 **이 레인이 «안 읽는» 자리는 0 이 아니라 UNMEASURED 로 나간다** (5라운드 신설). 차트
208
+ (`ppt/charts/`)·SmartArt(`ppt/diagrams/`) 안의 글자는 화면에 렌더되지만 `slides/` 밖이라 스캔
209
+ 범위가 아니고, DrawingML 을 `a` 가 아닌 접두사로 묶은 장도 이 정규식 스캐너가 못 읽는다. 둘 다
210
+ **그런 자리가 있으면 세어서 노트로 낸다** — 「안 읽었다」를 「이탈 없다」로 렌더하지 않는 것이
211
+ 이 레인 전체의 규율이다([[feedback_not_found_is_not_zero_family]]).
212
+
207
213
  🟥 **cross-family 2라운드가 판정을 한 번 뒤집었고, 그 되돌림 자체가 계약이다.** 1라운드는
208
214
  «템플릿 자신의 마스터/레이아웃이 쓰는 서체는 오탐이니 노트로 강등하라»고 했고 그렇게 고쳤다.
209
215
  2라운드가 그것을 **fail-open 으로 지목했다** — 배포 템플릿의 레이아웃은 쓰이지도 않는 자리에
@@ -41,15 +41,17 @@ import test_lane_font as T # noqa: E402
41
41
 
42
42
  def _widen(z):
43
43
  """뮤턴트: 상속 영역까지 판정 대상에 넣는다 = 영역 분리를 죽인다."""
44
- rows, n = _widen.orig(z)
44
+ # 🟥 반환 모양은 slide_runs 의 계약이다 — 2026-09-14(5라운드)에 `(rows, n)` 에서
45
+ # `(rows, n, foreign_ns)` 로 늘었고, 이 프로브가 **옳게 빨개졌다**(BASE 0 MUT 0 —
46
+ # 뮤턴트가 2-튜플을 돌려줘 scan() 이 «계기 오류» 로 떨어졌다). 지우지 말고 교체한다.
47
+ rows, n, foreign = _widen.orig(z)
45
48
  for name in z.namelist():
46
49
  if re.match(r'ppt/(slideMasters|slideLayouts)/[^/]+\.xml$', name):
47
50
  for tf in L._typefaces(z, name):
48
51
  if tf and not L.THEME_REF.match(tf):
49
- # 🟥 튜플 모양은 slide_runs 의 계약이다 — (장, 서체, 슬롯, 텍스트, 출처).
50
- # 계약이 바뀌면 이 프로브가 빨개진다. 빨개지는 것이 옳다.
52
+ # 🟥 행 모양도 계약이다 — (장, 서체, 슬롯, 텍스트, 출처).
51
53
  rows.append((0, tf, 'latin', '(상속)', 'inherited'))
52
- return rows, n
54
+ return rows, n, foreign
53
55
 
54
56
 
55
57
  def separation(d):
@@ -39,6 +39,11 @@ Mono, 그리고 그건 «의도»였다). ⇒ 판별자는 **영역 + 템플릿
39
39
  🟥 **이 레인이 구조적으로 못 보는 것**: ⓐ 이미지에 구워진 글자 ⓑ 폰트가 설치돼 있는지
40
40
  (파일은 이름만 적는다 — 없는 서체는 렌더러가 조용히 대체한다) ⓒ 같은 가족의 굵기 변형이
41
41
  실제로 존재하는지. 셋 다 **파일 밖**의 사실이라 여기서 0 으로 세지 않는다.
42
+ ⓓ **차트(`ppt/charts/`)·SmartArt(`ppt/diagrams/`) 안의 글자** — 화면에 렌더되지만 별도
43
+ 부품이라 `slides/` 스캔이 안 닿는다(cross-family R5/codex 지목, 실측 재현). 셋과 달리
44
+ 이건 **파일 «안»**의 사실이라 언젠가 읽을 수 있다 ⇒ 0 으로 세지 않고 **그런 부품이
45
+ 있으면 «UNMEASURED» 노트로 세어 낸다**(`_unscanned_text_parts`). 「안 읽었다」를
46
+ 「이탈 없다」로 렌더하지 않는 것이 이 레인 전체의 규율이다.
42
47
  """
43
48
  import os
44
49
  import re
@@ -66,7 +71,22 @@ _FONT_TAG = re.compile(r'<a:(latin|ea|cs|sym)\b([^>]*?)/?>')
66
71
  # `r:id="rId2"` 를 `id="rId2"` 로 잘못 읽고 **엉뚱한 값을 `id` 키에 넣는다** — 3라운드에서
67
72
  # 속성 순서를 고치며 내가 심은 결함이고, 4라운드가 잡았다(실측: 실물 덱이 그 형태라
68
73
  # 장 순서가 계속 파일명 순 폴백으로 돌고 있었다).
69
- _ATTR = re.compile(r'([\w:.-]+)="([^"]*)"')
74
+ # 🟥 XML 은 **작은따옴표 속성**도 허용한다. 큰따옴표만 읽으면 `typeface='X'` 를 통째로
75
+ # 놓치고 — 그런데 **다른 토큰이 하나라도 읽히면 UNMEASURED 도 안 나간다**(아래 참조).
76
+ # 즉 «부분 추출 실패»가 자신 있는 0 으로 렌더된다(cross-family R5/codex 지목).
77
+ _ATTR_RAW = re.compile(r'([\w:.-]+)=(?:"([^"]*)"|\'([^\']*)\')')
78
+
79
+
80
+ class _Attr:
81
+ """`findall` 이 (이름, 값) 쌍을 내도록 감싼다 — 호출부(`dict(_ATTR.findall(...))`)를
82
+ 안 바꾸려고. 큰따옴표 값이 비어 있으면 작은따옴표 조에서 온 값을 쓴다(둘 중 하나만 찬다)."""
83
+
84
+ @staticmethod
85
+ def findall(x):
86
+ return [(k, dq if dq else sq) for k, dq, sq in _ATTR_RAW.findall(x)]
87
+
88
+
89
+ _ATTR = _Attr()
70
90
 
71
91
 
72
92
  def font_refs(xml):
@@ -85,6 +105,18 @@ def font_names(xml):
85
105
  return [t for _, t in font_refs(xml)]
86
106
 
87
107
 
108
+ # 🟥 **주석은 어디서도 렌더되지 않는다** — 그런데 정규식 스캔에는 그대로 잡힌다.
109
+ # cross-family R5(codex) 지적: 템플릿 장표에 주석으로 남은 `<a:latin typeface="X"/>` 가
110
+ # 허용 집합으로 «승격»되어, 덱의 진짜 X 이탈이 조용히 통과한다(실측 재현).
111
+ # 읽는 모든 자리에서 먼저 죽인다 — 유도 쪽과 판정 쪽 **양쪽**에.
112
+ _XML_COMMENT = re.compile(r'<!--.*?-->', re.S)
113
+
114
+
115
+ def live_xml(x):
116
+ """렌더 후보만 남긴 XML — 주석 제거. 유도·판정 어느 쪽에서도 같은 것을 본다."""
117
+ return _XML_COMMENT.sub('', x)
118
+
119
+
88
120
  _PART = re.compile(r'ppt/(slides|slideLayouts|slideMasters|theme)/[^/]+\.xml$')
89
121
 
90
122
 
@@ -100,7 +132,7 @@ def _parts(z):
100
132
 
101
133
  def _typefaces(z, name):
102
134
  """한 부품이 쓰는 서체 이름들 (등장 순서 유지, 중복 포함)."""
103
- return font_names(z.read(name).decode('utf-8', 'replace'))
135
+ return font_names(live_xml(z.read(name).decode('utf-8', 'replace')))
104
136
 
105
137
 
106
138
  def theme_fonts(z):
@@ -108,7 +140,7 @@ def theme_fonts(z):
108
140
  got = set()
109
141
  for n in z.namelist():
110
142
  if re.match(r'ppt/theme/theme\d+\.xml$', n):
111
- x = z.read(n).decode('utf-8', 'replace')
143
+ x = live_xml(z.read(n).decode('utf-8', 'replace'))
112
144
  for tag in ('majorFont', 'minorFont'):
113
145
  m = re.search(r'<a:%s>.*?</a:%s>' % (tag, tag), x, re.S)
114
146
  if m:
@@ -135,6 +167,7 @@ def _occurrences(xml, where):
135
167
  달라졌다»로 떴다(2026-09-11). 있지도 않은 글자의 서체는 이탈이 아니다.
136
168
  """
137
169
  out = []
170
+ xml = live_xml(xml)
138
171
  # ① 런과 필드 — 찍힌 글자가 있다
139
172
  for tag in ('r', 'fld'):
140
173
  for m in re.finditer(r'<a:%s[ >].*?</a:%s>' % (tag, tag), xml, re.S):
@@ -191,12 +224,13 @@ def slide_runs(z):
191
224
  # 순서를 못 읽어도 «못 읽었다»로 끝내지 않는다 — 파일명 순으로라도 센다(번호는 근사).
192
225
  order = sorted(int(re.search(r'slide(\d+)', n).group(1)) for n in z.namelist()
193
226
  if re.match(r'ppt/slides/slide\d+\.xml$', n))
194
- rows = []
227
+ rows, foreign = [], set()
195
228
  for i, sn in enumerate(order, 1):
196
229
  x = z.read('ppt/slides/slide%d.xml' % sn).decode('utf-8', 'replace')
230
+ foreign |= set(foreign_dml_prefixes(x))
197
231
  for tf, slot, txt, src in _occurrences(x, 'slide'):
198
232
  rows.append((i, tf, slot, txt, src))
199
- return rows, len(order)
233
+ return rows, len(order), sorted(foreign)
200
234
 
201
235
 
202
236
  def drifted_occurrences(z, drifted, zt=None):
@@ -221,12 +255,13 @@ def drifted_occurrences(z, drifted, zt=None):
221
255
  try:
222
256
  before = set(font_names(re.sub(
223
257
  r'<a:endParaRPr\b[^>]*(?:/>|>.*?</a:endParaRPr>)', '',
224
- zt.read(name).decode('utf-8', 'replace'), flags=re.S)))
258
+ live_xml(zt.read(name).decode('utf-8', 'replace')), flags=re.S)))
225
259
  except Exception:
226
260
  before = set() # 템플릿에 없던 부품(신설) — 전부가 새 것이다
227
261
  # 🟥 렌더되지 않는 자리는 여기서도 안 센다 — `_occurrences` 만 엄격하고 여기는
228
262
  # 파일 전체를 훑으면, 빈 문단의 `endParaRPr` 하나로 갈라짐 오탐이 난다(R3-5).
229
- scanned = re.sub(r'<a:endParaRPr\b[^>]*(?:/>|>.*?</a:endParaRPr>)', '', x, flags=re.S)
263
+ scanned = re.sub(r'<a:endParaRPr\b[^>]*(?:/>|>.*?</a:endParaRPr>)', '',
264
+ live_xml(x), flags=re.S)
230
265
  for slot, tf in font_refs(scanned):
231
266
  if not THEME_REF.match(tf) and tf not in before:
232
267
  rows.append((area, name, tf, slot))
@@ -234,21 +269,27 @@ def drifted_occurrences(z, drifted, zt=None):
234
269
 
235
270
 
236
271
  def _allow_from_template(zt):
237
- """템플릿의 slides/ 가 실제로 쓰는 서체 = 허용 집합. 「덱 자신의 분포가 기준」.
272
+ """템플릿의 slides/ 가 실제로 **렌더하는** 서체 = 허용 집합. 「덱 자신의 분포가 기준」.
238
273
 
239
274
  🟥 **마스터·레이아웃은 일부러 안 넣는다.** 넣으면 상속된 잠재 기본값(이 코퍼스의
240
275
  Helvetica Neue)까지 «규정된 서체»가 되어 탐지력이 깎인다. 대신 `_template_own_fonts()`
241
276
  가 그 집합을 따로 들고, 거기 있는 서체의 지적은 **finding 이 아니라 노트로 강등**한다
242
- (cross-family agy 지적 A2 — 오탐이되, 허용으로 승격시킬 일은 아니다)."""
277
+ (cross-family agy 지적 A2 — 오탐이되, 허용으로 승격시킬 일은 아니다).
278
+
279
+ 🟥 **유도는 판정과 «같은 함수»로 한다 — 이 비대칭이 두 번 뚫렸다.**
280
+ 4라운드(R4-3)가 템플릿 `endParaRPr` 잔재의 승격을 잡았고 그 한 자리만 깁었는데,
281
+ 5라운드(codex)가 **같은 뿌리의 다른 자리**를 냈다: 글자 없는 빈 런(`<a:r>` 에 `<a:t>`
282
+ 가 비었거나 없음)의 서체도 승격된다 — 실측 재현, 컨트롤(빈 런 없는 템플릿)은 finding 1.
283
+ 한 군데씩 깁는 대신 **`_occurrences()` 를 그대로 재사용**한다: 판정이 세지 않는 것은
284
+ 유도도 못 센다. 한쪽만 관대한 정규화가 «한쪽에서만 통과하는 입력» 을 만드는 형태다
285
+ ([[feedback_divergent_leniency_duplicate_normalizers]] ·
286
+ [[feedback_half_fix_propagation_boundary]])."""
243
287
  got = set()
244
288
  for n in zt.namelist():
245
289
  if re.match(r'ppt/slides/slide\d+\.xml$', n):
246
- # 🟥 템플릿의 «렌더 안 되는» 끝 서식은 허용 집합에 넣지 않는다 — 넣으면 템플릿의
247
- # 보이지도 않는 잔재가 덱 전체의 합법 서체로 **승격**된다(4라운드 지목).
248
- # 판정 쪽(`_occurrences`)만 엄격하고 유도 쪽이 헐거우면 그 비대칭이 곧 누수다.
249
- x = re.sub(r'<a:endParaRPr\b[^>]*(?:/>|>.*?</a:endParaRPr>)', '',
250
- zt.read(n).decode('utf-8', 'replace'), flags=re.S)
251
- got |= {t for t in font_names(x) if t and not THEME_REF.match(t)}
290
+ x = zt.read(n).decode('utf-8', 'replace')
291
+ got |= {tf for tf, _slot, _t, _src in _occurrences(x, 'slide')
292
+ if tf and not THEME_REF.match(tf)}
252
293
  return got | theme_fonts(zt)
253
294
 
254
295
 
@@ -261,6 +302,44 @@ def _template_own_fonts(zt):
261
302
  return got
262
303
 
263
304
 
305
+ _DML_NS = 'http://schemas.openxmlformats.org/drawingml/2006/main'
306
+ _NS_DECL = re.compile(r'xmlns:([\w.-]+)="' + re.escape(_DML_NS) + r'"')
307
+
308
+
309
+ def foreign_dml_prefixes(xml):
310
+ """DrawingML 네임스페이스를 `a` 가 아닌 접두사로 묶은 자리 — 이 레인은 못 읽는다.
311
+
312
+ 🟥 XML 에서 접두사는 «이름»이 아니라 **바인딩**이라 `a:` 가 의무가 아니다. PowerPoint 는
313
+ 항상 `a:` 를 쓰지만 제3자 생성기는 그렇지 않을 수 있다. 정규식 스캐너는 그걸 못 읽고,
314
+ 더 나쁘게는 **다른 런이 하나라도 읽히면 `seen` 이 비지 않아 UNMEASURED 도 안 나간다**.
315
+ ⇒ 0 으로 세지 말고 **못 쟀다고 세라**(cross-family R5/codex 지목, 실측 재현).
316
+ """
317
+ return sorted({p for p in _NS_DECL.findall(xml) if p != 'a'})
318
+
319
+
320
+ _TEXT_PART = re.compile(r'ppt/(charts|diagrams|notesSlides)/[^/]+\.xml$')
321
+
322
+
323
+ def _unscanned_text_parts(z):
324
+ """`slides/` 밖인데 **서체를 들고 있는** 부품 — 이 레인이 안 읽는 자리.
325
+
326
+ 🟥 반환은 «개수»다. 0 이면 「그런 부품이 없다」이고, N 이면 「N 개를 **안 쟀다**」다.
327
+ 둘을 같은 0 으로 접으면 그것이 이 저장소가 이름으로 관리하는
328
+ [[feedback_not_found_is_not_zero_family]] 다."""
329
+ out = collections.Counter()
330
+ for n in z.namelist():
331
+ m = _TEXT_PART.match(n)
332
+ if not m:
333
+ continue
334
+ try:
335
+ x = live_xml(z.read(n).decode('utf-8', 'replace'))
336
+ except Exception:
337
+ continue
338
+ if [t for t in font_names(x) if t and not THEME_REF.match(t)]:
339
+ out[m.group(1)] += 1
340
+ return out
341
+
342
+
264
343
  def _norm(s):
265
344
  return re.sub(r'\s+', ' ', s).strip().lower()
266
345
 
@@ -326,7 +405,7 @@ def scan(cfg, root):
326
405
 
327
406
  try:
328
407
  z = zipfile.ZipFile(deck)
329
- rows, nslides = slide_runs(z)
408
+ rows, nslides, foreign_ns = slide_runs(z)
330
409
  parts = _parts(z)
331
410
  th = theme_fonts(z)
332
411
  except Exception as e:
@@ -446,6 +525,16 @@ def scan(cfg, root):
446
525
  f'허용 {len(allow)}가족 · 이탈 {len(offenders)}종 · 선언 면제 {sum(exempted.values())}회 · '
447
526
  f'그중 템플릿 자신도 쓰는 이름 {sum(demoted.values())}회'
448
527
  + ('' if rows else ' — 🟥 0 이면 UNMEASURED, 「이탈 없음」이 아니다'))
528
+ if foreign_ns:
529
+ notes.append('L15 font : 🟥 DrawingML 을 `a` 가 아닌 접두사로 묶은 장이 있다 ('
530
+ + ' · '.join(foreign_ns) + ') — 이 스캐너는 `a:` 만 읽는다. '
531
+ '그 자리의 서체는 UNMEASURED (0 아님)')
532
+ unscanned = _unscanned_text_parts(z)
533
+ if unscanned:
534
+ notes.append('L15 font : 🟥 이 레인이 **안 읽는** 부품에 서체가 있다 — '
535
+ + ' · '.join(f'{k} {v}개' for k, v in sorted(unscanned.items()))
536
+ + '. 화면에 렌더되지만 `slides/` 밖이라 스캔 범위가 아니다 — '
537
+ 'UNMEASURED (0 아님. 「이탈 없음」으로 읽지 마라)')
449
538
  if inherited_ok:
450
539
  notes.append('L15 font : 상속 확인(템플릿과 해시 동일) — ' + ' · '.join(sorted(inherited_ok))
451
540
  + ' 의 서체는 저자 산물이 아니므로 판정하지 않는다')
@@ -160,36 +160,73 @@ def build(path, slide_runs, master_font='Helvetica Neue', theme_font='Brand Disp
160
160
  return path
161
161
 
162
162
 
163
- # 🟥 장 순서를 실제로 재려면 **2장 이상**이어야 한다. 1장짜리로는 파일명 순 폴백과
164
- # 정상 경로가 같은 답을 내서 «초록인 이유»를 구분할 수 없다 — R3-4 레인이 그래서
165
- # 엉뚱한 이유로 초록이었고, 4라운드가 그 뒤의 진짜 결함(r:id 파싱)을 잡았다.
163
+ # 🟥 장 순서를 실제로 재려면 **2장 이상이면서 발표순 ≠ 파일명순** 이어야 한다.
164
+ # 1장짜리로는 파일명 순 폴백과 정상 경로가 같은 답을 내서 «초록인 이유»를 구분할 수 없다 —
165
+ # R3-4 레인이 그래서 엉뚱한 이유로 초록이었고, 4라운드가 그 뒤의 진짜 결함(r:id 파싱)을 잡았다.
166
+ # 🟥 **그런데 4라운드가 그 자리에 놓은 2장 픽스처도 안 꼬여 있었다**(5라운드 실측, 자력 적발 0 —
167
+ # 되돌림 프로브와 cross-family(codex)가 «독립적으로» 같은 것을 지목했다). 옛 판은
168
+ # `rId2→slide1 · rId1→slide2` 라 **발표순이 [slide1, slide2] = 파일명순**이었다. 그래서
169
+ # `_ATTR` 의 네임스페이스 수리(R4-1)를 **통째로 되돌려도 self-test 가 30/30 초록**이었다.
170
+ # 지금은 `rId2→slide2` 로 묶어 **발표순 [slide2, slide1] ≠ 파일명순 [slide1, slide2]** 다.
171
+ # 같은 되돌림에 이제 이 레인이 적색이 된다(BASE «slides 2» → MUT «slides 1»).
166
172
  PRES_2 = ('<p:presentation xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main" '
167
173
  'xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">'
168
174
  '<p:sldIdLst><p:sldId id="256" r:id="rId2"/><p:sldId id="257" r:id="rId1"/>'
169
175
  '</p:sldIdLst></p:presentation>')
170
- # rId2→slide1, rId1→slide2 : 즉 «발표 1장 = slide1.xml, 2장 = slide2.xml» 이 아니라 그 반대가
171
- # 되도록 일부러 꼬아 둔다. 파일명 순 폴백이면 순서가 뒤집혀 면제가 엉뚱한 장에 걸린다.
176
+ # rId2→slide2, rId1→slide1 : 발표 1장 = slide2.xml, 발표 2장 = slide1.xml.
177
+ # 파일명 순 폴백이면 순서가 뒤집혀 장 번호가 어긋나고 면제가 엉뚱한 장에 걸린다.
172
178
  PRES_RELS_2 = ('<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">'
173
- '<Relationship Id="rId2" Target="slides/slide1.xml" '
179
+ '<Relationship Id="rId2" Target="slides/slide2.xml" '
174
180
  'Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide"/>'
175
- '<Relationship Id="rId1" Target="slides/slide2.xml" '
181
+ '<Relationship Id="rId1" Target="slides/slide1.xml" '
176
182
  'Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide"/>'
177
183
  '</Relationships>')
184
+ # 🟥 R3-4 전용 — 위와 같은 꼬임에 **Target 이 Id 보다 앞에** 온다. 둘을 같이 걸어야
185
+ # «rels 속성 순서»의 수리가 되돌려질 때 적색이 된다(1장짜리로는 폴백과 같은 답).
186
+ PRES_RELS_2_TARGET_FIRST = (
187
+ '<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">'
188
+ '<Relationship Target="slides/slide2.xml" Id="rId2" '
189
+ 'Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide"/>'
190
+ '<Relationship Target="slides/slide1.xml" Id="rId1" '
191
+ 'Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide"/>'
192
+ '</Relationships>')
193
+
178
194
 
195
+ def build2(path, runs1, runs2, tpl_theme='Brand Display Bold', rels_xml=None):
196
+ """2장 덱. **발표순** 1장=runs1 · 2장=runs2.
179
197
 
180
- def build2(path, runs1, runs2, tpl_theme='Brand Display Bold'):
181
- """2장 덱. 발표순 1장=slide1, 2장=slide2 (rId 로 그렇게 묶는다)."""
198
+ 🟥 파일명순은 그 반대다 — runs1 은 `slide2.xml`, runs2 는 `slide1.xml` 에 들어간다.
199
+ 그래야 «장 순서를 못 읽고 파일명 순으로 떨어지는» 결함이 **관측 가능한 차이**를 낸다.
200
+ """
182
201
  with zipfile.ZipFile(path, 'w', zipfile.ZIP_DEFLATED) as z:
183
202
  z.writestr('[Content_Types].xml', CT)
184
203
  z.writestr('ppt/presentation.xml', PRES_2)
185
- z.writestr('ppt/_rels/presentation.xml.rels', PRES_RELS_2)
186
- z.writestr('ppt/slides/slide1.xml', slide(runs1))
187
- z.writestr('ppt/slides/slide2.xml', slide(runs2))
204
+ z.writestr('ppt/_rels/presentation.xml.rels', rels_xml or PRES_RELS_2)
205
+ z.writestr('ppt/slides/slide2.xml', slide(runs1))
206
+ z.writestr('ppt/slides/slide1.xml', slide(runs2))
188
207
  z.writestr('ppt/slideMasters/slideMaster1.xml', master('Helvetica Neue'))
189
208
  z.writestr('ppt/theme/theme1.xml', theme(tpl_theme))
190
209
  return path
191
210
 
192
211
 
212
+ def slot_run(text, font, slot):
213
+ """`<a:ea>` / `<a:cs>` 슬롯에만 서체가 있는 런 — 한중일·아랍 문자의 글꼴 자리."""
214
+ return (f'<a:r><a:rPr lang="ko-KR"><a:{slot} typeface="{font}"/></a:rPr>'
215
+ f'<a:t>{text}</a:t></a:r>')
216
+
217
+
218
+ def comment_run(text, font):
219
+ """**주석 처리된 런** — 도형을 통째로 주석으로 남긴 형태. 어디서도 렌더되지 않는다.
220
+
221
+ 🟥 픽스처는 «뚫리는 표기»여야 한다. 벌거벗은 `<!-- <a:latin .../> -->` 로는 이 레인이
222
+ 못 판별한다 — 그건 런 밖이라 `_occurrences` 가 어차피 안 본다(주석 제거를 되돌려도
223
+ 초록이었다, 5라운드 자기 되돌림 실측). 런 «안»에 넣어야 주석 제거가 하중을 진다
224
+ ([[feedback_fixture_must_use_the_breaking_spelling]]).
225
+ """
226
+ return (f'<!-- <a:r><a:rPr lang="ko-KR"><a:latin typeface="{font}"/></a:rPr>'
227
+ f'<a:t>{text}</a:t></a:r> -->')
228
+
229
+
193
230
  def sym_run(font):
194
231
  """`<a:sym>` — 기호 글꼴 슬롯. 실물 덱에 157개 있었다."""
195
232
  return (f'<a:r><a:rPr lang="ko-KR"><a:sym typeface="{font}"/></a:rPr>'
@@ -244,8 +281,11 @@ def main():
244
281
  k4 = build(os.path.join(d, 'k4.pptx'), [run('본문', 'Brand Display Bold')],
245
282
  theme_font='Papyrus')
246
283
  f4, _ = lane_font.scan(cfg_for(k4, tpl, GOOD), d)
247
- (ok if [x for x in f4 if x[1] == 'font-theme']
248
- else bad)('K4: 테마 이탈이 테마 1건으로 보고된다')
284
+ # 🟥 5라운드(codex) 지적 — 옛 판은 «있다»만 봤다. 이름이 «테마 **1건**으로»인데
285
+ # 2건이 나와도 초록이었다(중복 지적을 심어 실측: 30/30 그대로). 개수를 박는다.
286
+ _f4t = [x for x in f4 if x[1] == 'font-theme']
287
+ (ok if len(_f4t) == 1 and not [x for x in f4 if x[1] == 'font']
288
+ else bad)(f'K4: 테마 이탈이 테마 «1건»으로만 보고된다 (theme={len(_f4t)} · slide={len([x for x in f4 if x[1] == "font"])})')
249
289
 
250
290
  # K5 — 선언 면제
251
291
  f5, n5 = lane_font.scan(
@@ -295,13 +335,20 @@ def main():
295
335
  (ok if [x for x in f11 if 'Comic Sans' in x[3]]
296
336
  else bad)('K11 [S3]: 장 번호 필드(a:fld)의 이탈이 잡힌다')
297
337
 
298
- # K12 [A3+오탐] 렌더 안 되는 둘은 잡으면 안 된다 — 빈 런 · endParaRPr
338
+ # K12 [A3] 빈 런은 렌더 안 되므로 이탈이 아니다
339
+ # 🟥 5라운드(codex) 지적으로 **쪼갰다** — 옛 판은 빈 런과 endParaRPr 을 한 픽스처에
340
+ # 넣고 `not f12` 만 봤다. 통과가 둘 중 어느 쪽에 귀속되는지 알 수 없었다.
299
341
  k12 = build(os.path.join(d, 'k12.pptx'),
300
- [run('본문', 'Brand Display Bold'), empty_run('Comic Sans MS'),
301
- end_para('Papyrus')])
342
+ [run('본문', 'Brand Display Bold'), empty_run('Comic Sans MS')])
302
343
  f12, _ = lane_font.scan(cfg_for(k12, tpl, GOOD), d)
303
344
  (ok if not f12
304
- else bad)(f'K12 [A3]: 빈 런·endParaRPr 는 렌더 안 되므로 이탈 아님 (실제 {len(f12)}건)')
345
+ else bad)(f'K12 [A3]: 빈 런은 렌더 안 되므로 이탈 아님 (실제 {len(f12)}건)')
346
+ # K12b endParaRPr 단독 — 같은 이유로 따로 잰다
347
+ k12b = build(os.path.join(d, 'k12b.pptx'),
348
+ [run('본문', 'Brand Display Bold'), end_para('Papyrus')])
349
+ f12b, _ = lane_font.scan(cfg_for(k12b, tpl, GOOD), d)
350
+ (ok if not f12b
351
+ else bad)(f'K12b: 빈 문단 endParaRPr 은 렌더 안 되므로 이탈 아님 (실제 {len(f12b)}건)')
305
352
 
306
353
  # K13 [R2-3, 1라운드 A2 되돌림] 템플릿 마스터가 쓰는 서체여도 **finding 은 남는다**.
307
354
  # 억제하면 저자가 Office 기본값(Arial·Calibri)으로 본문을 찍어도 종료코드가 안 움직인다.
@@ -363,10 +410,14 @@ def main():
363
410
  else bad)('R3-2 [S]: 속성 순서와 무관하게 서체를 읽는다')
364
411
 
365
412
  # R3-4 [S/A] rels 의 Id/Target 순서가 뒤집혀도 장 순서를 읽는다
366
- r3b = build(os.path.join(d, 'r3b.pptx'), [run('코드', 'Comic Sans MS')],
367
- rels_xml=PRES_RELS_REVERSED)
413
+ # 🟥 5라운드 교체 — 옛 판은 **1장 픽스처**라 파일명 순 폴백과 정상 경로가 같은 답
414
+ # («slides 1»)을 냈다. rels 수리를 되돌려도 초록이었다(실측). 2장 + 꼬임 +
415
+ # Target-before-Id 로 바꿔 **되돌리면 «slides 1» 로 어긋나게** 만든다.
416
+ r3b = build2(os.path.join(d, 'r3b.pptx'),
417
+ [run('본문', 'Brand Display Bold')], [run('코드', 'Comic Sans MS')],
418
+ rels_xml=PRES_RELS_2_TARGET_FIRST)
368
419
  f3b, n3b = lane_font.scan(cfg_for(r3b, tpl, GOOD), d)
369
- (ok if [x for x in f3b if 'slides 1' in x[2]]
420
+ (ok if [x for x in f3b if 'slides 2' in x[2]]
370
421
  else bad)(f'R3-4 [S]: rels 속성 순서가 달라도 장 번호가 맞다 ({[x[2] for x in f3b]})')
371
422
 
372
423
  # R3-3 [A] 테마 이탈도 선언 면제를 존중한다
@@ -434,6 +485,104 @@ def main():
434
485
  (ok if [x for x in f44 if 'Wingdings' in x[3]]
435
486
  else bad)('R4-4 [S]: a:sym 기호 슬롯의 이탈도 잡는다')
436
487
 
488
+ # ── R5: 5라운드 (cross-family codex + 되돌림 프로브) ────────────────────
489
+ # R5-1 [S] 템플릿의 «렌더 안 되는» 토큰이 허용 집합으로 승격되면 안 된다.
490
+ # 4라운드가 endParaRPr 한 자리만 깁었고, 같은 뿌리의 다른 자리가 남아 있었다:
491
+ # 글자 없는 빈 런 · XML 주석. 유도를 판정과 같은 함수(`_occurrences`)로 통일했다.
492
+ tpl51 = build(os.path.join(d, 'tpl51.pptx'),
493
+ [run('본문', 'Brand Display Bold'), empty_run('Comic Sans MS')])
494
+ r51 = build(os.path.join(d, 'r51.pptx'),
495
+ [run('본문', 'Brand Display Bold'), run('코드', 'Comic Sans MS')])
496
+ f51, _ = lane_font.scan(cfg_for(r51, tpl51), d) # allow 미선언 → 템플릿에서 유도
497
+ (ok if [x for x in f51 if 'Comic Sans' in x[3]]
498
+ else bad)(f'R5-1 [S]: 템플릿의 «빈 런» 서체는 허용으로 승격되지 않는다 (실제 {len(f51)}건)')
499
+ # R5-1 컨트롤 — 템플릿이 그 서체를 **실제로 찍으면** 허용이 맞다(과교정 방지)
500
+ tpl51c = build(os.path.join(d, 'tpl51c.pptx'),
501
+ [run('본문', 'Brand Display Bold'), run('코드', 'Comic Sans MS')])
502
+ f51c, _ = lane_font.scan(cfg_for(r51, tpl51c), d)
503
+ (ok if not f51c
504
+ else bad)(f'R5-1 컨트롤: 템플릿이 실제로 찍는 서체는 허용된다 (실제 {len(f51c)}건)')
505
+ # R5-1b [S] 주석 안의 서체 선언도 승격되면 안 된다 — 어디서도 렌더되지 않는다
506
+ tpl51b = build(os.path.join(d, 'tpl51b.pptx'),
507
+ [comment_run('주석 처리된 도형', 'Comic Sans MS'), run('본문', 'Brand Display Bold')])
508
+ f51b, _ = lane_font.scan(cfg_for(r51, tpl51b), d)
509
+ (ok if [x for x in f51b if 'Comic Sans' in x[3]]
510
+ else bad)(f'R5-1b [S]: 템플릿 주석의 서체는 허용으로 승격되지 않는다 (실제 {len(f51b)}건)')
511
+ # R5-1c 판정 쪽에서도 주석은 안 센다 (같은 규칙이 양쪽에 걸린다 — 비대칭 재발 방지)
512
+ r51c = build(os.path.join(d, 'r51c.pptx'),
513
+ [run('본문', 'Brand Display Bold'), comment_run('주석 처리된 도형', 'Papyrus')])
514
+ f51d, _ = lane_font.scan(cfg_for(r51c, tpl, GOOD), d)
515
+ (ok if not f51d
516
+ else bad)(f'R5-1c: 덱 쪽 주석도 이탈로 세지 않는다 (실제 {len(f51d)}건)')
517
+
518
+ # R5-3 [S] `ea`/`cs` 슬롯 — 1라운드(A1)가 연 자리인데 **레인이 없었다**.
519
+ # `_FONT_TAG` 에서 `ea|cs` 를 빼도 self-test 가 30/30 초록이었다(되돌림 실측).
520
+ r53 = build(os.path.join(d, 'r53.pptx'),
521
+ [run('본문', 'Brand Display Bold'), slot_run('한자', 'Comic Sans MS', 'ea')])
522
+ f53, _ = lane_font.scan(cfg_for(r53, tpl, GOOD), d)
523
+ (ok if [x for x in f53 if 'Comic Sans' in x[3] and 'ea' in x[4]]
524
+ else bad)(f'R5-3 [S]: a:ea 슬롯의 이탈도 잡고 슬롯 이름을 낸다 (실제 {len(f53)}건)')
525
+ r53b = build(os.path.join(d, 'r53b.pptx'),
526
+ [run('본문', 'Brand Display Bold'), slot_run('نص', 'Papyrus', 'cs')])
527
+ f53b, _ = lane_font.scan(cfg_for(r53b, tpl, GOOD), d)
528
+ (ok if [x for x in f53b if 'Papyrus' in x[3] and 'cs' in x[4]]
529
+ else bad)(f'R5-3b [S]: a:cs 슬롯의 이탈도 잡는다 (실제 {len(f53b)}건)')
530
+
531
+ # R5-4 [A] 차트·SmartArt — 렌더되지만 `slides/` 밖이라 안 읽는다.
532
+ # 5라운드(codex) 지목: 옛 판은 그 상태에서 «이탈 0종» 을 자신 있게 찍었다.
533
+ # 스캔 범위를 넓히는 것은 별도 작업이고, 여기서 닫는 것은 **0 으로 렌더하지 않기**다.
534
+ CHART = ('<c:chartSpace xmlns:c="http://schemas.openxmlformats.org/drawingml/2006/chart" '
535
+ 'xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"><c:chart><c:title>'
536
+ '<c:tx><c:rich><a:p><a:r><a:rPr><a:latin typeface="Comic Sans MS"/></a:rPr>'
537
+ '<a:t>차트 제목</a:t></a:r></a:p></c:rich></c:tx></c:title></c:chart></c:chartSpace>')
538
+ r54 = build(os.path.join(d, 'r54.pptx'), [run('본문', 'Brand Display Bold')])
539
+ with zipfile.ZipFile(r54, 'a', zipfile.ZIP_DEFLATED) as _z:
540
+ _z.writestr('ppt/charts/chart1.xml', CHART)
541
+ f54, n54 = lane_font.scan(cfg_for(r54, tpl, GOOD), d)
542
+ (ok if any('안 읽는' in x and 'UNMEASURED' in x for x in n54)
543
+ else bad)('R5-4 [A]: 안 읽는 부품(차트)에 서체가 있으면 UNMEASURED 로 센다')
544
+ # R5-4 컨트롤 — 그런 부품이 없으면 그 노트는 안 나온다 (계기가 «항상 찍는» 게 아니다)
545
+ f54b, n54b = lane_font.scan(cfg_for(build(os.path.join(d, 'r54b.pptx'),
546
+ [run('본문', 'Brand Display Bold')]),
547
+ tpl, GOOD), d)
548
+ (ok if not any('안 읽는' in x for x in n54b)
549
+ else bad)('R5-4 컨트롤: 그런 부품이 없으면 노트도 없다')
550
+
551
+ # R5-5 [S] 작은따옴표 속성 — XML 이 허용한다. 못 읽으면 «부분 추출 실패»가
552
+ # 다른 런 덕에 UNMEASURED 도 못 타고 자신 있는 «이탈 0종» 으로 나간다.
553
+ r55 = build(os.path.join(d, 'r55.pptx'),
554
+ [run('본문', 'Brand Display Bold'),
555
+ "<a:r><a:rPr lang=\'ko-KR\'><a:latin typeface=\'Comic Sans MS\'/>"
556
+ "</a:rPr><a:t>코드</a:t></a:r>"])
557
+ f55, _ = lane_font.scan(cfg_for(r55, tpl, GOOD), d)
558
+ (ok if [x for x in f55 if 'Comic Sans' in x[3]]
559
+ else bad)(f'R5-5 [S]: 작은따옴표 속성의 서체도 읽는다 (실제 {len(f55)}건)')
560
+
561
+ # R5-6 [A] DrawingML 을 `a` 아닌 접두사로 묶은 장 — 못 읽는다. 0 이 아니라 «못 쟀다».
562
+ FOREIGN = ('<p:sld xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main" '
563
+ 'xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" '
564
+ 'xmlns:dm="http://schemas.openxmlformats.org/drawingml/2006/main">'
565
+ '<p:cSld><p:spTree><p:sp><p:txBody><a:p>'
566
+ '<a:r><a:rPr><a:latin typeface="Brand Display Bold"/></a:rPr><a:t>ok</a:t></a:r>'
567
+ '<dm:r><dm:rPr><dm:latin typeface="Comic Sans MS"/></dm:rPr>'
568
+ '<dm:t>bad</dm:t></dm:r>'
569
+ '</a:p></p:txBody></p:sp></p:spTree></p:cSld></p:sld>')
570
+ r56 = os.path.join(d, 'r56.pptx')
571
+ with zipfile.ZipFile(r56, 'w', zipfile.ZIP_DEFLATED) as _z:
572
+ _z.writestr('[Content_Types].xml', CT)
573
+ _z.writestr('ppt/presentation.xml', PRES)
574
+ _z.writestr('ppt/_rels/presentation.xml.rels', PRES_RELS)
575
+ _z.writestr('ppt/slides/slide1.xml', FOREIGN)
576
+ _z.writestr('ppt/slideMasters/slideMaster1.xml', master('Helvetica Neue'))
577
+ _z.writestr('ppt/theme/theme1.xml', theme('Brand Display Bold'))
578
+ f56, n56 = lane_font.scan(cfg_for(r56, tpl, GOOD), d)
579
+ (ok if any('접두사' in x and 'UNMEASURED' in x for x in n56)
580
+ else bad)('R5-6 [A]: `a` 아닌 DrawingML 접두사는 UNMEASURED 로 센다 («이탈 0» 아님)')
581
+ # R5-6 컨트롤 — 평범한 장에서는 그 노트가 안 나온다
582
+ _, n56b = lane_font.scan(cfg_for(k1, tpl, GOOD), d)
583
+ (ok if not any('접두사' in x for x in n56b)
584
+ else bad)('R5-6 컨트롤: `a:` 만 쓰는 장에는 그 노트가 없다')
585
+
437
586
  # R2-6b 대조 — 갈라진 부품에 «새로» 들인 서체는 여전히 잡힌다 (과교정 방지)
438
587
  LAY_NEW = LAY_T.replace('</p:sldLayout>', '<a:latin typeface="Papyrus"/></p:sldLayout>')
439
588
  r6b = build(os.path.join(d, 'r6b.pptx'), [run('본문', 'Brand Display Bold')],
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fh-qp",
3
- "version": "3.8.0",
3
+ "version": "3.10.0",
4
4
  "engines": {
5
5
  "claudeCode": ">=1.0.0"
6
6
  },
@@ -14,8 +14,11 @@
14
14
  <string>/bin/bash</string>
15
15
  <string>/path/to/forge-harness/scripts/probe_live_eval.sh</string>
16
16
  <!-- 🟥 COST + API-KEY DECISION IS THE OPERATOR'S — this template ships with NO default
17
- the subset / ids limiter flags limiter, i.e. installing it as-is runs the FULL selected set (12
18
- probes x 2 calls = 24 live `claude -p` invocations) every night. Read
17
+ the subset / ids limiter flags limiter, i.e. installing it as-is runs the FULL selected set.
18
+ COST AS OF 2026-09-14: 13 selected probes, of which 12 have 2 arms and G-TRIG-07 has 3
19
+ (it declares a second known-negative) = 27 arm-calls per rep, so the `--reps 3` below
20
+ makes it 81 live `claude -p` invocations every night, up from 66. Recount rather than
21
+ trusting this line: `probe_live_eval.sh --dry-run` prints the current selection. Read
19
22
  scripts/probe_live_eval.sh's own header (§COST) before installing, and add a
20
23
  a subset or ids argument argument here if a nightly full-set run is not what you
21
24
  want. This plist is a template, not a recommendation of scope. -->