fix(agent99): expose verified recovery lifecycle

This commit is contained in:
ogt
2026-07-11 20:19:21 +08:00
parent 244bad7259
commit 0a671bd46a
6 changed files with 203 additions and 33 deletions

View File

@@ -1,6 +1,6 @@
# Agent99 全域 AI 自動化主計畫
> 建立時間2026-07-10 15:05 CST最近更新2026-07-11 17:40 CST
> 建立時間2026-07-10 15:05 CST最近更新2026-07-11 20:14 CST
> 狀態P0 執行中,尚未達成全域 AI 自動化
> 機器可讀總帳:`docs/operations/agent99-enterprise-ai-automation-work-items.snapshot.json`
> 歷史需求來源:`docs/workplans/2026-07-02-commander-inserted-requirements-priority-ledger.md`
@@ -97,13 +97,13 @@
## 5. 更新後的唯一執行順序
2026-07-11 事故優先序覆寫後,機器可讀執行順序固定為:`AG99-P0-007 → P0-008 → P0-009 → P0-010 → P0-003 → P0-004 → P0-005 → P0-006 → P0-011 → P0-012 → P0-013 → P0-014`。下表的數字是穩定 work-item ID不再被誤當目前執行順位`next_execution_order` 才是 runtime projection 的唯一順位來源,且必須包含每個未完成 P0 恰好一次。
2026-07-11 20:14 live audit 重新校正後,機器可讀執行順序固定為:`AG99-P0-001 → P0-006 → P0-003 → P0-004 → P0-005 → P0-007 → P0-008 → P0-009 → P0-013 → P0-012 → P0-014 → P0-010 → P0-011`。先關閉 Agent99 假綠與看不見的執行結果,再擴充 ingress、evidence/candidate、verifier 與各 domain 自動化。下表的數字是穩定 work-item ID不再被誤當目前執行順位`next_execution_order` 才是 runtime projection 的唯一順位來源,且必須包含每個未完成 P0 恰好一次。
### Wave 0先修正 AI 決策真相
| 順序 | ID | 工作 | 狀態 | 驗收 |
| --- | --- | --- | --- | --- |
| 1 | AG99-P0-001 | 修正 `exitCode=0 => resolved` 假綠,對齊 99 runtime script 與 Gitea source SHA | **完成** | Production 99 outcome self-test 通過runtime manifest `7/7` matched、drift `0`operator replay 為 verified resolvedalert replay 缺 source-event resolved 時維持 verifying |
| 1 | AG99-P0-001 | 修正 `exitCode=0 => resolved`、evidence parse 假綠,對齊 99 runtime script 與 source SHA | **重新開啟current P0** | Production 99 outcome self-test 通過required evidence 必須 fresh 且可解析Recover 必須有 sent 或明確 suppressed receiptruntime manifest matched、drift `0` |
| 2 | AG99-P0-002 | 修正 alert taxonomy、wrong-domain routing、bridge-before-grouping、actionable Telegram card 漏接與重複事件 | **完成99 runtime `34e32f6e`、14/14 matched** | Alertmanager、AI card、ACTION REQUIRED、CI/CD failure 共用 dispatcher`suggestedMode`/kind 優先5 分鐘先 group同 fingerprint 只建立一個 active incident保留 acceptance receipt |
| 3 | AG99-P0-003 | 強化 ingressrelay token 必填、Telegram chat+sender allowlist、idempotency/single consumer | 待辦 | 未認證 LAN request 拒絕producer `auto_repair`/policy 被保留;所有 request 可追 trace |
| 4 | AG99-P0-004 | 新增 EvidenceCollect / RepairCandidate / MCP lane | 待辦 | 缺 evidence 的事件會建立可查 candidate不再錯送 Perf/AwoooRepair`INC-*` 可從收件追到 candidate |
@@ -113,8 +113,8 @@
| 順序 | ID | 工作 | 狀態 | 驗收 |
| --- | --- | --- | --- | --- |
| 5 | AG99-P0-005 | 模式專屬 verifier、真 rollback、cooldown/circuit-breaker | 待辦 | Recover/Perf/LoadShed/Harbor/AWOOOI/backup/provider 各有 post-condition失敗不寫成功 cooldown |
| 6 | AG99-P0-006 | Agent99 → AWOOOI/AwoooP/IWOOOS completion callback | 待辦 | incident/Run/Work Item/Verifier/recurrence 同一 trace 收斂Telegram 可讀回報只從結果物件產生 |
| 7 | AG99-P0-007 | 全主機 10 分鐘 reboot state machine | **進行中current P0;本輪 breach 後已 late recoveryL1/L2 runtime 已整合L0/600 秒重測待完成** | L0 off-LAN detection/OOB power、L1 Agent99/VMware、L2 110 full-SOP 必須以同一 incident 閉環;首可用/全綠時間與 blocker/ETA 可查 |
| 6 | AG99-P0-006 | Agent99 → AWOOOI/AwoooP/IWOOOS completion callback | **進行中;先關閉 Recover 可見生命週期 receipt** | incident/Run/Work Item/Verifier/recurrence 同一 trace 收斂Telegram 可讀回報只從結果物件產生 |
| 7 | AG99-P0-007 | 全主機 10 分鐘 reboot state machine | **進行中;本輪 breach 後已 late recoveryL1/L2 runtime 已整合L0/600 秒重測待完成** | L0 off-LAN detection/OOB power、L1 Agent99/VMware、L2 110 full-SOP 必須以同一 incident 閉環;首可用/全綠時間與 blocker/ETA 可查 |
| 8 | AG99-P0-008 | 99 VMware/VMX/autostart/lock 與 Windows Update no-auto-reboot | **本次 boot runtime greencontrolled apply/rollback/verifier 完成,待下次 reboot 驗證 startup 時序** | 110/188/112/120/121 VMX、autostart task、guest running 與 no-auto-reboot verifier green111 由實體 Mac readback 驗證 |
### Wave 2擴至所有產品與運維面
@@ -191,7 +191,14 @@
- Windows 99 runtime 已部署 `442b319bb80e009291ced7afa4f704cbe3b64886`manifest `14/14`、mismatch `0`、task `9/9`、SRE relay listening、Startup-Recovery `PT20M`。VMware controlled receipt `windows99-vmware-autostart-apply-20260711-173505.json` 回報 pre/post VMX process `5/5`、五 guests running、process-aware duplicate-start guard true、沒有 reboot/VM power change/secret read。
- 110 artifact `/home/wooo/reboot-recovery/reboot-auto-recovery-slo-20260711-172623` 顯示七主機 reachable、service/data/freshness/backup/188 hygiene/edge/VMware 全綠;只保留本輪時間窗三個 blocker。production-principal `agent99-Recover-20260711-173543.json``10.3s` 完成 service recovery、coordinator verified`rebootSloClaimed=false`
- 全部 23 個 public surfaces 已從 110 驗證為預期 2xx/3xxSignOz bridge 也已受控恢復。這證明「目前已恢復」與「Agent99 已整合 full SOP」不證明下一次全主機重啟會在 600 秒內完成。
- L0 external supervisor、可驗證 OOB power 與外部 maintenance origin 仍只到 source contract未有 production runtime receipt。current P0 因此`AG99-P0-007`;下一次 drill 只有在 L0/L1/L2 使用同一 incident 且 600 秒內 blocker=0 才能 terminal complete。
- L0 external supervisor、可驗證 OOB power 與外部 maintenance origin 仍只到 source contract未有 production runtime receipt。17:40 當時的 current P0 因此是 `AG99-P0-007`;下一次 drill 只有在 L0/L1/L2 使用同一 incident 且 600 秒內 blocker=0 才能 terminal complete。
### 2026-07-11 20:14 Agent99 可見閉環 live audit
- Windows 99 runtime revision `d8c7a81a2a03e72f61116212354657f5e38e00a2``14/14` matched九個必要排程皆 healthy、relay listener=1、五台 VMware guests 與五台服務主機皆可達Harbor/AWOOOI/五個 public checks 與 backup health 皆綠。Agent99 並非完全沒有工作。
- 最新 production-principal Recover 在 10.9 秒內完成 service recovery七個 phase 與 full-SOP coordinator verifier 都有 evidence`telegramAttemptCount=0`,所以 operator 看不到「Agent99 做了什麼、是否完成」。
- 同一 preflight 對最新 SRE/Telegram inbox safe summary 顯示 `RuntimeException`,卻仍因檔案時間新而回傳綠燈。這是明確 false-green regression不可用更多 dashboard 掩蓋。
- current P0 因此重新定位為 `AG99-P0-001`,第二順位是 `AG99-P0-006`:先把 required evidence 改成 fresh + parseable、Recover 成功事件形成繁中生命週期卡與 phase timeline、dedupe 也留下 receipt驗證後才回到 secure ingress、candidate、verifier 與 reboot/各 domain 主線。
## 7. 工作項強制欄位與治理
@@ -208,4 +215,4 @@
## 8. 立即下一步
目前唯一 P0 `AG99-P0-007`不另拆支線。L1 Agent99/VMware 與 L2 110 full-SOP 已有 runtime receipts下一步只收斂剩餘 L0把 external supervisor 部署到 99/110/188/LAN 之外,接上可驗證 OOB power、外部 maintenance、durable incident 與 Agent99 resume callback再用同一 incident 做 600 秒 E2E 重測。之後依序前進`P0-008 → P0-009 → P0-010 → P0-003 → P0-004 → P0-005 → P0-006 → P0-011 → P0-012 → P0-013 → P0-014`。main push 只在唯一 writer slot 進行;沒有 slot 時保留 local commit不讓推送協調打斷 runtime 主線。
目前唯一 P0 是 `AG99-P0-001`。立即動作是把 parse-aware preflight、Recover 生命週期卡、phase timeline 與 dedupe receipt 原子部署到 99再由 production principal 跑一次 Recover只有 runtime manifest matched、preflight parse-clean、Telegram sent 或 dedupe-suppressed receipt 明確存在才前進。後續固定依序`P0-006 → P0-003 → P0-004 → P0-005 → P0-007 → P0-008 → P0-009 → P0-013 → P0-012 → P0-014 → P0-010 → P0-011`。main push 只在唯一 writer slot 進行;沒有 slot 時保留 local commit不讓推送協調打斷 runtime 主線。