test(pdf): integration smoke (w/ search + cancel) + vector regression + alnum e2e (#[ignore]) for v0.20 sub-item 1

Step 9 (Group I) of v0.20.0 sub-item 1 (scanned PDF OCR) plan.

I3 — crates/kebab-app/tests/ingest_pdf_ocr_smoke.rs (신규):
- ingest_with_mock_ocr_yields_pdf_ocr_summary — `#[ignore]` real Ollama,
  ingest_with_config production path + IngestItem.pdf_ocr_pages verify.
- ocr_text_indexed_and_searchable — `#[ignore]` real Ollama, app.search
  의 OCR text indexed verify (§ Acceptance #2).
- ingest_with_cancel_aborts_mid_pdf — production cancel chain (pre-set
  cancel=true + dummy endpoint, no panic/deadlock verify).

I4 — crates/kebab-parse-pdf/tests/text_extractor_regression.rs (신규):
- vector_pdf_extract_byte_identical_to_baseline — F4 mojibake.pdf 의 vector
  PDF path canonical 의 byte-identical 보존 (Step 1-8 모든 변경 전후 invariant).
- baseline 신규 = tests/snapshots/vector_pdf_canonical.json (first run create).
- normalize_provenance_timestamps inline helper (R-3 mitigation, workspace
  전체 부재 — 신규 12-line).

I5 — crates/kebab-parse-pdf/tests/ocr_e2e.rs (신규):
- f1_alnum_accuracy_ge_85 / f2_alnum_accuracy_ge_70 — `#[ignore]` real
  Ollama qwen2.5vl:3b, § Acceptance §9 #3 의 implementation.
- alnum metric = strsim::levenshtein (dev-dep 추가).
- truth file copy from PoC scratch (page1.txt + page2-batchim.txt) →
  scanned_page1_truth.txt + scanned_page2_truth.txt.
- kebab-parse-image dev-dep 추가 (OllamaVisionOcr::from_parts 호출용).
  parser isolation invariant 의 dev-dep exception (spec §3.1, dep graph
  baseline -e normal 보존).

spec:  docs/superpowers/specs/2026-05-27-pdf-scanned-ocr-spec.md
plan:  docs/superpowers/plans/2026-05-27-pdf-scanned-ocr-plan.md (Step 9 I3+I4+I5)
prior: c9e0594 (Step 8 CLI printer)
contract: §9

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-27 10:10:58 +00:00
parent c9e05941c5
commit 48197687b7
7 changed files with 384 additions and 1 deletions

View File

@@ -0,0 +1,32 @@
한국어 OCR 품질 검증을 위한 합성 문서
본 문서는 Tesseract OCR 의 한국어 인식 정확도를 측정하기 위한 ground truth 입니다. 다양한 한국어 문자 유형을 포함합니다.
1. 일반 한국어 문장
오늘은 2026년 5월 27일 화요일이다. 날씨가 맑고 기온은 섭씨 22도이다. 봄의 끝자락에서 여름이 다가오고 있다.
2. 한자 혼용
大韓民國은 동아시아의 한 국가이다. 首都는 서울特別市이며 인구는 약 5천만 명이다. 國語는 한국어이고 文字는 한글을 사용한다.
3. 영문 혼용
RAG (Retrieval-Augmented Generation) 는 검색 기반 생성 모델이다. Tesseract 는 Google 이 후원하는 OCR 엔진이다. Apache 2.0 라이선스로 배포된다.
4. 숫자와 기호 혼합
- 가격: 12,345원 (USD $9.99)
- 좌표: (37.5665, 126.9780)
- 비율: 95.7% 정확도 달성
- 날짜: 2026-05-27, 14:30:00
5. 기술 용어
RAM 16GB, CPU 8코어, GPU 없음. 디스크 사용량은 250GB 중 51GB. PostgreSQL 와 SQLite 데이터베이스 모두 지원한다.
6. 짧은 문장 모음
- 빛의 속도는 약 30만 km/s 이다.
- 지구는 태양 주위를 1년에 한 번 돈다.
- 사람의 평균 체온은 36.5도이다.
- 한 시간은 60분, 1분은 60초이다.
7. 어려운 글자
의사: 의의있는 의미를 의문스럽게 의도한다.
받침이 복잡한 글자: 깎, 닭, 흙, 읊, 닮, 값.
이중 모음: 의자, 예의, 외출, 위험, 왜냐하면.