# task-2401 L1 Evidence 1차 vs 2차 비교 보고서

생성일: 2026-05-03  
작성자: 닌기르수 (개발5팀 테스터)  
태스크: task-2401 IDS Phase 1 한글 폰트 임베드 회귀 테스트

---

## 비교 대상

| 구분 | 파일 경로 |
|------|-----------|
| 1차 PNG | `memory/reports/task-2389-evidence/l1_smoke_supabase_h4.png` |
| 2차 PNG | `memory/reports/task-2401-evidence-25-stratified/evidence/financial_h4_gradient_1200x675.png` |

---

## 수치 비교

| 항목 | 1차 (task-2389) | 2차 (task-2401) | 판정 |
|------|----------------|----------------|------|
| 해상도 | 1080×1080 | 1200×675 | Latin square 사이즈 배분 |
| 파일 크기 | **5.98 KB** | **271.47 KB** | +4436% 개선 |
| file_size_ok | **FAIL** | PASS | |
| unique_colors | 18 | 1108 | +6056% |
| color_diversity_ok | True (임계값 ≥10) | True | |
| dominant_color_ratio | **0.9996 (99.96%)** | **0.0708 (7.08%)** | 대폭 개선 |
| blank_ratio_ok | **FAIL** (>97%) | PASS | |
| tofu_score | 0.25 | **0.05** | |
| tofu_glyph_clear | True | True | |
| verify 종합 pass | **False** | **True** | |

---

## 핵심 차이 분석

### 1. 폰트 임베드 (가장 중요한 개선)

**1차**: hybrid-image의 `render_html_to_png`가 Node.js Satori 호출 실패 후 `_pillow_fallback`으로 무음 강등.  
Pillow는 한글 폰트가 없으면 tofu(□□□)를 렌더하거나 blank에 가까운 이미지를 생성.  
결과: 6KB, dominant_ratio 99.96% → 사실상 단색 배경에 빈 텍스트 영역.

**2차**: `satori-cardnews/_satori.py`의 `safe_render_html_to_png`가  
Pretendard + NotoSansCJK 폰트를 명시적으로 로드한 Node.js Satori를 강제 호출.  
silent fallback guard(`install_silent_fallback_guard`)가 `_pillow_fallback` / `_write_blank_png`를  
RuntimeError로 차단하여 무음 강등 자체가 불가.  
결과: 271KB, dominant_ratio 7.08% → 그라데이션과 한글 텍스트가 정상 렌더됨.

### 2. 그라데이션 렌더링

**1차**: Pillow `Image.new("RGB", ...)` 단색 배경 → 1채널 단색.  
**2차**: Satori `linear-gradient(135deg, ...)` → 픽셀 단위 그라데이션 → unique_colors 1108개.

### 3. 레이아웃 구조

**1차**: Pillow `draw.text((40, 40), ...)` — 좌상단 고정 텍스트만.  
**2차**: h4_gradient 패턴 — 중앙 정렬 컨텐츠 박스 + 둥근 모서리 오버레이 + accent 구분선.

### 4. 색상 다양성

**1차**: 18 unique colors (단색 배경 + 흰색 텍스트 약간).  
**2차**: 1108 unique colors (그라데이션 + 반투명 오버레이 + 텍스트).

### 5. 파일 크기

**1차**: 5.98 KB → 10KB 기준 미달 (verify FAIL).  
**2차**: 271 KB → 정상 PNG.

---

## 검증 결과 변화

```
1차 verify: FAIL
  file_size_ok:       False  (5.98 KB < 10 KB)
  blank_ratio_ok:     False  (99.96% > 97%)
  tofu_score:         0.25

2차 verify: PASS
  file_size_ok:       True   (271 KB)
  color_diversity_ok: True   (1108 unique colors)
  blank_ratio_ok:     True   (7.08%)
  tofu_glyph_clear:   True   (tofu=0.05)
  html_string_match:  True
```

---

## 25장 stratified L1 evidence 요약

| 카테고리 | 패턴 수 | pass | 평균 파일크기 |
|----------|---------|------|---------------|
| financial | 5 | 5/5 | 123.5 KB |
| saas | 5 | 5/5 | 179.3 KB |
| consumer | 5 | 5/5 | 117.3 KB |
| luxury | 5 | 5/5 | 143.7 KB |
| tech_minimal | 5 | 5/5 | 113.0 KB |
| **합계** | **25** | **25/25** | **135.4 KB** |

평균 tofu_score: 0.0500 (전 케이스 동일 — 정상 렌더 확정)

---

## 결론

task-2389에서 탐지된 silent fallback corruption이 task-2401에서 완전히 차단됨.

- `install_silent_fallback_guard`가 hybrid-image의 무음 강등 경로를 RuntimeError로 치환
- `safe_render_html_to_png`가 Node.js Satori 강제 호출 + 출력 검증 (10KB 기준)
- 25장 전체 verify PASS — silent pass 0건
