feat(pchome): close freshness and multi-market decision gaps
Some checks failed
CD Pipeline / deploy (push) Has been cancelled

This commit is contained in:
ogt
2026-07-10 21:22:42 +08:00
parent 744cd946f3
commit b8cc27e4c4
29 changed files with 1373 additions and 123 deletions

View File

@@ -1,9 +1,37 @@
# PChome AI 自動化優先工作清單
> 最後更新: 2026-07-09 Asia/Taipei
> 最後更新: 2026-07-10 Asia/Taipei
> 範圍: PChome growth / MOMO mapping AI 自動化主線
> 真相來源: Gitea `dev` / `main`、正式環境 `/health`、正式 DB readback、machine-verifiable artifacts
> 狀態更新:本文件後段大量 preflight / guard / package 紀錄只保留為歷史證據,
> 不再視為業績方案完成度。現行 program truth 以
> `governance/pchome_growth_program_review.json` 與下列 2026-07-10 重排為準,
> `superseded_by=global_product_governance_v2`。
## 2026-07-10 業績閉環重排
正式環境基線:業績最新日 `2026-06-24`,落後 16 天13,032 個有業績商品中,
只有 35 個曾有外部報價,覆蓋約 0.27%。因此目前不能宣稱「PChome 業績提升完整方案已完成」。
| 順序 | 工作主線 | 狀態 | 下一個完成條件 |
|---|---|---|---|
| P0-1 | 授權業績資料自動取得與匯入 | 進行中 | 最新業績 <= 1 天source receipt 與 post-verifier 同 run 完成 |
| P0-2 | 全商品身份圖譜與營收加權對應 | 進行中 | 覆蓋 80% 營收商品的 >= 90% |
| P0-3 | 合法多電商資料取得 | 進行中 | 每個啟用來源具 freshness SLO、normalize、matcher、verifier |
| P0-4 | 多平台營收決策引擎 | 程式已完成,待推版回讀 | 正式環境以至少 2 個已啟用平台產生可重播決策 |
| P0-5 | 調價、促銷、內容、曝光實驗與歸因 | 未開始 | 同 run 完成 apply、轉換驗證、增量營收歸因與 rollback |
| P1-1 | 專業 UI/UX 作戰 cockpit | 程式已完成,待推版與視覺 QA | desktop/mobile 首屏無文字牆、無假圖、只顯示一個主要下一步 |
| P1-2 | Ollama-first MCP / RAG / PixelRAG runtime | 進行中 | 正式 flags 啟用PixelRAG receipt 可 replayQwen3-VL 驗證通過 |
| P1-3 | 資安與治理自動化 | 進行中 | low/medium/high controlled apply 自動閉環critical 才 break-glass |
已完成且本輪保留Google Drive 自動匯入、MOMO 同款與單位價資料模型、
PixelRAG blocked-page 分類、外部報價正規化、正式 DB 安全邊界。
本輪修復:來源 seed 不再覆寫 runtime 啟用狀態、營收服務不再只查 MOMO、
新增 Yahoo / ETMall / friDay / Rakuten PixelRAG alias、多平台 evidence 與 actionable 分層、
業績 freshness gate、全 catalog 覆蓋率、漏跑排程追趕,以及首屏來源摘要與過期資料阻擋。
## 不可遺漏的插入需求
以下是使用者在主線推進期間插入、且必須保留在完整工作項目裡的要求。後續不得再把這些需求漏掉或變成口頭提醒。

View File

@@ -112,6 +112,62 @@
| 1965 | `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 |
### 2026-07-10 Live Addendum
下表是本次完整 review 的機械式行數回讀;同一路徑若也出現在上表,以下表較新的數字為準。
這份更新只修正 inventory truth不把巨型檔案誤標成已完成重構。
| 行數 | 檔案 | 分類 | 拆分方向 |
|---:|---|---|---|
| 44888 | `services/pchome_mapping_backlog_service.py` | P0 gate 巨型 service | 立即停止新增 closeout package拆 policy、executor、verifier、receipt、reporter |
| 14289 | `services/ai_automation_smoke_service.py` | P0 smoke 巨型 service | 拆 family registry、collectors、health projection、metrics adapter |
| 9442 | `routes/openclaw_bot_routes.py` | P0 巨型 Blueprint | route、command、report、scheduler hook 分離 |
| 7641 | `routes/ai_routes.py` | P0 巨型 Blueprint | PChome growth、AI automation、recommendation route extension 分離 |
| 5865 | `services/marketplace_product_matcher.py` | P0 matcher 巨型 service | identity、variant、unit、scoring、explanation 分離 |
| 5513 | `services/ppt_generator.py` | P0 報表巨型 service | orchestration、slides、charts、registry 分離 |
| 4158 | `routes/admin_observability_routes.py` | P0 觀測台巨型 Blueprint | query、action、render context 與 route glue 分離 |
| 3763 | `services/competitor_price_feeder.py` | P0 feeder 巨型 service | acquisition、matching、refresh、persistence、receipt 分離 |
| 3322 | `routes/dashboard_routes.py` | P0 Dashboard Blueprint | query、decision projection、review action 分離 |
| 3290 | `routes/sales_routes.py` | P0 Sales Blueprint | chart、query、calendar、export 分離 |
| 3112 | `scheduler.py` | P0 排程總管 | task registry 與 domain jobs 分離 |
| 2961 | `services/openclaw_strategist_service.py` | P1 strategist | prompt、query、report、notification 分離 |
| 2383 | `services/competitor_intel_repository.py` | P1 repository | query、decision envelope、UI projection、cache 分離 |
| 2332 | `services/elephant_alpha_autonomous_engine.py` | P1 engine | trigger、planner、executor、notification 分離 |
| 2166 | `services/nemoton_dispatcher_service.py` | P1 dispatcher | model client、tool parser、decision、delivery 分離 |
| 2011 | `services/external_market_offer_service.py` | P1 market offers | source registry、normalizer、sync、review、readiness 分離 |
| 1917 | `services/market_intel/deployment_readiness.py` | P1 readiness | check registry、runtime probe、projection 分離 |
| 1658 | `routes/market_intel_review_report_routes.py` | P1 review route | report query、export、route glue 分離 |
| 1494 | `routes/vendor_routes.py` | P1 Vendor Blueprint | stockout mutation、email、route glue 分離 |
| 1456 | `services/ollama_service.py` | P1 AI runtime | routing、health、request、fallback 分離 |
| 1417 | `services/telegram_templates.py` | P1 templates | decision、incident、report renderer 分離 |
| 1409 | `services/import_service.py` | P1 import | acquisition、validation、writer、verifier 分離 |
| 1394 | `services/telegram_bot_service.py` | P1 bot | command、formatter、client 分離 |
| 1370 | `run_scheduler.py` | P1 scheduler entry | registration、catchup、observability wrappers 分離 |
| 1306 | `routes/system_public_routes.py` | P1 public routes | health、metrics、public projection 分離 |
| 1290 | `app.py` | P1 bootstrap | app factory 與 startup guards 分離 |
| 1272 | `services/code_review_pipeline_service.py` | P2 code review | scan、normalize、persist、report 分離 |
| 1202 | `services/pchome_revenue_growth_service.py` | P1 revenue growth | sales query、offer comparison、scoring、projection 分離 |
| 1188 | `services/ppt_auto_generation_service.py` | P2 PPT automation | resolver、queue、generator、catchup 分離 |
| 1121 | `services/pixelrag_crawler_integration_service.py` | P1 PixelRAG | capture routing、manifest、queue、readback 分離 |
| 1023 | `routes/cicd_routes.py` | P2 CI/CD Blueprint | query、deploy action、route glue 分離 |
| 1014 | `services/pchome_crawler.py` | P1 crawler | transport、parser、fallback、rate policy 分離 |
| 1014 | `routes/daily_sales_routes.py` | P2 Daily Sales Blueprint | query、format、export、route glue 分離 |
| 1013 | `routes/export_routes.py` | P2 Export Blueprint | command、path policy、download 分離 |
| 989 | `routes/market_intel_routes.py` | P2 Market Intel Blueprint | page、API、MCP registration 分離 |
| 966 | `services/trend_crawler.py` | P2 trend crawler | adapters、parser、persistence 分離 |
| 942 | `services/learning_pipeline.py` | P2 RAG learning | distill、promotion、persistence、telemetry 分離 |
| 906 | `services/competitor_match_attempt_rescore_audit.py` | P2 rescore audit | query、classifier、projection 分離 |
| 895 | `routes/market_intel_review_routes.py` | P2 review Blueprint | command、query、route glue 分離 |
| 867 | `services/token_report_service.py` | P2 token report | query、aggregate、chart、notify 分離 |
| 864 | `services/ppt_vision_service.py` | P2 vision QA | runtime、queue、probe、audit 分離 |
| 862 | `services/security_governance_review_service.py` | P1 governance | inventory、controls、runtime receipt、scorecard 分離 |
| 861 | `routes/market_intel_review_post_routes.py` | P2 review POST routes | command handlers 與 verifier 分離 |
| 846 | `services/market_intel/candidate_queue_review_ai_summary_persistence_telegram_dispatch_report_catalog_record_run_receipt.py` | P2 receipt pipeline | AI summary、persistence、delivery、catalog 分離 |
| 843 | `services/pixelrag_vlm_replay_worker_service.py` | P1 VLM worker | route selection、inference、validation、receipt 分離 |
| 826 | `routes/market_intel_mcp_run_routes.py` | P2 MCP route extension | run command 與 receipt query 分離 |
| 813 | `services/momo_crawler.py` | P2 MOMO crawler | transport、parser、normalization 分離 |
| 801 | `services/ai_surface_html_readback_service.py` | P2 UI readback | contract registry、HTML probe、result projection 分離 |
## 市場情報開發前置禁區
- 不得把跨平台活動頁、商品池、比對審核 API 新增到 `routes/sales_routes.py``routes/dashboard_routes.py``app.py`