Skip to content

[Feature] 미팅 전체 취소 api 구현 및 미팅 정책 위반 로직 수정 - #78

Open
Sehi55 wants to merge 19 commits into
developfrom
feat/meeting-cancellation
Open

[Feature] 미팅 전체 취소 api 구현 및 미팅 정책 위반 로직 수정#78
Sehi55 wants to merge 19 commits into
developfrom
feat/meeting-cancellation

Conversation

@Sehi55

@Sehi55 Sehi55 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

변경 사항

  • meeting match 기준 전체 미팅 취소 구현
  • 취소 투표 중 참여자 고정 로직 추가
  • 매칭 방 퇴장후 fastmatching 전환
  • 빠른 입장 시 미팅 매칭방에 연결
  • matched와 fastmatching 상태일 때 조회 시 meeting_match 의 채팅방 아이디 반환
  • 매칭 성사 후 동성 채팅방 비활성화

Summary by CodeRabbit

  • 신규 기능
    • 미팅 전체 취소 요청 생성, 투표, 현재 요청 조회 기능을 추가했습니다.
    • 전원 동의에 따른 미팅 취소와 취소 요청 만료 처리를 지원합니다.
    • 매칭 전용 채팅방 입장 및 조회 기능을 강화했습니다.
  • 개선
    • 비활성 채팅방의 메시지 전송, 입장, 동기화를 차단합니다.
    • 빠른 매칭 및 멤버 퇴장 시 미팅 상태와 채팅방 상태를 자동으로 조정합니다.
  • 테스트/마이그레이션
    • 취소 투표, 만료, 미팅 상태 전환 및 활성 채팅 멤버 제약을 검증하는 테스트와 데이터베이스 변경을 반영했습니다.

Sehi55 added 2 commits July 12, 2026 22:13
[FEAT] 연애관 채팅 프로필 공개 요청 구현
[FIX] 채팅방 오류 수정
@Sehi55 Sehi55 self-assigned this Jul 21, 2026
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Sehi55, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 19 minutes

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

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0dc55982-16a8-4aa6-b366-5c73c5c474d0

📥 Commits

Reviewing files that changed from the base of the PR and between 55f187b and 21bd0fa.

📒 Files selected for processing (2)
  • manabom/src/main/resources/db/migration/V24__add_unique_active_chat_member.sql
  • manabom/src/test/java/mannabom_server/manabom/application/meeting/service/MeetingCancellationServiceTest.java

Walkthrough

미팅 전체 취소 요청·투표·만료 처리를 추가했습니다. 승인 시 미팅과 관련 채팅방을 비활성화합니다. 빠른 매칭 입장·퇴장과 미팅 상태 전이를 보강했습니다. 비활성 채팅방의 메시지, 동기화, 구독을 제한했습니다.

Changes

미팅 취소 및 매칭 채팅 흐름

Layer / File(s) Summary
취소 상태 모델과 저장 구조
manabom/.../domain/meeting/{entity,enums,repository}/*, manabom/.../db/migration/V21__*.sql, V22__*.sql, V23__*.sql
취소 요청·투표 엔티티, 상태 enum, 리포지토리와 데이터베이스 제약 조건을 추가했습니다.
취소 요청·투표 서비스와 API
manabom/.../application/meeting/{service,scheduler}/*, manabom/.../application/meeting/dto/*, manabom/.../presentation/meeting/MeetingController.java, manabom/.../test/.../MeetingCancellation*
취소 요청 생성, 투표, 조회, 만료, 승인 처리와 세 API를 추가했습니다. 만료 스케줄러와 테스트도 추가했습니다.
매칭 채팅방 생명주기와 접근 제어
manabom/.../application/chat/service/*, manabom/.../domain/chat/repository/*, manabom/.../infrastructure/security/websocket/*, manabom/.../db/migration/V24__*.sql
매칭 채팅방 참여·조회·비활성화와 활성 멤버 중복 방지를 추가했습니다. 비활성 방의 메시지 전송, 동기화, WebSocket 구독을 제한했습니다.
미팅 매칭·입장·퇴장 상태 전이
manabom/.../application/meeting/service/*, manabom/.../domain/meeting/entity/Meeting.java, manabom/.../domain/meeting/repository/MeetingMatchRepository.java, manabom/.../test/.../MeetingMemberLeaveStatusTest.java
빠른 매칭 입장 시 매칭 채팅방을 연결했습니다. 매칭 성공과 멤버 퇴장에 따른 미팅 상태 전이를 추가했습니다.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant MeetingController
  participant MeetingCancellationService
  participant MeetingCancellationVoteRepository
  participant ChatRoomService
  participant Meeting
  Client->>MeetingController: 취소 요청 또는 투표
  MeetingController->>MeetingCancellationService: 취소 처리 위임
  MeetingCancellationService->>MeetingCancellationVoteRepository: 투표 저장 및 집계
  MeetingCancellationService->>ChatRoomService: 채팅방 및 멤버 비활성화
  MeetingCancellationService->>Meeting: 취소 상태 반영
  MeetingCancellationService-->>MeetingController: 취소 응답 반환
Loading

Possibly related PRs

Suggested reviewers: kimjuneon

Poem

토끼가 취소 표를 세고
매칭 방 문을 닫아요.
모두 동의하면 미팅도 쉬고
새 상태 길이 열려요.
enabled 방에서만 톡톡!

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 미팅 전체 취소 API 구현과 관련 정책 로직 수정을 명확하게 요약하며 변경 사항의 주요 목적과 일치합니다.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/meeting-cancellation

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.

@Sehi55 Sehi55 added bug Something isn't working enhancement New feature or request labels Jul 21, 2026

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

Actionable comments posted: 3

🧹 Nitpick comments (2)
manabom/src/test/java/mannabom_server/manabom/application/meeting/service/MeetingCancellationServiceTest.java (1)

124-156: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

채팅방/멤버 비활성화 경로에 대한 검증 보강 권장

unanimousApprovalCancelsBothMatchedTeamsmeeting1/meeting2cancelByAgreement() 호출만 검증합니다. approveCancellation()이 함께 수행하는 chatRoomRepository.findByMatch/findByMeeting 조회 결과에 대한 deactivateChatRoomAndMembers 호출(채팅방/멤버 비활성화)은 이 테스트에서 커버되지 않습니다. 이번 PR의 목표 중 하나가 "매칭 성사 후 채팅방 비활성화"이므로, 관련 verify를 추가해 회귀를 방지하는 것을 권장합니다.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@manabom/src/test/java/mannabom_server/manabom/application/meeting/service/MeetingCancellationServiceTest.java`
around lines 124 - 156, 보 unanimousApprovalCancelsBothMatchedTeams 테스트가 meeting
취소뿐 아니라 채팅방과 멤버 비활성화 경로도 검증하도록 보강하세요. approveCancellation()에서 사용하는
chatRoomRepository의 매칭/회의 조회 결과를 설정하고, deactivateChatRoomAndMembers 호출이 두 매칭 팀에
대해 수행되는지 검증하세요.
manabom/src/main/java/mannabom_server/manabom/application/meeting/service/MeetingService.java (1)

184-200: 🎯 Functional Correctness | 🔵 Trivial

enterRoomByCode/enterRoomById 로직 중복 및 saveAndFlush 처리 불일치.

두 메서드가 취소 대기 검증 → 입장 검증 → isFastMatchingEntry 계산 → addMember → 채팅방 조인 → 빠른 입장 매칭방 연결 → 응답 생성까지 거의 동일한 로직을 반복하고 있습니다. 공통 private 메서드로 추출하면 유지보수성이 개선되고, 두 진입점이 항상 동일하게 동작함을 보장할 수 있습니다.

추가로 enterRoomByCode(Line 188)에만 meetingRepository.saveAndFlush(meeting) 호출과 "왜 addMember가 반영이 안되지" 주석이 있는데, enterRoomById에는 동일한 flush가 없습니다. 원래 flush가 필요했던 이유(더티 체킹이 반영되지 않는 문제)가 실재한다면 enterRoomById에도 동일한 문제가 잠재해 있을 수 있습니다. 두 진입점에서 flush 필요 여부를 명확히 하고 일관되게 처리해 주세요.

Also applies to: 215-249

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@manabom/src/main/java/mannabom_server/manabom/application/meeting/service/MeetingService.java`
around lines 184 - 200, Extract the shared flow from enterRoomByCode and
enterRoomById into one private helper covering cancellation validation, join
validation, fast-matching detection, member addition, chat-room joins, and
response construction. Ensure both entry points delegate to this helper and use
the same meeting persistence behavior, explicitly deciding whether saveAndFlush
is required and applying that decision consistently; remove the temporary
comment.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@manabom/src/main/java/mannabom_server/manabom/application/chat/service/ChatRoomService.java`:
- Around line 139-155: Update joinMatchingChatRoom to check duplicate membership
using the member status, limiting the existsBy query to
ChatMemberStatus.ACTIVATE so users with DEACTIVATED membership history can
rejoin; preserve the existing active-member exception and save flow, and add a
database uniqueness safeguard if required to prevent concurrent duplicate
inserts.

In
`@manabom/src/main/java/mannabom_server/manabom/application/meeting/service/MeetingCancellationService.java`:
- Around line 155-165: Update expirePendingRequests() so each expired request is
processed in an independent transaction, preventing an OptimisticLockException
for one request from rolling back other requests. Move the per-request expire
operation into a transactional boundary that can commit or roll back
independently, while preserving the existing count and expiration timestamp
behavior.

In
`@manabom/src/main/java/mannabom_server/manabom/domain/meeting/enums/MeetingCancellationStatus.java`:
- Around line 3-8: Synchronize MeetingCancellationStatus with the
chk_cancellation_request_status database constraint by adding the missing
WITHDRAWN enum value, unless the schema is intentionally changed to remove it;
ensure the JPA enum values and allowed database statuses remain consistent.

---

Nitpick comments:
In
`@manabom/src/main/java/mannabom_server/manabom/application/meeting/service/MeetingService.java`:
- Around line 184-200: Extract the shared flow from enterRoomByCode and
enterRoomById into one private helper covering cancellation validation, join
validation, fast-matching detection, member addition, chat-room joins, and
response construction. Ensure both entry points delegate to this helper and use
the same meeting persistence behavior, explicitly deciding whether saveAndFlush
is required and applying that decision consistently; remove the temporary
comment.

In
`@manabom/src/test/java/mannabom_server/manabom/application/meeting/service/MeetingCancellationServiceTest.java`:
- Around line 124-156: 보 unanimousApprovalCancelsBothMatchedTeams 테스트가 meeting
취소뿐 아니라 채팅방과 멤버 비활성화 경로도 검증하도록 보강하세요. approveCancellation()에서 사용하는
chatRoomRepository의 매칭/회의 조회 결과를 설정하고, deactivateChatRoomAndMembers 호출이 두 매칭 팀에
대해 수행되는지 검증하세요.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: de0f7f96-38d9-4777-899a-18c3ec06efb0

📥 Commits

Reviewing files that changed from the base of the PR and between 867151a and 13c910d.

📒 Files selected for processing (27)
  • manabom/src/main/java/mannabom_server/manabom/application/chat/service/ChatRoomService.java
  • manabom/src/main/java/mannabom_server/manabom/application/chat/service/ChatService.java
  • manabom/src/main/java/mannabom_server/manabom/application/meeting/dto/request/MeetingCancellationVoteRequest.java
  • manabom/src/main/java/mannabom_server/manabom/application/meeting/dto/response/MeetingCancellationResponse.java
  • manabom/src/main/java/mannabom_server/manabom/application/meeting/dto/response/MeetingCancellationVoteResponse.java
  • manabom/src/main/java/mannabom_server/manabom/application/meeting/scheduler/MeetingCancellationScheduler.java
  • manabom/src/main/java/mannabom_server/manabom/application/meeting/service/MeetingCancellationService.java
  • manabom/src/main/java/mannabom_server/manabom/application/meeting/service/MeetingMatchingService.java
  • manabom/src/main/java/mannabom_server/manabom/application/meeting/service/MeetingService.java
  • manabom/src/main/java/mannabom_server/manabom/domain/chat/repository/ChatMemberRepository.java
  • manabom/src/main/java/mannabom_server/manabom/domain/chat/repository/ChatRoomRepository.java
  • manabom/src/main/java/mannabom_server/manabom/domain/meeting/entity/Meeting.java
  • manabom/src/main/java/mannabom_server/manabom/domain/meeting/entity/MeetingCancellationRequest.java
  • manabom/src/main/java/mannabom_server/manabom/domain/meeting/entity/MeetingCancellationVote.java
  • manabom/src/main/java/mannabom_server/manabom/domain/meeting/enums/CancellationVoteDecision.java
  • manabom/src/main/java/mannabom_server/manabom/domain/meeting/enums/MeetingCancellationStatus.java
  • manabom/src/main/java/mannabom_server/manabom/domain/meeting/enums/MeetingStatus.java
  • manabom/src/main/java/mannabom_server/manabom/domain/meeting/repository/MeetingCancellationRequestRepository.java
  • manabom/src/main/java/mannabom_server/manabom/domain/meeting/repository/MeetingCancellationVoteRepository.java
  • manabom/src/main/java/mannabom_server/manabom/domain/meeting/repository/MeetingMatchRepository.java
  • manabom/src/main/java/mannabom_server/manabom/infrastructure/security/websocket/StompAuthChannelInterceptor.java
  • manabom/src/main/java/mannabom_server/manabom/presentation/meeting/controller/MeetingController.java
  • manabom/src/main/resources/db/migration/V21__add_meeting_cancellation_tables.sql
  • manabom/src/main/resources/db/migration/V22__move_meeting_cancellation_to_match.sql
  • manabom/src/test/java/mannabom_server/manabom/application/meeting/service/MeetingCancellationServiceTest.java
  • manabom/src/test/java/mannabom_server/manabom/domain/meeting/MeetingCancellationDomainTest.java
  • manabom/src/test/java/mannabom_server/manabom/domain/meeting/MeetingMemberLeaveStatusTest.java

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

🧹 Nitpick comments (2)
manabom/src/main/resources/db/migration/V23__remove_withdrawn_cancellation_status.sql (1)

4-11: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

테이블 락(Table Lock) 방지를 위한 NOT VALID 활용 권장

운영 환경에서 제약 조건을 추가할 때 테이블 전체를 스캔하는 동안 쓰기 작업이 차단(Lock)될 수 있습니다. 이를 방지하기 위해 NOT VALID로 제약 조건을 먼저 추가한 뒤 VALIDATE CONSTRAINT를 통해 비동기적으로 검증하는 방식을 권장합니다.

💡 제안하는 마이그레이션 스크립트 수정안
 ALTER TABLE meeting_cancellation_requests
     ADD CONSTRAINT chk_cancellation_request_status
         CHECK (status IN (
                           'PENDING',
                           'APPROVED',
                           'REJECTED',
                           'EXPIRED'
-            ));
+            )) NOT VALID;
+
+ALTER TABLE meeting_cancellation_requests
+    VALIDATE CONSTRAINT chk_cancellation_request_status;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@manabom/src/main/resources/db/migration/V23__remove_withdrawn_cancellation_status.sql`
around lines 4 - 11, Update the chk_cancellation_request_status constraint in
the migration to add it with NOT VALID, then separately validate it using
VALIDATE CONSTRAINT so constraint creation does not scan and lock the entire
table during the initial ALTER TABLE operation.

Source: Linters/SAST tools

manabom/src/main/resources/db/migration/V24__add_unique_active_chat_member.sql (1)

1-3: 🩺 Stability & Availability | 🔵 Trivial

인덱스 생성 시 테이블 락(Lock) 발생 주의

운영 환경에서 데이터가 많은 테이블에 일반적인 방식으로 인덱스를 생성하면, 인덱스 생성이 완료될 때까지 해당 테이블의 쓰기 작업(Update, Insert, Delete)이 차단되어 서비스 지연 및 가용성 저하가 발생할 수 있습니다.

서비스에 미치는 영향을 최소화하려면 CONCURRENTLY 옵션을 사용하여 쓰기 락을 방지하는 것을 고려해 보세요.
단, Flyway와 같은 데이터베이스 마이그레이션 도구는 기본적으로 트랜잭션 내에서 스크립트를 실행합니다. CONCURRENTLY 키워드는 트랜잭션 내부에서 사용할 수 없으므로, 이를 적용하려면 해당 마이그레이션 파일이 트랜잭션 없이(Non-transactional) 실행되도록 별도의 설정이나 파일명 변경이 필요할 수 있습니다.

CREATE UNIQUE INDEX CONCURRENTLY uk_chat_members_active_room_user
    ON chat_members (room_id, user_id)
    WHERE status = 'ACTIVATE';
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@manabom/src/main/resources/db/migration/V24__add_unique_active_chat_member.sql`
around lines 1 - 3, Update the uk_chat_members_active_room_user migration to
create the partial unique index with the CONCURRENTLY option, and configure this
migration to run non-transactionally as required by Flyway. Preserve the
existing index name, columns, uniqueness, and status filter.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In
`@manabom/src/main/resources/db/migration/V23__remove_withdrawn_cancellation_status.sql`:
- Around line 4-11: Update the chk_cancellation_request_status constraint in the
migration to add it with NOT VALID, then separately validate it using VALIDATE
CONSTRAINT so constraint creation does not scan and lock the entire table during
the initial ALTER TABLE operation.

In
`@manabom/src/main/resources/db/migration/V24__add_unique_active_chat_member.sql`:
- Around line 1-3: Update the uk_chat_members_active_room_user migration to
create the partial unique index with the CONCURRENTLY option, and configure this
migration to run non-transactionally as required by Flyway. Preserve the
existing index name, columns, uniqueness, and status filter.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: abf70e11-ce53-4f00-b90e-4e6999b03786

📥 Commits

Reviewing files that changed from the base of the PR and between 13c910d and fa62312.

📒 Files selected for processing (9)
  • manabom/src/main/java/mannabom_server/manabom/application/chat/service/ChatRoomService.java
  • manabom/src/main/java/mannabom_server/manabom/application/meeting/service/MeetingCancellationExpirationService.java
  • manabom/src/main/java/mannabom_server/manabom/application/meeting/service/MeetingCancellationService.java
  • manabom/src/main/java/mannabom_server/manabom/domain/meeting/repository/MeetingCancellationRequestRepository.java
  • manabom/src/main/resources/db/migration/V23__remove_withdrawn_cancellation_status.sql
  • manabom/src/main/resources/db/migration/V24__add_unique_active_chat_member.sql
  • manabom/src/test/java/mannabom_server/manabom/application/chat/service/ChatRoomServiceTest.java
  • manabom/src/test/java/mannabom_server/manabom/application/meeting/service/MeetingCancellationExpirationServiceTest.java
  • manabom/src/test/java/mannabom_server/manabom/application/meeting/service/MeetingCancellationServiceTest.java
🚧 Files skipped from review as they are similar to previous changes (3)
  • manabom/src/main/java/mannabom_server/manabom/domain/meeting/repository/MeetingCancellationRequestRepository.java
  • manabom/src/main/java/mannabom_server/manabom/application/chat/service/ChatRoomService.java
  • manabom/src/main/java/mannabom_server/manabom/application/meeting/service/MeetingCancellationService.java

@kimjuneon kimjuneon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

확인했습니다 아래 부분만 한번 확인해주시면 좋을 것 같아요

@Sehi55
Sehi55 force-pushed the feat/meeting-cancellation branch from fa62312 to 55f187b Compare August 6, 2026 05:03
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

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

Actionable comments posted: 4

🧹 Nitpick comments (1)
manabom/src/main/resources/db/migration/V22__move_meeting_cancellation_to_match.sql (1)

7-18: 🩺 Stability & Availability | 🔵 Trivial | 🏗️ Heavy lift

온라인 migration 전략을 적용하십시오.

기본 제약 조건 검증과 인덱스 생성은 쓰기 잠금을 발생시킬 수 있습니다.

  • manabom/src/main/resources/db/migration/V22__move_meeting_cancellation_to_match.sql#L7-L18: FK와 CHECK를 NOT VALID로 추가한 뒤 별도 단계에서 검증하십시오.
  • manabom/src/main/resources/db/migration/V22__move_meeting_cancellation_to_match.sql#L20-L25: 인덱스에 CONCURRENTLY 사용을 검토하고 migration runner 설정을 확인하십시오.
  • manabom/src/main/resources/db/migration/V23__remove_withdrawn_cancellation_status.sql#L4-L11: 상태 CHECK를 NOT VALID로 추가한 뒤 별도 단계에서 검증하십시오.
  • manabom/src/main/resources/db/migration/V24__add_unique_active_chat_member.sql#L1-L3: 유니크 인덱스에 CONCURRENTLY 사용을 검토하고 migration runner 설정을 확인하십시오.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@manabom/src/main/resources/db/migration/V22__move_meeting_cancellation_to_match.sql`
around lines 7 - 18, Apply the online migration strategy across the specified
migration sites: in
manabom/src/main/resources/db/migration/V22__move_meeting_cancellation_to_match.sql
lines 7-18, add the foreign-key and check constraints as NOT VALID and validate
them separately; in lines 20-25, use concurrent index creation where applicable
and verify the migration runner supports it. In
manabom/src/main/resources/db/migration/V23__remove_withdrawn_cancellation_status.sql
lines 4-11, add the status check as NOT VALID and validate it in a separate
step. In
manabom/src/main/resources/db/migration/V24__add_unique_active_chat_member.sql
lines 1-3, use a concurrently created unique index and confirm the migration
runner’s transaction configuration supports concurrent DDL.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@manabom/src/main/resources/db/migration/V22__move_meeting_cancellation_to_match.sql`:
- Around line 20-22: Before creating the unique index in
manabom/src/main/resources/db/migration/V22__move_meeting_cancellation_to_match.sql
lines 20-22, remove duplicate PENDING rows sharing the same non-null
meeting_match_id, retaining one row per match. Apply the same cleanup in
manabom/src/main/resources/db/migration/V24__add_unique_active_chat_member.sql
lines 1-3 for duplicate ACTIVATE rows sharing (room_id, user_id), then create
each unique index.
- Around line 1-5: Update migration V22 around the meeting_cancellation_requests
schema changes to preserve existing pending requests: either keep legacy
meeting_id-based lookup support, or backfill meeting_match_id from a verified
meeting_matches relationship and update the related current, approval, and
rejection APIs to use it. Do not leave existing rows with null meeting_match_id
while only the new meeting_match_id path is active.

In
`@manabom/src/main/resources/db/migration/V23__remove_withdrawn_cancellation_status.sql`:
- Around line 1-11: 기존 WITHDRAWN 행을 처리하지 않아 chk_cancellation_request_status 추가가
실패할 수 있습니다. meeting_cancellation_requests의 WITHDRAWN 데이터를 제약 조건 제거 및 재추가 전에 적절한
유효 상태로 변환하거나 삭제하는 데이터 마이그레이션을 추가하고, 이후에는 기존 제약 조건 변경 흐름을 유지하십시오.

In
`@manabom/src/test/java/mannabom_server/manabom/application/meeting/service/MeetingCancellationServiceTest.java`:
- Around line 46-57: Update the unanimous-approval setup in
MeetingCancellationServiceTest so the allMembersAgreed stub matches the
vote(30L, ...) call by stubbing it with meeting ID 30L instead of a null
argument. Add the chatRoomRepository mock required by the approval path before
verifying cancelByAgreement(), and keep the existing approval assertions
unchanged.

---

Nitpick comments:
In
`@manabom/src/main/resources/db/migration/V22__move_meeting_cancellation_to_match.sql`:
- Around line 7-18: Apply the online migration strategy across the specified
migration sites: in
manabom/src/main/resources/db/migration/V22__move_meeting_cancellation_to_match.sql
lines 7-18, add the foreign-key and check constraints as NOT VALID and validate
them separately; in lines 20-25, use concurrent index creation where applicable
and verify the migration runner supports it. In
manabom/src/main/resources/db/migration/V23__remove_withdrawn_cancellation_status.sql
lines 4-11, add the status check as NOT VALID and validate it in a separate
step. In
manabom/src/main/resources/db/migration/V24__add_unique_active_chat_member.sql
lines 1-3, use a concurrently created unique index and confirm the migration
runner’s transaction configuration supports concurrent DDL.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 11b0a866-6776-4ef7-8192-ced93998e404

📥 Commits

Reviewing files that changed from the base of the PR and between db7db41 and 55f187b.

📒 Files selected for processing (33)
  • manabom/src/main/java/mannabom_server/manabom/application/chat/service/ChatRoomService.java
  • manabom/src/main/java/mannabom_server/manabom/application/chat/service/ChatService.java
  • manabom/src/main/java/mannabom_server/manabom/application/meeting/dto/request/MeetingCancellationVoteRequest.java
  • manabom/src/main/java/mannabom_server/manabom/application/meeting/dto/response/MeetingCancellationResponse.java
  • manabom/src/main/java/mannabom_server/manabom/application/meeting/dto/response/MeetingCancellationVoteResponse.java
  • manabom/src/main/java/mannabom_server/manabom/application/meeting/scheduler/MeetingCancellationScheduler.java
  • manabom/src/main/java/mannabom_server/manabom/application/meeting/service/MeetingCancellationExpirationService.java
  • manabom/src/main/java/mannabom_server/manabom/application/meeting/service/MeetingCancellationService.java
  • manabom/src/main/java/mannabom_server/manabom/application/meeting/service/MeetingMatchingService.java
  • manabom/src/main/java/mannabom_server/manabom/application/meeting/service/MeetingService.java
  • manabom/src/main/java/mannabom_server/manabom/domain/chat/repository/ChatMemberRepository.java
  • manabom/src/main/java/mannabom_server/manabom/domain/chat/repository/ChatRoomRepository.java
  • manabom/src/main/java/mannabom_server/manabom/domain/meeting/entity/Meeting.java
  • manabom/src/main/java/mannabom_server/manabom/domain/meeting/entity/MeetingCancellationRequest.java
  • manabom/src/main/java/mannabom_server/manabom/domain/meeting/entity/MeetingCancellationVote.java
  • manabom/src/main/java/mannabom_server/manabom/domain/meeting/enums/CancellationVoteDecision.java
  • manabom/src/main/java/mannabom_server/manabom/domain/meeting/enums/MeetingCancellationStatus.java
  • manabom/src/main/java/mannabom_server/manabom/domain/meeting/enums/MeetingStatus.java
  • manabom/src/main/java/mannabom_server/manabom/domain/meeting/repository/MeetingCancellationRequestRepository.java
  • manabom/src/main/java/mannabom_server/manabom/domain/meeting/repository/MeetingCancellationVoteRepository.java
  • manabom/src/main/java/mannabom_server/manabom/domain/meeting/repository/MeetingMatchRepository.java
  • manabom/src/main/java/mannabom_server/manabom/global/error/MeetingCancellationExpiredException.java
  • manabom/src/main/java/mannabom_server/manabom/infrastructure/security/websocket/StompAuthChannelInterceptor.java
  • manabom/src/main/java/mannabom_server/manabom/presentation/meeting/controller/MeetingController.java
  • manabom/src/main/resources/db/migration/V21__add_meeting_cancellation_tables.sql
  • manabom/src/main/resources/db/migration/V22__move_meeting_cancellation_to_match.sql
  • manabom/src/main/resources/db/migration/V23__remove_withdrawn_cancellation_status.sql
  • manabom/src/main/resources/db/migration/V24__add_unique_active_chat_member.sql
  • manabom/src/test/java/mannabom_server/manabom/application/chat/service/ChatRoomServiceTest.java
  • manabom/src/test/java/mannabom_server/manabom/application/meeting/service/MeetingCancellationExpirationServiceTest.java
  • manabom/src/test/java/mannabom_server/manabom/application/meeting/service/MeetingCancellationServiceTest.java
  • manabom/src/test/java/mannabom_server/manabom/domain/meeting/MeetingCancellationDomainTest.java
  • manabom/src/test/java/mannabom_server/manabom/domain/meeting/MeetingMemberLeaveStatusTest.java
🚧 Files skipped from review as they are similar to previous changes (27)
  • manabom/src/main/java/mannabom_server/manabom/application/meeting/scheduler/MeetingCancellationScheduler.java
  • manabom/src/main/java/mannabom_server/manabom/domain/meeting/enums/MeetingCancellationStatus.java
  • manabom/src/main/java/mannabom_server/manabom/infrastructure/security/websocket/StompAuthChannelInterceptor.java
  • manabom/src/main/java/mannabom_server/manabom/domain/chat/repository/ChatRoomRepository.java
  • manabom/src/main/java/mannabom_server/manabom/application/meeting/service/MeetingCancellationExpirationService.java
  • manabom/src/test/java/mannabom_server/manabom/domain/meeting/MeetingMemberLeaveStatusTest.java
  • manabom/src/main/java/mannabom_server/manabom/application/meeting/dto/response/MeetingCancellationResponse.java
  • manabom/src/main/java/mannabom_server/manabom/domain/meeting/enums/CancellationVoteDecision.java
  • manabom/src/main/java/mannabom_server/manabom/application/meeting/dto/request/MeetingCancellationVoteRequest.java
  • manabom/src/main/java/mannabom_server/manabom/domain/meeting/repository/MeetingCancellationVoteRepository.java
  • manabom/src/main/java/mannabom_server/manabom/domain/meeting/repository/MeetingCancellationRequestRepository.java
  • manabom/src/main/resources/db/migration/V21__add_meeting_cancellation_tables.sql
  • manabom/src/main/java/mannabom_server/manabom/application/meeting/dto/response/MeetingCancellationVoteResponse.java
  • manabom/src/test/java/mannabom_server/manabom/domain/meeting/MeetingCancellationDomainTest.java
  • manabom/src/main/java/mannabom_server/manabom/domain/meeting/repository/MeetingMatchRepository.java
  • manabom/src/main/java/mannabom_server/manabom/application/chat/service/ChatService.java
  • manabom/src/main/java/mannabom_server/manabom/domain/meeting/entity/MeetingCancellationVote.java
  • manabom/src/main/java/mannabom_server/manabom/domain/meeting/enums/MeetingStatus.java
  • manabom/src/test/java/mannabom_server/manabom/application/chat/service/ChatRoomServiceTest.java
  • manabom/src/main/java/mannabom_server/manabom/domain/chat/repository/ChatMemberRepository.java
  • manabom/src/main/java/mannabom_server/manabom/domain/meeting/entity/MeetingCancellationRequest.java
  • manabom/src/main/java/mannabom_server/manabom/application/meeting/service/MeetingMatchingService.java
  • manabom/src/main/java/mannabom_server/manabom/presentation/meeting/controller/MeetingController.java
  • manabom/src/main/java/mannabom_server/manabom/application/meeting/service/MeetingService.java
  • manabom/src/main/java/mannabom_server/manabom/application/chat/service/ChatRoomService.java
  • manabom/src/main/java/mannabom_server/manabom/application/meeting/service/MeetingCancellationService.java
  • manabom/src/test/java/mannabom_server/manabom/application/meeting/service/MeetingCancellationExpirationServiceTest.java

@Sehi55
Sehi55 requested a review from kimjuneon August 6, 2026 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants