Skip to content

fix: 릴리즈 리뷰 반영 — 시드 스냅샷 삭제 범위·검색어 길이 코드 포인트 기준 - #257

Merged
chanwoo7 merged 1 commit into
developfrom
fix/release-review-search-seed-length
Aug 30, 2026
Merged

fix: 릴리즈 리뷰 반영 — 시드 스냅샷 삭제 범위·검색어 길이 코드 포인트 기준#257
chanwoo7 merged 1 commit into
developfrom
fix/release-review-search-seed-length

Conversation

@chanwoo7

Copy link
Copy Markdown
Member

릴리즈 PR #255 CodeRabbit 지적 2건 반영: ① 시드의 스냅샷 deleteMany를 시드가 쓰는 두 정각으로 한정(무관 데이터 보존) ② 검색어 길이 검사를 코드 포인트 기준으로(VarChar(200) 문자 수와 일치, 이모지 회귀 테스트).

CodeRabbit 릴리즈 리뷰 2건 반영.

- seedSearchEvents: 스냅샷 전량 deleteMany가 시드와 무관한 기존 스냅샷까지 지움 →
  시드가 쓰는 두 정각(직전·현재)만 삭제 후 재삽입(시드는 자기 영역만 정리한다는
  idempotent 원칙 준수).
- normalizeSearchKeyword: 길이 검사를 UTF-16 단위(.length)에서 코드 포인트 기준으로 —
  MySQL VarChar(200)은 문자 수 기준이라 서로게이트 쌍(이모지)이 2로 계산되면 저장
  가능한 검색어를 거절함. 회귀 테스트(이모지 200/201개) 추가.
@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e161ff3b-01b3-447b-8c69-be37ceb4435c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

🧹 knip — dead-code 리포트

Unused exported types (2)
Duplicate exports (1)
전체 리포트
Unused exported types (2)
ProductSearchScope  type  src/features/product/index.ts:20:8
StoreSearchScope    type  src/features/store/index.ts:17:8  
Duplicate exports (1)
KEYWORD_RANK_SNAPSHOT_SIZE|MAX_POPULAR_KEYWORDS_LIMIT  src/features/search/constants/search.constants.ts

청소 후보(오탐 가능) · 기준 docs/guide/architecture-conventions.md

@github-actions

Copy link
Copy Markdown

🩺 NestJS Doctor — 90/100 (Excellent)

진단 288건 (error 0).

Category error warning info
architecture 0 0 9
correctness 0 140 0
performance 0 24 16
schema 0 0 86
security 0 13 0
architecture / security 상위 항목
  • info architecture/architecture/no-barrel-export-internals: Barrel file re-exports internal type 'IAuditLogRepository'.
  • warning security/security/no-exposed-env-vars: Direct 'process.env.NODE_ENV' access in 'AuthController'. Use ConfigService instead.
  • warning security/security/require-guards-on-endpoints: Endpoint 'start' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'callback' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'refresh' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'logout' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'sellerLogin' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'sellerRefresh' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'sellerLogout' has no @UseGuards() at class or method level.
  • warning security/security/require-guards-on-endpoints: Endpoint 'devIssueToken' has no @UseGuards() at class or method level.
  • info architecture/architecture/no-barrel-export-internals: Barrel file re-exports internal module '@/features/conversation/repositories/conversation.repository'.
  • info architecture/architecture/no-barrel-export-internals: Barrel file re-exports internal type 'ConversationRepository'.
  • info architecture/architecture/no-barrel-export-internals: Barrel file re-exports internal module '@/features/order/repositories/order.repository'.
  • info architecture/architecture/no-barrel-export-internals: Barrel file re-exports internal type 'OrderRepository'.
  • info architecture/architecture/no-barrel-export-internals: Barrel file re-exports internal module '@/features/product/repositories/product.repository'.

오탐 포함 가능 · 기준 docs/guide/architecture-conventions.md

@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: ac38b09692

ℹ️ 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".

Comment on lines +67 to +69
await prisma.searchKeywordRankSnapshot.deleteMany({
where: { ranked_at: { in: [previousAt, rankedAt] } },
});

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 Clean up snapshots from earlier seed runs

When the seed is rerun after the clock advances by more than one hour, snapshots created by the previous run fall outside these two timestamps and are never removed. resetSeedScope removes the corresponding seeded search events, while the snapshot table has unlimited retention, so repeated seed runs accumulate orphaned synthetic ranking history and the seed is no longer idempotent across hour boundaries; track and delete prior seed-owned snapshots rather than limiting cleanup solely to the new run's timestamps.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

미반영(트레이드오프): 스냅샷 소유권 추적은 컬럼 신설이 필요한 dev 시드 과설계. 크론이 시드 이벤트를 집계해 만든 스냅샷도 동일하게 잔존하므로 완전한 멱등은 어차피 불가. popularSearchKeywords는 최신 스냅샷만 노출하므로 과거 정각의 잔존 스냅샷은 화면에 나타나지 않고, 두 정각 한정 삭제로 같은 시간대 재시드의 중복(uk 충돌)은 방지됨.

@codecov

codecov Bot commented Aug 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

Copy link
Copy Markdown

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 97.88% 5482/5601
🟢 Branches 94.08% 2162/2298
🟢 Functions 96.59% 1077/1115
🟢 Lines 98.46% 4978/5056

Test suite run success

1774 tests passing in 207 suites.

Report generated by 🧪jest coverage report action from ac38b09

@chanwoo7
chanwoo7 merged commit e50c067 into develop Aug 30, 2026
12 checks passed
@chanwoo7
chanwoo7 deleted the fix/release-review-search-seed-length branch August 30, 2026 20:34
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