MSG-224 feat: 축제 미션 적재 — 시드·격주 수동 갱신 러너, source 소유 식별(V13) - #86
Merged
Conversation
|
Claude finished @Ss0Mae's task in 3m 25s —— View job 🔍 PR 리뷰 완료작업 목록
총평스펙( 컨벤션
Owner A/B 도메인 경계
버그·로직
테스트
참고(블로킹 아님)
|
테스트 커버리지
|
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.
🎫 관련 티켓
docs/prd/MSG-219-mission-prd.md(검토됨, FR-1~5) / 스펙:docs/MSG-224.md작업 내용
festivals.jsonl1,059건)에서 진행 중이거나 예정인 축제를 골라 EVENT 미션으로 적재한다. 축제마다 중심 좌표 주변 9×9 격자 81개를 미션 대상으로 잡고, 한 곳만 찍어도 완료되도록 target_count는 1로 둔다.missions.source컬럼을 추가했다. 러너가 어떤 행이 자기 것인지 알아보기 위한 적재 출처 표시다(아래 참고).🤔 고민한 내용
type='EVENT'였는데, 팝업(MSG-235)도 같은 EVENT 타입을 쓴다. 그대로 두면 축제 갱신이 끝난 팝업까지 지워버리고, 1격자 팝업이 dedupe 대조에 섞여 가짜 축제 키를 만들면 진짜 축제를 건너뛸 수도 있었다. 그래서 source 컬럼을 도입해source='FESTIVAL'인 행만 건드리게 했다. source가 비어 있는 행(수동 데이터)은 어떤 러너도 건드리지 않는다.Mission.created_at은 DB DEFAULT에 맡겼다(insertable=false). 기존 조회 전용 매핑 그대로 INSERT하면 NOT NULL 위반이 나는 함정을 리뷰 사전 점검에서 찾았다.👀 리뷰 포인트
NOT EXISTS(user_missions)조건. 빠지면 스탬프 걸린 미션의 FK에 걸려 격주 갱신 전체가 롤백된다.일격자_EVENT는_dedupe_대조에_포함되지_않는다. 팝업 모사 데이터를 축제 중심에서 (-4,-4) 자리에 같은 기간으로 놓아서, 예전 코드로 되돌리면 반드시 깨지게 배치했다.