Repository navigation
feat: AI 코스 후보 추천 기능 구현 - #44
Conversation
|
Warning Review limit reached
Next review available in: 48 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. 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: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughChangesThe PR adds a validated AI course recommendation API. It defines recommendation response records, supports place lookup and construction, adds a recommendation failure code, permits unauthenticated endpoint access, and updates affected test fixtures. AI course recommendation
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant SecurityConfig
participant CourseController
participant CourseAiRecommendationService
Client->>SecurityConfig: POST /courses/ai-recommendations
SecurityConfig->>CourseController: Permit request
CourseController->>CourseAiRecommendationService: recommend(request)
CourseAiRecommendationService-->>CourseController: AiRecommendations
CourseController-->>Client: AiRecommendations response
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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
🧹 Nitpick comments (1)
src/test/java/com/daytodo/global/config/TargetApiSecurityTest.java (1)
60-60: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd a regression test for unauthenticated AI recommendations.
@MockitoBeanonly supplies the newCourseControllerdependency. The current tests do not verify thatPOST /courses/ai-recommendationsis permitted without a JWT. StubcourseAiRecommendationService.recommend(...), send a valid request withoutAuthorization, and verify the response and service call.🤖 Prompt for 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. In `@src/test/java/com/daytodo/global/config/TargetApiSecurityTest.java` at line 60, Add a new test method in TargetApiSecurityTest that verifies unauthenticated access to the POST /courses/ai-recommendations endpoint is permitted. Stub the courseAiRecommendationService.recommend method to return a valid response, send a request to the endpoint without an Authorization header, and assert both that the HTTP response is successful and that the mocked service method was invoked as expected.
🤖 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/main/java/com/daytodo/domain/place/entity/PlacePriceEstimate.java`:
- Around line 42-49: Update the PlacePriceEstimate constructor to validate that
maxPrice is greater than or equal to minPrice before assigning the fields,
rejecting invalid ranges so they cannot reach persistence or budget
calculations. Preserve valid estimates and use the class’s established
validation or exception convention if one exists.
---
Nitpick comments:
In `@src/test/java/com/daytodo/global/config/TargetApiSecurityTest.java`:
- Line 60: Add a new test method in TargetApiSecurityTest that verifies
unauthenticated access to the POST /courses/ai-recommendations endpoint is
permitted. Stub the courseAiRecommendationService.recommend method to return a
valid response, send a request to the endpoint without an Authorization header,
and assert both that the HTTP response is successful and that the mocked service
method was invoked as expected.
🪄 Autofix
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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 734de13f-c72e-46ec-8a42-e756de061b05
📒 Files selected for processing (10)
src/main/java/com/daytodo/domain/course/controller/CourseController.javasrc/main/java/com/daytodo/domain/course/dto/CourseRequest.javasrc/main/java/com/daytodo/domain/course/dto/CourseResponse.javasrc/main/java/com/daytodo/domain/course/exception/code/CourseErrorCode.javasrc/main/java/com/daytodo/domain/place/entity/Place.javasrc/main/java/com/daytodo/domain/place/entity/PlacePriceEstimate.javasrc/main/java/com/daytodo/domain/place/repository/PlaceRepository.javasrc/main/java/com/daytodo/global/config/SecurityConfig.javasrc/test/java/com/daytodo/domain/course/service/CourseServiceTest.javasrc/test/java/com/daytodo/global/config/TargetApiSecurityTest.java
📌 관련 이슈
🔎 What is this PR?
POST /courses/ai-recommendations
✨ Changes
📷 Result
💬 To. Reviewer
✅ 체크 리스트
Summary by CodeRabbit