OoO
7b6423fa67
fix(openclaw): route wakeup phrases back to menu
CD Pipeline / deploy (push) Successful in 2m55s
2026-05-02 16:03:49 +08:00
OoO
673982d83b
Fix OpenClaw callback command path from NL dispatch regression
CD Pipeline / deploy (push) Successful in 4m17s
2026-05-02 15:59:54 +08:00
OoO
76304602b1
fix(ppt): footer→bottom, font spec (Courier New/Microsoft JhengHei), 50-item paginated table, remove old single-page remnant
CD Pipeline / deploy (push) Successful in 2m41s
2026-05-02 15:32:54 +08:00
OoO
0b82350745
style(ppt): comprehensive warm-tone redesign - caramel KPI cards, warm paper MCP/AI pages, revenue ratio bars in product table, chart→caramel orange, cover with warm decorative bands
2026-05-02 15:20:02 +08:00
OoO
ccc0cef9be
feat(ppt): upgrade monthly AI prompt to 7-section expert template with MCP RAG integration, enrich data_summary with category/product breakdown
CD Pipeline / deploy (push) Successful in 2m47s
2026-05-02 15:06:16 +08:00
OoO
4c6e4ca5fb
style(ppt): align PPT palette perfectly with MOMO Pro v2 design tokens (Beige, Warm Ink, Caramel Orange) as per frontend upgrade roadmap
2026-05-02 15:01:55 +08:00
OoO
934adc957c
style(ppt): redesign ppt layouts, align palette with frontend, and add dedicated MCP RAG slide
2026-05-02 14:59:45 +08:00
OoO
9068d463bb
feat(ea): execute Phase 3 C-series architecture fixes to prevent recurrence
...
CD Pipeline / deploy (push) Successful in 2m37s
- C1: Removed weekly_strategy and meta_analysis from Elephant Alpha's SAFE_ACTIONS (orchestrator prompt and engine _ACTION_ZH) to prevent autonomous generation of scheduled reports
- C2: Removed hardcoded 0.85 confidence example from orchestrator prompt and implemented bounding validation (0.0~1.0) in _parse_strategic_decision
- C3: Expanded ADR-019 data freshness gate (_ppt_check_data_freshness) to cover /ppt weekly and /ppt strategy routes, proactively warning users of stale data
2026-05-02 14:39:10 +08:00
OoO
9158bbe1a6
fix(ea): execute Phase 2 B-series data quality and gate improvements
...
CD Pipeline / deploy (push) Successful in 2m40s
- B1 & B2: Updated SQL column names from 銷售金額 to 總業績 in openclaw_strategist_service.py and chart_generator_service.py
- B3: Removed bare except statements in DB fetchers to raise errors instead of failing silently
- B4: Implemented freshness gate (MAX(snapshot_date) < CURRENT_DATE - 2) in daily_sales_snapshot to prevent generating stale reports and send data stalled alerts
- B5: Replaced hardcoded 45.0 system load percentage with actual psutil CPU metric
2026-05-02 14:34:30 +08:00
OoO
e6df2fad28
fix(ea): remove weekly_strategy/meta_analysis from autonomous engine triggers (Phase 1 stopgap)
...
CD Pipeline / deploy (push) Successful in 2m39s
Critic-approved 3-point revision (REVISE → adopted):
1. Disable weekly_insight trigger at definition (line 279-285) — EA no
longer evaluates the 6h / >=5 ai_insights condition that fired
_generate_strategy_report without force_tg_alert=True.
2. Remove the openclaw weekly/meta dispatch table branches (line 591-606).
The 5 actions (generate_strategic_analysis, generate_weekly_strategy,
generate_market_analysis, generate_pricing_strategy,
generate_meta_analysis) now fall through to the existing
`raise ValueError(f"Unrecognized step: ...")` at line 631, which
_execute_decision's try/except converts into a circuit-breaker failure.
This is the correct failure semantics critic asked for.
3. Convert _generate_strategy_report / _generate_meta_report into hard
RuntimeError raisers and drop their imports of
openclaw_strategist_service. Deep insurance: any future caller crashes
immediately instead of silently bypassing dedupe.
Evidence: ai_insights logged 35+ duplicate weekly_strategy sends in 7 days
because EA's `_generate_strategy_report` invoked
generate_weekly_strategy_report() without force_tg_alert=True, bypassing
the run_scheduler.py weekly dedupe gate.
Out of scope (per task contract):
- run_scheduler.py:115 Monday 06:00 schedule — preserved (sole owner)
- services/openclaw_strategist_service.py — owned by B-series (SQL)
- Other EA triggers (price_drop_alert / market_opportunity /
threat_escalation / code_exception / resource_optimization) — preserved
- Other dispatch branches (hermes / nemotron / auto_heal / code_fix /
price_adjustment review) — preserved
- Did NOT add force_tg_alert=True defensive layer (critic flagged as
anti-pattern)
- Did NOT touch _TRIGGER_TO_DECISION_TYPE / _ALLOWED_ACTION_TYPES
Not pushed, not deployed. D1 deployment will be issued separately and
must use `docker compose up -d --no-deps --force-recreate momo-scheduler`
(per feedback_compose_restart_vs_up).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-02 13:12:14 +08:00
OoO
477aab3f6f
refactor(telegram): migrate edm_notifier text path to EventRouter (ADR-019 Phase 5)
...
CD Pipeline / deploy (push) Has been cancelled
services/edm_notifier.py 的 _send_telegram() 處理 EDM 媒體告警,原本 if/else
分流 sendPhoto / sendMessage。
行為變化:
- 純文字分支(無 image_path):改走 services.event_router.dispatch_sync()
event_type=edm_media_alert, severity=warning
- 含圖片分支(sendPhoto with multipart file upload):依 ADR-019 任務指示
保留直連 Telegram API(EventRouter 不支援 file upload,列為 known skip)
- caller 行為不變,失敗仍 logger.error 不阻斷主線
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-02 13:09:34 +08:00
OoO
3e9d53c98c
refactor(telegram): migrate aider_heal_executor sender to EventRouter (ADR-019 Phase 5)
...
services/aider_heal_executor.py 的 _notify_telegram() 為 ADR-013 AutoHeal 閉環
通知出口(aider 自動修復進度)。原直接 POST sendMessage,timeout=5s(非阻塞)。
改走 services.event_router.dispatch_sync()。
行為變化:
- 失敗仍靜默 pass,caller(execute_code_fix 等)行為完全不變
- severity=warning 會被 EventRouter classify 為 L0 或 L1(無 trace 時 L0),
輕量分流不會拖慢自動修復流程
- 享 EventRouter 內建 retry + JSONL queue replay;舊版 timeout=5 失敗即丟訊息
的問題改善(可從 queue 重送)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-02 13:09:34 +08:00
OoO
84786be06f
refactor(telegram): migrate cicd_routes sender to EventRouter (ADR-019 Phase 5)
...
routes/cicd_routes.py 的 send_telegram_message() 用於 CI/CD pipeline 失敗 / Drone
build 異常等告警。原本直接 POST sendMessage,改走 services.event_router.
dispatch_sync()(event_type=cicd_pipeline_alert, severity=alert)。
行為變化:
- parse_mode 從 Markdown 改 HTML(EventRouter 統一);既有訊息中的 *bold* 等
Markdown 控制字元會以純文字顯示,可讀性不受顯著影響
- 失敗保留 print + return False 同舊行為,不阻斷 caller(send_pipeline_failure_alert
等)的 try/except 結構
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-02 13:09:34 +08:00
OoO
ea78d0814b
refactor(telegram): migrate alert_routes sender to EventRouter (ADR-019 Phase 5)
...
routes/alert_routes.py 的 send_telegram_message() 是 Alertmanager webhook 通用告警
出口,原本直接 POST sendMessage 並對每個 chat_id 迴圈。改走 services.event_router.
dispatch_sync() 統一入口(event_type=alertmanager_webhook, severity=alert)。
行為變化:
- 移除手動 chat_id 迴圈,改傳 admin_chat_ids 給 EventRouter(內部仍逐一發)
- 新增 ADR-012 三層分流(L0/L1/L2)+ JSONL queue replay 失敗重送
- parse_mode 參數保留簽名向後相容,但實際統一走 EventRouter HTML 模板
- caller(Alertmanager webhook handler)的 try/except 結構未動
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-02 13:09:34 +08:00
OoO
edfe38e87d
refactor(telegram): migrate nemoton_dispatcher sender to EventRouter (ADR-019 Phase 5)
...
NemoTron Dispatcher 的 _send_telegram() 原本直接 POST Telegram Bot API(含 MarkdownV2
跳脫)+ 透過 self.nm 走 NotificationManager 兩條路。改為統一走 services.event_router.
dispatch_sync(),享 EventRouter 的 retry + 失敗 JSONL queue replay + AI 三層分流。
行為變化:
- 從 _exec_trigger_price_alert / _exec_add_to_recommendation / _exec_flag_for_human_review
三個工具實作流入 EventRouter,event_type=nemoton_dispatch_alert,severity=alert
- 移除 self.nm._send_telegram_messages() 的 short-circuit;改由 EventRouter 內建
通道處理 chat_ids/token 解析
- 失敗時保留 logger.error + log fallback,不阻斷主線(同舊行為)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-02 13:09:34 +08:00
OoO
e12e6a8f96
feat(telegram): ADR-019 Phase 6 - daily data freshness probe + cron 09:05
...
CD Pipeline / deploy (push) Has been cancelled
ADR-019 Phase 6:每日 09:05 OpenClawBot scheduler 主動巡檢 realtime_sales_monthly
最新資料日期,落後超過閾值時透過 EventRouter 發 Telegram 警告。
新增 services/data_freshness_probe.py:
- gap == 0:靜默不發(資料齊全)
- gap == 1:info(昨日資料齊,正常)
- gap == 2~3:warning
- gap >= 4:alert(P2,ETL 大概率出問題)
- latest_date 取不到:alert(DB 連線異常)
routes/openclaw_bot_routes.py 加 cron job openclaw_data_freshness_probe
(hour=9 minute=5,避開 09:00 的其他既有 job)。
從『用戶月初按按鈕踩坑才發現資料缺口』的被動模式,轉成 agent 主動巡檢通知。
配合 Phase 1(PPT freshness gate)+ Phase 2(agent tool)+ Phase 3(cmd 路徑
agent dispatch)+ Phase 4(對話 state),Telegram Bot 互動層的『rigid default
+ 靜默空白』反模式根除。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-02 13:07:30 +08:00
OoO
14195b65fd
feat(telegram): ADR-019 Phase 4 - conversation memory + chat_id propagation
...
CD Pipeline / deploy (push) Successful in 2m51s
ADR-019 Phase 4:新增 services/openclaw_session.py 管理 chat_id 級別的多輪
對話歷史與 carry-over slot。In-memory,30 分鐘 TTL,重啟清空(臨時對話 state
不該污染 ai_insights 永久記憶)。
openclaw_answer 簽章加 chat_id=None 可選參數:
- 傳入時 agent 會看到該 chat 最近 5 輪對話歷史,注入 system prompt
- Ollama / Gemini FC 兩條路徑都會在生成成功後 append_turn 寫回 session
- system prompt 加決策規則:「若歷史顯示用戶剛被問參數,優先用該答案接續執行」
Caller 全部更新傳 chat_id:
- routes/openclaw_bot_routes.py:5479 (handle_cmd 不認識指令 fallback)
- routes/openclaw_bot_routes.py:5916 (webhook NL 路徑)
- routes/openclaw_bot_routes.py:_agent_dispatch_cmd (Phase 3 hook)
- services/telegram_bot_service.py:934 (polling NL fallback)
向下相容:chat_id=None 時行為與舊版完全相同(無 multi-turn 記憶)。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-02 13:04:18 +08:00
OoO
38f4033eb0
feat(telegram): ADR-019 Phase 3 - feature-flagged agent dispatch for cmd:X
...
CD Pipeline / deploy (push) Successful in 2m47s
ADR-019 Phase 3:在 handle_cmd 入口插入 agent dispatch hook,將白名單 cmd 翻成
NL question 交 OpenClaw agent 處理。Agent 自動透過 Phase 2 的 check_data_freshness
tool probe 資料缺口,缺資料時主動詢問用戶,避免靜默產出空白結果。
新增:
- 環境變數 OPENCLAW_AGENT_DISPATCH (預設 0)、OPENCLAW_AGENT_DISPATCH_CMDS (逗號分隔)
- _CMD_TO_NL 翻譯字典:sales / top / vendor 三 cmd 起步
- _agent_dispatch_cmd() helper:feature flag + 白名單 + agent 呼叫 + 失敗 fallback
設計考量:
- 預設 OFF,零 prod regression 風險
- Agent 失敗自動回原 handler,不卡用戶
- 灰度路徑:先在 staging 開 OPENCLAW_AGENT_DISPATCH=1 + CMDS=sales 觀察一週
- 21 cmd 不需要全部翻譯,只翻譯有「資料缺口可能性」或「參數需確認」的
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-02 13:00:02 +08:00
OoO
b3348ae77d
feat(telegram): ADR-019 Phase 2 - check_data_freshness tool for OpenClaw
...
CD Pipeline / deploy (push) Has been cancelled
ADR-019 Phase 2:把資料新鮮度查詢註冊為 OpenClaw 的第 4 個 Function Calling
tool。Agent 在回答任何特定時段業績問題前可主動 probe,避免月初/季初時編造
「業績為零」這類因 ETL 尚未匯入造成的虛假結論。
新增:
- _FC_TOOLS 加入 check_data_freshness 宣告
- _execute_tool 對應分支:回傳 latest_data_date / available_months /
current_month_has_data / data_freshness_warning
- 系統 prompt 更新:明示 4 個工具與「相對時間詞先 probe」決策規則
與 Phase 1 互補:Phase 1 是 PPT cmd 路徑寫死的補丁,Phase 2 讓 NL 對話路徑
透過 agent 自己決策,是 ADR-019「Agent-First」原則的真正起點。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-02 12:58:06 +08:00
OoO
db02ecf2cf
feat(telegram): ADR-019 Phase 1 - PPT data freshness gate + store_insight fix
...
CD Pipeline / deploy (push) Successful in 2m55s
ADR-019 Phase 1 (止血):PPT 生成前 probe 資料新鮮度。月初/缺資料期間用戶按
ppt:monthly/daily 不再產出空白報告,改主動 inline keyboard 詢問:
- 改看最新有資料的月份/日期(一鍵)
- 自訂月份/日期(接 await:date_ppt_*)
- 取消
新增 PPTDataInsufficientError exception + _ppt_check_data_freshness() helper。
_generate_ppt_cmd 簽章加 _reply_to=None;_ppt_background 靜默吞此例外。
順手修同檔 :1976/:1993 兩處 store_insight() positional args 錯位 bug —
原本 (date, report_type, ai_text) 對應 signature (insight_type, content, period)
完全錯位,導致 period varchar(50) 被 2000 字 AI 內容截斷、INSERT 失敗、
ai_insights 表寫入永久失敗。改成 kwargs 呼叫。
ADR-019 (Telegram Bot Agentic Conversation Layer) 同步落地,Status: Accepted。
六 Phase 路線圖見 ADR 文件,本 commit 完成 Phase 1。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-02 12:52:45 +08:00
OoO
1a886d962b
fix(telegram): dedupe webhook+polling updates via shared DB guard
...
CD Pipeline / deploy (push) Successful in 8m50s
Webhook (Flask) and polling (momo-telegram-bot) consumed the same
Telegram update_id, causing /menu callbacks to fire twice. Add a
shared dedup module backed by telegram_update_dedup table (300s TTL,
60s cleanup) with in-memory fallback, wired into both paths.
Polling launcher now skips startup when webhook is configured to
prevent dual-consumption at the source.
38 tests across webhook, menu keyboards, telegram_api, dedup guard,
and trend bot service.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-02 12:01:04 +08:00
OoO
75de76ac12
fix(momo): block EC404 auto-open with end-to-end URL guard
...
CD Pipeline / deploy (push) Has been cancelled
- normalize URLs at write time (scheduler crawlers, routes) to drop
javascript:/EC404/placeholder i_code (momo_/manual_/pchome_)
- add global click+auxclick guard in base.html and ewoooc_base.html
that intercepts blocked MOMO URLs and redirects to safe i_code URL
- per-page dashboards reuse the same isLikelyMomoIcode validation
- /api/track_momo_link records blocked events for diagnosis
- ship sanitize_momo_urls.py to clean existing polluted DB rows
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-02 12:00:34 +08:00
OoO
026d0e7539
feat(reports): move monthly analysis to v2 shell
CD Pipeline / deploy (push) Successful in 2m14s
2026-05-01 21:13:18 +08:00
OoO
d6782ee710
feat(ai): move recommendation page to v2 shell
CD Pipeline / deploy (push) Successful in 2m13s
2026-05-01 21:08:44 +08:00
OoO
9b3e0a4565
feat(ai): move history page to v2 shell
CD Pipeline / deploy (push) Successful in 2m19s
2026-05-01 21:06:17 +08:00
OoO
939ed5eef5
feat(ai): move intelligence page to v2 shell
CD Pipeline / deploy (push) Successful in 2m18s
2026-05-01 21:03:19 +08:00
OoO
7d46ff9ba5
feat(competitor): persist match attempts
CD Pipeline / deploy (push) Successful in 2m9s
2026-05-01 20:56:17 +08:00
OoO
c1f43b0ae4
fix(campaign): persist full crawl snapshots
CD Pipeline / deploy (push) Successful in 2m22s
2026-05-01 20:48:28 +08:00
OoO
bb99dfeab6
feat(campaign): restore operations table signals
CD Pipeline / deploy (push) Has been cancelled
2026-05-01 20:43:46 +08:00
OoO
4e853a233f
perf(dashboard): speed up competitor overview
CD Pipeline / deploy (push) Successful in 2m12s
2026-05-01 20:36:25 +08:00
OoO
b9d6186d68
feat(frontend): sync latest MOMO Pro prototype styling
CD Pipeline / deploy (push) Successful in 2m18s
2026-05-01 20:32:23 +08:00
OoO
066cf1846f
feat(dashboard): show AI pick evidence gaps
CD Pipeline / deploy (push) Successful in 2m18s
2026-05-01 17:17:03 +08:00
OoO
e86075d59d
fix(dashboard): avoid redundant prewarm rebuilds
CD Pipeline / deploy (push) Successful in 2m15s
2026-05-01 16:36:58 +08:00
OoO
2ac7410d40
fix(dashboard): prewarm cache and expose pick evidence
CD Pipeline / deploy (push) Successful in 2m20s
2026-05-01 16:34:13 +08:00
OoO
9e2337764b
fix(ai): supersede old product picks
CD Pipeline / deploy (push) Successful in 2m48s
2026-05-01 16:24:15 +08:00
OoO
b3d00a011c
fix(dashboard): warm cache after AI pick refresh
CD Pipeline / deploy (push) Successful in 3m37s
2026-05-01 16:16:39 +08:00
OoO
b447aefcfb
fix(ai): clear dashboard cache after pick regeneration
CD Pipeline / deploy (push) Successful in 2m27s
2026-05-01 16:10:51 +08:00
OoO
3920701e1a
feat(dashboard): optimize cache and AI pick confidence
CD Pipeline / deploy (push) Successful in 2m46s
2026-05-01 16:01:52 +08:00
OoO
0334051aa7
feat(dashboard): 匯出 AI 挑品操作清單
CD Pipeline / deploy (push) Successful in 2m39s
2026-05-01 15:43:57 +08:00
OoO
1d1a7f6e94
feat(dashboard): 強化 AI 挑品清單決策資訊
CD Pipeline / deploy (push) Successful in 2m22s
2026-05-01 15:22:21 +08:00
OoO
a5de082437
feat(dashboard): 顯示 50 品 AI 挑品清單
CD Pipeline / deploy (push) Successful in 3m12s
2026-05-01 15:08:41 +08:00
OoO
6bce46bbc7
fix(runtime): 強化健康檢查監控韌性
CD Pipeline / deploy (push) Successful in 2m29s
2026-05-01 14:46:49 +08:00
OoO
77b085f813
fix(dashboard): 快取比價決策總覽
CD Pipeline / deploy (push) Successful in 2m28s
2026-05-01 14:32:51 +08:00
OoO
ea15aa6437
refactor(vendor): 抽出廠商管理查詢服務
CD Pipeline / deploy (push) Failing after 8m57s
2026-05-01 14:20:09 +08:00
OoO
1012d609d4
feat(dashboard): 顯示 PChome 比價決策總覽
CD Pipeline / deploy (push) Has been cancelled
2026-05-01 14:19:18 +08:00
OoO
fbc85fcedc
refactor(vendor): 抽出缺貨 API 查詢服務
CD Pipeline / deploy (push) Successful in 2m11s
2026-05-01 14:12:56 +08:00
OoO
b5de8d5d61
fix(ai): 價格調整轉人工覆核
CD Pipeline / deploy (push) Successful in 2m16s
2026-05-01 14:09:54 +08:00
OoO
62f8f1d52d
refactor(vendor): 抽出缺貨 V2 查詢服務
CD Pipeline / deploy (push) Has been cancelled
2026-05-01 14:07:10 +08:00
OoO
8a3d50933b
feat(ai): 自動補抓並重算 PChome 挑品
CD Pipeline / deploy (push) Successful in 2m18s
2026-05-01 14:02:37 +08:00
OoO
043a7dc915
feat(ai): 補抓 PChome 待比對商品
CD Pipeline / deploy (push) Successful in 2m20s
2026-05-01 13:40:37 +08:00