Skip to content

[HCS-364] analysis server cdc on으로 설정#56

Merged
tkv00 merged 10 commits into
mainfrom
fix/HSC-364
Mar 18, 2026
Merged

[HCS-364] analysis server cdc on으로 설정#56
tkv00 merged 10 commits into
mainfrom
fix/HSC-364

Conversation

@tkv00

@tkv00 tkv00 commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

📝작업 내용


👀변경 사항


🎫 Jira Ticket

  • Jira Ticket: HSC-364

#️⃣관련 이슈

@tkv00 tkv00 added 🏷️ release 릴리즈 준비/버전 태깅/릴리즈 노트/릴리즈 브랜치 작업 🚑 hotfix 프로덕션 긴급 수정(우회/긴급 패치 포함) ☁️ area: INFRA 인프라/운영/배포 영역 🔥 priority: P0 즉시 처리 필요(서비스/데모 블로커) release:patch 버전 patch bump: X.Y.(Z+1) deploy:intelligence-server labels Mar 18, 2026
@github-actions github-actions Bot added Counselor Team 🐛 fix 기능에 대한 버그 수정 🗂️ area: BE 백엔드 영역 labels Mar 18, 2026
@github-actions github-actions Bot changed the title Fix/hsc 364 [HSC-364] Fix/hsc 364 Mar 18, 2026
@tkv00 tkv00 changed the title [HSC-364] Fix/hsc 364 analysis server cdc on으로 설정 Mar 18, 2026
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 Pull Request는 CDC 분석 활성화 로직을 개선하고, AI 기반 마케팅 문구 생성을 위한 한국어 프롬프트를 상세화하며, 더욱 견고한 상품 필터링 및 폴백 메커니즘을 구현하여 상품 추천 시스템을 강화하는 데 중점을 둡니다. 연령 기반 필터링 도입과 상품 유형별 균형 잡힌 추천을 통해 보다 정확하고 상황 인지적인 다양한 상품 추천을 제공하는 것을 목표로 합니다.

Highlights

  • CDC 분석 활성화 로직 개선: app_mode 설정을 추가하고 cdc_analysis_enabled를 선택적 필드로 변경했으며, cdc_analysis_enabled 또는 app_mode에 따라 CDC 분석 활성화 여부를 결정하는 effective_cdc_analysis_enabled 속성을 도입했습니다. 또한, CDC 분석 서비스 활성화 로직을 effective_cdc_analysis_enabled를 사용하도록 업데이트하고, APP_MODE 및 CDC 분석 상태에 대한 로깅을 추가했습니다.
  • AI 마케팅 프롬프트 상세화: SEGMENT_SYSTEM_PROMPTSPERSONA_STYLE_PROMPTS의 한국어 프롬프트를 대화체로 변경하고, 마케팅 카피 생성에 대한 구체적인 예시와 추가 규칙을 포함하여 상세화했습니다. 이는 AI가 고객 상황에 더 적합하고 설득력 있는 추천 문구를 생성하도록 돕습니다.
  • 상품 추천 필터링 및 폴백 메커니즘 강화: 연령 기반 상품 추천 필터링 로직(_age_from_ctx, _is_age_allowed_for_tags)을 도입하고, 상품 유형별 최대 추천 개수를 제한하는(_check_and_update_product_type_count) 기능을 추가했습니다. 또한, 임베딩 실패 시 사용할 기본 상품을 가져오는 쿼리(FETCH_DEFAULT_PRODUCTS_SQL)를 추가하고, LLM JSON 응답 지침을 상세화하며, 임베딩 실패 시 기본 상품 목록으로 대체하는 폴백 로직을 강화했습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist 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.

Code Review

이 PR은 APP_MODE에 따라 CDC 분석을 활성화하도록 설정을 변경하고, 추천 로직을 크게 개선했습니다. 연령 기반 필터링, 상품 추천 다양성 확보, 폴백 로직 강화 등 새로운 비즈니스 규칙이 잘 적용되었습니다. 또한 LLM 프롬프트를 개선하여 추천의 질을 높이려는 노력이 돋보입니다. 전반적으로 좋은 개선이지만, 코드에 NameError를 유발할 수 있는 치명적인 버그가 하나 발견되어 수정이 필요합니다.

)
)
used_ids.add(pid)
type_counts[tcode] = current + 1

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

critical

이 라인에서 tcodecurrent 변수가 정의되지 않아 NameError가 발생합니다. 또한, 이 로직은 몇 줄 위에서 호출된 _check_and_update_product_type_count 함수 내부에서 이미 처리되므로 중복됩니다. 이 라인을 삭제하는 것이 좋습니다.

@tkv00 tkv00 changed the title analysis server cdc on으로 설정 [HCS-364] analysis server cdc on으로 설정 Mar 18, 2026
@tkv00 tkv00 merged commit 54fb06e into main Mar 18, 2026
1 of 4 checks passed
@tkv00 tkv00 deleted the fix/HSC-364 branch March 20, 2026 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🗂️ area: BE 백엔드 영역 ☁️ area: INFRA 인프라/운영/배포 영역 Counselor Team deploy:intelligence-server 🐛 fix 기능에 대한 버그 수정 🚑 hotfix 프로덕션 긴급 수정(우회/긴급 패치 포함) 🔥 priority: P0 즉시 처리 필요(서비스/데모 블로커) release:patch 버전 patch bump: X.Y.(Z+1) 🏷️ release 릴리즈 준비/버전 태깅/릴리즈 노트/릴리즈 브랜치 작업

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants