Files
ewoooc/docs/memory/current_execution_queue_20260524.md
2026-05-25 07:18:44 +08:00

97 lines
13 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Current Execution Queue 2026-05-24
> 目的:把目前使用者要求的核心產品優化整理成單一執行佇列,避免 UI、比價、PPT、AI 觀測台與部署驗證漏項。
> 原則:準確率優先;不放寬 MOMO / PChome 全域比對門檻;正式部署不碰 `momo-db`;每個工作流都需有測試或正式 smoke。
## 0. 部署與驗證通道基準
- 確認 `main`、Gitea、正式環境版本一致。
- 修復或確認 SSH / Gitea / 188 hop 可用。
- 每次上線只 recreate `momo-app``scheduler``telegram-bot`,禁止使用 `--remove-orphans`,禁止影響 `momo-db`
- 2026-05-24 21:33 CST 狀態:`main` 已推 Gitea 並部署到 188正式 `/health``V10.451`。本輪只 recreate `momo-app``scheduler``telegram-bot` 未重建但保持 healthy未使用 `--remove-orphans`,未碰 `momo-db`。Smoke 通過:主要頁面 HTTP 200、三個 app 容器 healthy、`/api/pchome-review/queue` 可用於 `recoverable_low_score` / `legacy_low_score` read-only 查詢,且 10 分鐘錯誤 log 未見 Traceback / ERROR。
- 2026-05-24 22:17 CST 狀態:`main` 已推 Gitea 並部署到 188正式 `/health``V10.453`。本輪 recreate `momo-app``scheduler``telegram-bot`;未使用 `--remove-orphans`,未碰 `momo-db`。Smoke 通過:三個 app 容器 healthy、Gemini hard disabled 且 24 小時 `ai_calls` 無 Gemini provider、Ollama 順序維持 GCP-A → GCP-B → 111、`/api/pchome-review/queue` 三個 status 查詢成功、rescore audit read-only `selection_mode=latest_sku_only`
- 2026-05-24 22:55 CST 狀態:`main` 已推 Gitea 並部署到 188正式 `/health``V10.455`。本輪 recreate `momo-app``scheduler``telegram-bot`;未使用 `--remove-orphans`,未碰 `momo-db`。Smoke 通過:三個 app 容器 healthy、EventRouter `decision_envelope` 直送不進 L1/L2 AI handler、Telegram 信封顯示標的 SKU 與 PChome 候選、Gemini hard disabled 且 24 小時 `ai_calls` 無 Gemini provider、Ollama 順序維持 GCP-A → GCP-B → 111、`/api/pchome-review/queue?review_status=rescore_accepted` 查詢成功、10 分鐘錯誤 log 未見 Traceback / ERROR / CRITICAL。已執行 `--retract-variant-accepted`,最新 `rescore_accepted_current``variant_selection_review` 殘留為 0。
- 2026-05-24 23:05 CST 狀態:`main` 已推 Gitea 並部署到 188正式 `/health``V10.456`。本輪 recreate `momo-app``scheduler``telegram-bot`;未使用 `--remove-orphans`,未碰 `momo-db`。Smoke 通過:三個 app 容器 healthy、`/api/pchome-review/queue?review_status=rescore_accepted` 每筆帶 `decision_envelope`、guardrail `can_auto_execute=false`、Gemini hard disabled 且 24 小時 `ai_calls` 無 Gemini provider、Ollama 順序維持 GCP-A → GCP-B → 111、5 分鐘三容器錯誤 log 未見 Traceback / ERROR / CRITICAL。
- 2026-05-24 23:17 CST 狀態:`main` 已推 Gitea 並部署到 188正式 `/health``V10.457`。本輪 recreate `momo-app``scheduler``telegram-bot`;未使用 `--remove-orphans`,未碰 `momo-db`。Smoke 通過:三個 app 容器 healthy、Dashboard PChome 覆核頁顯示 `dashboard-review-envelope` 與 HITL、`/api/pchome-review/queue?review_status=rescore_accepted` 仍帶 `decision_envelope``can_auto_execute=false`、Excel flatten helper 輸出決策信封 ID/資料品質/自動執行允許/證據摘要、Gemini hard disabled 且 24 小時 `ai_calls` 無 Gemini provider、Ollama 順序維持 GCP-A → GCP-B → 111、5 分鐘三容器錯誤 log 未見 Traceback / ERROR / CRITICAL。
- 2026-05-24 23:30 CST 狀態:`main` 已推 Gitea 並部署到 188正式 `/health``V10.458`。本輪 recreate `momo-app``scheduler``telegram-bot`;未使用 `--remove-orphans`,未碰 `momo-db`。Smoke 通過:三個 app 容器 healthy、`summarize_review_decision_envelopes()` 產生 3 條 HITL 摘要且全數 `can_auto_execute=false``_fetch_competitor_summary()``review_decision_text``/api/pchome-review/queue?review_status=rescore_accepted` 仍帶 `decision_envelope``can_auto_execute=false`、核心頁面 `/daily_sales``/growth_analysis``/observability/ppt_audit_history``/market_intel/matches``/vendor-stockout/list` HTTP 2005 分鐘三容器錯誤 log 未見 Traceback / ERROR / CRITICAL最新 `rescore_accepted_current``variant_selection_review` 殘留為 0。
- 2026-05-24 23:43 CST 狀態:`main` 已推 Gitea 並部署到 188正式 `/health``V10.459`。本輪 recreate `momo-app``scheduler``telegram-bot`;未使用 `--remove-orphans`,未碰 `momo-db`。Smoke 通過:三個 app 容器 healthy、`/api/pchome-review/queue?review_status=protected_existing_match` 輸出 `existing_match_conflict`,建議動作為 `compare_existing_identity``can_auto_execute=false`、Dashboard protected filter / daily / growth / PPT audit HTTP 2005 分鐘三容器錯誤 log 未見 Traceback / ERROR / CRITICAL。
- 2026-05-24 23:59 CST 狀態:`main` 已推 Gitea 並部署到 188正式 `/health``V10.460`。本輪 recreate `momo-app``scheduler``telegram-bot`;未使用 `--remove-orphans`,未碰 `momo-db`。Smoke 通過:三個 app 容器 healthy、`scripts/check_sales_charts_runtime.js --base-url https://mo.wooo.work --routes /daily_sales,/growth_analysis` 通過daily/growth 主要 canvas 均有 Chart.js instance、非零資料點與彩色像素核心頁面 `/daily_sales``/growth_analysis``/observability/ppt_audit_history`、PChome protected queue API HTTP 2005 分鐘三容器錯誤 log 未見 Traceback / ERROR / CRITICAL。
## 1. MOMO / PChome 核心比價準確率
- 查正式 `competitor_match_attempts` 最新狀態分布與高量低信心 cohort。
- 以小批次 pilot 處理 `recoverable_low_score`,優先品線:
- DASHING DIVA
- aroma / diffuser / essential oil
- lip / cosmetic variant
- private-care / body-care
- 2026-05-24 22:10 CST 起PChome rescore audit 預設對齊 review queue 最新狀態:先取每個 SKU 最新 attempt再套用 status / reason 篩選;歷史候選回看需明確使用 `--include-historical-candidates`
- 2026-05-24 22:20 CST 起matcher replay 先套用 V10.453 安全修正:`EX8` 型號不視為 `x8` 入數,香氛固體凝膠一側泛稱、一側具體香味/No. 款式走 vetoHerbacin 小甘菊護手霜 20ml brandless 可作窄範圍安全回收。
- 2026-05-24 22:42 CST 起feeder / rescore audit 套用 V10.454 安全閘門:`identity_review` / `manual_review` / `variant_selection_review` 的近門檻候選只能留在覆核,不能由 replay、refresh 或 `accepted_current` 入隊語意自動寫正式 PChome 價差。
- 2026-05-24 22:48 CST 已執行 production rescore 入隊745 筆 `true_low_confidence` 中先有 2 筆通過舊 gateV10.454 gate 補上 `variant_selection_review` 排除後SKU `8884618` KATE 多款任選唇膏已退回最新 `true_low_confidence`,最終只保留 SKU `10922465` Herbacin 小甘菊護手霜 20ml 為 `rescore_accepted_current` 人工覆核 attempt正式價格表未寫入Dashboard / competitor intel cache 已清除。
- 2026-05-24 22:44 CST 起rescore audit 補 `--retract-variant-accepted` 工具化退回路徑;若最新 `rescore_accepted_current` 仍帶 `variant_selection_review`,只追加 `true_low_confidence` attempt不刪歷史、不寫正式價格表。
- 只新增窄範圍、可解釋 matcher 規則。
- 保留 `MIN_MATCH_SCORE``identity_veto`、既有正式候選覆寫保護。
- 驗收:`matched` 有增加、目標 `low_score` 下降、`needs_review` 不異常上升、無明顯跨色號/跨款式/跨劑型錯配。
## 2. 商品列表與人工覆核閉環
- 商品列表不得再大量顯示籠統「待對比」。
- 將狀態拆成:尚未搜尋、價格過期待刷新、近門檻可救回、證據不足、既有強配對保護、已排除、需單位價比較、找不到同款。
- 每筆覆核要顯示候選 PChome 商品、候選價、match score、診斷原因、下一步動作。
- 人工採用 / 否決 / 單位價 / 補搜尋必須能回寫 review queue並影響 feeder 後續行為。
- 2026-05-25 00:06 CST 起,尚未進入 PChome 搜尋/補抓的商品列表文案改為「尚未搜尋」與「尚未進入 PChome 補抓」,不再顯示籠統「待比對」,避免和低信心待人工覆核混淆。
- 2026-05-24 23:40 CST 起,`protected_existing_match` 的 review `decision_envelope` 會解析 `existing_match_conflict`,列出既有正式候選、新候選、雙方 score 與 delta這類案件仍不可自動覆蓋正式價差但人工覆核、Agent 與 PPT 不再只看到籠統「既有保護」。
## 3. 12 Agent 決策信封整合
- `decision_envelope` 已接到 NemoTron 價格告警與人工覆核,下一步要讓 OpenClaw、ElephantAlpha、PPT QA 與 review queue 共用同一份 evidence contract。
- 2026-05-24 22:44 CST 起EventRouter 對已附 `decision_envelope` 的事件直接渲染證據模板,不呼叫 L1/L2 AI handler這讓 NemoTron 價格告警、人工覆核與後續 Agent 共用同一份 SKU / PChome / evidence / guardrails不再二次生成摘要。
- 2026-05-24 23:00 CST 起,`fetch_competitor_review_queue()``fetch_competitor_review_queue_page()``/api/pchome-review/queue` 每筆候選也帶 `decision_envelope`,包含 SKU/PChome 標的、match evidence、人工下一步、預期價差與不可自動寫正式價差的 guardrailsDashboard、Agent、Telegram、PPT 後續共用此 contract。
- 2026-05-24 23:15 CST 起Dashboard 覆核卡與 PChome 覆核 Excel 匯出也顯示/輸出信封摘要、資料品質、HITL、trace、自動執行阻擋原因與證據摘要下載檔不得丟失 guardrails。
- 2026-05-24 23:25 CST 起OpenClaw 週報/日報/月報與 competitor PPT 使用 `summarize_review_decision_envelopes()` 的同一份 HITL 信封摘要,不再手寫 attempt_status 統計或自行翻譯覆核狀態。
- 2026-05-24 23:40 CST 起,`compare_existing_identity` 成為 `protected_existing_match` 的明確建議動作Agent 只能提示「比較既有正式候選與新候選」,不得因新候選分數較高自動寫正式價差。
- 2026-05-24 23:55 CST 起ElephantAlpha `resource_optimization` / `ea_escalation` 都必須帶 deterministic `decision_envelope`Telegram 按鈕 callback 使用 `decision_id`,證據只允許 action_plans、CPU 實測、hygiene 與 trigger trace。
- 告警不得再輸出空泛「預期效益」必須帶資料品質、證據來源、HITL 邊界與 trace id。
- Agent 建議只能輔助排序與分析,不得繞過 matcher / feeder / review service 寫正式價格。
## 4. 業績分析資料與圖表修復
- 修正即時業績匯入 `snapshot_date text = date` 類型錯誤。
- `/daily_sales``/growth_analysis` 圖表不得空白;需保留原本圖表並升級成更專業的呈現。
- 圖表需通過 runtime nonblank canvas 檢查與手機版 responsive。
- daily/growth/PPT 必須共用 `competitor_intel_repository` 的比價資料出口,避免價差方向或統計口徑分裂。
- 2026-05-24 23:55 CST 起daily/growth chart 判斷不再只看 series 長度;若序列全 0顯示 chart-empty 狀態而不是畫只有座標軸的假圖。正式 smoke 需跑 `scripts/check_sales_charts_runtime.js` 確認主要 canvas 非空。
## 5. PPT 視覺 QA 與自動簡報產線
- 每日、每週、每月、每季、半年、年度簡報需依排程產出。
- 每次產出與視覺 QA 結果必須完整寫入 DB。
- `/observability/ppt_audit_history` 必須清楚顯示 runtime 狀態、產出狀態、視覺 QA、問題追蹤與可預覽檔案。
- PPTX / PDF 預覽需可站內直接開啟,不能只下載。
## 6. 外部 BI / 協作入口
- `/metabase` 不可空白,需顯示可診斷 bridge 狀態或可用替代入口。
- `/grist` / 資料協作連結不得連到其他專案站。
- 側欄與 topbar 外部工具入口要統一走 momo-pro bridge route。
## 7. AI 觀測台與全站 UI/UX
- 10 個 AI 觀測台頁面必須符合新版字體、字級、暖墨色、焦糖 accent、點陣視覺與 responsive 規範。
- 全站主要頁面需通過 desktop / mobile overflow guard。
- 表格與圖表只允許在局部容器橫向滾動,不可造成整頁無限延伸。
## 8. 效能與可觀測性
- 持續降低 `/daily_sales``/growth_analysis`、商品看板、PChome queue、PPT audit 首屏 TTFB。
- 避免 worker cold start 重查重算;必要時使用共享快取與指紋失效。
- 111 fallback 只作最後救急;持續監控 GCP-A / GCP-B / 111 用量與 circuit breaker。
## 9. 每輪收尾
- Focused tests → full pytest 或合理範圍回歸 → production smoke。
- 更新 SOT / memory / TODO。
- 推 Gitea正式部署確認 `/health` 版本。
- 記錄未完成與下一輪入口。