docs(logbook): record alerts operator flow rollout [skip ci]

This commit is contained in:
Your Name
2026-06-01 00:02:06 +08:00
parent c80aae3461
commit 2860bd2b4b

View File

@@ -1,3 +1,102 @@
## 2026-05-31Alerts 焦點告警補上處理狀態卡
**背景**
- 使用者指出 Telegram 告警雖然已能 deep link 到 Alerts 真相鏈,但前端仍要 operator 自己讀多段狀態無法第一眼判斷「是否重複、Telegram 是否回寫、AI 是否已處置、是否需要人工、Sentry / SigNoz 是否匹配」。
- 本輪不新增決策規則、不觸發修復、不寫入 DB只把既有 `status-chain` DB truth-chain 以 operator 可讀的四張狀態卡呈現在 Alerts 焦點告警區。
**本次調整**
- `apps/web/src/app/[locale]/alerts/page.tsx`
- 在 `FocusIncidentEvidencePanel` 新增 `告警處理狀態` 區塊。
- 四張卡直接讀 `source_refs` / `operator_outcome` / `source correlation`
- `重複 / 同指紋`:顯示最新入站是否重複、同 fingerprint 關聯 Incident 數。
- `Telegram 回寫`:顯示 channel、send status、message type、出站數與最新送出時間。
- `AI 處置判定`:顯示 AI summary、state、next step 與是否需要人工。
- `Sentry / SigNoz 匹配`:顯示 direct / candidate / applied 與未匹配原因。
- `apps/web/messages/zh-TW.json` / `apps/web/messages/en.json`
- 補齊繁中文案;`en.json` 維持繁中鏡像,避免前端 i18n 破裂。
**驗證**
```text
python3 -m json.tool apps/web/messages/zh-TW.json / en.json -> pass
cmp -s apps/web/messages/zh-TW.json apps/web/messages/en.json -> pass
git diff --check -> pass
pnpm --dir apps/web exec tsc --noEmit --tsBuildInfoFile /tmp/awoooi-alerts-operator-flow-20260531-r4.tsbuildinfo -> pass
NEXT_PUBLIC_API_URL=https://awoooi.wooo.work NEXT_PRIVATE_BUILD_WORKER_COUNT=1 pnpm --dir apps/web run build -> pass
```
**本機 / Production 瀏覽器檢查**
```text
local:
http://127.0.0.1:3108/zh-TW/alerts?project_id=awoooi&incident_id=INC-20260530-0DD83C&_v=operator-flow-local
hasFlow=true
cardCount=4
canScroll=true
horizontalOverflow=false
production:
https://awoooi.wooo.work/zh-TW/alerts?project_id=awoooi&incident_id=INC-20260530-0DD83C&_v=d40c4a9f
hasFlow=true
cardCount=4
canScroll=true
horizontalOverflow=false
repeat_state=同指紋重複,關聯 5 筆
telegram_state=telegram / sent出站 3
ai_state=已執行但驗證退化,需人工確認
source_state=provider_fresh_no_match / provider_heartbeat_present_but_no_incident_match
screenshot=/tmp/awoooi-alerts-operator-flow-cards-d40c4a9f.png
```
**Gitea / Production deploy**
```text
a73ccffb fix(web): surface alert operator flow state
code-review run 2343 -> success
cd run 2342 -> cancelled by newer main push d40c4a9f (workflow cancel-in-progress)
d40c4a9f feat(web): add IwoooS command map
includes a73ccffb
code-review run 2345 -> success
cd run 2344 -> success
c80aae34 chore(cd): deploy d40c4a9 [skip ci]
k8s latest:
awoooi-api image = 192.168.0.110:5000/awoooi/api:d40c4a9fdb680121181812394d0b0211d5d4818f
awoooi-web image = 192.168.0.110:5000/awoooi/web:d40c4a9fdb680121181812394d0b0211d5d4818f
awoooi-worker image = 192.168.0.110:5000/awoooi/api:d40c4a9fdb680121181812394d0b0211d5d4818f
awoooi-api/web/worker rollout = successfully rolled out
production status-chain sample:
incident_id=INC-20260530-0DD83C
current_stage=execution_succeeded
stage_status=success
verdict=auto_repaired_verification_degraded
repair_state=executed
verification=degraded
needs_human=true
next_step=manual_verify_or_repair
source_refs inbound_total=54 outbound_total=3
latest_outbound=telegram sent error
related_incidents=5
fingerprint=e4f823b8be3d604c92fc776009f09cde
```
**進度**
```text
Telegram/AwoooP/frontend truth-chain visibility: 95%
Frontend AI automation management UI: 97%
Sentry/SigNoz per-incident visibility: 92%
MCP / self-hosted MCP visibility: 97%
Ansible / PlayBook visibility: 90%
Overall AI automation flywheel: 81%
24h full AI Agent auto-repair production claim: 0% (尚未做 24h 無人工介入驗證,不宣稱達成)
```
## 2026-05-31IwoooS 資安工作地圖首層化
**背景**