Skip to content

[Fix] 공고 분석 필수 필드 검증 범위 조정#175

Merged
whc9999 merged 2 commits into
devfrom
fix/job-posting-ingest-required-field-validation
Jul 26, 2026
Merged

[Fix] 공고 분석 필수 필드 검증 범위 조정#175
whc9999 merged 2 commits into
devfrom
fix/job-posting-ingest-required-field-validation

Conversation

@whc9999

@whc9999 whc9999 commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

✨ 어떤 이유로 PR를 하셨나요?

  • feature 병합
  • 버그 수정(아래에 issue #를 남겨주세요)
  • 코드 개선
  • 코드 수정
  • 배포
  • 기타(아래에 자세한 내용 기입해주세요)

📋 세부 내용 - 왜 해당 PR이 필요한지 작업 내용을 자세하게 설명해주세요

  • 공고 분석 품질 검증 대상을 공고명, 회사명, 직무로 제한
  • 주요 업무와 자격 요건은 분석 실패 기준에서 제외
  • 공고 분석 실패 시 invalid field 목록을 응답 error payload로 반환
  • GeneralException에 구조화된 error payload 전달 기능 추가
  • 공고 분석 검증 정책 변경에 맞춰 테스트 수정 및 추가

📸 작업 화면 스크린샷

⚠️ PR하기 전에 확인해주세요

  • 로컬테스트를 진행하셨나요?
  • 머지할 브랜치를 확인하셨나요?
  • 관련 label을 선택하셨나요?

🚨 관련 이슈 번호 [ ]

Summary by CodeRabbit

  • 개선 사항

    • 채용 공고 입력 검증 오류에 원인, 안내 메시지, 문제가 있는 필드 목록을 포함합니다.
    • 필수 정보의 누락, 공백, 길이 부족 및 잘못된 값이 필드별로 상세히 안내됩니다.
    • 오류 응답에 구조화된 검증 정보를 제공해 문제를 더 쉽게 확인할 수 있습니다.
  • 테스트

    • 잘못된 필드와 오류 메시지에 대한 검증을 강화했습니다.

- 공고 분석 품질 검증 대상을 공고명, 회사명, 직무로 제한
- 주요 업무와 자격 요건은 분석 실패 기준에서 제외
- 공고 분석 실패 시 invalid field 목록을 응답 error payload로 반환
- GeneralException에 구조화된 error payload 전달 기능 추가
- 공고 분석 검증 정책 변경에 맞춰 테스트 수정 및 추가
@whc9999 whc9999 self-assigned this Jul 26, 2026
@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@whc9999, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 49 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 7984cb52-61e1-48ec-8f04-ea3cc21e3ee7

📥 Commits

Reviewing files that changed from the base of the PR and between 3fc6de7 and e699cd5.

📒 Files selected for processing (8)
  • src/main/java/com/jobdri/jobdri_api/domain/jobposting/dto/response/JobPostingGenerateResponse.java
  • src/main/java/com/jobdri/jobdri_api/domain/jobposting/service/JobPostingAiService.java
  • src/main/java/com/jobdri/jobdri_api/domain/jobposting/service/JobPostingIngestQualityValidator.java
  • src/main/java/com/jobdri/jobdri_api/domain/jobposting/service/JobPostingIngestService.java
  • src/main/java/com/jobdri/jobdri_api/domain/jobposting/service/JobPostingWorkerBridgeService.java
  • src/test/java/com/jobdri/jobdri_api/domain/jobposting/service/JobPostingAiServiceTest.java
  • src/test/java/com/jobdri/jobdri_api/domain/jobposting/service/JobPostingIngestServiceTest.java
  • src/test/java/com/jobdri/jobdri_api/domain/jobposting/service/JobPostingWorkerBridgeServiceTest.java
📝 Walkthrough

Walkthrough

채용 공고 입력 검증이 필수 필드별 오류 정보를 수집하도록 변경되었습니다. 상세 오류 DTO와 예외 전달 구조가 추가되었고, 추출·생성 결과 및 관련 테스트가 새 응답 형식에 맞게 갱신되었습니다.

Changes

채용 공고 입력 검증

Layer / File(s) Summary
상세 검증 오류 계약과 전달
src/main/java/com/jobdri/jobdri_api/domain/jobposting/dto/response/..., src/main/java/com/jobdri/jobdri_api/global/apiPayload/exception/...
필드명·라벨·메시지를 담는 검증 오류 DTO를 추가하고, GeneralException과 예외 응답 처리에서 추가 오류 데이터를 전달하도록 변경했습니다.
필수 필드 검증 흐름
src/main/java/com/jobdri/jobdri_api/domain/jobposting/service/JobPostingIngestQualityValidator.java
추출·생성 결과의 필수 필드를 null, 공백, 최소 길이, placeholder 기준으로 검증하고 무효 필드 목록을 포함한 예외를 발생시킵니다.
검증 결과 테스트 갱신
src/test/java/com/jobdri/jobdri_api/domain/jobposting/service/JobPostingIngestServiceTest.java, src/test/java/com/jobdri/jobdri_api/domain/jobposting/service/JobPostingWorkerBridgeServiceTest.java
예외 메시지 기대값을 갱신하고, invalidFields()의 필드 목록과 순서를 검증하도록 테스트를 변경했습니다.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant IngestService
  participant JobPostingIngestQualityValidator
  participant GeneralException
  participant ExceptionAdvice
  IngestService->>JobPostingIngestQualityValidator: 추출·생성 결과 검증
  JobPostingIngestQualityValidator->>GeneralException: 무효 필드 목록 포함 예외 생성
  GeneralException->>ExceptionAdvice: error 데이터 전달
  ExceptionAdvice-->>IngestService: 상세 실패 응답 반환
Loading

Possibly related PRs

  • JobDri-Developer/BackEnd#165: 동일 validator의 ingest 및 worker finalize 전 검증 호출을 추가해 본 변경과 직접 연결됩니다.

Suggested labels: ♻️ refactor

Suggested reviewers: shinae1023

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed 제목이 공고 분석의 필수 필드 검증 범위 조정이라는 핵심 변경을 정확히 요약합니다.
Description check ✅ Passed 템플릿의 핵심 섹션과 체크리스트를 갖췄고, 변경 목적과 내용도 충분히 구체적으로 설명했습니다.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/job-posting-ingest-required-field-validation

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/main/java/com/jobdri/jobdri_api/domain/jobposting/service/JobPostingIngestQualityValidator.java`:
- Around line 64-68: Update the required-field validation in
JobPostingIngestQualityValidator to pass generated.postingName() for the
postingName field instead of generated.jobTitle(). Ensure postingName remains a
distinct value from jobTitle through the generation response and save request
flow, and update related tests so an invalid jobTitle is not also reported as an
invalid postingName.
🪄 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: 3b8113aa-dd5d-403a-af17-6d129e0315cf

📥 Commits

Reviewing files that changed from the base of the PR and between e5deb1c and 3fc6de7.

📒 Files selected for processing (6)
  • src/main/java/com/jobdri/jobdri_api/domain/jobposting/dto/response/JobPostingIngestValidationErrorResponse.java
  • src/main/java/com/jobdri/jobdri_api/domain/jobposting/service/JobPostingIngestQualityValidator.java
  • src/main/java/com/jobdri/jobdri_api/global/apiPayload/exception/GeneralException.java
  • src/main/java/com/jobdri/jobdri_api/global/apiPayload/exception/handler/ExceptionAdvice.java
  • src/test/java/com/jobdri/jobdri_api/domain/jobposting/service/JobPostingIngestServiceTest.java
  • src/test/java/com/jobdri/jobdri_api/domain/jobposting/service/JobPostingWorkerBridgeServiceTest.java

- JobPostingGenerateResponse에 postingName 필드 추가
- 공고 생성 프롬프트 응답 스키마에 postingName 포함
- 공고 저장 시 postingName과 jobTitle을 각각 별도 필드로 매핑
- 공고명 검증이 jobTitle이 아닌 postingName을 기준으로 동작하도록 수정
- invalid jobTitle이 postingName invalid로 함께 보고되지 않도록 테스트 추가
@whc9999
whc9999 merged commit b033839 into dev Jul 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant