[badge] 배지 카운트 비소급 (launch 이후 회고만)#272
Conversation
이전(launch 전) 회고가 누적/주간 배지 조건에 소급 반영되던 문제 수정. achievement.feature-launched-at(설정, env 오버라이드) 이후 completedAt 회고만 countCompletedRetros / 주간 카운트에 반영. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b355253502
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| private fun completedAtsSinceLaunch(userId: UUID): List<LocalDateTime> = | ||
| retrospectiveRepository | ||
| .findCompletedAtByUserIdAndStatusAndDeletedAtIsNull(userId, RetroStatus.COMPLETED) | ||
| .filter { !it.isBefore(featureLaunchedAt) } |
There was a problem hiding this comment.
Skip legacy completed rows without completedAt
When a user has completed retros from before completed_at was added/backfilled, that column can be NULL (V13__add_completed_at.sql adds it as nullable), and the JPQL projection can return a null element for those COMPLETED rows. This filter dereferences every value with it.isBefore(...), so the first badge check for such a user throws and BadgeEventListener logs/abandons badge awarding instead of just ignoring pre-launch rows. Please filter nulls or add r.completedAt IS NOT NULL/a cutoff predicate in the repository query before comparing.
Useful? React with 👍 / 👎.
변경
이전(릴리즈 전) 회고가 배지 조건에 소급 반영되던 문제 수정.
achievement.feature-launched-at설정 추가(ACHIEVEMENT_FEATURE_LAUNCHED_ATenv로 환경별 오버라이드)RetrospectAchievementReaderImpl:countCompletedRetros/주간 카운트가 launch 이후 completedAt 회고만 집계🤖 Generated with Claude Code