You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
raf 의 2026-06-07 결정 — browser/scrape spike 전면 폐기 후 제휴업체 catalog DB + pgvector cosine retrieval path 로 전환. Stage 1+2 (cody_describe / style_formula / cody_embedding) 는 Phase A-E 로 완료된 상태. 본 issue 는 그 위에 Stage 3 (catalog match) 의 ai-server 측 핵심 path 를 lock-in.
`catalog_repository_pgvector.py` (신규) — `NullCatalogItemRepository` 의 실 구현. `find_exact` (brand + title pg_trgm 유사도 ≥ 0.85 + category_path.group filter) + `find_similar` (cosine `<=>` ORDER BY + min_score filter + group filter)
`catalog_matcher.match()` signature 변경 — `role_embeddings` (Phase 3 산출) 받아 cached vec 사용 → re-embed 호출 skip. cached 없는 idx 는 `build_item_query_text` fallback (Phase 1 inert 환경 + soft-fail 회복)
`processor.py` step 11 — `role_embeddings_list` 전달
`_container.py` — env `CATALOG_MATCH_REPOSITORY` (default "null") switch 의 factory dispatch
`_environment.py` — `CATALOG_MATCH_REPOSITORY` / `CATALOG_MATCH_EXACT_THRESHOLD` 추가
15 신규 unit test (helper 4 + early-return 7 + happy 4)
배경
raf 의 2026-06-07 결정 — browser/scrape spike 전면 폐기 후 제휴업체 catalog DB + pgvector cosine retrieval path 로 전환. Stage 1+2 (cody_describe / style_formula / cody_embedding) 는 Phase A-E 로 완료된 상태. 본 issue 는 그 위에 Stage 3 (catalog match) 의 ai-server 측 핵심 path 를 lock-in.
직전 대화 결정:
items테이블 (raf 명시, feat(affiliate): Rakuten SFTP 기반 아이템 카탈로그 DB 구축 #625 의 본문 operation DB 기본 과 다름 — 본 issue 가 SoT)cody_role_embeddings별 테이블, jsonb 안 vector 의 ivfflat 불가 회피)작업 정리 (Phase 0-4 완료)
Phase 0 — Cleanup ✅
Phase 1 — Migration ✅
Phase 2 — catalog team 공유 spec ✅
Phase 3 — per-role embedding 적재 ✅
Phase 4 — PgvectorCatalogItemRepository + matcher rewrite ✅
Total 60 tests green (회귀 0).
산출물
남은 phase
Catalog 적재 시점에 enable
```bash
export CATALOG_MATCH_REPOSITORY=pgvector
export CATALOG_MATCH_ENABLED=true
ai-server 재기동 → reparse 1건 → catalog_matches jsonb 적재 확인
```
코드 변경 0 — env flag flip 만으로 동작 (adapter-first 의 SoT 가치).
의존성