fix: OCR 날짜 파싱 실패 시 필드·신뢰도 계약 일치 - #23
Draft
hywznn wants to merge 1 commit into
Draft
Conversation
날짜 정규화에 실패한 필드는 fields와 field_confidences 양쪽에서 함께 제외해 Server OCR 응답 계약을 만족시킵니다. 잘못된 한·영 월 조합과 비지원 날짜 형식에 대한 회귀 테스트를 추가합니다.
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.
왜 필요한가요?
Refs #20
관련 Server PR: fowoco/server#112
AI OCR이 날짜 문자열을 인식했지만 ISO 날짜로 변환하지 못하면
fields에서는 해당 값을 제거하면서field_confidences에는 신뢰도를 남기고 있었습니다.Server는 두 객체가 동일한 field key를 가져야 한다고 검증하므로 다음 응답은
INVALID_RESPONSE_CONTRACT로 거부됩니다.{ "fields": {}, "field_confidences": { "date_of_birth": 0.99 } }무엇이 바뀌나요?
fields와field_confidences양쪽에서 제거합니다.검증
powershell또는pwsh가 없어 PowerShell 전용 테스트 2개는 실행 환경 조건으로 제외했습니다.병합 방향
이 PR의 Base는
feat/DB_to_SERVER입니다. 이 PR을 먼저 병합한 뒤 해당 Stateless OCR 브랜치를develop대상으로 별도 PR 생성·검증해야 합니다.