Skip to content

feat: 게시글 AI 요약 핵심 기능 추가#2295

Closed
taejinn wants to merge 1 commit into
developfrom
feat/2248-ai-article-summary
Closed

feat: 게시글 AI 요약 핵심 기능 추가#2295
taejinn wants to merge 1 commit into
developfrom
feat/2248-ai-article-summary

Conversation

@taejinn

@taejinn taejinn commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

🔍 개요

  • 게시글 상세 조회 시 AI 요약을 기존 content 상단에 함께 내려주도록 추가했습니다.
  • 원문 게시글 내용은 수정하지 않고, 요약 결과는 article_ai_summaries 테이블에 별도로 저장합니다.
  • 요약이 없거나 생성 중인 경우에는 원문만 반환하고, 백그라운드 큐에서 Upstage Solar Pro 3와 Document Parse를 사용해 요약을 생성합니다.

🚀 주요 변경 내용

  • article_ai_summaries 테이블과 claim/retry용 index를 추가했습니다.
  • GET /articles/{id} 조회 시 성공한 요약이 있으면 content 상단에 AI 요약 HTML을 붙여 반환합니다.
  • 요약이 없거나 stale이면 WAIT 상태로 등록하고, 스케줄러가 최대 batch size만큼 순차 처리합니다.
  • 본문 HTML, 게시글 첨부, 본문 내 koreatech 파일 URL을 요약 입력으로 수집합니다.
  • 첨부 문서/이미지는 Upstage Document Parse를 거친 뒤 Solar 입력에 포함합니다.
  • Solar 응답은 JSON schema로 받고, 서버 allowlist icon과 검증기를 통과한 문장만 저장합니다.
  • 429, timeout, premature close 같은 일시 오류는 next_attempt_at 기준으로 재시도되도록 처리했습니다.

💬 참고 사항

  • Upstage API key는 UPSTAGE_API_KEY 환경 변수로만 주입합니다.
  • 실패/운영 조회 API는 후속 stacked PR에서 분리했습니다.
  • 다음 테스트를 통과했습니다.
    • ./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.acceptance.domain.ArticleAiSummaryApiTest'
    • 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: 4e912ec0-7dc6-4020-9c43-e50b9e459fdd

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-article-summary

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 요약 생성/저장/렌더링 흐름을 추가합니다.
@taejinn taejinn force-pushed the feat/2248-ai-article-summary branch from 62107aa to bf80564 Compare July 7, 2026 11:12
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

Unit Test Results

753 tests   750 ✔️  1m 23s ⏱️
180 suites      3 💤
180 files        0

Results for commit bf80564.

@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