Skip to content

feat(datingexam): 필수 과목 9문항 개편 및 동률 우선순위 적용 (#452) - #458

Merged
stemmmm merged 1 commit into
developfrom
feat/452
Jul 20, 2026
Merged

feat(datingexam): 필수 과목 9문항 개편 및 동률 우선순위 적용 (#452)#458
stemmmm merged 1 commit into
developfrom
feat/452

Conversation

@stemmmm

@stemmmm stemmmm commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

개요

필수 과목 문항을 15개 → 9개로 개편하고, 답변을 6개 성격 유형에 재매핑합니다. (#453의 6유형 기반)

변경 사항

  • V18 마이그레이션 (src/main/resources/db/migration/V18__reset_required_exam_to_9_questions.sql)
    • 기존 연애고사 데이터(subject/question/answer/submit) + 집계 결과(dating_exam_submit_result) 리셋
    • is_dating_exam_submitted = FALSE로 전원 재응시 유도
    • 4과목(가치관 3 / 데이트 2 / 취향 2 / 결혼 2) = 9문항 재삽입, 답변별 6유형 매핑
  • 동률 우선순위 변경 (DatingExamSubmitResult.recalculateDominant)
    • 자기주도형 > 자극모험형 > 동반성장형 > 현실안정형 > 이성중심형 > 정서교감형
  • 제출 검증 로직은 이미 DB 문항 수 기준 동적이라 코드 변경 불필요

유형 매핑 (한글명 → enum)

자기주도형 동반성장형 정서교감형 현실안정형 자극모험형 이성중심형
DECISIVE_INDEPENDENT GROWING_RUNNING_MATE DEVOTED_ROMANTIC REALISTIC_SHELTER STIMULATING_ADVENTURER RATIONAL_REALIST

⚠️ 데이터 리셋 (확정 사항)

문항·유형 매핑이 바뀌어 과거 집계(구 15문항·4유형 기준)가 무의미하므로 기존 결과를 삭제하고 재응시를 유도합니다. 배포 시 모든 회원의 대표 유형이 초기화됩니다.

마이그레이션 방식

환경 독립적인 리셋 + 재삽입 방식입니다(하드코딩 ID 미사용). 문항/답변 ID는 재생성됩니다.

테스트

  • 동률 우선순위(자기주도형 최우선, 자극모험형>동반성장형, 이성중심형>정서교감형 등) 검증

Closes #452

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

recalculateDominant()의 tie-break 우선순위가 변경되고, 각 우선순위를 검증하는 테스트가 추가·갱신되었다. 또한 V18 migration에서 기존 연애고사 제출 및 결과 데이터를 초기화하고, 4개 REQUIRED 과목과 총 9개 문항 및 personality type별 답변을 새로 등록한다.

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

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning 설명이 내용상은 충분하지만, 저장소 템플릿의 @coderabbitai summary/참고 자료/노트 구조를 따르지 않습니다. 템플릿의 @coderabbitai summary, 참고 자료, 노트 섹션을 포함해 같은 형식으로 다시 작성하세요.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Title check ✅ Passed 제목이 9문항 개편과 동률 우선순위 변경이라는 핵심 변경을 간결하게 요약합니다.
✨ 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/452

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.

필수 과목 문항을 15개 → 9개로 개편하고 답변을 6개 유형에 재매핑.
- V18 마이그레이션: 기존 연애고사 데이터/제출 결과 리셋 후 9문항 재삽입,
  is_dating_exam_submitted 초기화로 전원 재응시 유도
- recalculateDominant 동률 우선순위 변경:
  자기주도형 > 자극모험형 > 동반성장형 > 현실안정형 > 이성중심형 > 정서교감형
- 검증 로직은 이미 DB 문항 수 기준 동적이라 코드 변경 불필요
@stemmmm stemmmm changed the title docs(datingexam): 필수 과목 9문항 마이그레이션 뼈대 (#452) feat(datingexam): 필수 과목 9문항 개편 및 동률 우선순위 적용 (#452) Jul 20, 2026
@stemmmm
stemmmm marked this pull request as ready for review July 20, 2026 12:21
@github-actions

Copy link
Copy Markdown

Test results

831 tests   831 ✅  16s ⏱️
249 suites    0 💤
249 files      0 ❌

Results for commit 277e493.

@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: 1

🤖 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 `@src/main/resources/db/migration/V18__reset_required_exam_to_9_questions.sql`:
- Around line 1-3: Flyway가 자동 실행하지 않도록 마이그레이션 파일을
src/main/resources/db/migration/에서 docs/db-migrations/로 이동하고 파일명을 .draft.sql
형식으로 변경하세요. SQL 내용은 유지하고, Flyway 스캔 대상 경로에 해당 파일이 남지 않도록 확인하세요.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4007c1fa-ce4a-4672-801c-f7e0cb1acd5a

📥 Commits

Reviewing files that changed from the base of the PR and between eec3e06 and 277e493.

📒 Files selected for processing (3)
  • src/main/java/deepple/deepple/datingexam/domain/DatingExamSubmitResult.java
  • src/main/resources/db/migration/V18__reset_required_exam_to_9_questions.sql
  • src/test/java/deepple/deepple/datingexam/domain/DatingExamSubmitResultTest.java

Comment on lines +1 to +3
-- #452 필수 과목 문항 15개 → 9문항 변경 + 답변 6유형 재매핑
-- 문항/유형 매핑이 바뀌므로 기존 제출/집계 결과를 초기화하고 전원 재응시를 유도한다.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🔴 Critical | ⚡ Quick win

마이그레이션 파일 경로가 PR 설명과 일치하지 않습니다.

PR 설명에 따르면 Flyway 자동 실행을 방지하기 위해 마이그레이션 파일을 docs/db-migrations/ 경로에 .draft.sql 형식으로 배치해야 하지만, 현재 파일은 Flyway 스캔 대상인 src/main/resources/db/migration/ 경로에 위치해 있습니다.

이 상태로 애플리케이션이 실행되면 마이그레이션이 자동 적용되어 의도치 않게 기존 데이터가 모두 삭제될 위험이 있습니다. PR 설명의 의도대로 Flyway가 인식하지 않도록 파일 경로를 docs/ 하위로 이동해 주시기 바랍니다.

🤖 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 `@src/main/resources/db/migration/V18__reset_required_exam_to_9_questions.sql`
around lines 1 - 3, Flyway가 자동 실행하지 않도록 마이그레이션 파일을
src/main/resources/db/migration/에서 docs/db-migrations/로 이동하고 파일명을 .draft.sql
형식으로 변경하세요. SQL 내용은 유지하고, Flyway 스캔 대상 경로에 해당 파일이 남지 않도록 확인하세요.

@stemmmm
stemmmm merged commit f4e8af8 into develop Jul 20, 2026
4 checks passed
@stemmmm
stemmmm deleted the feat/452 branch July 20, 2026 12:49
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