Skip to content

[FIX] 라이브 공유 종료 상태 유지 시간 단축 - #273

Merged
coli-geonwoo merged 1 commit into
developfrom
fix/#272-finished-ttl
Sep 28, 2026
Merged

coli-geonwoo merged 1 commit into
developfrom
fix/#272-finished-ttl

Conversation

@coli-geonwoo

@coli-geonwoo coli-geonwoo commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

배경

사회자가 FINISHED를 발행하면 서버는 룸을 종료 상태로 기억하고, 이후 입장하는 청중에게 FINISHED를 보내 종료 화면으로 이동시킨다.
종료 상태 유지 시간(SharingRoomRegistry.FINISHED_TTL)이 1일이라, 다음날 같은 토론 테이블로 다시 공유할 때 청중이 사회자보다 먼저 입장하면 대기 화면이 아닌 종료 화면이 표시됐다.

작업

  • FINISHED_TTL을 1일 → 5분으로 단축
    • 종료 후 5분 이내 입장한 청중: FINISHED (종료 화면)
    • 이후 사회자보다 먼저 입장한 청중: CHAIRMAN_ABSENT (대기 화면)
    • 사회자가 공유를 시작하면 reopen으로 종료 상태가 즉시 해제되는 기존 동작은 유지
  • FE 변경 불필요 (CHAIRMAN_ABSENT 수신 시 이미 대기 화면 처리)

테스트

  • SharingRoomRegistryTest: removeExpired 테스트가 시간 단위를 하드코딩해 5분 TTL에서 깨지므로 TTL 기준 분 단위로 재작성
  • SharingServiceTest: 종료 유지 시간이 지난 룸에 사회자보다 먼저 입장하면 CHAIRMAN_ABSENT를 받는 회귀 테스트 추가
  • ./gradlew test 전체 통과
  • 로컬 BE/FE 기동 후 수동 확인

참고 (후속 검토)

같은 테이블로 토론을 연달아 진행할 때, 종료 후 5분 이내 & 사회자가 공유 모달을 열기 전에 입장한 청중은 종료 화면을 본다.
종료 화면에는 소켓 연결이 없어 이후 공유가 시작돼도 자동 복귀하지 않으므로, 필요 시 FE에서 종료 화면에서도 룸 구독을 유지하는 방향으로 별도 대응한다.

Closes #272

🤖 Generated with Claude Code

Summary by CodeRabbit

  • 버그 수정
    • 종료된 공유 룸이 5분 후 만료되도록 조정했습니다.
    • 만료된 룸에 청중이 입장하면 사회자 부재 알림을 받을 수 있도록 처리했습니다.

종료 후 다음날 같은 테이블로 다시 공유할 때 청중이 사회자보다 먼저
입장하면 종료 화면이 표시되던 문제를 수정한다. 종료 상태 유지 시간이
지나면 사회자 부재(CHAIRMAN_ABSENT)를 알려 대기 화면으로 이동한다.

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

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: debate-timer/debate-timer-be/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: e1c315f3-470c-47d8-a9ba-f43523491bf6

📥 Commits

Reviewing files that changed from the base of the PR and between d5a64cb and 6f94a17.

📒 Files selected for processing (3)
  • src/main/java/com/debatetimer/service/sharing/SharingRoomRegistry.java
  • src/test/java/com/debatetimer/service/sharing/SharingRoomRegistryTest.java
  • src/test/java/com/debatetimer/service/sharing/SharingServiceTest.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.


Walkthrough

공유 룸의 종료 상태 유지 시간이 1일에서 5분으로 변경되었습니다. 테스트는 단축된 유지 시간에 따른 룸 제거와, 유지 시간이 지난 뒤 사회자 없이 입장한 청중에게 CHAIRMAN_ABSENT 이벤트가 전송되는 동작을 확인합니다.

Changes

공유 룸 종료 상태 만료

Layer / File(s) Summary
종료 상태 유지 시간 및 만료 검증
src/main/java/com/debatetimer/service/sharing/SharingRoomRegistry.java, src/test/java/com/debatetimer/service/sharing/SharingRoomRegistryTest.java, src/test/java/com/debatetimer/service/sharing/SharingServiceTest.java
FINISHED_TTL을 1일에서 5분으로 변경했습니다. 룸 만료 테스트의 시간 간격을 조정하고, 유지 시간이 지난 뒤 청중이 입장하면 CHAIRMAN_ABSENT 이벤트가 전송되는 테스트를 추가했습니다.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 6f94a

The five-minute retention matches the requested behavior, and viewers joining after expiry receive CHAIRMAN_ABSENT when no chairman is active. No material merge risk remains.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 6f94a

The five-minute expiry changes when viewers move from the finished screen to the waiting screen, but the reviewed paths do not show a new privilege, entrypoint, or security-control bypass. Client behavior and deployment conditions were not fully verified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The changed exposure is the duration of finished-state responses for rooms reached through the existing audience join path, not a newly reachable channel or a grant of chairman authority.

Trust Boundaries and Controls

  • observed — The reviewed chairman subscription path performs owner authorization before chairman handling. The public audience path predates this change and selects an existing room-status response.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed 제목은 FINISHED_TTL을 1일에서 5분으로 단축하는 핵심 변경을 정확하고 간결하게 설명합니다.
Description check ✅ Passed 설명은 배경, 작업 내용, 테스트 결과, 후속 검토 사항을 포함합니다. 템플릿의 연관 이슈 형식과 다르지만 Closes #272로 이슈를 명시했으며, 선택 항목인 리뷰 요구사항은 생략할 수 있습니다.
Linked Issues check ✅ Passed 직접 연결된 이슈 #272의 코딩 요구사항을 충족합니다. SharingRoomRegistry.FINISHED_TTL을 1일에서 5분으로 변경했습니다. SharingRoomRegistryTest는 5분 이내의 종료 상태와 만료된 상태의 제거 동작을 검증합니다. SharingServiceTest.JoinAudience는 유지 시간이 지난 뒤 청중이 …
Out of Scope Changes check ✅ Passed 변경은 이슈 #272와 직접 연결된 범위에 있습니다. TTL 변경과 관련 레지스트리 테스트 보강, 만료 후 CHAIRMAN_ABSENT 동작의 회귀 테스트만 포함합니다. 요약에 unrelated 기능 변경은 나타나지 않습니다.
  • Fix all pre-merge checks with AI
✨ 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

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

Copy link
Copy Markdown

Test Results

169 files  169 suites   52s ⏱️
434 tests 434 ✅ 0 💤 0 ❌
446 runs  446 ✅ 0 💤 0 ❌

Results for commit 6f94a17.

@github-actions

Copy link
Copy Markdown

📝 Test Coverage Report

Overall Project 91.64% 🍏
Files changed 100% 🍏

File Coverage
SharingRoomRegistry.java 100% 🍏

@coli-geonwoo
coli-geonwoo merged commit d750832 into develop Sep 28, 2026
5 checks passed
@coli-geonwoo
coli-geonwoo deleted the fix/#272-finished-ttl branch September 28, 2026 12:37
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