Repository navigation
[Fix] 여행 기록 스티커 검증 실패 시 임시 사진 소모 방지 - #427
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Validate stickers before image movement src/main/java/com/yeogido/backend/domain/travel/service/TravelRecordServiceImpl.java, src/test/java/com/yeogido/backend/domain/travel/service/TravelRecordStickerValidationTransactionTest.java |
Creation and update prepare sticker data before moving images. Update retains existing stickers when the request is null and removes them when the list is empty. Integration tests check validation failures, preserved state, and successful retries using the same temporary photo. |
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix · Severity of issue fixed: Medium
Possibly related PRs
- yeogido/backend#421: This PR changes sticker validation in the version-checked update flow introduced by PR
#421.
Suggested reviewers: yangjiae12
Merge Risk: 
Minimal · up to 8f0b6
-
The intended validation order is in place, with no identified issue requiring a fix before merge.
Pre-merge checks: 
5
-
Full details: Linked Issues check
-
Explanation
[
#426] The create path resolves and validates stickers, checks sticker availability, and only then callsmoveImages. The update path reserves the version, validates stickers against the existing placement, and only then callsmoveImages. Transactional rollback restores the reserved version and existing data when validation fails.TravelRecordStickerValidationTransactionTestverifies no photo move on missing, foreign, deleted, or duplicate-zIndex stickers. It also verifies retry with the same temporary photo and original version. The test covers omitted stickers and empty-list deletion. The existing update helper behavior for retained stickers remains unchanged.
Full details: Out of Scope Changes check
-
Explanation
The whole-PR diff changes
TravelRecordServiceImpland addsTravelRecordStickerValidationTransactionTest. The service changes move sticker validation before photo movement and reuse the validated sticker map. The test covers rollback, retry, validation errors, and sticker-list policies required by [#426]. No unrelated product behavior or unrelated refactoring appears.
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 7 functions across 2 files.
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
|
@coderabbitai review |
Action performed
|
yangjiae12
left a comment
There was a problem hiding this comment.
이전에 말씀드린 부분 반영된 거 확인했습니다! 수고하셨습니다~
📌 PR 설명
🔗 연관된 이슈
Resolves: #426
📝 리뷰 요구사항
💻 테스트 결과
등록 스티커 검증 실패

수정 스티커 검증 실패

원래 버전으로 정상 수정

Summary by CodeRabbit