Files
ewoooc/docs/memory/project_phase38_56_observability_war_room.md
OoO 054685826a
Some checks failed
CD Pipeline / deploy (push) Has been cancelled
feat(observability): 重塑 AI 觀測台戰情室 UI
2026-05-05 13:17:42 +08:00

2.3 KiB
Raw Permalink Blame History

Phase 38→56 AI 觀測台戰役盤點

日期2026-05-05
用途接續觀測台、Telegram、scheduler probe、L2 自動化與 deploy_doctor 時的低成本入口。

已確認落地

  • Commit 19f1340→df2311d 覆蓋 Phase 38→55HEAD 另有 Phase 56 deploy_doctor 擴充。
  • Web 觀測台已形成 10 頁overview、agent_orchestration、business_intel、host_health、ai_calls、budget、promotion_review、rag_queries、quality_trend、ppt_audit_history。
  • templates/components/_ewoooc_shell.html 已加入 AI 觀測 sidebar grouptemplates/ewoooc_base.html 已加入 topbar health indicator。
  • Telegram 已加入 obs_* 指令與 cmd:obs_heal:*cmd:obs_force_throttlecmd:obs_trigger_review inline action。
  • run_scheduler.py 已加入 host probe、cleanup、AI error spike、observability daily summary。
  • migrations/029_create_host_health_probes.sqlmigrations/030_create_ppt_audit_results.sql 已補 host health / PPT audit 持久化。

2026-05-05 修補

  • AutoHeal Web / Telegram 入口不再只看 _is_unhealthy() 30 秒記憶體 TTL也接受 host_health_probes 30 分鐘內最新探針為 unhealthy。
  • AI 呼叫錯誤突增告警補上 1 小時 in-process dedup避免每 30 分鐘重複推送。
  • 補回 memory 索引與模組化治理清單,避免 Phase 38→56 戰役只存在於聊天戰報。

已知治理債

  • routes/admin_observability_routes.py 約 2550 行,已是 P0 巨型 Blueprint。後續不可再直接塞新頁面或 SQL應抽 observability_query_serviceobservability_action_service
  • routes/openclaw_bot_routes.py 約 9104 行Telegram 指令應繼續拆到 services/openclaw_bot/
  • 觀測台 template 仍大量使用 Bootstrap card / btn-*,尚未完全改成 --momo-* design token這是 cosmetic不是 P0。
  • 現有 smoke test 多數 mock DB/Ollama/MCP只能證明 route 不 500不能證明 SQL schema、真實資料或 L2 side effect 正確。

下一步建議

  • 優先抽 routes/admin_observability_routes.py 的查詢層,保留 route 只做 request parsing 與 render。
  • 補一個整合級 smoke用測試 DB 建 host_health_probes,驗證 Web/TG AutoHeal 在 DB 最新 unhealthy 時不會被 _is_unhealthy() TTL 擋下。
  • 若要做視覺 polish再集中處理 Bootstrap → MOMO V2 token不要混進功能 patch。