Skip to content

[Feat] 자소서 분석 문장 상태값 추가#64

Merged
whc9999 merged 1 commit into
mainfrom
feat/#24-analysis-status
May 22, 2026
Merged

[Feat] 자소서 분석 문장 상태값 추가#64
whc9999 merged 1 commit into
mainfrom
feat/#24-analysis-status

Conversation

@whc9999
Copy link
Copy Markdown
Collaborator

@whc9999 whc9999 commented May 22, 2026

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

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

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

  • 첨삭 문장 상태 enum 추가
  • 분석 LLM 응답에 status 필드 반영
  • 문항 분석 엔티티와 응답 DTO에 status 추가
  • status 값 소문자 응답 및 기본값 보정 처리
  • 분석 서비스 테스트에 status 검증 추가

📸 작업 화면 스크린샷

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

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

🚨 관련 이슈 번호 [#24]

Summary by CodeRabbit

  • New Features
    • Added status tracking to question analysis with four classification levels: Proven, Mentioned, Missing, and Fabricated. Users can now see the status of each analyzed question, providing greater transparency into the analysis results.

Review Change Stack

- 첨삭 문장 상태 enum 추가
- 분석 LLM 응답에 status 필드 반영
- 문항 분석 엔티티와 응답 DTO에 status 추가
- status 값 소문자 응답 및 기본값 보정 처리
- 분석 서비스 테스트에 status 검증 추가
@whc9999 whc9999 merged commit 334c06c into main May 22, 2026
1 of 2 checks passed
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 22, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: fceecdea-7e9e-4026-84e7-94b08c165ae3

📥 Commits

Reviewing files that changed from the base of the PR and between 02a543c and 9d5b8ac.

📒 Files selected for processing (7)
  • src/main/java/com/jobdri/jobdri_api/domain/analysis/dto/llm/AnalysisLlmResponse.java
  • src/main/java/com/jobdri/jobdri_api/domain/analysis/dto/response/QuestionAnalysisResponse.java
  • src/main/java/com/jobdri/jobdri_api/domain/analysis/entity/QuestionAnalysis.java
  • src/main/java/com/jobdri/jobdri_api/domain/analysis/entity/QuestionAnalysisStatus.java
  • src/main/java/com/jobdri/jobdri_api/domain/analysis/service/AnalysisAiClient.java
  • src/main/java/com/jobdri/jobdri_api/domain/analysis/service/AnalysisService.java
  • src/test/java/com/jobdri/jobdri_api/domain/analysis/service/AnalysisServiceTest.java

📝 Walkthrough

Walkthrough

This PR extends the analysis pipeline by introducing a status field for question analysis items. The status is defined as an enum, persisted in the entity, received from the LLM, normalized during service processing, and exposed in the API response.

Changes

Question Analysis Status Field

Layer / File(s) Summary
Status enum definition
src/main/java/com/jobdri/jobdri_api/domain/analysis/entity/QuestionAnalysisStatus.java
New QuestionAnalysisStatus enum with four constants: PROVEN, MENTIONED, MISSING, FABRICATED.
Entity status field and factory method
src/main/java/com/jobdri/jobdri_api/domain/analysis/entity/QuestionAnalysis.java
QuestionAnalysis adds persisted status field with MENTIONED default and string enum mapping; create() factory extended to accept and set QuestionAnalysisStatus status parameter.
LLM DTO and prompt updates
src/main/java/com/jobdri/jobdri_api/domain/analysis/dto/llm/AnalysisLlmResponse.java, src/main/java/com/jobdri/jobdri_api/domain/analysis/service/AnalysisAiClient.java
AnalysisLlmResponse.QuestionAnalysisItem record now includes status field; AnalysisAiClient prompt updated with JSON example and validation rule constraining status to four allowed values.
Service status normalization
src/main/java/com/jobdri/jobdri_api/domain/analysis/service/AnalysisService.java
New normalizeStatus(String) helper converts blank or unrecognized status to MENTIONED, parses other values case-insensitively; QuestionAnalysis.create() call updated to use normalized status.
Response DTO status mapping
src/main/java/com/jobdri/jobdri_api/domain/analysis/dto/response/QuestionAnalysisResponse.java
QuestionAnalysisResponse record adds status field; from(QuestionAnalysis) factory uses statusValue() helper to convert entity enum to lowercased string, defaulting null to MENTIONED.
Test coverage for status flow
src/test/java/com/jobdri/jobdri_api/domain/analysis/service/AnalysisServiceTest.java
Mocked QuestionAnalysisItem stubs now include status values; assertions verify status strings ("mentioned", "proven", "fabricated") propagate through service and response layers.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • JobDri-Developer/BackEnd#61: Extends the analysis pipeline added in #61 by introducing a status field across AnalysisLlmResponse, QuestionAnalysis, and the full data flow with normalization and response mapping.

Poem

🐰 A status for each question, from LLM's reply,
PROVEN, MENTIONED, MISSING—oh my!
Through entity to response, the status flows free,
Normalized with care, as it ought to be. ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/#24-analysis-status

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant