Feat/#27 actual apply count#88
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThis PR adds optional sequence-based lookup to the analysis results endpoint. The controller now accepts an optional ChangesSequence-based analysis retrieval
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (2 warnings, 1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
src/test/java/com/jobdri/jobdri_api/domain/analysis/service/AnalysisServiceTest.java (1)
510-520: ⚡ Quick winAdd a test for non-positive
sequencevalidation.
getAnalysis(user, mockApplyId, 0/-1)should assertGeneralErrorCode.INVALID_PARAMETERto lock the guard behavior and prevent regressions.🤖 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/jobdri/jobdri_api/domain/analysis/service/AnalysisServiceTest.java` around lines 510 - 520, Add a test in AnalysisServiceTest that calls analysisService.getAnalysis(user, mockApply.getId(), 0) and another for -1 (or a parameterized case) and assert they throw GeneralException with code GeneralErrorCode.INVALID_PARAMETER; locate the existing test for missing sequence (getAnalysisThrowsWhenSequenceDoesNotExist) and add a new test method (e.g., getAnalysisThrowsWhenSequenceIsNonPositive) that reuses saveUser/saveMockApply and verifies the guard behavior of AnalysisService.getAnalysis against non-positive sequence inputs.
🤖 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/jobdri/jobdri_api/domain/analysis/service/AnalysisService.java`:
- Around line 121-128: The stream calls
mockApplyRepository.calculateSequence(mockApply) for each MockApply, causing N+1
queries; change to compute sequences in-memory or fetch all sequences in one
query. For example in AnalysisService replace the stream/filter that uses
calculateSequence(...) with a single pass over the List<MockApply> returned by
findAllByUserIdAndJobPostingIdOrderByIdAsc to assign incremental sequence
numbers (or call a new repository method like
calculateSequencesForUserAndJobPosting that returns sequences for all IDs in one
DB call) and then find the matching sequence, avoiding per-item
calculateSequence calls.
In `@src/main/resources/application.yaml`:
- Line 3: The default Spring profile is currently set to prod via the active
property using ${SPRING_PROFILES_ACTIVE:prod}; change the fallback default to a
safe development profile (e.g., dev or local) so that when
SPRING_PROFILES_ACTIVE is unset the application uses non-production settings;
update the active property in application.yaml to ${SPRING_PROFILES_ACTIVE:dev}
(or :local) and ensure any documentation or deployment manifests explicitly set
SPRING_PROFILES_ACTIVE=prod for production environments.
---
Nitpick comments:
In
`@src/test/java/com/jobdri/jobdri_api/domain/analysis/service/AnalysisServiceTest.java`:
- Around line 510-520: Add a test in AnalysisServiceTest that calls
analysisService.getAnalysis(user, mockApply.getId(), 0) and another for -1 (or a
parameterized case) and assert they throw GeneralException with code
GeneralErrorCode.INVALID_PARAMETER; locate the existing test for missing
sequence (getAnalysisThrowsWhenSequenceDoesNotExist) and add a new test method
(e.g., getAnalysisThrowsWhenSequenceIsNonPositive) that reuses
saveUser/saveMockApply and verifies the guard behavior of
AnalysisService.getAnalysis against non-positive sequence inputs.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 456616c6-c69f-4c71-bebc-8608cd3b5051
📒 Files selected for processing (5)
src/main/java/com/jobdri/jobdri_api/domain/analysis/controller/AnalysisController.javasrc/main/java/com/jobdri/jobdri_api/domain/analysis/service/AnalysisService.javasrc/main/java/com/jobdri/jobdri_api/domain/mockapply/repository/MockApplyRepository.javasrc/main/resources/application.yamlsrc/test/java/com/jobdri/jobdri_api/domain/analysis/service/AnalysisServiceTest.java
✨ 어떤 이유로 PR를 하셨나요?
📋 세부 내용 - 왜 해당 PR이 필요한지 작업 내용을 자세하게 설명해주세요
📸 작업 화면 스크린샷
🚨 관련 이슈 번호 [#27]
Summary by CodeRabbit
Release Notes
New Features
Tests