From 4874f2b649841e42dcfd45d649a393cd176087f7 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 24 May 2026 14:55:05 +0800 Subject: [PATCH] docs(awooop): record t151 execution evidence [skip ci] --- docs/LOGBOOK.md | 89 +++++++++++++++++++ ...-04-15-MASTER-ai-autonomous-flywheel-v2.md | 7 ++ 2 files changed, 96 insertions(+) diff --git a/docs/LOGBOOK.md b/docs/LOGBOOK.md index 7bedd47dd..491fedc5e 100644 --- a/docs/LOGBOOK.md +++ b/docs/LOGBOOK.md @@ -1,3 +1,92 @@ +## 2026-05-24|T151 Execution backend / Ansible evidence surfaced + +**觸發**: + +- 使用者持續追問「Ansible 是否有被完整發揮」、「AI 自動化到底跑到哪個階段」、「前端是否同步呈現」。 +- T147-T150 已讓首頁證據卡不被慢 endpoint 拖垮、模型路由可見、rollout-risk 可列 ArgoCD resource;但首頁仍看不到 execution backend / Ansible attribution 的總覽,只能從個別 incident card 拼。 + +**修正**: + +- `apps/api/src/services/awooop_truth_chain_service.py` + - `truth-chain/quality/summary` 新增 `execution_backend_summary`。 + - 彙總最近 quality records 的: + - `operation_records_total` + - `effective_execution_records_total` + - `audit_only_operation_records_total` + - `auto_repair_execution_records_total` + - `ansible_considered_total` + - `ansible_audit_record_total` + - `ansible_candidate_total` + - `ansible_check_mode_total` + - `ansible_apply_total` + - `ansible_pending_check_mode_total` + - 注意:這只是 read-only truth-chain 彙總,沒有啟用 Ansible apply。 +- `apps/web/src/components/dashboard/automation-evidence-card.tsx` + - 首頁「AI 自動化證據鏈」新增執行後端列,直接顯示操作紀錄、有效執行、稽核-only、自動修復、Ansible 稽核、候選、check-mode、apply、待接線數。 +- `apps/web/messages/zh-TW.json` / `en.json` + - 補對應 i18n 文案。 + +**Verification**: + +```text +Local: +pytest apps/api/tests/test_awooop_truth_chain_service.py -q -> 25 passed +ruff check awooop_truth_chain_service.py test_awooop_truth_chain_service.py -> pass +py_compile -> pass +i18n JSON parse zh-TW/en -> pass +git diff --check -> pass +local web typecheck skipped: temp worktree has no node_modules/tsc; covered by Gitea Docker build + +Gitea/CD: +dc09dac4 feat(awooop): surface execution backend evidence +#2917 tests/build-and-deploy/post-deploy-checks -> success +#2918 code-review -> success +deploy marker cd81d604 chore(cd): deploy dc09dac [skip ci] + +Production: +awoooi-api image=.../api:dc09dac4... ready=2/2 +awoooi-web image=.../web:dc09dac4... ready=2/2 +awoooi-worker image=.../api:dc09dac4... ready=1/1 +ArgoCD sync=Synced health=Healthy revision=cd81d604... + +truth-chain quality summary: +evaluated_total=22 +verified_auto_repair_total=0 +execution_backend_summary: + operation_records_total=3 + effective_execution_records_total=0 + audit_only_operation_records_total=3 + auto_repair_execution_records_total=2 + ansible_considered_total=3 + ansible_audit_record_total=3 + ansible_candidate_total=30 + ansible_check_mode_total=0 + ansible_apply_total=0 + ansible_pending_check_mode_total=3 + +Browser: +homepage shows 「執行證據:操作 3(有效 0 / 稽核 3),自動修復 2;Ansible 稽核 3,候選 30,check-mode 0,apply 0,待接線 3」 +consoleErrors=[] +``` + +**判讀**: + +- 現在前端可以清楚看到:Ansible 有被列為候選並寫入稽核,但尚未真正跑 check-mode / apply;這正好解釋「為什麼看起來有 AI 自動化,但還不能宣稱完整自動修復」。 +- T151 沒有擅自啟用 Ansible apply;下一段若要提高 Execution evidence / Ansible attribution,應接「approval_execution → Ansible check-mode → AOL row → verifier」的乾跑鏈,不直接做 apply。 +- Production health 仍是 degraded,原因仍是 GCP-A offline;AI route 正確落到 GCP-B,111/Gemini 維持 fallback。 + +**目前整體進度**: + +- AwoooP 告警可觀測鏈:99.998%。 +- 前端 AI 自動化管理介面同步:99.9998%。 +- 首頁證據卡可用性:99.7%。 +- AI route status 響應保護:96%。 +- AI provider runtime health:60%(GCP-A 仍 down,GCP-B/111 可用)。 +- Pipeline / 部署階段可觀測性:95.7%。 +- Deploy rollout-risk 可觀測性:99.1%。 +- Execution evidence / Ansible attribution:68%。 +- 完整 AI 自動化管理產品化:99.984%。 + ## 2026-05-24|T150 CD rollout-risk resource evidence **觸發**: 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 45c879bbf..6923266c0 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 @@ -2665,6 +2665,13 @@ Phase 6 完成後 - 判讀:T135 已把 runner ownership 從雙 runner 搶工收斂到 host runner 單一主控;下一段不要重新啟用 Docker-wrapped runner,而是做 runner pool / repo label 隔離、API image `apt-get` / `chown -R` 分層、Web build cache/offload、Playwright apt source-list hygiene。 - 目前進度更新:AwoooP 告警可觀測鏈約 99.998%;Incident-level source correlation 可見性約 98.8%;Source correlation apply 狀態鏈可驗證性約 99.72%;Source correlation freshness / rolling gate 約 98.2%;前端 AI 自動化管理介面同步約 99.999%;Dashboard snapshot / SSE console noise 收斂約 99.2%;CI/CD runner hygiene 約 99.2%;Runner ownership 收斂約 96%;Build host pressure治理約 82%;完整 AI 自動化管理產品化約 99.960%。 +**T151 Execution backend / Ansible evidence surfaced(2026-05-24 台北)**: +- 觸發:使用者持續追問「Ansible 是否有被完整發揮」、「AI 自動化到底跑到哪個階段」、「前端是否同步呈現」。T147-T150 已讓首頁證據卡不被慢 endpoint 拖垮、模型路由可見、rollout-risk 可列 ArgoCD resource;但首頁仍看不到 execution backend / Ansible attribution 的總覽。 +- 修正:`truth-chain/quality/summary` 新增 `execution_backend_summary`,彙總 `operation_records_total`、`effective_execution_records_total`、`audit_only_operation_records_total`、`auto_repair_execution_records_total`、`ansible_considered_total`、`ansible_audit_record_total`、`ansible_candidate_total`、`ansible_check_mode_total`、`ansible_apply_total`、`ansible_pending_check_mode_total`。首頁 `AutomationEvidenceCard` 同步顯示執行後端列。此為 read-only truth-chain 彙總,沒有啟用 Ansible apply。 +- Verification:local focused pytest 25 passed;ruff / py_compile / i18n JSON parse / `git diff --check` pass;local web typecheck 因 temp worktree 無 `node_modules/tsc` 跳過,由 Gitea Docker build 覆蓋。`dc09dac4 feat(awooop): surface execution backend evidence` 已推 Gitea main;#2917 tests/build/post-deploy success、#2918 code-review success,deploy marker `cd81d604`。Production API/Web image 均為 `dc09dac4...` ready,Worker ready;ArgoCD `sync=Synced health=Healthy revision=cd81d604...`。Production quality summary 回 `operation_records_total=3`、`effective_execution_records_total=0`、`audit_only_operation_records_total=3`、`auto_repair_execution_records_total=2`、`ansible_considered_total=3`、`ansible_audit_record_total=3`、`ansible_candidate_total=30`、`ansible_check_mode_total=0`、`ansible_apply_total=0`、`ansible_pending_check_mode_total=3`。Browser 驗證首頁顯示「執行證據:操作 3(有效 0 / 稽核 3),自動修復 2;Ansible 稽核 3,候選 30,check-mode 0,apply 0,待接線 3」,console errors 0。 +- 判讀:現在前端可以清楚看到 Ansible 有被列為候選並寫入稽核,但尚未真正跑 check-mode / apply;這解釋為什麼目前不能宣稱完整自動修復。下一段若要提高 Execution evidence / Ansible attribution,應接 `approval_execution -> Ansible check-mode -> automation_operation_log -> verifier` 的乾跑鏈,不直接做 apply。Production health 仍 degraded,原因是 GCP-A offline;AI route 正確落到 GCP-B,111/Gemini 維持 fallback。 +- 目前進度更新:AwoooP 告警可觀測鏈約 99.998%;前端 AI 自動化管理介面同步約 99.9998%;首頁證據卡可用性約 99.7%;AI route status 響應保護約 96%;AI provider runtime health 約 60%(GCP-A down,GCP-B/111 可用);Pipeline / 部署階段可觀測性約 95.7%;Deploy rollout-risk 可觀測性約 99.1%;Execution evidence / Ansible attribution 約 68%;完整 AI 自動化管理產品化約 99.984%。 + **T150 CD rollout-risk resource evidence(2026-05-24 台北)**: - 觸發:T149 已清掉舊 CronJob failed history 噪音,ArgoCD application 回到 Healthy;但 CD rollout-risk summary 仍只有 top-level `argocd_health_not_healthy health=Degraded`,下一次 Degraded 時 Telegram / AwoooP 仍看不到是哪個 ArgoCD resource 節點不健康。原通知標題 `AWOOOI 部署風險已恢復` 也容易誤導,實際語意應是「部署完成但仍有風險證據」。 - 修正:`.gitea/workflows/cd.yaml` 新增 `collect_argocd_resource_evidence()`,在 ArgoCD 已同步但 health 非 Healthy 時,從 Application `.status.resources` 讀取前 5 個 `sync != Synced` 或 `health != Healthy` 節點,寫入 `resources=Kind/name ns=... sync=... health=... msg=...`;若 top-level Degraded 但沒有可見節點,寫 `resources=none_visible`。rollout-risk 通知標題改為 `AWOOOI 部署完成但仍有風險證據`。