추출 계약 문서를 부분값 성공 규약으로 갱신 - #48
Merged
Merged
Conversation
- 세 필드(name·imageUrl·currentPrice) non-null 을 Extractor 가 보장하고 못 채우면 422 라는 규약을, "하나라도 채우면 200 / 하나도 못 채우면 422" 로 바꾼다. 사진에 가격이 박혀 있지 않은 것은 정상 입력이라 셋을 다 요구하면 "쇼핑몰 화면 캡처"만 통과하는 계약이 된다 - 세 필드를 채우는 책임이 Extractor 단독에서 "Extractor 가 채운 만큼 + 사용자가 나머지" 로 갈렸음을 명시한다. 호출자는 부분값을 INCOMPLETE 로 받는다 (TeamPiKi/core#944) - 이미지 경로의 업로드 object key 를 items/{uuid}.png 고정에서 결과물을 따르는 확장자로 고친다. 크롭 불가 포맷(HEIC·WebP·HEIF)의 원본을 png 로 위장 저장하던 버그를 함께 수정했기 때문이다 (TeamPiKi/extractor#35) - imageUrl 은 이미지 경로에서 업로드 결과라 여전히 항상 non-null 이고, 그래서 그 경로가 값 0개로 422 가 되는 일은 사실상 없다는 점을 함께 적는다 - code 표의 UNTRUSTWORTHY_VALUE 설명도 같은 기준으로 고친다. error-codes.yaml 은 code 집합·disposition 이 그대로라 변경 없다
|
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 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
INCOMPLETE상태로 수용하고(추출 부분값을 INCOMPLETE 로 수용하고 유저 입력으로 완성한다 core#945), extractor 는 값이 하나라도 있으면 200 으로 내려보낸다(추출 부분값을 200 으로 반환하고 크롭 불가 포맷의 위장 업로드를 고친다 extractor#37).Task
.png가 아니게 됐다.Action
네 자리를 고쳤다.
items/{uuid}.png고정UNTRUSTWORTHY_VALUE설명imageUrl은 여전히 항상 non-null 이라는 점을 명시했다. 업로드 결과라 크롭에 실패해도 원본이 올라가서, 그 경로가 값 0개로 422 가 되는 일은 사실상 없다.contracts/extraction-error-codes.yaml은 code 집합과 disposition 이 그대로라 건드리지 않았다. 각 repo 의 메타 테스트가 이 카탈로그와 코드를 대조하므로, 불필요하게 만지면 양쪽 CI 만 흔든다.Result
연관 이슈