추출 부분값을 200 으로 반환하고 크롭 불가 포맷의 위장 업로드를 고친다 - #37
Merged
Conversation
- 응답 경계가 세 필드(name·imageUrl·currentPrice) 중 하나라도 비면 422 로 닫아 채운 값까지 함께 버렸다. prod 30일 이미지 추출 18건 중 16건이 이 게이트에 걸렸는데, 사진에 가격이 박혀 있지 않은 것은 정상 입력이라 그 계약은 사실상 "쇼핑몰 화면 캡처"만 통과시켰다 - 값이 하나라도 있으면 200 으로 내려보내고, 하나도 못 건졌을 때만 UNTRUSTWORTHY_VALUE 로 닫는다. 호출자가 부분값을 INCOMPLETE 로 받아 사용자가 나머지를 채운다 (TeamPiKi/core#944) - 에스컬레이션 판정(missingReadyField)은 그대로 뒀다 — 부분값일 때 헤드리스로 한 번 더 시도하는 것은 여전히 옳고, 달라지는 건 "그래도 부분값이면 어떻게 끝내는가" 뿐이다 - 크롭 불가 포맷(HEIC·WebP·HEIF 는 ImageIO 에 디코더가 없다)의 원본을 .png · image/png 로 올리던 버그를 함께 고친다. prod 에 확장자·content-type 은 png 인데 바이트는 HEIC 인 객체가 실제로 있었고, 브라우저 대부분이 그 파일을 렌더링하지 못한다. 등록 허용 5개 포맷 중 셋이 이 경로를 탄다 - 부분값은 성공 응답이라 code 가 남지 않아 어느 필드가 비었는지 사후 판별이 불가능하다 — missing 을 로그로 남긴다 - 크롭 여부(cropped)도 로그에 더한다. croppedUrl 이라는 이름과 달리 크롭을 건너뛴 경우가 섞여 있어, 원본이 그대로 올라간 비율을 알 수 없었다
|
Important Review available on request
Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment ⚙️ Run configurationConfiguration used: Organization UI 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 was referenced Aug 15, 2026
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.
Situation
Task
Action
응답 계약
UNTRUSTWORTHY_VALUEUNTRUSTWORTHY_VALUEcurrency는 원래 READY 필수가 아니라, 단독으로 남아도 "건졌다" 의 근거로 세지 않는다.크롭 불가 포맷의 위장 업로드
ImageCropper는ImageIO로 디코딩하는데 png·jpeg 만 지원해 나머지는 크롭을 건너뛴다(의도된 fallback). 그런데 업로드는 항상.png·image/png로 하드코딩돼 있었다..png/image/png.png/image/png(위장)관측
croppedUrl이라는 필드명과 달리 크롭을 건너뛴 경우가 섞여 있어, 원본이 그대로 올라간 비율을 알 수 없었다.Result
contracts/extraction-api.md)이 아직 "세 필드 non-null 을 Extractor 가 보장한다, 못 채우면 422" 로 되어 있어 별도 PR 로 고쳐야 한다.연관 이슈