Skip to content

[chore] prod 배포 v0.0.6 - #75

Open
theminjunchoi wants to merge 1 commit into
prodfrom
dev
Open

[chore] prod 배포 v0.0.6#75
theminjunchoi wants to merge 1 commit into
prodfrom
dev

Conversation

@theminjunchoi

@theminjunchoi theminjunchoi commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

📦 prod 승격 (dev → prod), v0.0.5 → v0.0.6

포함 변경

🗄️ DB 마이그레이션 (prod에 신규 적용)

  • 없음 (V15까지 prod와 동일)

🌐 API 영향

  • 없음. 엔드포인트·요청/응답 스펙 변경 없음.
  • 앱 응답의 GenerationResult.usedTokens(성공 시도 표시값)도 그대로입니다. generation_log 기록값만 정확해집니다.

⚠️ 배포 후 예상되는 동작 변화

이 수정의 실제 효과는 prod에서만 나타납니다. 일일 토큰 상한은 gamss.token-limit.enabled: true인 prod 프로필에서만 켜지기 때문에(application-prod.yml), dev에서는 집계 정확도 개선을 체감할 수 없었습니다.

배포 후:

  • 재시도가 발생한 생성의 토큰이 이제 전부 합산되므로, 유저가 일일 상한(현재 10만 토큰)에 이전보다 빨리 도달할 수 있습니다. 기존에 누락되던 만큼이 정상 반영되는 것이라 의도된 변화입니다.
  • 백오피스 대시보드의 총 토큰·예상 비용이 이전 기간 대비 올라가 보일 수 있습니다. 실제 사용량이 는 게 아니라 그동안 과소 집계되던 것이 바로잡히는 것입니다.
  • 상한 도달 문의가 늘면 백오피스 토큰 정책 화면에서 daily_token_limit 조정이 가능합니다.

✅ 확인 완료

  • dev 배포 후 정상 동작 확인 (현재 dev 운영 중, 이미지 dev-54d75ab)
  • 전체 테스트 통과 (CI green)
  • prod 신규 시크릿·환경변수 추가 없음

Summary by CodeRabbit

  • 개선 사항

    • 댓글 생성 재시도 과정에서 모든 시도의 토큰 사용량을 누적해 생성 로그에 정확히 반영합니다.
    • 성공 및 최종 실패 로그 모두 누적된 사용량과 시도 횟수를 제공합니다.
    • 토큰 정보가 없는 호출 실패도 안정적으로 처리합니다.
  • 테스트

    • 재시도 후 성공 및 최종 실패 상황의 토큰 집계를 검증하는 테스트를 추가했습니다.

@github-actions

Copy link
Copy Markdown

Test Results

303 tests  +4   303 ✅ +4   1m 20s ⏱️ +4s
 50 suites +1     0 💤 ±0 
 50 files   +1     0 ❌ ±0 

Results for commit 54d75ab. ± Comparison against base commit f2ec2aa.

@github-actions

Copy link
Copy Markdown

Test Coverage

Overall Project 73.19% -0.19% 🍏
Files changed 87.3% 🍏

File Coverage
TokenUsageAccumulator.kt 100% 🍏
CommentGenerationService.kt 84.06% -2.22% 🍏

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

LLM 댓글·답글 생성 재시도마다 성공 및 실패 토큰을 TokenUsageAccumulator에 누적하고, 최종 성공·실패 생성 로그에 누적 사용량을 기록하도록 변경했다. 관련 단위 테스트와 재시도 시나리오 테스트를 추가했다.

Changes

재시도 토큰 집계

Layer / File(s) Summary
토큰 누적 계약 및 검증
src/main/kotlin/.../TokenUsageAccumulator.kt, src/test/kotlin/.../TokenUsageAccumulatorTest.kt
성공 출력과 토큰이 없는 실패 예외의 used, cached, input, output 값을 누적하고 이를 검증한다.
재시도 로그 반영
src/main/kotlin/.../CommentGenerationService.kt, src/test/kotlin/.../CommentGenerationServiceTest.kt
댓글 및 답글 생성의 각 재시도 토큰을 합산해 성공·실패 로그에 기록하며, 1차 실패 후 성공과 전체 실패 시나리오를 검증한다.

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

Possibly related PRs

  • Nexters/GAMSS-Server#59: 동일한 CommentGenerationService 생성 로그와 실패 예외의 토큰 정보 확장 흐름과 직접 연결된다.
  • Nexters/GAMSS-Server#67: 동일한 재시도 토큰 로깅 경로와 관련 테스트 구조를 다룬다.
  • Nexters/GAMSS-Server#13: 현재 재시도 및 토큰 누적 대상인 댓글 생성 기능의 기반을 추가했다.

Suggested labels: 🚨 fix

Suggested reviewers: kite707

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 제목이 prod 승격과 v0.0.6 버전 bump를 담고 있어 변경의 핵심을 어느 정도 반영합니다.
Description check ✅ Passed 이슈, 개요, 주요 변경, API/DB 영향, 배포 후 변화가 포함되어 템플릿 요구를 대부분 충족합니다.
Linked Issues check ✅ Passed 재시도별 토큰 누적과 성공·최종 실패 로그 반영이 구현되어 #66의 핵심 요구를 충족합니다.
Out of Scope Changes check ✅ Passed 테스트, prod 승격, 버전 상승, 토큰 누적 로직만 보여 목적 밖 변경은 보이지 않습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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 dev

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/test/kotlin/com/nexters/gamss/conversation/service/CommentGenerationServiceTest.kt`:
- Around line 180-249: Extend the test coverage around the existing
comment-generation retry tests to verify reply-generation failure-then-success
and final-failure flows, accumulation of tokens in logs when a retryable failure
is followed by a non-retryable exception, and the successful
GenerationResult.usedTokens value equals the final successful attempt’s tokens.
Cover all three logging branches while preserving the existing explicit
assertions for comment success and failure.
🪄 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: d3a8f211-4f49-46aa-bbfa-5b3e5d8cfe53

📥 Commits

Reviewing files that changed from the base of the PR and between f2ec2aa and 54d75ab.

📒 Files selected for processing (4)
  • src/main/kotlin/com/nexters/gamss/conversation/service/CommentGenerationService.kt
  • src/main/kotlin/com/nexters/gamss/conversation/service/TokenUsageAccumulator.kt
  • src/test/kotlin/com/nexters/gamss/conversation/service/CommentGenerationServiceTest.kt
  • src/test/kotlin/com/nexters/gamss/conversation/service/TokenUsageAccumulatorTest.kt

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant