Skip to content

[refactor/#380] Post embedding projection 책임 정리#391

Merged
Dimo-2562 merged 4 commits into
developfrom
refactor/#380
May 22, 2026
Merged

[refactor/#380] Post embedding projection 책임 정리#391
Dimo-2562 merged 4 commits into
developfrom
refactor/#380

Conversation

@Dimo-2562
Copy link
Copy Markdown
Contributor

@Dimo-2562 Dimo-2562 commented May 22, 2026

❤️ 기능 설명

Post embedding pipeline의 책임을 projection 생성/조회/저장 관점으로 정리하고, 관련 회귀를 빠르게 잡을 수 있도록 테스트를 보강했습니다.

  • PostEmbeddingProcessorTest 추가
    • title/summary validation
    • chunk filtering
    • embedding 호출 규칙
    • PostDocument 필드 매핑
    • 예외 전파
  • PostEmbeddingReaderTest 추가
    • lazy loading
    • 빈 결과 처리
    • 새 step execution 시작 시 repository 재조회
  • PostEmbeddingReaderDataJpaTest 추가
    • ready for embedding query contract 검증
    • null, "", whitespace-only summary 제외
    • embeddedAt != null 제외
  • PostEmbeddingWriterTest 추가
    • bulk index 요청 shape 검증
    • 성공분만 embeddedAt 갱신
    • null 응답/전부 실패 시 갱신 생략
  • PostEmbeddingReader@StepScope + ItemStreamReader로 정리해 반복 실행 시 iterator 상태가 새 step execution마다 초기화되도록 보강
  • PostRepository.findReadyForEmbedding()TRIM(summary) 기준으로 맞춰 Reader/Processor의 blank summary 계약을 일치시킴

배치/리팩토링 작업이라 Swagger 스크린샷 대신 Gradle 테스트 실행 결과를 첨부합니다.

테스트

./gradlew test --rerun-tasks \
  --tests com.techfork.domain.post.batch.PostEmbeddingProcessorTest \
  --tests com.techfork.domain.post.batch.PostEmbeddingReaderTest \
  --tests com.techfork.domain.post.batch.PostEmbeddingReaderDataJpaTest \
  --tests com.techfork.domain.post.batch.PostEmbeddingWriterTest
  • 결과: PASS

연결된 issue

close #380



✅ 체크리스트

  • PR 제목 규칙 잘 지켰는가?
  • 추가/수정사항을 설명하였는가?
  • 테스트 결과 사진을 넣었는가? (CLI 환경이라 스크린샷 대신 실행 결과 첨부)
  • 이슈넘버를 적었는가?

@Dimo-2562 Dimo-2562 self-assigned this May 22, 2026
@Dimo-2562 Dimo-2562 added 🌟 REFACTOR 리팩터링 (기능 변화 X) 📝 domain:post 게시글 관련 labels May 22, 2026
@Dimo-2562 Dimo-2562 merged commit c8c3a76 into develop May 22, 2026
1 check passed
@Dimo-2562 Dimo-2562 deleted the refactor/#380 branch May 22, 2026 05:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📝 domain:post 게시글 관련 🌟 REFACTOR 리팩터링 (기능 변화 X)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REFACTOR] Post embedding projection 책임 정리

1 participant