[improve/#66] 커밋 분석 Gemini 호출 단일화#67
Conversation
커밋 diff를 한 번 분석해 사용자 요약과 임베딩 재료를 함께 만들도록 내부 분석 결과를 통합합니다. Constraint: 기존 summary 응답과 Chroma 임베딩 문서 구성은 유지해야 함 Rejected: 요약용 Gemini 호출과 임베딩용 Gemini 호출 분리 유지 | 큰 diff 입력 토큰이 중복 발생함 Confidence: high Scope-risk: moderate Directive: 외부 응답 스키마를 바꾸지 말고 내부 분석 결과 재사용만 확장할 것 Tested: uv run pytest; uv run ruff check Not-tested: 실제 Gemini 운영 응답 A/B 비교
동기 분석과 비동기 run에서 한 번 만든 커밋 분석 결과를 임베딩 저장 단계에 그대로 전달합니다. Constraint: /api/commit/analyze와 /api/commit/analyze/runs 응답 필드는 그대로 유지해야 함 Rejected: 백그라운드 임베딩 단계에서 diff를 다시 Gemini에 전달 | 동일 입력을 중복 과금함 Confidence: high Scope-risk: narrow Directive: 분석 결과는 요청 처리 중 메모리 객체로만 전달하고 별도 저장소 계약을 만들지 말 것 Tested: uv run pytest; uv run ruff check Not-tested: 운영 BackgroundTasks 실패 로그 확인
커밋 분석 결과가 임베딩 저장 단계로 전달되고 실패 시 run 상태가 실패로 유지되는지 검증합니다. Constraint: 내부 호출 수를 줄이더라도 동기/비동기 API 결과 계약은 유지해야 함 Rejected: 호출 수 감소를 수동 확인에만 의존 | 비용 회귀를 테스트로 잡기 어려움 Confidence: high Scope-risk: narrow Directive: 커밋 분석 비용 최적화 변경 시 LLM 재호출 방지 테스트를 유지할 것 Tested: uv run pytest; uv run ruff check Not-tested: 실제 Gemini 과금량 대시보드 비교
|
Warning Review limit reached
More reviews will be available in 13 minutes and 26 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ 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 |
✨ 작업 개요
커밋 분석 시 같은 diff를 Gemini LLM에 두 번 전달하던 구조를 정리했습니다.
기존 API 응답과 Chroma 저장 형식은 유지하면서, 한 번 생성한 커밋 분석 결과를 요약 응답과 임베딩 저장 단계에서 재사용합니다.
📄 작업 내용
summary변경요약,기술키워드,변경방향,파일맥락/api/commit/analyze에서 생성한 분석 결과를 BackgroundTasks 임베딩 저장에 전달/api/commit/analyze/runs비동기 파이프라인에서 분석 결과를summary_ready와embedding단계가 함께 사용하도록 변경failed로 유지되는 회귀 테스트 추가📌 관련 이슈
🔌 API 변경사항
/api/commit/analyze응답 필드 유지/api/commit/analyze/runs상태/결과 응답 필드 유지💬 기타 사항
✅ 테스트
uv run pytest→ 115 passeduv run ruff check→ All checks passed!