[Feat] 직무 중분류 평가 기준 매칭 및 프롬프트 반영 보강#123
Conversation
- 직무 중분류 평가 기준이 없으면 프롬프트 보조 기준 섹션 생략 - 중분류명 매칭 시 공백 및 구분자 정규화 처리 - blank 중분류 기준 row skip 시 warn 로그 추가 - AnalysisService payload에 중분류 평가 기준이 연결되는 경로 테스트 추가 - Provider 정규화 조회 테스트 및 프롬프트 섹션 생략 테스트 보강
|
Warning Review limit reached
Next review available in: 48 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: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughIntroduces ChangesJob Category Evaluation Criteria
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant AnalysisService
participant JobCategoryEvaluationCriteriaProvider
participant AnalysisExecutionPayload
participant AnalysisAiClient
AnalysisService->>JobCategoryEvaluationCriteriaProvider: findByMiddleName(jobPosting middle name)
JobCategoryEvaluationCriteriaProvider-->>AnalysisService: Optional<JobCategoryEvaluationCriteria>
AnalysisService->>AnalysisExecutionPayload: build payload with criteria (or null)
AnalysisService->>AnalysisAiClient: analyze(payload) / analyze(jobPosting, questions, criteria)
AnalysisAiClient->>AnalysisAiClient: buildPrompt(..., jobCategoryEvaluationCriteria)
AnalysisAiClient->>AnalysisAiClient: formatJobCategoryEvaluationCriteriaSection(criteria)
Possibly related PRs
🚥 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
🧹 Nitpick comments (2)
src/main/java/com/jobdri/jobdri_api/domain/analysis/service/JobCategoryEvaluationCriteriaProvider.java (1)
64-70: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win
normalizeKeymisses Unicode whitespace (full-width space, NBSP).
\\s+in Java only matches ASCII whitespace by default; it does not match full-width space (U+3000) or non-breaking space (U+00A0), both of which can appear in Korean-sourced text. If any real middle-classification name contains these characters, normalization silently fails and the lookup misses.♻️ Suggested fix
private String normalizeKey(String value) { return value.trim() .replace('ㆍ', '·') .replace('・', '·') .replace('/', '·') - .replaceAll("\\s+", ""); + .replaceAll("\\p{White_Space}+", ""); }🤖 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/main/java/com/jobdri/jobdri_api/domain/analysis/service/JobCategoryEvaluationCriteriaProvider.java` around lines 64 - 70, The normalizeKey method in JobCategoryEvaluationCriteriaProvider does not remove Unicode whitespace like full-width space and NBSP, so lookups can still miss for Korean-sourced text. Update normalizeKey to normalize all whitespace characters, not just ASCII, by using a Unicode-aware whitespace removal strategy before returning the key, while keeping the existing character replacements for separators and dot variants.src/main/java/com/jobdri/jobdri_api/domain/analysis/service/AnalysisService.java (1)
149-158: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winRedundant branch — both paths behave identically.
analyze(JobPosting, List<Question>)just forwards to the 3-arg overload withnullcriteria, so this null-check branch can be removed.♻️ Proposed simplification
public AnalysisLlmResponse executeAnalysis(AnalysisExecutionPayload payload) { - if (payload.jobCategoryEvaluationCriteria() == null) { - return analysisAiClient.analyze(payload.jobPosting(), payload.answeredQuestions()); - } return analysisAiClient.analyze( payload.jobPosting(), payload.answeredQuestions(), payload.jobCategoryEvaluationCriteria() ); }🤖 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/main/java/com/jobdri/jobdri_api/domain/analysis/service/AnalysisService.java` around lines 149 - 158, The null-check in AnalysisService.executeAnalysis is redundant because both branches end up calling analysisAiClient.analyze with the same inputs. Simplify executeAnalysis by removing the if/else and always invoking the overload that accepts jobCategoryEvaluationCriteria, since analyze(JobPosting, List<Question>) already delegates to the 3-arg method when criteria is null.
🤖 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/resources/analysis/job-category-evaluation-criteria.json`:
- Around line 587-594: The relatedKeywords array in
job-category-evaluation-criteria.json has a split phrase caused by the unescaped
comma in the Photoshop/Illustrator entry. Merge the two entries into a single
keyword string so formatCriteriaList renders one bullet item, and verify the
surrounding list under the relatedKeywords field remains valid JSON and
preserves the intended wording.
---
Nitpick comments:
In
`@src/main/java/com/jobdri/jobdri_api/domain/analysis/service/AnalysisService.java`:
- Around line 149-158: The null-check in AnalysisService.executeAnalysis is
redundant because both branches end up calling analysisAiClient.analyze with the
same inputs. Simplify executeAnalysis by removing the if/else and always
invoking the overload that accepts jobCategoryEvaluationCriteria, since
analyze(JobPosting, List<Question>) already delegates to the 3-arg method when
criteria is null.
In
`@src/main/java/com/jobdri/jobdri_api/domain/analysis/service/JobCategoryEvaluationCriteriaProvider.java`:
- Around line 64-70: The normalizeKey method in
JobCategoryEvaluationCriteriaProvider does not remove Unicode whitespace like
full-width space and NBSP, so lookups can still miss for Korean-sourced text.
Update normalizeKey to normalize all whitespace characters, not just ASCII, by
using a Unicode-aware whitespace removal strategy before returning the key,
while keeping the existing character replacements for separators and dot
variants.
🪄 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: 890228ff-51b3-4a75-a0ef-221cd07d525d
📒 Files selected for processing (9)
src/main/java/com/jobdri/jobdri_api/domain/analysis/dto/criteria/JobCategoryEvaluationCriteria.javasrc/main/java/com/jobdri/jobdri_api/domain/analysis/service/AnalysisAiClient.javasrc/main/java/com/jobdri/jobdri_api/domain/analysis/service/AnalysisExecutionPayload.javasrc/main/java/com/jobdri/jobdri_api/domain/analysis/service/AnalysisService.javasrc/main/java/com/jobdri/jobdri_api/domain/analysis/service/JobCategoryEvaluationCriteriaProvider.javasrc/main/resources/analysis/job-category-evaluation-criteria.jsonsrc/test/java/com/jobdri/jobdri_api/domain/analysis/service/AnalysisAiClientTest.javasrc/test/java/com/jobdri/jobdri_api/domain/analysis/service/AnalysisServiceTest.javasrc/test/java/com/jobdri/jobdri_api/domain/analysis/service/JobCategoryEvaluationCriteriaProviderTest.java
- Photoshop, Illustrator 관련 키워드를 하나의 문자열로 병합 - 직무 중분류 평가 기준 JSON 유효성 확인 - Provider resource 로딩 테스트 통과 확인
✨ 어떤 이유로 PR를 하셨나요?
📋 세부 내용 - 왜 해당 PR이 필요한지 작업 내용을 자세하게 설명해주세요
📸 작업 화면 스크린샷
🚨 관련 이슈 번호 [ ]
Summary by CodeRabbit
New Features
Tests