feat(awooop): surface degraded ai route lanes
All checks were successful
CD Pipeline / tests (push) Successful in 1m25s
Code Review / ai-code-review (push) Successful in 12s
CD Pipeline / build-and-deploy (push) Successful in 3m37s
CD Pipeline / post-deploy-checks (push) Successful in 1m44s

This commit is contained in:
Your Name
2026-05-25 13:24:53 +08:00
parent 19d306c720
commit ed3e658578
8 changed files with 455 additions and 17 deletions

View File

@@ -1,3 +1,68 @@
## 2026-05-25T175 AI Provider lane 降級狀態前後端顯示
**背景**
- T174 已把 production manifest 恢復成 `GCP-A -> GCP-B -> 111 -> Gemini`,但前端/API 仍主要用 `selected_provider` 表示結果。
- 當 GCP-A 真實紅燈且 GCP-B 接手時Operator 需要同時看到:
- policy 仍以 GCP-A 為第一順位;
- 目前使用中 lane 是 GCP-B
- GCP-A 是被跳過的 degraded lane
- 下一步是修復被跳過的 primary lane而不是把 manifest 改名或靜默跳過。
**本次修補**
- `/api/v1/platform/ai-route-status` 新增 lane 狀態欄位:
- `lane_mode``primary` / `degraded_failover` / `cloud_fallback` / `unavailable`
- `active_lane`
- `skipped_lanes`
- `operator_action`
- AwoooP Runs 頁的 AI Provider Routing panel 會把「使用中」與「已跳過」分開顯示,並在 degraded / cloud fallback 時列出下一步。
- 首頁 Automation Evidence card 會把非 primary 狀態補進模型路由摘要,避免只看到目前 provider 而看不到 failover 階段。
- i18n 同步補齊 zh-TW / en 文案,維持前端零硬編碼。
**本地驗證**
```text
pytest:
test_ai_route_status_response_preserves_route_fields
test_ai_route_lane_state_marks_degraded_failover
test_ai_route_lane_state_marks_cloud_fallback
test_ai_route_status_times_out_before_slow_provider_checks
test_ai_route_status_lightweight_fallback_keeps_gemini_policy_only
-> 5 passed
ruff / py_compile:
platform_operator_service.py
operator_runs.py
test_awooop_operator_timeline_labels.py
-> passed
frontend:
pnpm --dir apps/web exec tsc --noEmit
-> passed
json / diff:
en.json / zh-TW.json JSON.parse
git diff --check
-> passed
```
**目前整體進度**
- AwoooP 告警可觀測鏈:約 99.2%。
- 低風險自動修復閉環:約 95.5%。
- 前端 AI 自動化管理介面同步:約 96.9%。
- Telegram 詳情 / 歷史可解釋性:約 95.5%。
- Callback evidence / DB replayability約 95.6%。
- MCP / 自建 MCP 可見性:約 88%。
- Sentry / SigNoz source correlation visibility約 88%。
- Ansible / PlayBook decision visibility約 84.8%。
- KM owner-review / completion governance約 84%。
- AI Provider lane 健康與可見性:約 88%GCP-A 仍待 repair本輪補足 degraded lane 顯示)。
- 完整 AI 自動化管理產品化:約 94.5%。
---
## 2026-05-25T174 Ollama manifest policy-order guard
**背景**