@chrono-meta/fh-gate 3.8.0 β†’ 3.9.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.
@@ -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.9.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. -->
@@ -26,10 +26,16 @@
26
26
  # hand-curated CLI-event filter) and scripts/probe_live_eval_lib.py for the implementation. Run
27
27
  # `--dry-run` to see the full 33-row breakdown: which probes are selected, which are excluded and
28
28
  # why, and which pass the mechanical rule but have no authored expect/control yet
29
- # (NOT-YET-AUTHORED β€” an honest gap, not a silent drop; G-LINT-01 is the current example, deferred
30
- # because scoring a full /harness-doctor Step 5 run needs more than a keyword regex).
29
+ # (NOT-YET-AUTHORED β€” an honest gap, not a silent drop). As of 2026-09-14 that bucket is EMPTY:
30
+ # G-LINT-01, its long-standing occupant, moved to ARM_CAPABILITY_EXCLUDE because the real blocker
31
+ # is that its route needs the Skill layer the arm does not have β€” an unauthored spec was never the
32
+ # reason. See probe_live_eval_lib.py for the three named exclude sets and what each one does and
33
+ # does not claim.
31
34
  #
32
- # COST. Each selected probe costs TWO live `claude -p` calls (primary + control). Do not run the
35
+ # COST. Each selected probe costs TWO live `claude -p` calls (primary + control) β€” THREE if it
36
+ # declares `control_input_b`, a second known-negative (only G-TRIG-07 does, as of 2026-09-14).
37
+ # At the current 13-probe selection that is 27 arm-calls per rep; the nightly plist passes
38
+ # `--reps 3`, so a full night is 81 live calls. Do not run the
33
39
  # full selected set casually β€” use --subset N or --ids P1,P2 for a spot-check, and read
34
40
  # sim_isolated_run.sh's own header before running unattended (isolation guarantees, what "observe"
35
41
  # mode does and does not prevent, the three-valued rc/bytes verdict for a timeout vs an empty
@@ -85,6 +91,30 @@ SIM_RUNNER="${FH_SIM_RUNNER_BIN:-$REPO_ROOT/scripts/sim_isolated_run.sh}"
85
91
  # ── file-header constant β€” the "λ¬Έν„±" the design brief calls for. Change here, not per-invocation. ──
86
92
  THRESHOLD="0.8"
87
93
 
94
+ # ── EVIDENCE PRESERVATION (2026-09-14) ────────────────────────────────────────────────────────
95
+ # πŸŸ₯ WHY. Until today every run's response bodies were written into a `mktemp -d` and destroyed
96
+ # with it, and the launchd log carries only the runner's console tail β€” no answer text. So when
97
+ # 09-12 came back at pass_rate 0.18 and 09-13 came back 0/3 on EVERY probe, there was no way to
98
+ # tell a model-availability blip from a rate limit from a clone failure from a real regression.
99
+ # Both nights are now PERMANENTLY UNATTRIBUTABLE. That is the cost this block exists to stop
100
+ # paying: a nightly instrument that throws away its own evidence can report a number but can
101
+ # never explain one.
102
+ #
103
+ # WHAT IS KEPT, AND WHAT IS NOT. Only the FLAT artifacts each arm dir holds β€” the response `.txt`,
104
+ # its `.stderr.txt`, the `.prompt.txt`, the `.meta.tsv` (corpus_head_date / model / cutoff) and the
105
+ # runner console log. πŸŸ₯ NOT the clones: sim_isolated_run.sh puts each rep's full
106
+ # `git clone --local --no-hardlinks` under `<out>/w_<arm>_r<n>/repo`, and this repo's tracked tree
107
+ # is ~260MB, so preserving `--out` wholesale would deposit tens of GB per night. `find -maxdepth 1
108
+ # -type f` is what draws that line: the clone trees live at depth 2+ and are never copied.
109
+ #
110
+ # WHERE. tracks/_meta/live_eval_runs/<date>/ β€” gitignored via `.gitignore:45 tracks/**` (verified
111
+ # with `git check-ignore -v`), same zone as the report the run already writes.
112
+ EVIDENCE_ROOT_DEFAULT="tracks/_meta/live_eval_runs"
113
+ # Retention: a nightly full set is ~66 small text files (a few hundred KB). 14 days is chosen to
114
+ # span the weekly cadence with a margin, so a Monday session can still read the previous week's
115
+ # incident. Override with FH_LIVE_EVAL_KEEP_DAYS; 0 disables pruning entirely (never auto-deletes).
116
+ KEEP_DAYS="${FH_LIVE_EVAL_KEEP_DAYS:-14}"
117
+
88
118
  MODEL="sonnet"
89
119
  # ── reps β€” ν”„λ‘œλΈŒλ‹Ή 반볡 횟수. κΈ°λ³Έ 1(μ’…μ „ 행동 κ·ΈλŒ€λ‘œ), 무인 λŸ°μ€ plist μ—μ„œ 3 을 μ€€λ‹€. ──
90
120
  # πŸŸ₯ μ™œ 1 이 κΈ°λ³Έμ΄λ©΄μ„œ 야간은 3 인가 (2026-09-06 μ‹€μΈ‘): 유효 런 3 개λ₯Ό μž¬μ±„μ ν•˜λ‹ˆ 12 ν”„λ‘œλΈŒ 쀑
@@ -99,6 +129,7 @@ SUBSET=""
99
129
  IDS=""
100
130
  OUTDIR=""
101
131
  REPORT_OUT="" # --report-out: where the markdown report lands (default: tracks/_meta/live_eval_<date>.md)
132
+ NO_EVIDENCE=0 # --no-evidence: skip the preserved-artifact copy (lanes / throwaway spot-checks)
102
133
  while [ $# -gt 0 ]; do
103
134
  case "$1" in
104
135
  --subset) SUBSET="${2:-}"; shift 2 ;;
@@ -108,6 +139,7 @@ while [ $# -gt 0 ]; do
108
139
  --dry-run) DRYRUN=1; shift ;;
109
140
  --out) OUTDIR="${2:-}"; shift 2 ;;
110
141
  --report-out) REPORT_OUT="${2:-}"; shift 2 ;; # lanes/spot-checks MUST pass this β€” never the live path
142
+ --no-evidence) NO_EVIDENCE=1; shift ;;
111
143
  *) echo "unknown flag: $1" >&2; exit 2 ;;
112
144
  esac
113
145
  done
@@ -168,6 +200,54 @@ RUN_DATE="$(date +%Y-%m-%d)"
168
200
  OUTDIR="${OUTDIR:-$WORKDIR/run}"
169
201
  mkdir -p "$OUTDIR"
170
202
 
203
+ # ── evidence dir + retention prune ────────────────────────────────────────────────────────────
204
+ EVIDENCE_DIR=""
205
+ if [ "$NO_EVIDENCE" -eq 0 ]; then
206
+ # Overridable for the lanes ONLY β€” a lane that wrote into the live evidence path would be the
207
+ # same class of defect as the 2026-09-05 incident where a lane overwrote that night's report
208
+ # ([[feedback_sim_with_write_tools_is_a_fleet]]). Note the prune guard below deliberately
209
+ # REFUSES to prune an overridden root, so this flag can never be used to point the delete at
210
+ # something else.
211
+ EVIDENCE_ROOT="${FH_LIVE_EVAL_EVIDENCE_ROOT:-$REPO_ROOT/$EVIDENCE_ROOT_DEFAULT}"
212
+ mkdir -p "$EVIDENCE_ROOT"
213
+ EVIDENCE_DIR="$EVIDENCE_ROOT/$RUN_DATE"
214
+ # A second run on the same day gets its own dir rather than overwriting the first. The report
215
+ # path already learned this lesson the hard way (2026-09-05 10:18, a lane overwrote the 02:30
216
+ # record); evidence is the artifact you go back to *because* the record looked wrong, so losing
217
+ # the earlier one is worse here, not better.
218
+ [ -d "$EVIDENCE_DIR" ] && EVIDENCE_DIR="$EVIDENCE_ROOT/${RUN_DATE}_$(date +%H%M%S)"
219
+ mkdir -p "$EVIDENCE_DIR"
220
+
221
+ # Prune. Guarded three ways, because this is the one line in this script that deletes anything:
222
+ # (a) the root must be the literal path built above, under $REPO_ROOT/tracks/_meta
223
+ # (b) only DIRECTORIES exactly one level down whose name is date-shaped
224
+ # (c) only older than KEEP_DAYS; KEEP_DAYS=0 disables pruning outright
225
+ # `-mtime +N` is portable across BSD (macOS) and GNU find; `-mindepth/-maxdepth 1` pins depth so
226
+ # a nested path can never be reached.
227
+ case "$EVIDENCE_ROOT" in
228
+ "$REPO_ROOT/tracks/_meta/"*)
229
+ if [ "$KEEP_DAYS" -gt 0 ] 2>/dev/null; then
230
+ while IFS= read -r _old; do
231
+ [ -n "$_old" ] || continue
232
+ echo " 🧹 pruning evidence older than ${KEEP_DAYS}d: $_old"
233
+ rm -rf "$_old"
234
+ done < <(find "$EVIDENCE_ROOT" -mindepth 1 -maxdepth 1 -type d \
235
+ -name '20[0-9][0-9]-[0-9][0-9]-[0-9][0-9]*' -mtime "+$KEEP_DAYS" 2>/dev/null)
236
+ fi
237
+ ;;
238
+ *) echo " ⚠️ evidence root outside tracks/_meta β€” refusing to prune: $EVIDENCE_ROOT" >&2 ;;
239
+ esac
240
+ fi
241
+
242
+ # Copy ONLY the flat per-arm artifacts out of a probe dir. The full clone trees live at
243
+ # <probe_out>/w_<arm>_r<n>/repo/** β€” `-maxdepth 1 -type f` is what keeps them out (see the header
244
+ # block: preserving them wholesale would be tens of GB a night).
245
+ preserve_probe_evidence() { # $1 = probe_out dir, $2 = probe id
246
+ [ -n "$EVIDENCE_DIR" ] || return 0
247
+ mkdir -p "$EVIDENCE_DIR/$2" || return 0
248
+ find "$1" -maxdepth 1 -type f -exec cp {} "$EVIDENCE_DIR/$2/" \; 2>/dev/null || true
249
+ }
250
+
171
251
  echo ""
172
252
  echo "── live run: $SELECTED_COUNT probe(s), model=$MODEL, out=$OUTDIR ──────────────────────"
173
253
 
@@ -214,6 +294,30 @@ while IFS= read -r id; do
214
294
  echo " Partial run artifacts kept at: $OUTDIR" >&2
215
295
  exit 2
216
296
  fi
297
+
298
+ # OPTIONAL second known-negative β€” a THIRD live call per rep, spent only where one control has
299
+ # been measured to under-discriminate. Keyed off the spec file's existence, which the selector
300
+ # writes only when `control_input_b` is declared (so "file absent" can only mean "not declared",
301
+ # never "declared but empty").
302
+ if [ -f "$SPEC_DIR/$id.control_b.txt" ]; then
303
+ control_b_text="$(cat "$SPEC_DIR/$id.control_b.txt")"
304
+ echo "β–Ά $id β€” control_b"
305
+ bash "$SIM_RUNNER" --arm control_b --reps "$REPS" --prompt "$control_b_text" \
306
+ --mode observe --model "$MODEL" --out "$probe_out" \
307
+ > "$probe_out/_runner_control_b.log" 2>&1
308
+ runner_rc=$?
309
+ tail -n 6 "$probe_out/_runner_control_b.log"
310
+ if [ "$runner_rc" -eq 2 ]; then
311
+ echo "" >&2
312
+ echo "❌ $id control_b runner call exited 2 (preflight failure, before \`claude\` ran)." >&2
313
+ echo " Aborting the whole run rather than burning the remaining clones." >&2
314
+ echo " Runner log: $probe_out/_runner_control_b.log" >&2
315
+ echo " Partial run artifacts kept at: $OUTDIR" >&2
316
+ exit 2
317
+ fi
318
+ fi
319
+
320
+ preserve_probe_evidence "$probe_out" "$id"
217
321
  done < "$SPEC_DIR/selected_ids.txt"
218
322
 
219
323
  echo ""
@@ -233,6 +337,16 @@ python3 "$LIB" score \
233
337
  --reps "$REPS"
234
338
  score_rc=$?
235
339
 
340
+ if [ -n "$EVIDENCE_DIR" ]; then
341
+ # The report is part of the evidence: a preserved body set with no verdict beside it forces the
342
+ # next reader to re-derive what the run concluded.
343
+ cp "$REPORT_PATH" "$EVIDENCE_DIR/_report.md" 2>/dev/null || true
344
+ _kept=$(find "$EVIDENCE_DIR" -type f 2>/dev/null | wc -l | tr -d ' ')
345
+ _size=$(du -sh "$EVIDENCE_DIR" 2>/dev/null | cut -f1)
346
+ echo ""
347
+ echo "πŸ“¦ response bodies preserved: $EVIDENCE_DIR ($_kept files, ${_size:-?}; retention ${KEEP_DAYS}d)"
348
+ fi
349
+
236
350
  echo ""
237
351
  echo "run artifacts kept at: $OUTDIR"
238
352
  echo "(temp selection workspace $WORKDIR is NOT auto-deleted when --out was passed explicitly; ok to remove by hand)"