feat: 큐레이션 feed_payload 컬럼 추가 및 쓰기 경로 저장 - #677
Merged
Merged
Conversation
- 서브모듈 V4 마이그레이션: curation_extension.feed_payload json nullable 컬럼 추가 - CurationExtension에 feedPayload 필드 매핑
- extractFeedPayload: x-feed 필드 투영 + 피드 교차 x-graphql의 숨은 입력값(argFrom) 병합 - GraphQL 실행 없이 원본 payload에서만 추출 - 4개 스펙 리소스 및 숨은 입력값 시나리오 단위 테스트 5건
- AdminSpecBasedCurationService create/update에서 추출 메서드로 feed_payload 저장·갱신 - CurationExtension.update 시그니처에 feedPayload 추가 - mono 단위 테스트 2건, admin 통합 테스트 2건 추가
argFrom은 payloadPath로 내려간 노드(배열이면 그 원소) 기준 상대 경로인데 루트 기준으로 탐색해 숨은 입력값이 조용히 누락됐다. 남길 스키마 경로를 미리 모아 투영 재귀에 넘기는 방식으로 바꿔 배열 원소에서도 경로가 어긋나지 않게 한다. 남길 값이 없을 때는 null 대신 빈 컨테이너를 저장해 backfill 이전 레거시 행과 구분한다. 피드 경로 해석 규칙은 CurationFeedPaths로 추출해 저장 시 추출과 조회 시 보강이 같은 기준을 쓰도록 한다. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
픽스처가 feed_payload를 비워두면 후속 읽기 경로 테스트가 NULL fallback 분기만 타게 된다. 운영과 같은 추출 결과를 남긴다. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
서브모듈 신규 커밋은 개발 환경 이미지 태그 범프 2건으로 storage/ 변경은 없다. Task 3의 "픽스처 갱신 불필요" 판단을 정정한 내용도 함께 남긴다. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
8 tasks
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.
배경
curation_extension.payload는 건당 최대 128KB로, 피드 조회 시 전체를 전송·투영하는 구조의 개선 기반이 필요변경 사항
스키마
curation_extension.feed_payloadJSON nullable 컬럼 추가. 포인터는6611431(V4b1eeffb포함, 이후 2건은 개발 환경 이미지 태그 범프로storage/변경 없음)CurationExtension:feedPayload필드 매핑,update시그니처에 feedPayload 추가추출 로직
CurationFeedProjector.extractFeedPayload: 원본 payload에서x-feed.enabled필드와, 피드 경로와 교차하는x-graphql의argFrom값(숨은 입력값, 예: alcoholId)만 추출. GraphQL 실행 없음, 통계값 미포함argFrom은payloadPath로 내려간 노드(배열이면 그 원소) 기준 상대 경로로 해석한다.whisky_tasting_event가 이 조합(payloadPath: $.alcohols)을 쓴다null이 아니라 빈 컨테이너([]/{})를 저장한다.null은 backfill 이전 레거시 행의 표시로만 쓴다CurationFeedPaths(신규): 피드 경로 해석 규칙(rootSchema/collect/intersectsFeed/normalize)을 한 곳에 모은다.CurationResponseMaterializer에 복제돼 있던 4종을 제거해, 저장 시 추출과 조회 시 보강이 같은 기준을 쓰도록 보장한다쓰기 경로
AdminSpecBasedCurationService: 생성·수정 시 원본 검증 후 feed_payload를 같은 트랜잭션으로 저장·갱신CurationFixtureFactory: 픽스처도 운영과 같은 추출 결과를 남긴다. 비워두면 후속 읽기 경로 테스트가 NULL fallback 분기만 타게 된다검증
payloadPath하위 배열 + 빈 컨테이너읽기 경로 전환 시 인계 사항
feed_payload가null이면 backfill 이전 레거시 행이다. 빈 결과는[]/{}로 저장되므로 fallback 판정은null만 보면 된다x-feed가 아닌 필드다.feed_payload를 그대로 응답해서는 안 되고, 현행처럼materializeFeed→projectPayload를 거쳐야 한다제외 범위 (후속 과제)
배포 참고