V10.489 strengthen PChome manual review matching

This commit is contained in:
OoO
2026-05-29 11:24:27 +08:00
parent 81701e85f4
commit c1b2fa82f5
7 changed files with 217 additions and 2 deletions

View File

@@ -55,6 +55,7 @@
- 2026-05-24 追記:同步 PChome rescore audit 最新狀態口徑與單位價 multiplier 修正後的 `services/marketplace_product_matcher.py` 行數;此處只更新 inventory不變更拆分策略。
- 2026-05-24 追記:同步 PChome review queue 決策信封合併後的 `services/competitor_intel_repository.py` 行數;此處只更新 inventory不變更拆分策略。
- 2026-05-25 追記:同步背景 embedding 讀取 `host_health_probes` skip guard 後的 `services/ollama_service.py` 行數;此處只更新 inventory不變更 Ollama 路由決策。
- 2026-05-29 追記:同步 PChome near-threshold / focused identity 回收系列後的 `services/marketplace_product_matcher.py` 行數;此處只更新 inventory不變更拆分策略。
## 達到或超過 800 行檔案清單
@@ -81,7 +82,7 @@
| 940 | `services/import_service.py` | P2 import service | validators / import writers / report builders |
| 1071 | `services/telegram_templates.py` | P2 Telegram templates | alert template groups / channel-specific formatting / reusable render helpers |
| 867 | `services/token_report_service.py` | P2 token report service | query / aggregation / chart payload / notification formatting |
| 3786 | `services/marketplace_product_matcher.py` | P2 marketplace matcher | identity parsing / unit-comparable scoring / search term quality / persistence normalization |
| 4865 | `services/marketplace_product_matcher.py` | P2 marketplace matcher | identity parsing / unit-comparable scoring / search term quality / persistence normalization |
| 865 | `routes/daily_sales_routes.py` | P2 Daily Sales Blueprint | route glue / export helpers / daily query and formatting service |
| 1266 | `services/ollama_service.py` | P2 Ollama client | host health / request client / fallback policy / response parsing |
| 849 | `services/pchome_crawler.py` | P2 PChome crawler | search fetch / parsing / fallback source handling / rate limit policy |

View File

@@ -83,6 +83,8 @@
- 2026-05-25 23:45 CST 起,`V10.484` 拆分 manual gate exact 與型錄風險POWERMAN 男性私密養護液 30ml、PHYSIOGEL AI 冰鎮精華露 200ml 2入、TS6 緊彈水嫩凝膠 40g、DERMA 寶寶洗髮沐浴露 150/500ml、Clarins 黃金亮眼萃 20ml、Cetaphil 長效潤膚乳 237/473ml 等明確同款可走 `exact / total_price / price_alert_exact`COCODOR 大豆蠟燭單側多款任選保留 `variant_selection_review`Pavaruni 雙側 20 香味蠟燭保持 total-price exact。測試`tests/test_marketplace_product_matcher.py``tests/test_competitor_match_attempts_persistence.py``tests/test_competitor_match_attempt_rescore_audit.py` 通過。
- 2026-05-25 23:55 CST 起,`V10.485` 補 NITORI 香氛噴霧器短型號防線near-threshold read-only pilot 中唯一 gate pass 為 5510 vs J82 LBR已判定不該入隊matcher 將 `J82` 這類短英數型號納入 NITORI diffuser model conflict與 5510 / YX168 等不同型號一樣 hard veto。Production 已部署 `/health=V10.485`120 筆 near-threshold audit 由 `gate_pass=1``gate_pass=0`accepted audit `scanned=89 / gate_pass=89 / still_low=0`
- 2026-05-29 起,`V10.486` 補 PChome near-threshold 風險邊界NEW DIRECTIONS 甜杏仁油 vs 酪梨油直接 hard vetoCOCODOR 經典擴香瓶多款任選、KAMERIA 足膜任選三款、Hakugen 白元入浴劑橘盒/綠盒不同變體都保留 `variant_selection_review`,不進可採用 gate。Production 已部署 `/health=V10.486`240 筆 near-threshold audit `gate_pass 83→79``identity_veto 0→1``still_low 157→160`
- 2026-05-29 起,`V10.488` 新增市場情報 MCP Fetch Run Receipt 安全預覽 gate只審核操作員 dry-run receipt不執行 CLI、不抓外站、不寫 DB。
- 2026-05-29 起,`V10.489` 補 PChome 低分同款人工覆核回收與 gate-pass 風險邊界TS6 超美白香氛誘霜 120g/ml、W 修護保養蝸牛特潤修護面膜 6 片、Derma 大地 Eco 植萃護膚油 2 入,從低信心升成 `identity_review` 候選Clarins 輕盈美體護理油 vs 身體調和護理油、台塑生醫嬰兒沐浴/洗髮組合數量反轉、isLeaf 私密慕絲香型數量不一致改 hard vetoHOOOME 大理石暖燈 vs 泛稱經典款只留 `variant_selection_review`,不進 total-price accepted。
## 3. 12 Agent 決策信封整合

View File

@@ -13,6 +13,8 @@
## 📅 詳細更新日誌 (考古存檔)
### 2026-05-24PChome 近門檻身份回收第二輪
- **V10.489 PChome 低分同款人工覆核回收與 gate-pass 風險邊界**: `marketplace_product_matcher` 新增三個窄範圍 focused identityTS6 超美白香氛誘霜 120g/ml、W 修護保養蝸牛特潤修護面膜 6 片、Derma 大地 Eco 植萃護膚油 2 入。這些樣本只升到 `identity_review / manual_review`,不進 `price_alert_exact`;同版補 Clarins 身體油不同線、命名組合品數量反轉、isLeaf 香型數量不一致 hard vetoHOOOME 大理石暖燈單側設計差留人工覆核。
- **V10.488 市場情報 MCP Fetch Run Receipt gate**: 新增 `/api/market_intel/mcp_fetch_run_receipt` 與 UI preview只審核操作員 shell dry-run 後貼回的 receiptAPI 不執行 CLI、不抓外站、不寫檔、不開 DB、不掛 scheduler且會阻擋 secret/token 欄位與 side-effect flags。
- **V10.473 背景 embedding 讀取 host_health skip**: `OllamaService.generate_embedding(..., allow_111_fallback=False)` 會先查最近 `host_health_probes`;若 GCP-A/GCP-B 在 20 分鐘視窗內已由 runtime probe 標成 unhealthy背景 embedding 直接跳過該節點並開短暫 GCP circuit不等待 30 秒 timeout、不落 111。DB 讀取失敗時 fail-open 回原本 retry避免觀測層阻斷 embedding。
- **V10.472 GCP Ollama failover rootless 診斷**: 新增 `scripts/ops/diagnose_ollama_gcp_failover.sh` 與 DevOps SOP可不需 root 檢查 GCP-A/GCP-B/111 direct、110 proxy `11435/11436` 與 GCP-B `bge-m3` runtime。現況確認GCP-A `22/11434` refused、GCP-B `22/11434` open 但 SSH key denied、GCP-B embed OK、110:11435 502、110:11436 OKprimary 修復需 GCP/SSH 或 110 root 權限。
- **V10.471 GCP-B embedding timeout 校準**: GCP-B `bge-m3` `/api/embed` 直接實測約 6.4s / 7.3s / 23.5s,原 `OLLAMA_EMBED_MAX_TIMEOUT=15` 與 host health `OLLAMA_HOST_HEALTH_EMBED_TIMEOUT=8` 會誤判慢但成功的 embedding預設改為 30s。背景 embedding 仍只跑 GCP-A/GCP-B不落 111。