docs(awooop): record t60 recurrence repair evidence [skip ci]
This commit is contained in:
@@ -1,3 +1,55 @@
|
||||
## 2026-05-18 | T60 Recurrence Repair / Work Item Evidence
|
||||
|
||||
**背景**:統帥追問 Telegram 告警與重複告警雖然進了 AwoooP,但仍看不出「是否真正 AI 自動修復」、「是否已進 work item / ticket」、「是否需要人工接手」。T59 已補 recurrence / linked run;本輪把 recurrence group 繼續接到 incident id、auto-repair execution、latest verifier evidence 與 work item 狀態,並修掉 API DTO 會把新欄位濾掉的 contract 缺口。
|
||||
|
||||
**修正**:
|
||||
- `GET /api/v1/platform/events/dossier/recurrence` 每組新增 `incident_ids`、`latest_incident_id`、`repair_summary`、`work_item`。
|
||||
- `repair_summary` 讀 `auto_repair_executions` 最新紀錄,並用 `incident_evidence.verification_result` 區分:
|
||||
- `auto_repair_verified`
|
||||
- `auto_repair_succeeded_unverified`
|
||||
- `auto_repair_failed`
|
||||
- `manual_gate`
|
||||
- `investigating`
|
||||
- `run_completed_no_repair`
|
||||
- `no_repair_record`
|
||||
- `work_item` 以 read-only contract 產生 `verification:{incident_id}:{auto_repair_id}` 或 `incident:{incident_id}`,讓前端能從 recurrence group 連到 Work Items。
|
||||
- Runs 頁「重複告警關聯」新增自動修復、待處理項、Incident、修復狀態與「開啟工作項」入口。
|
||||
- 補 zh-TW / en i18n。
|
||||
- 修正 `ChannelEventRecurrenceResponse` / item / summary response model,避免 Pydantic `response_model` 把 T60 欄位濾掉。
|
||||
- 補回歸測試,確保 response model 保留 `repair_summary` / `work_item`。
|
||||
|
||||
**local verification**:
|
||||
- `python3 -m py_compile apps/api/src/services/channel_event_dossier_service.py apps/api/src/api/v1/platform/events.py apps/api/tests/test_channel_event_dossier_service.py`:pass。
|
||||
- `DATABASE_URL=postgresql+asyncpg://awoooi:awoooi@localhost:5432/awoooi PYTHONPATH=apps/api pytest apps/api/tests/test_channel_event_dossier_service.py -q`:8 passed。
|
||||
- `DATABASE_URL=postgresql+asyncpg://awoooi:awoooi@localhost:5432/awoooi PYTHONPATH=apps/api ruff check --select F,E9,I ...`:pass。
|
||||
- `node -e "JSON.parse(...zh-TW.json); JSON.parse(...en.json)"`:pass。
|
||||
- `pnpm --dir apps/web run typecheck`:pass。
|
||||
- `pnpm --dir apps/web exec next lint --file src/app/[locale]/awooop/runs/page.tsx`:pass with existing literal-string warnings in legacy Runs page;T60 新增文案已走 i18n。
|
||||
- `NEXT_PUBLIC_API_URL=https://awoooi.wooo.work pnpm --dir apps/web run build`:pass with existing Sentry setup warnings。
|
||||
- `git diff --check`:pass。
|
||||
|
||||
**production verification**:
|
||||
- `7fa06731 feat(awooop): link recurring alerts to repair work` pushed to Gitea main。
|
||||
- 第一輪 Gitea `1797` Code Review success;`1796` CD success;deploy marker `e36c9b18 chore(cd): deploy 7fa0673 [skip ci]`。
|
||||
- 第一輪 prod smoke 發現 API 容器已有新 service code,但 route `response_model` 還是 T59 schema,導致 `repair_summary` / `work_item` 被 Pydantic 濾掉。
|
||||
- `4b8f9466 fix(awooop): preserve recurrence repair fields` pushed to Gitea main。
|
||||
- 第二輪 Gitea `1799` Code Review success;`1798` CD success;deploy marker `d321f44e chore(cd): deploy 4b8f946 [skip ci]`。
|
||||
- K8s image:API / Web 均為 `192.168.0.110:5000/awoooi/*:4b8f946699294063dd7dd3a69d5ff45f19e1d685`。
|
||||
- Health:`https://awoooi.wooo.work/api/v1/health` → `status=healthy`、`mock_mode=false`。
|
||||
- Recurrence API:`/api/v1/platform/events/dossier/recurrence?project_id=awoooi&limit=20` → `200`,且 `has_t60_summary=true`。
|
||||
- `source_event_total=20`、`recurrence_group_total=1`、`recurrent_group_total=1`、`duplicate_event_total=10`、`linked_run_total=20`、`unlinked_event_total=0`。
|
||||
- T60 summary:`auto_repair_linked_total=0`、`verified_repair_group_total=0`、`open_work_item_group_total=0`、`manual_gate_group_total=0`。
|
||||
- Top group:`DockerContainerUnhealthy` / `bitan-pharmacy-bitan-1`,latest incident=`INC-20260517-F25B4A`,repair status=`run_completed_no_repair`,auto repair total=`0`,work item status=`none`。
|
||||
- Frontend smoke:`/zh-TW/awooop/runs?project_id=awoooi` 顯示 Run 監控、導航、重複告警關聯、自動修復、待處理項、開啟工作項;未出現 Application error。
|
||||
|
||||
**目前整體進度**:
|
||||
- AwoooP observability / truth-chain 可回看:約 97%。
|
||||
- 來源告警入庫、重複發生、Sentry / SignOz 與修復結果可見性:約 96.5%。
|
||||
- Telegram callback detail/history 可追溯:約 96%。
|
||||
- AI 自動修復閉環:約 95.5%;本輪讓 live recurrent group 明確顯示 `run_completed_no_repair`,代表「可見性已補上」,但該類告警仍未能宣稱有 auto-repair execution。
|
||||
- 前端 AI 自動化管理介面產品化:約 95%。
|
||||
- 完整 AI 自動化管理產品化:約 90%。
|
||||
|
||||
## 2026-05-18 | T59 Recurring Alert Links on AwoooP Runs
|
||||
|
||||
**背景**:統帥追問 Telegram 告警卡片無法判斷「是不是一直重複發生」、「有沒有被 AI 自動化處理或修復」、「跑到哪個流程階段」。T58 已補 Source Dossier Coverage;本輪再補 recurrence / related-run 視圖,讓 Run 監控第一屏可直接看到同一 fingerprint / 目標資源的重複發生次數與最新 Run 狀態。
|
||||
|
||||
Reference in New Issue
Block a user