Skip to content

[badge] 배지 카운트 비소급 (launch 이후 회고만)#272

Merged
Develop-KIM merged 1 commit into
developfrom
feat/badge-non-retroactive
Jun 30, 2026
Merged

[badge] 배지 카운트 비소급 (launch 이후 회고만)#272
Develop-KIM merged 1 commit into
developfrom
feat/badge-non-retroactive

Conversation

@Develop-KIM

Copy link
Copy Markdown
Member

변경

이전(릴리즈 전) 회고가 배지 조건에 소급 반영되던 문제 수정.

  • achievement.feature-launched-at 설정 추가(ACHIEVEMENT_FEATURE_LAUNCHED_AT env로 환경별 오버라이드)
  • RetrospectAchievementReaderImpl: countCompletedRetros/주간 카운트가 launch 이후 completedAt 회고만 집계
  • 예: launch 전 회고 30개가 있어도 "10회/30회" 배지가 즉시 부여되지 않음. launch 후 새로 쌓은 회고만 카운트.

미션/레벨은 이미 미션 startedAt 이후만 카운트(비소급)라 변경 불필요.
프로젝트 기반 배지(피커/디깅)는 별도 reader라 이번 범위에서 제외(필요 시 후속).

🤖 Generated with Claude Code

이전(launch 전) 회고가 누적/주간 배지 조건에 소급 반영되던 문제 수정.
achievement.feature-launched-at(설정, env 오버라이드) 이후 completedAt 회고만
countCompletedRetros / 주간 카운트에 반영.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Develop-KIM Develop-KIM merged commit 7a3b371 into develop Jun 30, 2026
3 checks passed

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 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) }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@Develop-KIM Develop-KIM deleted the feat/badge-non-retroactive branch July 1, 2026 00:38
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