feat(awooop): project ai route repair work item
All checks were successful
CD Pipeline / tests (push) Successful in 1m22s
Code Review / ai-code-review (push) Successful in 11s
CD Pipeline / build-and-deploy (push) Successful in 3m30s
CD Pipeline / post-deploy-checks (push) Successful in 1m20s

This commit is contained in:
Your Name
2026-05-25 14:42:57 +08:00
parent e5cd01c9cb
commit 63b4c3453f
6 changed files with 296 additions and 1 deletions

View File

@@ -1,3 +1,44 @@
## 2026-05-25T178 AI route repair work item / PlayBook 候選
**背景**
- T177 已讓 `ai_route_repair / repair_diagnosis` 顯示在 `/api/v1/platform/ai-route-status` 與 AwoooP Runs但 operator 仍需要更清楚知道這件事是否形成工作項、由誰接、PlayBook 建議是什麼、是否可安全自動修復。
- 本段仍不修 GCP-A、不改 route、不建立 Incident / Telegram / Approval只把既有 DB repair evidence 轉成 read-only work item projection維持低噪音與安全邊界。
**本次修復**
- `repair_evidence` 新增:
- `work_item``ai-route-repair:<target>`,目前 `ollama_gcp_a` 為 open / needs_human=true。
- `playbook_recommendation``ai_route_primary_lane_recovery`,依 live blockers 組出 GCP control plane、OS access、Ollama service、110 proxy、route status verification 等步驟;`safe_to_auto_execute=false``requires_approval=true`
- `owner_action`:主責 HermesOpenClaw / ElephantAlpha 協作human owner 為 Cloud/SRE owner狀態為 blocked by external cloud/OS access。
- AwoooP Work Items 頁新增 T178「AI Provider primary lane 修復工作項」,讀 `/api/v1/platform/ai-route-status` 顯示 lane、selected provider、target、blocker 數、work item id、owner、PlayBook 與安全自動修復判斷。
- 此 work item 是 read-model projection不寫 incident state、不寫 auto-repair result、不變更 runtime route。
**本地驗證**
```text
python3 -m py_compile apps/api/src/services/platform_operator_service.py apps/api/src/api/v1/platform/operator_runs.py -> pass
jq empty apps/web/messages/zh-TW.json apps/web/messages/en.json -> pass
git diff --check -> pass
ruff check platform_operator_service.py + targeted tests --ignore B008 -> pass
pytest targeted ai-route status/evidence tests -> 6 passed
pnpm --dir apps/web exec tsc --noEmit --tsBuildInfoFile /tmp/awoooi-t178-tsconfig.tsbuildinfo -> pass
```
**目前整體進度**
- AwoooP 告警可觀測鏈:約 99.32%。
- 低風險自動修復閉環:約 95.8%。
- 前端 AI 自動化管理介面同步:約 97.6%。
- Telegram 詳情 / 歷史可解釋性:約 95.5%。
- Callback evidence / DB replayability約 96.0%。
- MCP / 自建 MCP 可見性:約 88%。
- Sentry / SigNoz source correlation visibility約 88%。
- Ansible / PlayBook decision visibility約 85.2%。
- KM owner-review / completion governance約 84%。
- AI Provider lane 健康與可見性:約 92%GCP-A runtime 尚未修復;但 repair evidence / work item / PlayBook 候選已可見)。
- 完整 AI 自動化管理產品化:約 95.2%。
## 2026-05-25T177 AI route repair evidence API / 前端投影
**背景**