Conversation
- ClubApplicant 엔티티에 aiSummary 필드 추가 - updateAiSummary() 메서드 추가 - ApplicantIdMessageConsumer에서 AI 요약 결과를 memo 대신 aiSummary 필드에 저장하도록 변경 - 기존 memo 필드는 사용자 메모용으로 유지
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning
|
| Cohort / File(s) | Summary |
|---|---|
ClubApplicant 엔티티 확장 backend/src/main/java/moadong/club/entity/ClubApplicant.java |
aiSummary 필드 추가(@Builder.Default ""), public void updateAiSummary(String aiSummary) 메서드 추가. |
메시지 컨슈머 업데이트 backend/src/main/java/moadong/club/summary/ApplicantIdMessageConsumer.java |
summarize 응답에 대한 null 체크(조기 리턴) 추가 및 기존 updateMemo(...) 호출을 updateAiSummary(...)로 변경하여 AI 요약을 별도 필드에 저장하도록 수정. |
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
- [refactor] AI 프롬프트 튜닝 #1140 — ApplicantIdMessageConsumer의 AI 요약 흐름(프롬프트/서비스 호출 및 응답 처리) 변경과 연관됨.
Suggested reviewers
- seongwon030
- Zepelown
- oesnuj
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | 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 |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | 제목은 변경사항의 핵심(메모와 AI요약 분리)을 명확하게 요약하고 있으며, PR 목표와 일치합니다. |
| Linked Issues check | ✅ Passed | PR은 MOA-617의 요구사항을 충족합니다: aiSummary 필드 추가, updateAiSummary() 메서드 구현, AI 응답을 aiSummary에 저장하는 방식으로 변경되었습니다. |
| Out of Scope Changes check | ✅ Passed | 모든 변경사항이 메모와 AI요약 분리라는 정의된 범위 내에 있으며, 범위를 벗어난 변경은 없습니다. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing touches
- 📝 Generate docstrings
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Post copyable unit tests in a comment
- Commit unit tests in branch
refactor/#1156-split-memo-ai-summary-MOA-617
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 @coderabbitai help to get the list of available commands and usage tips.
Test Results72 tests 72 ✅ 20s ⏱️ Results for commit 4284f3d. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@backend/src/main/java/moadong/club/summary/ApplicantIdMessageConsumer.java`:
- Around line 80-81: The code currently logs sensitive decrypted applicant data
by calling log.info(prompt.toString()) and logging the AIResponse
summarizeContent; update ApplicantIdMessageConsumer to avoid emitting PII at
INFO level—either remove the log.info(prompt.toString()) entirely or change it
to log.debug(...) and ensure any AIResponse (summarizeContent) is only logged at
debug or with sensitive fields redacted; keep calls to
gemmaService.getSummarizeContent(...) intact but ensure any logging around
prompt.toString() and summarizeContent uses debug level or sanitized output so
decrypted personal data is not written to production logs.
- Around line 83-88: Move the aiSummary guard before calling
gemmaService.getSummarizeContent() to avoid unnecessary AI calls and
decryption/prompt work: check clubApplicant.getAiSummary() at the start of
processing and return/skip if non-empty. Only call
gemmaService.getSummarizeContent() and then
clubApplicant.updateAiSummary(summarizeContent.response()) when the summary is
missing. Also avoid unconditionally calling
clubApplicantsRepository.save(clubApplicant) when no update occurred—only save
after updateAiSummary() was applied.
backend/src/main/java/moadong/club/summary/ApplicantIdMessageConsumer.java
Show resolved
Hide resolved
backend/src/main/java/moadong/club/summary/ApplicantIdMessageConsumer.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@backend/src/main/java/moadong/club/summary/ApplicantIdMessageConsumer.java`:
- Around line 83-86: summarizeContent.response() can be non-null but empty,
which would overwrite existing aiSummary; in ApplicantIdMessageConsumer (around
the block using summarizeContent.response()) add a check that the response is
not blank/empty (e.g., !response.isBlank()/!response.isEmpty()) before calling
clubApplicant.updateAiSummary(response), and skip/update only when it has
non-empty content (optionally log a debug/info message when an empty response is
received) to avoid clobbering existing aiSummary.
#️⃣연관된 이슈
#1156
📝작업 내용
중점적으로 리뷰받고 싶은 부분(선택)
논의하고 싶은 부분(선택)
🫡 참고사항
Summary by CodeRabbit
릴리스 노트
새로운 기능
버그 수정