Repository navigation
[refactor] LifeExpectancyPolicy의 미사용 minRemainingLife 필드 제거 - #70
Merged
Merged
Conversation
예상수명 하한선은 ResultService에서 입력 나이 + 5년으로 계산되어 minRemainingLife 필드/컬럼은 어디서도 읽지 않는 죽은 코드였다.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: 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. Comment |
kyer5
approved these changes
Sep 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 개요 (why, what)
LifeExpectancyPolicy.minRemainingLife(DB 컬럼min_remaining_life)는 어디에서도 읽지 않는 죽은 코드였습니다.getMinRemainingLife()호출부가 없고,LifeExpectancyPolicy를 소비하는 유일한 지점인ResultService.createResult()는maleExpectancy/femaleExpectancy만 사용합니다.ResultService.calculateExpectedLife()에서 입력 나이 + 5년(FLOOR_YEARS_ABOVE_INPUT_AGE = 5)으로 계산되고 있어, 이 필드가 담당하는 역할이 없습니다.🛠️ 구현 방법 (how)
LifeExpectancyPolicy엔티티에서min_remaining_life컬럼 매핑, 필드, Builder 파라미터/대입을 제거했습니다.ResultControllerTest픽스처에서.minRemainingLife(...)를 제거했습니다.ResultControllerTest(9건) 통과를 확인했습니다.ddl-auto: update는 컬럼을 삭제하지 않으므로 dev/prod에 직접 실행이 필요합니다.🤔 검토한 대안과 선택 이유 (trade-off)
💭 리뷰 포인트
LifeExpectancyPolicy📚 Reference (Optional)
🤖 Generated with Claude Code
https://claude.ai/code/session_011grnE3mcEJDkQS3TdDUs4n