feat: 온보딩 나이대 응답에 "잘 모르겠어요"(UNDECIDED) 추가 - #138
Conversation
… of positional constructor
|
Warning Review limit reached
Next review available in: 41 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: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthrough온보딩에 Changes온보딩 기능 변경
AWS 스케줄 변경
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant OnboardingServiceImpl
participant OnboardingRepository
Client->>OnboardingServiceImpl: targetAgeBands 제출
OnboardingServiceImpl->>OnboardingServiceImpl: UNDECIDED 선택 검증
OnboardingServiceImpl->>OnboardingRepository: 유효한 온보딩 저장
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #138 +/- ##
============================================
+ Coverage 88.55% 88.58% +0.03%
- Complexity 491 493 +2
============================================
Files 107 108 +1
Lines 1546 1560 +14
Branches 119 120 +1
============================================
+ Hits 1369 1382 +13
- Misses 130 132 +2
+ Partials 47 46 -1
... and 1 file with indirect coverage changes
☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
infra/modules/aws/app/schedule.tf (1)
26-27: 🩺 Stability & Availability | 🔵 Trivial스케줄 비활성화 전에 인스턴스 상태 전환을 보장하세요.
stop과start를 모두DISABLED로 변경하면, 적용 시점에aws_instance.this가stopped상태여도 다시 시작할 이벤트가 없습니다. 특히 00:00~09:00 사이에 적용하면 운영 서버가 계속 중단될 수 있습니다. 적용 전에 인스턴스를running으로 전환하고, 적용 후 상태를 확인하는 배포 절차를 추가하거나 기존 절차를 검증해 주세요.Also applies to: 46-47
🤖 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 `@infra/modules/aws/app/schedule.tf` around lines 26 - 27, Update the deployment procedure for the schedules around the stop and start resource definitions so the target aws_instance.this is transitioned to running before both schedules are disabled, and verify its running state after applying the change. Reuse or validate the existing deployment mechanism rather than relying solely on the Terraform state transition.src/test/java/chaeso/zip/server/onboarding/application/OnboardingServiceSubmitTest.java (1)
153-172: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win
UNDECIDED단독 선택의 성공 경로도 테스트하세요.현재 테스트는 혼합 선택 거부만 검증합니다.
List.of(AgeBand.UNDECIDED)로 제출하고saveAndFlush가 호출되며 저장된targetAgeBands가 단일 값인지 검증하세요. 이 테스트가 있어야 허용된 응답 값이 이후 검증 변경으로 차단되지 않습니다.🤖 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/chaeso/zip/server/onboarding/application/OnboardingServiceSubmitTest.java` around lines 153 - 172, Extend the TargetAgeBands tests around rejectsUndecidedWithOtherAgeBands with a success-case test that submits List.of(AgeBand.UNDECIDED) through onboardingService.submit. Verify the submission succeeds, onboardingRepository.saveAndFlush is called, and the persisted entity’s targetAgeBands contains exactly the single UNDECIDED value.
🤖 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 `@docs/infra.md`:
- Around line 94-96: Update the AWS automatic stop scheduling section in
docs/infra.md to explicitly show both StopInstances and StartInstances schedules
as DISABLED. Preserve the existing cron values while stating that they are
retained configuration and are not currently executed automatically.
In
`@src/main/java/chaeso/zip/server/recommendation/application/RecommendationServiceImpl.java`:
- Around line 99-105: 추천 조회 흐름의 recommendationService.recommend 호출이 온보딩 존재 여부만
확인하지 않도록 수정하세요. 인증된 principal의 userId를 함께 전달하고, recommend 내부에서는 findOnboarding
대신 findOwnedOnboarding(userId, onboardingId)를 사용해 소유자가 아닌 요청은 기존처럼 404로 처리되게
하세요.
---
Nitpick comments:
In `@infra/modules/aws/app/schedule.tf`:
- Around line 26-27: Update the deployment procedure for the schedules around
the stop and start resource definitions so the target aws_instance.this is
transitioned to running before both schedules are disabled, and verify its
running state after applying the change. Reuse or validate the existing
deployment mechanism rather than relying solely on the Terraform state
transition.
In
`@src/test/java/chaeso/zip/server/onboarding/application/OnboardingServiceSubmitTest.java`:
- Around line 153-172: Extend the TargetAgeBands tests around
rejectsUndecidedWithOtherAgeBands with a success-case test that submits
List.of(AgeBand.UNDECIDED) through onboardingService.submit. Verify the
submission succeeds, onboardingRepository.saveAndFlush is called, and the
persisted entity’s targetAgeBands contains exactly the single UNDECIDED value.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: b4ae6b1b-fef5-4e78-add7-e3f41f38c4e6
📒 Files selected for processing (15)
docs/infra.mdinfra/modules/aws/app/schedule.tfsrc/main/java/chaeso/zip/server/channel/domain/vo/AgeBand.javasrc/main/java/chaeso/zip/server/onboarding/application/OnboardingServiceImpl.javasrc/main/java/chaeso/zip/server/onboarding/domain/OnboardingErrorCode.javasrc/main/java/chaeso/zip/server/onboarding/domain/OnboardingNotFoundException.javasrc/main/java/chaeso/zip/server/onboarding/presentation/OnboardingApiDocs.javasrc/main/java/chaeso/zip/server/onboarding/presentation/dto/SubmitOnboardingRequest.javasrc/main/java/chaeso/zip/server/performance/domain/entity/AdPerformance.javasrc/main/java/chaeso/zip/server/recommendation/application/RecommendationServiceImpl.javasrc/test/java/chaeso/zip/server/common/config/CreatedAtAuditingTest.javasrc/test/java/chaeso/zip/server/onboarding/application/OnboardingServiceSubmitTest.javasrc/test/java/chaeso/zip/server/onboarding/domain/OnboardingRepositoryTest.javasrc/test/java/chaeso/zip/server/recommendation/application/RecommendationServiceImplTest.javasrc/test/java/chaeso/zip/server/recommendation/presentation/RecommendationControllerTest.java
코드 리뷰 요약 (자동 머지 게이트)🔴 Blocker없음 🟠 Major
🟡 Minor
🤖 Generated with Claude Code — automated PR review gate |
* chore: AWS S3 공개 버킷 추가 (#126) * feat(infra): add public S3 bucket and upload commands for static assets * docs: document public static assets S3 bucket * chore: remove unused region field from onboarding S3 test config * chore(infra): increase EC2 root volume to 30GB and switch to gp3 * fix: address review feedback on public assets bucket * fix(infra): scope down public bucket permissions and fix access log delivery * feat: 저장된 시뮬레이션 목록 및 상세 조회 API 구현 (#130) * fix(simulation): mark optional response fields NOT_REQUIRED instead of nullable * feat(simulation): add saved simulation detail API * feat(simulation): add paginated my-simulations list API * chore(simulation): drop unused SimulationNotFoundException import * fix(simulation): omit null fields from simulation item responses * fix(simulation): count only funded channels in list summaries * docs(simulation): add a page/size example to the list API 400 response * feat: 채널 추천 결과 저장 API 구현 (#133) * fix(security): scope the public recommendations path to GET * fix(openapi): publish data and error as required on response wrappers * feat(recommendation): add channel recommendation save API * fix(recommendation): serialize saves per onboarding * feat: add flyway migration v16 * feat(channel): filter the channel list by primary category (#134) * feat: 온보딩 나이대 응답에 "잘 모르겠어요"(UNDECIDED) 추가 (#138) * feat(infra): disable aws scheduler * refactor(performance): build AdPerformance via Lombok builder instead of positional constructor * feat(onboarding): let users answer "don't know" for target age band * refactor(onboarding): extract OnboardingNotFoundException for id-based lookups * test(onboarding): cover UNDECIDED-alone and AdPerformance ratio branches --------- Co-authored-by: Yelim Lee <142207312+1117mg@users.noreply.github.com>
🔗 관련 이슈
Closes #136
📝 작업 내용
AgeBand.UNDECIDED) 추가, 다른 연령대와 함께 선택 시 거부 (ONB-011)AdPerformance생성자를 Lombok 빌더로 변경OnboardingNotFoundException추가, 온보딩 조회 실패 시 메시지 조립 중복 제거 (컨벤션에 맞도록 수정)✅ 체크리스트
💬 리뷰 참고 사항
Summary by CodeRabbit
새로운 기능
버그 수정
문서
운영