Skip to content

[HOTFIX] 복수전공 졸업요건 및 탈퇴 계정 재가입 오류 수정 - #334

Merged
kimhoeyun merged 4 commits into
mainfrom
hotfix/333
Aug 23, 2026
Merged

[HOTFIX] 복수전공 졸업요건 및 탈퇴 계정 재가입 오류 수정#334
kimhoeyun merged 4 commits into
mainfrom
hotfix/333

Conversation

@kimhoeyun

Copy link
Copy Markdown
Collaborator

참고 사항

P1: 꼭 반영해주세요 (Request changes)
P2: 적극적으로 고려해주세요 (Request changes)
P3: 웬만하면 반영해 주세요 (Comment)
P4: 반영해도 좋고 넘어가도 좋습니다 (Approve)
P5: 그냥 사소한 의견입니다 (Approve)

🔗 Related Issue

변경 내용

복수전공 졸업요건 후보 선택

  • GraduationMajorResolver.resolveDualMajor()에서 주전공 영역 요건을 먼저 확인합니다.
  • 영역 요건이 없는 주전공 후보는 건너뛰고, 실제 계산 가능한 주전공·복수전공 조합을 선택합니다.
  • 현재 후보에 영역 요건이 없고 과거 후보에 요건이 있는 학과 개편 사례의 회귀 테스트를 추가했습니다.

탈퇴 계정 레거시 병합 및 재가입

  • 학번으로 조회된 기존 사용자가 탈퇴 상태이면 정상 계정 병합을 수행하지 않습니다.
  • 기존 Student를 익명화하고 SocialAccount, RefreshToken, 인증 캐시를 정리합니다.
  • 기존 탈퇴 User는 보존하고 신규 User는 활성 상태로 유지합니다.
  • 탈퇴 User에 연결된 레거시 소셜 계정으로 로그인해도 신규 활성 User와 SocialAccount를 생성합니다.
  • User.absorbFrom()에서 isDeleted, deletedAt이 신규 User로 전파되지 않도록 방어합니다.
  • 학번 UNIQUE 충돌을 방지하기 위해 Student 익명화 결과를 saveAndFlush()로 즉시 반영합니다.

검증 결과

  • ./gradlew test --tests com.chukchuk.haksa.domain.graduation.policy.GraduationMajorResolverTest --stacktrace --no-daemon 통과.
  • ./gradlew test --tests com.chukchuk.haksa.domain.user.service.UserServiceUnitTests --stacktrace --no-daemon 통과.
  • ./gradlew test --tests com.chukchuk.haksa.domain.user.service.UserServiceIntegrationTest --stacktrace --no-daemon 통과.
  • ./gradlew test --tests com.chukchuk.haksa.domain.user.model.UserTests --stacktrace --no-daemon 통과.
  • ./gradlew check --stacktrace --no-daemon 통과.
  • git diff --check main...HEAD 통과.
  • 저장소에 spotlessApply Gradle task가 등록되어 있지 않아 해당 포맷 task는 실행하지 못했습니다.

운영 및 문서

  • 운영 DB의 레거시 탈퇴 데이터는 별도 조회·검증 후 보정해야 합니다.
  • Hotfix 배포 후 임시 변경한 학생의 주전공 데이터를 실제 학적 값으로 복원해야 합니다.
  • 관련 Wiki를 확인했으며, 탈퇴·재가입 시 레거시 계정 병합 금지 정책은 아직 반영되지 않아 후속 갱신이 필요합니다.
  • PR과 커밋에는 운영 학생의 학번·UUID·이름을 포함하지 않았습니다.

남은 위험

  • 본 PR은 운영 DB 데이터를 직접 변경하지 않습니다.
  • 기존 탈퇴 토큰은 계속 401로 차단되며, 재가입 사용자는 새 토큰으로 재로그인해야 합니다.

@kimhoeyun kimhoeyun added the 🐞 BugFix Something isn't working label Aug 21, 2026
@kimhoeyun kimhoeyun self-assigned this Aug 21, 2026
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d41aba7d-4a0d-40e5-8e7a-397a8df1bdfc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@pp8817 pp8817 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

수고하셨습니당

@kimhoeyun
kimhoeyun merged commit 0066d11 into main Aug 23, 2026
4 checks passed
@kimhoeyun
kimhoeyun deleted the hotfix/333 branch August 23, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 BugFix Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants