Skip to content

[FIX] 속기록에 생성 시점의 시간표 이름·주제·팀 이름을 스냅샷으로 저장 - #290

Merged
coli-geonwoo merged 2 commits into
developfrom
fix/#288-transcript-table-snapshot
Oct 24, 2026
Merged

coli-geonwoo merged 2 commits into
developfrom
fix/#288-transcript-table-snapshot

Conversation

@coli-geonwoo

@coli-geonwoo coli-geonwoo commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

🚩 연관 이슈

closed #288

작업 내용

토론이 끝난 뒤 시간표의 이름·주제를 바꾸면 이미 만든 속기록과 토론 기록 목록의 주제도 함께 바뀌었습니다. 조회·목록·AI 보정·분석이 시간표를 매번 다시 읽었기 때문입니다. 속기록은 그 토론의 기록이므로 생성 시점의 값으로 고정합니다.

  • 속기록 저장 시 시간표 이름·주제·찬성/반대 팀 이름을 transcript에 함께 저장합니다(TranscriptTableSnapshot, V21).
  • 속기록 조회(GET /api/transcripts/{id}), 목록(GET /api/transcripts), AI 보정, 분석 보고서 생성이 모두 이 스냅샷을 씁니다.
  • 시간표를 지운 뒤 속기록을 조회하면 시간표를 찾지 못해 실패하던 문제도 함께 해결됩니다.
  • 기존 속기록은 V21 마이그레이션에서 현재 시간표 값으로 채웁니다. 이미 지워진 시간표의 기록은 null로 남습니다.

검증

  • "시간표를 수정해도 생성 시점 값 유지", "시간표를 지워도 기록에 남음" 테스트를 먼저 실패시킨 뒤 구현했습니다.
  • ./gradlew test 654개 통과(Flyway 마이그레이션 검증 포함).
  • 로컬 실제 확인: 속기록 생성 후 시간표를 "바뀐 시간표 / 바뀐 주제"로 수정해도 상세·목록이 생성 당시 이름·주제를 유지했고, 시간표 삭제 후 조회도 200으로 성공했습니다.

🗣️ 리뷰 요구사항 (선택)

  • V21의 기존 데이터 채우기는 상관 서브쿼리 UPDATE입니다. dev·prod의 transcript 건수가 적어 문제없다고 봤는데 확인 부탁드립니다.
  • #289가 같은 TranscriptRefiner를 고쳐 이 브랜치 위에 있습니다. 이 PR을 먼저 머지해 주세요.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • 개선 사항
    • 속기록에 토론 시간표의 이름, 주제, 찬성·반대 팀 이름이 저장됩니다.
    • 시간표를 수정하거나 삭제한 뒤에도 속기록 상세 정보와 목록에서 생성 당시의 이름과 주제를 확인할 수 있습니다.
    • 스냅샷 기능 도입 전 생성된 기록은 저장된 정보가 없어 시간표 관련 항목이 비어 있을 수 있습니다.

시간표를 수정하면 이미 만든 속기록의 주제도 바뀌던 문제를 고친다.
속기록 저장 시 시간표 정보를 함께 저장하고, 조회·목록·AI 보정·분석은 이 스냅샷을 쓴다.
기존 속기록은 V21 마이그레이션에서 현재 시간표 값으로 채운다.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coli-geonwoo coli-geonwoo added the fix 기능 수정 label Oct 24, 2026
@coli-geonwoo coli-geonwoo self-assigned this Oct 24, 2026
@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 53 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 06d87f2 and 50ac0b0.

Files selected for processing: 3
  • src/main/java/com/debatetimer/service/transcript/TranscriptRefiner.java
  • src/main/resources/prompt/transcript-refinement-system.txt
  • src/test/java/com/debatetimer/service/transcript/TranscriptRefinerTest.java

Walkthrough

속기록 생성 시 시간표 이름, 안건, 찬성 팀 이름, 반대 팀 이름을 스냅샷으로 저장합니다. 상세·목록 응답과 분석·다듬기 과정은 저장된 값을 사용합니다. 기존 속기록의 스냅샷 값은 마이그레이션에서 채웁니다.

Changes

속기록 시간표 스냅샷

Layer / File(s) Summary
스냅샷 저장 및 복원
src/main/java/com/debatetimer/domain/transcript/*, src/main/java/com/debatetimer/entity/transcript/TranscriptEntity.java, src/main/java/com/debatetimer/domainrepository/transcript/TranscriptDomainRepository.java, src/main/java/com/debatetimer/service/transcript/TranscriptService.java, src/main/resources/db/migration/V21__add_table_snapshot_to_transcript.sql, src/test/java/com/debatetimer/domainrepository/transcript/TranscriptDomainRepositoryTest.java
속기록 생성 시 시간표 정보를 엔티티에 저장하고 도메인 객체로 복원합니다. 마이그레이션은 기존 행을 일치하는 시간표 값으로 채웁니다.
상세 및 목록 응답
src/main/java/com/debatetimer/domain/transcript/TranscriptSummary.java, src/main/java/com/debatetimer/repository/transcript/TranscriptRepository.java, src/main/java/com/debatetimer/dto/transcript/response/*, src/main/java/com/debatetimer/service/transcript/TranscriptService.java, src/test/java/com/debatetimer/service/transcript/TranscriptServiceTest.java
상세 응답과 목록 응답이 별도로 조회한 시간표 대신 속기록 스냅샷의 정보를 사용합니다. 테스트는 시간표 수정·삭제 후에도 생성 당시 값이 응답에 남는지 확인합니다.
분석 및 다듬기 입력
src/main/java/com/debatetimer/service/transcript/DebateAnalyzer.java, src/main/java/com/debatetimer/service/transcript/TranscriptRefiner.java, src/test/java/com/debatetimer/service/transcript/DebateAnalyzerTest.java, src/test/java/com/debatetimer/service/transcript/TranscriptRefinerTest.java
분석과 다듬기 프롬프트가 속기록 스냅샷의 안건과 팀 이름을 사용합니다. null 값은 빈 문자열로 변환합니다.

Priority: Pending latest changes

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

Change: Bug fix · Severity of issue fixed: Medium

Possibly related PRs

Merge Risk: Minimal · up to 06d87

Transcript detail access remains restricted to its owner. No confirmed issue from this review needs to block the snapshot change.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 10.81% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 37 functions across 15 files. (1 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed 제목은 속기록에 생성 시점의 시간표 정보를 스냅샷으로 저장하는 핵심 변경을 정확하고 간결하게 설명합니다.
Description check Passed 설명은 연관 이슈, 변경 내용, 검증 결과, 리뷰 요구사항을 포함합니다. PR의 목적과 구현 범위도 명확하게 설명합니다.
Linked Issues check Passed 직접 연결된 활성 이슈 #288의 코딩 요구사항을 충족합니다. TranscriptService.create는 생성 시 TranscriptTableSnapshot을 저장합니다. V21은 기존 속기록을 현재 시간표 값으로 채우고, 삭제된 시간표의 행은 null로 둡니다. TranscriptService와 응답 객체는 저장된 스냅샷으로 상세·목록을 구…
Out of Scope Changes check Passed 변경 범위는 #288의 스냅샷 저장과 사용에 직접 연결됩니다. 도메인·엔티티·저장소 변경은 스냅샷 영속화에 필요합니다. 서비스·응답 변경은 상세·목록 조회를 스냅샷 기반으로 전환합니다. 보정·분석 변경은 삭제되거나 수정된 시간표에 의존하지 않도록 합니다. 마이그레이션과 테스트도 해당 동작을 지원합니다. 확인된 무관한 변경은 없습니다.
Full details: Linked Issues check

Explanation

직접 연결된 활성 이슈 #288의 코딩 요구사항을 충족합니다. TranscriptService.create는 생성 시 TranscriptTableSnapshot을 저장합니다. V21은 기존 속기록을 현재 시간표 값으로 채우고, 삭제된 시간표의 행은 null로 둡니다. TranscriptService와 응답 객체는 저장된 스냅샷으로 상세·목록을 구성합니다. TranscriptRefiner와 DebateAnalyzer도 Transcript의 스냅샷을 사용합니다. 관련 테스트는 시간표 수정 후 값 보존과 시간표 삭제 후 조회를 검증합니다.

Full details: Docstring Coverage

Explanation

Docstring coverage is 10.81% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 37 functions across 15 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

📝 Test Coverage Report

Overall Project 92.66% -0.08% 🍏
Files changed 96.81% 🍏

File Coverage
TranscriptEntity.java 100% 🍏
Transcript.java 100% 🍏
TranscriptSummary.java 100% 🍏
TranscriptTableSnapshot.java 100% 🍏
TranscriptRepository.java 100% 🍏
DebateAnalyzer.java 91.32% -0.83% 🍏
TranscriptRefiner.java 90.94% -2.17% 🍏
TranscriptDomainRepository.java 88.49% 🍏
TranscriptService.java 86.84% 🍏

@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.

🔇 Additional comments: 1
src/main/java/com/debatetimer/dto/transcript/response/TranscriptResponse.java-28-29: 1

28-29: Minor · Data Integrity & Integration · Quick win

⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

상세 응답의 시간표 필드를 nullable로 선언하세요.

V21 이전에 삭제된 시간표의 속기록은 스냅샷 값이 null입니다. 이 생성자는 해당 값을 TranscriptResponse에 그대로 전달하지만, tableName, agenda, prosTeamName, consTeamName은 nullable로 표시하지 않습니다. 네 응답 필드에 @Nullable을 적용해 실제 응답 계약을 명시하세요.


Review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between a41a8e4 and 06d87f2.

Files selected for processing: 16
  • src/main/java/com/debatetimer/domain/transcript/Transcript.java
  • src/main/java/com/debatetimer/domain/transcript/TranscriptSummary.java
  • src/main/java/com/debatetimer/domain/transcript/TranscriptTableSnapshot.java
  • src/main/java/com/debatetimer/domainrepository/transcript/TranscriptDomainRepository.java
  • src/main/java/com/debatetimer/dto/transcript/response/TranscriptResponse.java
  • src/main/java/com/debatetimer/dto/transcript/response/TranscriptSummaryResponse.java
  • src/main/java/com/debatetimer/entity/transcript/TranscriptEntity.java
  • src/main/java/com/debatetimer/repository/transcript/TranscriptRepository.java
  • src/main/java/com/debatetimer/service/transcript/DebateAnalyzer.java
  • src/main/java/com/debatetimer/service/transcript/TranscriptRefiner.java
  • src/main/java/com/debatetimer/service/transcript/TranscriptService.java
  • src/main/resources/db/migration/V21__add_table_snapshot_to_transcript.sql
  • src/test/java/com/debatetimer/domainrepository/transcript/TranscriptDomainRepositoryTest.java
  • src/test/java/com/debatetimer/service/transcript/DebateAnalyzerTest.java
  • src/test/java/com/debatetimer/service/transcript/TranscriptRefinerTest.java
  • src/test/java/com/debatetimer/service/transcript/TranscriptServiceTest.java

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@github-actions

Copy link
Copy Markdown

Test Results

256 files  256 suites   57s ⏱️
639 tests 639 ✅ 0 💤 0 ❌
655 runs  655 ✅ 0 💤 0 ❌

Results for commit 50ac0b0.

@coli-geonwoo
coli-geonwoo merged commit 0dff975 into develop Oct 24, 2026
5 checks passed
@coli-geonwoo
coli-geonwoo deleted the fix/#288-transcript-table-snapshot branch October 24, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix 기능 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FIX] 속기록에 생성 시점의 시간표 이름·주제·팀 이름을 스냅샷으로 저장

1 participant