Skip to content

fix(book): partial-read progress classification and seed chunk position encoding#327

Merged
SolfE merged 28 commits intodevelopfrom
refactor/optimize-books-domain
Apr 24, 2026
Merged

fix(book): partial-read progress classification and seed chunk position encoding#327
SolfE merged 28 commits intodevelopfrom
refactor/optimize-books-domain

Conversation

@SolfE
Copy link
Copy Markdown
Member

@SolfE SolfE commented Apr 24, 2026

Summary

책 진행도 분류 회귀와 k6 시드 데이터 인코딩 불일치를 함께 수정했습니다.

Problem

  • /books?progress=IN_PROGRESS에서 일부 읽은 책(챕터 미완료)이 제외되어 NOT_STARTED로 보일 수 있었습니다.
  • k6 시드의 maxReadChunkNumber가 서비스 비교 로직에서 사용하는 인코딩 형식과 달라 진행도 비교가 깨질 수 있었습니다.

Solution

  • IN_PROGRESS/NOT_STARTED 판별 조건에 "부분 읽기" 상태를 반영했습니다.
  • k6 시드에서 maxReadChunkNumberchapter-first 인코딩 값으로 저장하도록 변경했습니다.

Changes

  • BookRepositoryImpl:
    • IN_PROGRESS 조회 시 chapterProgresses.progressPercentage > 0 && isCompleted = false 조건을 포함.
    • NOT_STARTED 제외 집합에도 동일한 부분 읽기 조건 반영.
  • BookRepositoryImplTest:
    • 부분 읽기 책이 IN_PROGRESS로 분류되는 케이스 추가.
    • 부분 읽기 책이 NOT_STARTED에서 제외되는 케이스 추가.
  • k6/seed/content/book/seed-books-content.mongosh.js:
    • maxReadChunkNumber 시드 값을 인코딩 포맷으로 저장.
    • encodeChapterFirstPosition 헬퍼 추가.

Example

  • 기존: 1챕터 2청크까지 읽어도 챕터 완료 전이면 IN_PROGRESS에서 누락될 수 있음.
  • 변경 후: 챕터 미완료라도 실제 읽기 시작 상태면 IN_PROGRESS로 집계.

Related Issues

  • Review comments (P1, P3) addressed in this PR.

SolfE added 27 commits March 30, 2026 12:31
@SolfE SolfE changed the title [codex] Optimize books progress filtering, seed encoding, and local-k6 profile Optimize books progress filtering, seed encoding, and local-k6 profile Apr 24, 2026
@SolfE SolfE changed the title Optimize books progress filtering, seed encoding, and local-k6 profile fix(book): partial-read progress classification and seed chunk position encoding Apr 24, 2026
@SolfE SolfE marked this pull request as ready for review April 24, 2026 16:25
@SolfE SolfE merged commit 9e6f07f into develop Apr 24, 2026
1 check passed
@SolfE SolfE deleted the refactor/optimize-books-domain branch April 24, 2026 16:25
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