V10.494 add market intel candidate queue review gate

This commit is contained in:
OoO
2026-05-31 13:08:53 +08:00
parent c196a0e228
commit cef27c77df
12 changed files with 1227 additions and 167 deletions

View File

@@ -165,6 +165,7 @@ EwoooC 目前已有 MOMO EDM / 節慶活動資料、`promo_products`、PChome
- 2026-05-29 追加 MCP fetch run receipt gate`services.market_intel.mcp_fetch_run_receipt``/api/market_intel/mcp_fetch_run_receipt` 在操作員 shell 完成 dry-run fetch 後審核 receipt id、artifact path、platform/source/receipt path 對帳、公開 URL、request/error budget、secret 外洩與 API/DB/scheduler 副作用旗標API/UI 不執行 CLI、不發外部 request、不保存 receipt、不開 DB、不寫入、不掛 scheduler只放行到後續 result parser review。
- 2026-05-31 追加 MCP fetch result parser review gate`services.market_intel.mcp_fetch_result_parser_review``/api/market_intel/mcp_fetch_result_parser_review` 在 receipt 通過後審核操作員貼回的 parser 結構化摘要,檢查 receipt source/receipt path 對帳、parser artifact path、活動/商品候選必要欄位、公開 URL、小批次候選上限、raw HTML/secret 外洩與 API/DB/scheduler 副作用旗標API/UI 不讀 artifact、不執行 parser CLI、不發外部 request、不保存 parser result、不寫入、不掛 scheduler只放行到候選 handoff review。
- 2026-05-31 追加 MCP fetch candidate handoff review gate`services.market_intel.mcp_fetch_candidate_handoff_review``/api/market_intel/mcp_fetch_candidate_handoff_review` 在 parser review 通過後審核候選交接包,檢查 source/candidate key 對齊、queue policy 是否仍是 `manual_candidate_review` / `preview_only`、小批次候選上限、操作員無寫入/無連外/無排程確認、raw HTML/secret 外洩與 side-effect flagsAPI/UI 不建立 queue、不讀 artifact、不寫 DB、不掛 scheduler只放行到人工 candidate queue review。
- 2026-05-31 追加 MCP fetch candidate queue review gate`services.market_intel.mcp_fetch_candidate_queue_review``/api/market_intel/mcp_fetch_candidate_queue_review` 在 handoff review 通過後審核人工 queue review 草案,檢查候選 key 對齊、`review_state=needs_review`、allowed actions 人工限定、`queue_write_status=not_persisted`、操作員無寫入/無連外/無排程確認、raw HTML/secret 外洩與 side-effect flagsAPI/UI 不建立 queue、不更新 review_state、不讀 artifact、不寫 DB、不掛 scheduler只放行到 writer preflight。
- 2026-05-18 追加 scheduler attach plan preview`services.market_intel.scheduler_plan``/api/market_intel/scheduler_plan` 描述未來 `campaign_discovery_daily``campaign_product_probe``product_match_review_seed` 三個 job 的 cadence、gate、fallback 與安全邊界。此階段不註冊 scheduler job、不啟動 crawler、不連外、不寫 DB排程掛載必須等 migration、seed、MCP fetch gate、manual sample 與人工批准全過。
- 2026-05-18 追加 match review plan preview`services.market_intel.match_review_plan``/api/market_intel/match_review_plan` 定義商品比對訊號、分數門檻、`needs_review → confirmed/rejected` HITL 流程與安全邊界。此階段不建立 review queue、不自動 confirmed、不寫 `market_product_matches`、不呼叫 MCP價格只能作為輔助訊號不能單獨決定同品比對。
- 2026-05-18 追加 opportunity plan preview`services.market_intel.opportunity_plan``/api/market_intel/opportunity_plan` 定義競品低價威脅、促銷缺口、深折重疊、活動即將結束四類規則與分級策略。此階段不建立 opportunity queue、不派送 Telegram、不產生 AI 摘要、不寫 DB高風險項必須先有 confirmed match 與 DB evidence 才能升級。

View File

@@ -42,6 +42,7 @@
- 2026-05-24 追記:同步市場情報 MCP fetch target review gate 後的 `routes/market_intel_routes.py``services/market_intel/deployment_readiness.py` 行數;本次新增邏輯已放在獨立 `services/market_intel/mcp_fetch_target_review.py`route 僅保留薄 glue後續市場情報 MCP route 應拆出子 Blueprint 或 route registration helper。
- 2026-05-24 追記:同步市場情報 MCP fetch run package gate 後的 `routes/market_intel_routes.py``services/market_intel/deployment_readiness.py` 行數;本次新增 endpoint 已拆到 `routes/market_intel_mcp_run_routes.py`,主 Blueprint 只新增 extension import後續 MCP route 應延續此模式。
- 2026-05-24 追記:同步市場情報 MCP fetch run readiness gate 後的 `services/market_intel/deployment_readiness.py` 行數;本次新增 endpoint 延續 `routes/market_intel_mcp_run_routes.py` route extension新增邏輯放在獨立 `services/market_intel/mcp_fetch_run_readiness.py`
- 2026-05-31 追記:同步市場情報 MCP fetch candidate queue review gate 後的 `services/market_intel/deployment_readiness.py` 行數;本次新增邏輯維持在獨立 `services/market_intel/mcp_fetch_candidate_queue_review.py`route 延續 `routes/market_intel_mcp_run_routes.py` extension。
- 2026-05-24 追記:同步背景 Code Review 111 fallback 保護合併後的 `services/code_review_pipeline_service.py` 行數;此處只更新 inventory不變更 Code Review 行為。
- 2026-05-21 追記:同步 PChome/LUDEYA 商品線名稱漂移比對更新後的 `services/marketplace_product_matcher.py` 行數;此處只更新 inventory不變更模組化決策。
- 2026-05-21 追記:同步 MAC/Yuskin/AHC 名稱漂移與 bundle equivalent matcher 更新後的 `services/marketplace_product_matcher.py` 行數;此處只更新 inventory不變更模組化決策。
@@ -94,7 +95,7 @@
| 805 | `routes/bot_api_routes.py` | P2 Bot API Blueprint | route glue / bot action service |
| 1319 | `routes/market_intel_review_report_routes.py` | P2 market intel review report Blueprint | review report route glue / export payload / phase handoff orchestration |
| 917 | `routes/market_intel_routes.py` | P2 market intel Blueprint | page route / API route glue / MCP gate route registration helper |
| 1040 | `services/market_intel/deployment_readiness.py` | P2 market intel deployment readiness | preflight gates / readiness payload / route contract helpers |
| 1181 | `services/market_intel/deployment_readiness.py` | P2 market intel deployment readiness | preflight gates / readiness payload / route contract helpers |
| 846 | `services/market_intel/candidate_queue_review_ai_summary_persistence_telegram_dispatch_report_catalog_record_run_receipt.py` | P2 market intel review receipt pipeline | AI summary / persistence / Telegram dispatch / report catalog run receipt orchestration |
## 市場情報開發前置禁區

View File

@@ -89,6 +89,7 @@
- 2026-05-31 起,`V10.491` 新增市場情報 MCP Fetch Result Parser Review gate在 receipt gate 後只審核操作員 shell parser 貼回的結構化摘要,對齊 source/path、公開 URL、候選必要欄位、小批次上限、raw HTML/secret/side-effect 風險;仍不讀 artifact、不執行 CLI、不連外、不寫 DB、不掛 scheduler。
- 2026-05-31 起,`V10.492` 收緊 PChome 近門檻自動回刷:`run_retryable_candidate_revalidation()` 只回刷 `recoverable_low_score` 與 legacy `low_score / refresh_low_score`,且 SQL 端要求 `hard_veto=false``comparison_mode=exact_identity`、diagnostic reasons 命中同品線/identity anchor`identity_veto``unit_comparable``true_low_confidence` 不再進每日自動回刷隊列,需等待新證據或人工處理。
- 2026-05-31 起,`V10.493` 新增市場情報 MCP Fetch Candidate Handoff Review gate在 parser review 通過後只審核候選交接包,要求 source/candidate key 完全對齊、queue policy 維持 manual preview、小批次上限與操作員無寫入/無連外/無排程確認;仍不建立 queue、不寫 DB、不讀 artifact、不連外、不掛 scheduler。
- 2026-05-31 起,`V10.494` 新增市場情報 MCP Fetch Candidate Queue Review gate在 handoff review 通過後只審核人工 queue review 草案,要求候選 key 完全對齊、review_state 只停在 `needs_review`、allowed actions 限人工操作、queue_write_status 維持 `not_persisted`;仍不建立 queue、不更新 review_state、不寫 DB、不連外、不掛 scheduler。
## 3. 12 Agent 決策信封整合

View File

@@ -13,6 +13,7 @@
## 📅 詳細更新日誌 (考古存檔)
### 2026-05-24PChome 近門檻身份回收第二輪
- **V10.494 市場情報 MCP Fetch Candidate Queue Review gate**: 新增 `/api/market_intel/mcp_fetch_candidate_queue_review` 與 UI preview只審核 candidate handoff 後的人工 queue review 草案;要求候選 key 完全對齊、`review_state=needs_review`、allowed actions 限人工確認/否決/延後、`queue_write_status=not_persisted`,且 API 不建立 queue、不更新 review_state、不寫 DB、不連外、不掛 scheduler。
- **V10.493 市場情報 MCP Fetch Candidate Handoff Review gate**: 新增 `/api/market_intel/mcp_fetch_candidate_handoff_review` 與 UI preview只審核 parser review 後的候選交接包;要求 source/candidate key 完全對齊、queue policy 維持 `manual_candidate_review` / `preview_only`、候選數維持小批次,且 API 不建立 queue、不寫 DB、不讀 artifact、不連外、不掛 scheduler。
- **V10.491 市場情報 MCP Fetch Result Parser Review gate**: 新增 `/api/market_intel/mcp_fetch_result_parser_review` 與 UI preview只審核操作員 shell parser 後貼回的結構化摘要API 不讀 artifact、不執行 parser CLI、不抓外站、不寫檔、不開 DB、不掛 scheduler且會阻擋 raw HTML/body/snapshot、secret/token 欄位與 side-effect flags。
- **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 大理石暖燈單側設計差留人工覆核。