docs: record auto repair mcp grant closure [skip ci]
This commit is contained in:
@@ -1,3 +1,30 @@
|
||||
## 2026-06-01|production auto_repair_executor MCP write grant 補套
|
||||
|
||||
**背景**:
|
||||
|
||||
- `/api/v1/ai/slo?force_refresh=true` 仍顯示 `auto_execute_success_rate=45/54=83.3%`,低於 `85%` 門檻。
|
||||
- live DB 盤點確認 7 日內 9 筆失敗分兩群:`PB-20260420-3F9C4C` Docker healthcheck legacy SSH restart 失敗 5 筆、`PB-20260416-79EB94` StockWoooWorkDown 舊 K3s node target 失敗 4 筆。
|
||||
- 程式碼已在 `2faa167e` 加入安全 `ssh_docker_restart/write` MCP route,但 production DB 查不到 `auto_repair_executor` 的 write grant,代表治理合約 migration 未落地。
|
||||
|
||||
**本次處置**:
|
||||
|
||||
- 套用 `apps/api/migrations/awooop_awoooi_mcp_auto_repair_executor_docker_restart_2026-06-01.sql`。
|
||||
- `awoooi_migrator` 受限於 `permission denied for table awooop_contract_revisions`,改用 production app owner fallback 套同一份可回滾 migration。
|
||||
- migration 結果:`active_contract_rows=1`、`tool_rows=1`、`grant_rows=1`。
|
||||
|
||||
**Live 驗證**:
|
||||
|
||||
- RLS context `app.project_id=awoooi` 下可見 active revision:`auto_repair_executor v1.1 active`。
|
||||
- `awooop_mcp_grants` 可見 `auto_repair_executor` 已取得 `ssh_docker_restart` / `["write"]`,`is_revoked=false`,tool `is_active=true`。
|
||||
- production API pod read-only smoke:legacy `ssh {host} 'docker inspect {container} ... && docker restart {container}'` 可正規化為 `ssh_docker_restart/write`,參數 `host=192.168.0.110`、`container_name=minio`、`trust_score=0.85`。
|
||||
- migration 後尚無新的 `auto_repair_executions`,因此沒有引入新的失敗列。
|
||||
|
||||
**進度邊界**:
|
||||
|
||||
- 整體 AI 自動化飛輪進度仍維持 `61%`。
|
||||
- 本輪封住後續 DockerContainerUnhealthy 同型 executor gap,但不竄改歷史 SLO;`auto_execute_success_rate` 需靠新成功樣本或舊失敗滾出 7 日窗才會回綠。
|
||||
- 技術債:`awoooi_migrator` 對 `awooop_contract_revisions` / MCP contract tables 權限不足,後續要補 migration role grant,避免再次依賴 app owner fallback。
|
||||
|
||||
## 2026-06-01|IwoooS 首屏深度地圖與證據語義校正
|
||||
|
||||
**背景**:
|
||||
|
||||
Reference in New Issue
Block a user