Skip to content

feat: 게시글 AI 요약 로그 조회 API 추가#2297

Closed
taejinn wants to merge 1 commit into
feat/2248-ai-summary-admin-queuefrom
feat/2248-ai-summary-admin-logs
Closed

feat: 게시글 AI 요약 로그 조회 API 추가#2297
taejinn wants to merge 1 commit into
feat/2248-ai-summary-admin-queuefrom
feat/2248-ai-summary-admin-logs

Conversation

@taejinn

@taejinn taejinn commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

🔍 개요

  • 예상 가능한 요약 실패/재시도/스킵 이벤트를 서버 error 로그 대신 DB 로그로 확인할 수 있게 분리했습니다.
  • 이 PR은 핵심 사용자 기능 범위가 아니라, 테스트/운영 중 어떤 케이스에서 요약 오류가 발생하는지 조회하기 위한 선택적 관측 API입니다.
  • 팀에서 Admin 로그 조회가 이번 범위에 불필요하다고 판단하면 이 PR은 머지하지 않고 닫아도 됩니다.
  • Slack 알림이 과하게 발생하지 않도록 운영 이벤트성 로그는 기본 서버 로그에서 debug로 낮췄습니다.

🚀 주요 변경 내용

  • article_ai_summary_logs 테이블을 추가했습니다.
  • 요약 실패/재시도/스킵 시 summaryId, articleId, boardId, eventType, status, failureType, message, retryCount, nextAttemptAt, workerId를 저장합니다.
  • GET /admin/articles/ai-summaries/logs를 추가했습니다.
    • page, limit, summary_id, article_id, event_type, failure_type 필터를 지원합니다.
  • Admin API 응답에서도 기존 sanitizer를 다시 적용해 API key, Bearer token, URL query, provider raw body가 노출되지 않도록 했습니다.
  • 요약 로그는 90일 보관 후 매일 03:20에 삭제합니다.
  • 03:20은 기본 FAILED 재처리 창 안의 저트래픽 시간대이며, 정각 배치와 겹치지 않도록 선택했습니다. 이 의도를 scheduler 주석에도 남겼습니다.

💬 참고 사항

  • 이 PR은 feat: 게시글 AI 요약 큐 조회 API 추가 #2296 이후에 머지되어야 합니다.
  • 핵심 요약 노출 기능은 #2295에 있으며, 이 PR은 장애/오류 케이스 확인용 보조 PR입니다.
  • Docker daemon 종료로 AdminArticleAiSummaryApiTest의 Testcontainers 실행은 로컬에서 완료하지 못했습니다.
  • 다음 테스트를 통과했습니다.
    • ./gradlew test --rerun-tasks --tests 'in.koreatech.koin.unit.domain.community.article.service.summary.*' --tests 'in.koreatech.koin.infrastructure.upstage.client.*Test'
    • ./gradlew test --rerun-tasks --tests 'in.koreatech.koin.unit.domain.community.article.service.summary.ArticleAiSummaryServiceTest'
    • git diff --check

✅ Checklist

  • 코드 스타일 가이드 준수
  • 테스트 코드 포함됨
  • 보안 및 민감 정보 검증

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5b1abdb2-29eb-4c3d-b07c-1bc7a64fa3de

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/2248-ai-summary-admin-logs

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.

게시글 AI 요약 처리 이벤트를 DB 로그로 저장하고 Admin 조회 및 90일 보관 정책을 추가합니다.
@taejinn taejinn force-pushed the feat/2248-ai-summary-admin-logs branch from 7db4934 to 906a0b3 Compare July 7, 2026 11:12
@taejinn taejinn force-pushed the feat/2248-ai-summary-admin-queue branch from 77cff9b to 79d5adb Compare July 7, 2026 11:12
@taejinn

taejinn commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

요청에 따라 PR을 닫습니다.

@taejinn taejinn closed this Jul 7, 2026
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