From f85a8768680fac482a1020ae690c29dac15752b9 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 20 May 2026 14:53:39 +0800 Subject: [PATCH] docs(web): record t106 incident evidence rollout [skip ci] --- docs/LOGBOOK.md | 72 +++++++++++++++++++ ...-04-15-MASTER-ai-autonomous-flywheel-v2.md | 8 +++ 2 files changed, 80 insertions(+) diff --git a/docs/LOGBOOK.md b/docs/LOGBOOK.md index 864386c4e..254f2135d 100644 --- a/docs/LOGBOOK.md +++ b/docs/LOGBOOK.md @@ -1,3 +1,75 @@ +## 2026-05-20|T106 Alerts incident card 顯示 MCP / 操作 / KM / 修復證據 + +**觸發**: + +- T105 已讓 `/alerts` 完整清單每頁 50 筆 incident 接上 AwoooP status-chain,但卡片上仍只顯示流程階段與 verdict。 +- 統帥反覆指出 Telegram / 前端都無法一眼看出「到底有沒有用 MCP / 自建 MCP」、「有沒有操作紀錄」、「有沒有寫 KM」、「有沒有自動修復證據」。 +- 這些 evidence count 已在 `status-chain.evidence` 裡,但沒有在 incident card 的主視覺中呈現,Operator 仍要進詳情 API 才能判斷。 + +**修正**: + +- `IncidentCard` 在 `truth-chain / ADR-100` flow summary 後方新增 evidence row:`MCP {count}`、`操作 {count}`、`KM {count}`、`修復 {count}`。 +- evidence count 直接讀 `statusChain.evidence.mcp_gateway_total`、`operation_records`、`knowledge_entries`、`auto_repair_records`。 +- count 大於 0 時用 active 樣式突出;0 仍顯示,讓 Operator 可看出「未使用 / 無紀錄」而不是資訊消失。 +- zh-TW / en i18n 補齊 `incident.card.flowEvidence*`,避免新增硬編前端文案。 + +**邊界**: + +- 本輪是 read-only product visibility,不新增 MCP 執行、不改 AwoooP Gateway enforcement、不改 incident / approval / execution / auto-repair 狀態機。 +- evidence row 代表目前 truth-chain 已回傳的 DB 計數;若 MCP / KM / auto-repair 為 0,表示該 incident 目前沒有相應 evidence,不可被解讀成「已自動修復」。 + +**Local / production verification**: + +```text +node JSON parse zh-TW/en messages + -> i18n json ok +pnpm --dir apps/web exec tsc --noEmit --pretty false + -> pass +pnpm --dir apps/web exec next lint --file incident-card.tsx + -> exit 0 +NEXT_PUBLIC_API_URL=https://awoooi.wooo.work pnpm --dir apps/web run build + -> compiled successfully, 90/90 static pages +Local Playwright http://localhost:3030/zh-TW/alerts + -> evidence rows visible; first samples include MCP / 操作 / KM / 修復; pageErrors=0, consoleErrors=0 +Production health + -> /api/v1/health healthy, prod, mock_mode=false +Production incidents + -> count=448 +Production Playwright https://awoooi.wooo.work/zh-TW/alerts + -> evidenceCount=50, first samples: + MCP 8 操作 0 KM 0 修復 0 + MCP 16 操作 0 KM 0 修復 0 + MCP 16 操作 1 KM 0 修復 0 + MCP 16 操作 1 KM 0 修復 0 + MCP 0 操作 1 KM 0 修復 0 + -> pageErrors=0, consoleErrors=0 + -> screenshot /tmp/awoooi-t106-alerts-evidence-production.png +``` + +**Gitea deploy / smoke**: + +```text +Code commit: + 2eaffe07 feat(web): surface incident automation evidence counts + +Deploy marker: + 543c9389 chore(cd): deploy 2eaffe0 [skip ci] + +Gitea Actions: + 1925 Code Review -> success in 11s + 1924 CD -> success in 9m19s +``` + +**目前整體進度**: + +- 首頁資料可信度:約 99.9%。 +- Alerts 完整清單可追蹤性:約 99.8%。 +- 前端 AI 自動化管理介面同步:約 99.95%。 +- AwoooP 告警可觀測鏈:約 99.85%。 +- MCP / 操作 / KM / 修復證據可見性:約 99.2%。 +- 低風險自動修復閉環:約 95.2%。 +- 完整 AI 自動化管理產品化:約 99.2%。 + ## 2026-05-20|T105 Alerts 完整清單接上 AwoooP status-chain **觸發**: diff --git a/docs/superpowers/specs/2026-04-15-MASTER-ai-autonomous-flywheel-v2.md b/docs/superpowers/specs/2026-04-15-MASTER-ai-autonomous-flywheel-v2.md index e16375b95..d28197299 100644 --- a/docs/superpowers/specs/2026-04-15-MASTER-ai-autonomous-flywheel-v2.md +++ b/docs/superpowers/specs/2026-04-15-MASTER-ai-autonomous-flywheel-v2.md @@ -2426,6 +2426,14 @@ Phase 6 完成後 - 邊界:T105 是 read-only 前端可觀測性與效能/可讀性收斂,不改 incident / approval / execution / auto-repair 狀態機;完整事件仍透過分頁逐頁查看。 - 目前進度更新:首頁資料可信度約 99.9%;Alerts 完整清單可追蹤性約 99.6%;前端 AI 自動化管理介面同步約 99.9%;AwoooP 告警可觀測鏈約 99.8%;低風險自動修復閉環約 95.2%;完整 AI 自動化管理產品化約 99.1%。 +**T106 Alerts incident card 顯示 MCP / 操作 / KM / 修復證據(2026-05-20 台北)**: +- 觸發:T105 後 `/alerts` 已能顯示每筆 incident 的 status-chain,但 Operator 仍無法在卡片主視覺一眼判斷「到底有沒有動用 MCP / 自建 MCP」、「是否有操作紀錄」、「是否寫入 KM」、「是否存在自動修復證據」。 +- 修正:`IncidentCard` 在 `truth-chain / ADR-100` summary 後新增 evidence row,直接呈現 `statusChain.evidence` 的 `mcp_gateway_total`、`operation_records`、`knowledge_entries`、`auto_repair_records`。0 值也顯示,避免「沒有證據」被誤解成「已處理」。 +- 驗證:i18n JSON ok;`tsc --noEmit` pass;`incident-card.tsx` targeted lint exit 0;production build 90/90 static pages。Local Playwright `/zh-TW/alerts` 顯示前 5 筆 evidence row 並包含 `MCP / 操作 / KM / 修復`,pageErrors=0 / consoleErrors=0。 +- Production / CI:`2eaffe07 feat(web): surface incident automation evidence counts` 已推 Gitea main;deploy marker `543c9389 chore(cd): deploy 2eaffe0 [skip ci]`。Actions:#1925 Code Review success 11s、#1924 CD success 9m19s。Production health healthy/prod/mock_mode=false;`/api/v1/incidents` count=448;Production Playwright `/zh-TW/alerts` 確認 evidenceCount=50,前 5 筆包含 `MCP 8操作 0KM 0修復 0`、`MCP 16操作 1KM 0修復 0`、`MCP 0操作 1KM 0修復 0`,pageErrors=0 / consoleErrors=0。 +- 邊界:T106 仍是 read-only evidence visibility,不新增 MCP enforcement、不新增 auto-repair 執行權限、不改 incident / approval / execution 狀態機。宣稱某 incident 已自動修復仍必須同時看 execution、verification、closure、KM / PlayBook evidence。 +- 目前進度更新:首頁資料可信度約 99.9%;Alerts 完整清單可追蹤性約 99.8%;前端 AI 自動化管理介面同步約 99.95%;AwoooP 告警可觀測鏈約 99.85%;MCP / 操作 / KM / 修復證據可見性約 99.2%;低風險自動修復閉環約 95.2%;完整 AI 自動化管理產品化約 99.2%。 + --- ### 2026-04-20 晚 (台北) — C1-C4 全流程串接 — Playbook 鏈路保護(commit de2d34d)