fix(quiz): 유사퀴즈 제출 시각을 주입 Clock(Asia/Seoul)으로 계산 - #686
Conversation
복습 완료 전진의 '오늘'이 스케줄 조회(ScheduleController)의 KST '오늘'과 어긋나던 문제 수정. LocalDateTime.now() 는 JVM 기본 타임존(컨테이너 UTC)을 써서, KST 00:00~08:59 구간에 제출하면 today(UTC)=어제(KST)가 되어 오늘 due 복습 카드가 전진되지 않고(완료 무반영) due 날짜도 하루 밀렸다. 팀 표준 Clock(ClockConfig, Asia/Seoul)을 주입해 now(clock)로 계산한다. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 38 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough유사퀴즈 제출 시각 계산이 JVM 기본 타임존 대신 주입된 Asia/Seoul Changes유사퀴즈 제출 시각 타임존 정렬
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@src/test/java/com/wanted/backend/domain/quiz/application/service/SimilarQuizSubmissionServiceTest.java`:
- Around line 53-54: SimilarQuizSubmissionServiceTest의 고정 시각을 KST 08:30인
2026-05-11T23:30:00Z로 변경해 자정~08:59 경계를 재현하세요. 제출 결과의 submittedAt과
completeTodayReviews에 전달된 시각을 서로 비교하는 대신 각각 LocalDateTime.of(2026, 5, 12, 8,
30)인지 직접 단언해 실제 제출 시각과 clock 사용을 검증하세요.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 37b9e355-7f0c-46bd-97b5-788aa6689727
📒 Files selected for processing (2)
src/main/java/com/wanted/backend/domain/quiz/application/service/SimilarQuizSubmissionService.javasrc/test/java/com/wanted/backend/domain/quiz/application/service/SimilarQuizSubmissionServiceTest.java
고정 Clock을 KST 10:00 → UTC 23:30(KST 익일 08:30)으로 옮겨 버그가 재현되던 00:00~08:59 경계를 실제로 통과시키고, submittedAt·복습 전진 인자가 LocalDateTime.of(2026,5,12,8,30)인지 절대값으로 단언한다. 두 값의 동일성만 검사하던 기존 방식은 구현이 raw now()로 되돌아가도 통과해 회귀를 못 잡았다. (CodeRabbit 리뷰 반영) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
📌 연관 이슈
📝 작업 내용
SimilarQuizSubmissionService에 팀 표준Clock(ClockConfig, Asia/Seoul) 주입LocalDateTime.now()→LocalDateTime.now(clock)로 변경completeTodayReviews)의 '오늘'이 스케줄 조회의 KST '오늘'과 정렬되도록 수정🖥️ 프론트엔드 연동 가이드 (API 명세)
1. 영향 엔드포인트
POST/api/similar-quizzes/{similarQuizId}/submit: 제출 시 복습 완료 전진 (동작 정확도 개선)GET/api/schedule/me/today,/api/schedule/me: 복습(REVIEW) 항목 노출 (제출 후 정상적으로 사라짐)2. 요청 파라미터 (Request)
3. 정상 응답 예시
변경 없음
4.⚠️ 프론트엔드 참고 및 주의사항
🚨 주요 에러 코드 및 예외 (Exceptions)
💡 백엔드 리뷰 포인트 (Backend Review)
.now()다수(QuizController 등) — 후속 정리 대상.✅ 체크리스트
Summary by CodeRabbit