Conversation
폰트 인코딩이 깨져 대체 문자(�)가 섞인 PDF가 검증 없이 Chunk·Embedding·RAG로 전달되던 문제를 막는다. 문서 전체 대비 비율이 5%를 넘으면 DOCUMENT_CONTENT_GARBLED로 차단하고, 기존 문서 내용 오류와 동일한 재처리 정책으로 분류한다.
PdfDocumentParser.isGarbled() 임계치 경계값과 parseDocument()의 정상 문서 오탐 방지, WorkerIndexingFailureClassifier의 새 에러코드 분류를 검증한다.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
변경 내용
�비율이 5%를 넘으면DOCUMENT_CONTENT_GARBLED(DOCUMENT-PARSING-008)로 차단합니다.WorkerIndexingFailureClassifier의 기존DOCUMENT_CONTENT_INVALID분류에 등록해, 암호화/OCR 필요/파싱 실패와 동일한 재처리 정책을 그대로 상속받습니다.검증
./backend/gradlew -p backend test --tests "*PdfDocumentParserTest*" --tests "*WorkerIndexingFailureClassifierTest*"통과./backend/gradlew -p backend build -x test통과알려진 한계
PDFBox가 실제로
�를 출력하는 상황은 폰트 ToUnicode CMap이 깨진 손상 PDF에서만 발생하는데, 기존 테스트 헬퍼(Standard14 Helvetica/WinAnsiEncoding)로는 이런 손상을 인위적으로 재현할 수 없습니다. 그래서parseDocument()레벨의 실제 손상 PDF 통합 테스트는 이번에 빠졌고,isGarbled()로직 자체는 문자열 직접 테스트로 커버했습니다. 실제 문제 PDF를 확보하면 fixture로 추가하는 걸 후속 작업으로 남겨둡니다.Closes #257