docs(logbook): 記錄 Telegram 資產沉澱正式部署 [skip ci]
This commit is contained in:
@@ -1,3 +1,41 @@
|
||||
## 2026-06-18|Telegram 告警卡補上自動化資產沉澱總帳
|
||||
|
||||
**背景**:統帥指出 KM、PlayBook、腳本、排程與自動化機制如果在頁面、告警訊息與事件處置包看不到,就等同沒有完整記錄與沉澱。Approvals / Runs / Alerts 已補上共用資產沉澱矩陣,但正式 Telegram `ACTION REQUIRED` 卡片仍沒有把同一筆事件的 KM / PlayBook / script / schedule / verifier 前移到第一屏,值班者仍需閱讀長段狀態鏈才能推斷 AI 自動化到底留下什麼。
|
||||
|
||||
**完成內容**:
|
||||
- `700390a5 fix(api): 在 Telegram 告警顯示自動化資產沉澱`:在 Telegram 主卡與 AwoooP status-chain/detail/history 摘要補上 `🧾 自動化資產沉澱` 區塊。
|
||||
- `c40f3548 test(api): 對齊 Telegram 資產沉澱判讀`:修正測試期望,讓 KM、PlayBook、Verifier 三項 ready 時顯示 `完成 3 / 卡點 0`。
|
||||
- Telegram 卡片現在會顯示 `KM`、`PlayBook`、`腳本/Ansible`、`排程/來源`、`Verifier` 與 `完成 n / 卡點 n`,並固定註明 `只讀顯示,不代表已授權執行`。
|
||||
- 本段只調整訊息 body 與 formatter 測試;不改 Bot token、不改 chat routing、不改 callback payload、不送 live Telegram 測試通知、不改 Gateway queue、不開 runtime gate。
|
||||
|
||||
**橙區審查摘要**:
|
||||
- 觸及 `apps/api/src/services/telegram_gateway.py`,pre-commit hook 正確提示 Telegram Gateway Tier 2 橙區。
|
||||
- 變更必要性:告警卡看不到自動化資產沉澱,無法滿足 MASTER 的 observable-by-default 與值班者快速判讀需求。
|
||||
- 影響範圍:限定在 Telegram HTML 訊息正文;不碰發送、審批按鈕、callback、token、chat id 或外部呼叫。
|
||||
- 回滾計畫:可單獨 revert `700390a5` 與 `c40f3548`;不涉及 schema / migration / host write。
|
||||
- 測試覆蓋:新增主卡與 status-chain formatter assertions,並由 Gitea 乾淨環境全量 API tests 驗證。
|
||||
|
||||
**驗證**:
|
||||
- 本地 `python3 -m py_compile apps/api/src/services/telegram_gateway.py apps/api/tests/test_telegram_message_templates.py` 通過。
|
||||
- 本地 `git diff --check`、`source-control-owner-response-guard.py --root .`、`security-mirror-progress-guard.py --root .` 通過。
|
||||
- 本地 pytest 因 worktree Python / 套件環境不完整無法執行;以 Gitea 乾淨環境為準。
|
||||
- Gitea `code-review.yaml #3184`:`700390a5` 成功。
|
||||
- Gitea `cd.yaml #3183`:第一次失敗,原因是新增測試期望 `完成 2 / 卡點 0` 與實際 formatter `完成 3 / 卡點 0` 不一致;失敗前已有 `3102 passed, 16 skipped`。
|
||||
- Gitea `code-review.yaml #3186`:`c40f3548` 成功。
|
||||
- Gitea `cd.yaml #3185`:成功;API tests `3243 passed, 23 skipped`,B5 integration `5 passed`,post-deploy Playwright smoke `5 passed`。
|
||||
- Deploy marker:`1ccbb080 chore(cd): deploy c40f354 [skip ci]`。
|
||||
- CD deploy log:ArgoCD `Synced / Healthy`,`awoooi-api`、`awoooi-web`、`awoooi-worker` rollout 成功,`AWOOOI_ROLLOUT_RISK=0`。
|
||||
- Production health:`https://awoooi.wooo.work/api/v1/health` 回 `healthy / prod / mock_mode=false`,API / PostgreSQL / Redis / OpenClaw / SignOz / Ollama GCP-A / GCP-B / local 均為 `up`。
|
||||
|
||||
**完成度同步**:
|
||||
- Telegram 告警卡資產沉澱 formatter:本地 `100%`、Gitea tests `100%`、正式部署 `100%`。
|
||||
- AwoooP 核心可見面:Approvals / Runs / Alerts / Telegram 主卡已完成第一輪 `KM / PlayBook / 腳本 / 排程 / Verifier` 可視化;Observability、Tenants 與 Knowledge Base 仍需接同一資產總帳。
|
||||
- AgentOps 治理與可觀測基礎:`78% -> 79%`,只代表可視化與告警正文 readback 前進。
|
||||
- Telegram Bot / TG 群組:契約 `44% -> 46%`;live send、Bot API call、Gateway queue write、delivery receipt production write 仍 `0%`。
|
||||
- Runtime write、KM write、PlayBook trust write、腳本 / 排程套用、Verifier live execution:仍 `0 / false`,不得把 Telegram 卡片可見誤讀為自動修復已授權。
|
||||
|
||||
**下一步**:把同一套資產沉澱總帳接到 Observability、Tenants 與 Knowledge Base;再進入 P2-406D no-send envelope ledger / P2-406E failure-only digest route,讓 Telegram 實發前就能看見 dedup、receipt expectation、owner、next action 與 blocked reason。
|
||||
|
||||
## 2026-06-18|Alerts 焦點告警補上自動化資產沉澱矩陣
|
||||
|
||||
**背景**:統帥再次指出 KM、PlayBook、腳本、排程與自動化機制如果在頁面與告警訊息看不到,就等於沒有被完整記錄與沉澱。Approvals / Runs 已先補上 `AwoooPAutomationAssetLedger`,但 `/zh-TW/alerts` 焦點告警仍只有來源參照、Operator flow 與狀態鏈,使用者從 Telegram 點回告警真相鏈時仍要讀大量文字,無法一眼看出這筆事件到底沉澱了哪些資產、缺哪些資產。
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
| 項目 | 目前完成度 | 本次判讀 | 下一個有效動作 |
|
||||
|---|---:|---|---|
|
||||
| 本工作清單細化 | 100% | 已把所有工作流拆成 P0 / P1 / P2 / P3 | 同步 LOGBOOK 與 MASTER §8 |
|
||||
| AgentOps 治理與可觀測基礎 | 78% | 已有 schema / snapshot / API / UI / gate;P2-407 已正式把日報 / 週報 / 月報、P2-406B receipt owner review、P2-004 drift monitor 與 P2-403J 報表真相串成 no-write 分析草稿,且 Approvals / Runs / Alerts 已補 KM / PlayBook / 腳本 / 排程 / Verifier 資產沉澱矩陣;runtime 真正執行仍低 | P2-408 中 / 低風險白名單;補 Runs mobile smoke;正式 Telegram 告警卡 / Observability / Tenants 接同一資產沉澱總帳 |
|
||||
| AgentOps 治理與可觀測基礎 | 79% | 已有 schema / snapshot / API / UI / gate;P2-407 已正式把日報 / 週報 / 月報、P2-406B receipt owner review、P2-004 drift monitor 與 P2-403J 報表真相串成 no-write 分析草稿,且 Approvals / Runs / Alerts / Telegram 告警卡已補 KM / PlayBook / 腳本 / 排程 / Verifier 資產沉澱矩陣;runtime 真正執行仍低 | P2-408 中 / 低風險白名單;補 Runs mobile smoke;Observability / Tenants / Knowledge Base 接同一資產沉澱總帳 |
|
||||
| OpenClaw / Hermes / NemoTron 佈建布局 | 45% | 目前是只讀 layout 與治理頁可視化,不是主機上 live agent worker | 建立 runtime agent registry 與 AgentSession ledger |
|
||||
| Agent 主動溝通 / 接手 / 學習 | 設計證據 100%,runtime 35% | 互動證據、War Room 與 readback gate 已齊;Event Bus、RAG writeback、PlayBook trust 寫入仍未開 | 先做 no-write event stream,再做 Owner-approved writeback |
|
||||
| 日報 / 週報 / 月報 | 可視化 100%,no-write 分析 100%,實發 0% | 報表批准包、P2-406B owner review、P2-407 no-write analyst 與治理頁已可見;Telegram 實發、receipt production write、AI analysis live runtime 仍為 0 | P2-408 白名單與 P2-406F no-send scheduler |
|
||||
| Telegram Bot / TG 群組 | 契約 44%,實發 0% | no-send preview、dry-run、owner review gate 與 P2-406B receipt readback owner review 已有;live send / Bot API / Gateway queue 未批准 | 收到合格 owner approval 後才評估 P2-406C one-message canary |
|
||||
| Telegram Bot / TG 群組 | 契約 46%,實發 0% | no-send preview、dry-run、owner review gate、P2-406B receipt readback owner review 與正式告警卡 `KM / PlayBook / 腳本 / 排程 / Verifier` 資產沉澱顯示已完成;live send / Bot API / Gateway queue 未批准 | P2-406D no-send envelope ledger、P2-406E failure-only digest route;收到合格 owner approval 後才評估 P2-406C one-message canary |
|
||||
| 中低風險自動化 | 30% | 政策方向已明確,但實際 auto worker 未開 | 建立 low / medium whitelist、dry-run verifier、rollback proof |
|
||||
| 高風險審核 | 68% | Owner Gate、拒收規則與 P2-406B receipt owner review 已多層化;仍缺真實 owner response accepted ledger | P2-145 / P2-406C 類 gate 繼續只讀讀回 |
|
||||
| 市場主流 Agent 追蹤 | 55% | 已有市場治理頁與 weekly watch;需擴充成固定外部來源評分與回放 | P2-412 週期性 market watch + scorecard |
|
||||
@@ -148,7 +148,7 @@
|
||||
|---|---:|---|---|
|
||||
| Agent 市場治理 | 72% | 進行中 | `agent_market_governance_snapshot_v1`、API、UI 分頁、每週觀察流程 |
|
||||
| Nemotron 實際整合應用 | 30% | 完整回放前仍被關卡擋下 | `blocked_needs_evidence`,下一關是 `refresh_source_evidence_then_5_record_smoke_only` |
|
||||
| 工具 / 服務 / 套件 AI 自動化 | 97% | P2-004 依賴 / 供應鏈漂移監控讀回已完成,且已納入 P2-406B receipt readback owner review 與 P2-407 no-write analysis;Approvals / Runs / Alerts 已能看到 KM / PlayBook / 腳本 / 排程 / Verifier 的沉澱狀態;下一主線是 P2-408 中 / 低風險白名單與 Telegram 告警卡同款總帳 | 新增 `dependency_supply_chain_drift_monitor_v1`、`ai_agent_receipt_readback_owner_review_v1`、`ai_agent_report_no_write_analysis_runtime_v1` schema / snapshot / API / tests / governance UI 卡片;9 個 drift candidate、5 個 P2-407 source readback、6 筆 draft recommendation、3 個 owner gate;Approvals / Runs / Alerts production evidence 已驗證;仍不得外部 CVE / license / registry / Agent market lookup、不得升級、不得寫 lockfile、不得 Docker build、不得 Telegram 實發 |
|
||||
| 工具 / 服務 / 套件 AI 自動化 | 97% | P2-004 依賴 / 供應鏈漂移監控讀回已完成,且已納入 P2-406B receipt readback owner review 與 P2-407 no-write analysis;Approvals / Runs / Alerts / Telegram 告警卡已能看到 KM / PlayBook / 腳本 / 排程 / Verifier 的沉澱狀態;下一主線是 P2-408 中 / 低風險白名單與 Observability / Tenants / Knowledge Base 同款總帳 | 新增 `dependency_supply_chain_drift_monitor_v1`、`ai_agent_receipt_readback_owner_review_v1`、`ai_agent_report_no_write_analysis_runtime_v1` schema / snapshot / API / tests / governance UI 卡片;9 個 drift candidate、5 個 P2-407 source readback、6 筆 draft recommendation、3 個 owner gate;Approvals / Runs / Alerts / Telegram formatter production evidence 已驗證;仍不得外部 CVE / license / registry / Agent market lookup、不得升級、不得寫 lockfile、不得 Docker build、不得 Telegram 實發 |
|
||||
| OpenClaw / Hermes / NemoTron 佈建布局 | 45% | P1-401 / P1-402 已完成;仍是只讀 layout 與治理頁顯示,不是 runtime deploy | `ai_agent_deployment_layout_v1` schema、`ai_agent_deployment_layout_2026-06-11.json`、`GET /api/v1/agents/agent-deployment-layout`、治理頁自動化盤點 UI、`AI_AGENT_DEPLOYMENT_LAYOUT_2026-06-11.md` |
|
||||
| OpenClaw / Hermes / NemoTron 主動溝通、學習與成長證據 | 100% | P2-401A 到 P2-144 已完成只讀證據面、runtime / report / result-capture gates、no-write readback、promotion review、writer implementation review、writer dry-run fixture、writer dry-run readback、owner promotion execution gate、owner-approved execution rehearsal、owner acceptance / maintenance window gate、owner acceptance readback / preflight hold、owner-approved preflight release package、owner-approved release readiness readback、owner release approval gate、post-release verifier / rollback gate、final release candidate readback、release authorization hold / readback gate、release verifier preflight / owner review packet、release decision hold / readback、release decision next handoff、release decision input prep、12-Agent War Room、owner response 預檢與 owner response 回讀;P2-141 基線與 S4.9 owner release packet 補強皆已正式驗證,P2-142 12-Agent War Room 已完成 production readback 與 desktop / mobile smoke,P2-143 owner response 預檢已完成 production readback 與 in-app browser smoke,P2-144 owner response 回讀已完成 production API readback 與 desktop / mobile smoke。runtime worker、DB migration、production Redis consumer group、canonical runtime readback、live query、runtime score、result capture write、Telegram 實發、delivery receipt E2E、live report delivery、reviewer queue write、Gateway queue write、AI analysis runtime、中低風險 auto worker、KM / LOGBOOK / audit DB / timeline / PlayBook trust 寫入、SDK / 付費服務仍未開 gate | `ai_agent_result_capture_release_decision_owner_response_readback_v1`、`GET /api/v1/agents/agent-result-capture-release-decision-owner-response-readback`、`docs/evaluations/ai_agent_result_capture_release_decision_owner_response_readback_2026-06-14.json`、feature commit `8795f100`、deploy marker `ac938037`、Gitea code-review `2965` / CD `2964` success、5 個回覆讀回 lane、18 個 owner 必填欄位、6 個 readback validation check、6 個 rejection guard、5 個 operator action、等待外部回覆 `5`、未收件 lane `5`、正式寫入 / 發送 `0`;P2-142 feature commit `5de4b3f3`、deploy marker `1a2c9e36`、Gitea CD run `4232` success、production API readback、desktop / mobile in-app browser smoke;P2-143 feature commit `755b0a8d`、deploy marker `667d6329`、Gitea code-review `2961` / CD `2960` success、production API readback、desktop / mobile in-app browser smoke;MASTER §3.2.1b / §3.2.1d / §3.4.3 |
|
||||
| AI Agent 主動營運委派與版本生命週期 | 100% | P2-402A / P2-402B / P2-402C / P2-402D / P2-402E / P2-402F / P2-402G 已完成;已建立 repo-only 版本新鮮度快照、工具採用批准包、Telegram action-required digest policy、Gitea PR 草案 lane、host / K3s / stateful 版本只讀盤點、API 與 governance UI。定期排程、外部版本查詢、工具安裝、CI 變更、套件升級、主機更新、container pull、實際 PR creation、auto merge、Telegram 實發、SSH、kubectl、重啟仍未開 gate | `ai_agent_proactive_operations_contract_v1`、`ai_agent_version_freshness_snapshot_v1`、`ai_agent_tool_adoption_approval_package_v1`、`ai_agent_telegram_action_required_digest_policy_v1`、`ai_agent_gitea_pr_draft_lane_v1`、`ai_agent_host_stateful_version_inventory_v1`、`GET /api/v1/agents/agent-proactive-operations-contract`、`GET /api/v1/agents/agent-version-freshness-snapshot`、`GET /api/v1/agents/agent-tool-adoption-approval-package`、`GET /api/v1/agents/agent-telegram-action-required-digest-policy`、`GET /api/v1/agents/agent-gitea-pr-draft-lane`、`GET /api/v1/agents/agent-host-stateful-version-inventory`、`/zh-TW/governance?tab=automation-inventory`、MASTER §3.2.1c |
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
| Frontend design system / visual grammar | 維持 `60%` | 否 | 本輪只推進 IwoooS 頁面資訊架構與圖表排序,不宣稱全站設計系統完成 |
|
||||
| P2 全站繁中治理 D0+D1+D2 註解語氣 / AIOps sample / Code Review 候選分類 / AwoooP Runs fallback | `53%` | 只限高風險可見 literal、盤點、註解語氣、AIOps 範例資料命名、Code Review route i18n 與 AwoooP Runs fallback readability | D0 已清 messages 高風險殘留;D1 已掃 `apps/web/src` 字串 literal 並修正高風險可見 / bundle 文案;D2 已清 `apps/web/src` 內部稱謂註解、AIOps sample/mock 命名、Code Review 可見文案搬進 `codeReview` namespace,並清理 Runs / Callback / Source Flow fallback 可見殘留。全站 hardcoded TSX 可見 literal 仍需後續分批搬遷 |
|
||||
| AI Agent automation inventory UX / readability | 本地 `100%`;正式站 `100%` | 否 | 治理頁已把 P1-002 後資料重排為決策指揮摘要、決策支援六因子覆蓋率與 Gitea / Runner 缺口矩陣;這是可讀性與決策支援 slice,不調高 backlog `78%`、IwoooS `64%`、S4.9 gate 或 active runtime gate |
|
||||
| Telegram 監控告警 / 批准執行真相鏈 | outbound 主鏈路 `100%`;批准後執行止血 `100%`;no-action 人工處置包 D0 `100%`;MCP / PlayBook 修復候選 D5 `88%`;Approvals / Runs / Alerts 資產沉澱矩陣 `100% / desktop 100% / 100%`;治理長期項 `98%` | 是,僅限候選產生、阻擋原因、人工草案包、AwoooP 工作項可追蹤性、Work Items 詳細接手板、Approvals / Runs / Alerts 資產沉澱欄與 coverage gap metadata | 已修復 Alertmanager tenant context、既有 approval 收斂告警 recurrence、AI 分析中重複告警 recurrence、no-action approval 誤導執行、可執行修復 execution / KM / verifier 紀錄、no-action 人工處置包、MCP evidence / PlayBook trust 候選產生、通用兜底 / 診斷型 PlayBook 阻擋理由、缺候選時的 PlayBook 草案欄位 / 下一步 / AwoooP work item 入口與詳細處置板、blocked result 的服務 coverage gap / blocking stage / required MCP evidence refs,以及 Approvals / Runs / Alerts 的 `KM / PlayBook / 腳本 / 排程 / Verifier` 資產沉澱矩陣;但正式 Telegram 告警卡仍需輸出同款總帳,完整自動修復飛輪仍需用真實告警驗證 approval -> execution -> verifier -> KM / PlayBook trust 全鏈,不調高 runtime gate |
|
||||
| Telegram 監控告警 / 批准執行真相鏈 | outbound 主鏈路 `100%`;批准後執行止血 `100%`;no-action 人工處置包 D0 `100%`;MCP / PlayBook 修復候選 D5 `88%`;Approvals / Runs / Alerts / Telegram 告警卡資產沉澱矩陣 `100% / desktop 100% / 100% / formatter+deploy 100%`;治理長期項 `98%` | 是,僅限候選產生、阻擋原因、人工草案包、AwoooP 工作項可追蹤性、Work Items 詳細接手板、Approvals / Runs / Alerts / Telegram 告警卡資產沉澱欄與 coverage gap metadata | 已修復 Alertmanager tenant context、既有 approval 收斂告警 recurrence、AI 分析中重複告警 recurrence、no-action approval 誤導執行、可執行修復 execution / KM / verifier 紀錄、no-action 人工處置包、MCP evidence / PlayBook trust 候選產生、通用兜底 / 診斷型 PlayBook 阻擋理由、缺候選時的 PlayBook 草案欄位 / 下一步 / AwoooP work item 入口與詳細處置板、blocked result 的服務 coverage gap / blocking stage / required MCP evidence refs,以及 Approvals / Runs / Alerts / Telegram 告警卡的 `KM / PlayBook / 腳本 / 排程 / Verifier` 資產沉澱矩陣;完整自動修復飛輪仍需用真實告警驗證 approval -> execution -> verifier -> KM / PlayBook trust 全鏈,不調高 runtime gate |
|
||||
|
||||
## 2. P0 工作拆解與優先順序
|
||||
|
||||
|
||||
Reference in New Issue
Block a user