docs(awooop): record t59 recurring alert links [skip ci]
This commit is contained in:
@@ -1,3 +1,45 @@
|
||||
## 2026-05-18 | T59 Recurring Alert Links on AwoooP Runs
|
||||
|
||||
**背景**:統帥追問 Telegram 告警卡片無法判斷「是不是一直重複發生」、「有沒有被 AI 自動化處理或修復」、「跑到哪個流程階段」。T58 已補 Source Dossier Coverage;本輪再補 recurrence / related-run 視圖,讓 Run 監控第一屏可直接看到同一 fingerprint / 目標資源的重複發生次數與最新 Run 狀態。
|
||||
|
||||
**修正**:
|
||||
- 新增 read-only `GET /api/v1/platform/events/dossier/recurrence`。
|
||||
- 從最近 N 筆 `awooop_conversation_event` 依 `fingerprint`,或 `provider + alertname + namespace + target_resource` 分組。
|
||||
- 每組回傳 occurrence、duplicate、source refs、Sentry / SignOz / alert refs、linked run count、latest run id/state/agent、run state counts、first/latest received time。
|
||||
- API 以 `LEFT JOIN awooop_run_state` 補最新 Run 狀態;provider filter 使用 typed param,避免 asyncpg optional-param 型別推斷問題。
|
||||
- Runs 頁新增「重複告警關聯」面板,顯示重複群組、重複事件、linked Runs、最新狀態,並可直接開啟最新 Run。
|
||||
- 補齊 zh-TW / en i18n 與 recurrence helper / fetch tests。
|
||||
|
||||
**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='sqlite+aiosqlite:///:memory:' pytest apps/api/tests/test_channel_event_dossier_service.py apps/api/tests/test_platform_router_order.py -q`:11 passed。
|
||||
- `ruff check --select F,E9` changed API/test files:pass。
|
||||
- `jq empty apps/web/messages/zh-TW.json apps/web/messages/en.json`:pass。
|
||||
- `pnpm --filter @awoooi/web 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 page;新增 recurrence 文案已走 i18n。
|
||||
- `NEXT_PUBLIC_API_URL=https://awoooi.wooo.work pnpm --filter @awoooi/web build`:pass with existing Sentry setup warnings。
|
||||
- `git diff --check`:pass。
|
||||
|
||||
**production verification**:
|
||||
- `94f8c68b feat(awooop): show recurring alert links` pushed to Gitea main。
|
||||
- Gitea `2329` Code Review success;Gitea `2328` CD tests / build-and-deploy / post-deploy-checks success。
|
||||
- Deploy marker:`41ed3c04 chore(cd): deploy 94f8c68 [skip ci]`。
|
||||
- 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`。
|
||||
- `source_event_total=20`、`recurrence_group_total=2`、`recurrent_group_total=2`、`duplicate_event_total=9`、`linked_run_total=20`、`unlinked_event_total=0`。
|
||||
- Top group:`DockerContainerUnhealthy` / `bitan-pharmacy-bitan-1`,`occurrence_total=18`、`duplicate_total=9`、`linked_run_total=18`、latest run state=`completed`。
|
||||
- Second group:`DockerContainerMemoryLimitPressure` / `node-exporter-110`,`occurrence_total=2`、latest run state=`completed`。
|
||||
- Provider filter:`provider=alertmanager&limit=20` → `200`,同樣回傳 2 組 recurrent groups。
|
||||
- Frontend smoke:`/zh-TW/awooop/runs?project_id=awoooi` 顯示 Run 監控、導航、重複告警關聯、`DockerContainerUnhealthy`、最新狀態「已完成」、以及「開啟 Run」;未出現 Application error。
|
||||
|
||||
**目前整體進度**:
|
||||
- AwoooP observability / truth-chain 可回看:約 96.5%。
|
||||
- 來源告警入庫、重複發生與 Sentry / SignOz 關聯可見性:約 95%。
|
||||
- Telegram callback detail/history 可追溯:約 96%。
|
||||
- AI 自動修復閉環:約 95%。
|
||||
- 前端 AI 自動化管理介面產品化:約 94%。
|
||||
- 完整 AI 自動化管理產品化:約 89%。
|
||||
|
||||
## 2026-05-18 | T58 Source Dossier Coverage on AwoooP Runs
|
||||
|
||||
**背景**:統帥指出 Telegram 告警截圖仍無法一眼判斷是否重複、是否完整入庫、是否連到 Sentry / SignOz 等相關工作日誌,以及是否已進入 AI 自動處理流程。T15c 已有單筆 Source Event Dossier,T57 已補 TG Callback Evidence;本輪補列表層 coverage,讓 Operator 在 Run 監控第一屏就能看到近期來源事件 truth-chain 覆蓋狀態。
|
||||
|
||||
Reference in New Issue
Block a user