docs(governance): record km healthcheck backlog rollout [skip ci]
This commit is contained in:
@@ -23,6 +23,10 @@ node JSON parse zh-TW/en
|
||||
-> json ok
|
||||
pytest apps/api/tests/test_governance_dispatcher.py apps/api/tests/test_ai_governance_endpoints.py apps/api/tests/test_governance_agent.py -q
|
||||
-> 64 passed
|
||||
pytest apps/api/tests/test_governance_dispatcher.py -q
|
||||
-> 18 passed
|
||||
pytest apps/api/tests/test_governance_agent.py apps/api/tests/test_governance_dispatcher.py apps/api/tests/test_ai_governance_endpoints.py -q
|
||||
-> 66 passed
|
||||
ruff F/E9 selected files
|
||||
-> All checks passed
|
||||
pnpm --filter @awoooi/web typecheck
|
||||
@@ -33,21 +37,82 @@ git diff --check
|
||||
-> pass
|
||||
```
|
||||
|
||||
**Production deploy / smoke(完成)**:
|
||||
|
||||
```text
|
||||
Code commits:
|
||||
c99be252 feat(governance): surface km healthcheck dispatch
|
||||
b85ab70c fix(governance): intake km healthcheck dispatches
|
||||
2f68b3f4 fix(governance): drain km healthcheck backlog
|
||||
|
||||
Deploy markers:
|
||||
aee0a700 chore(cd): deploy c99be25 [skip ci]
|
||||
271aadce chore(cd): deploy b85ab70 [skip ci]
|
||||
9e9b3068 chore(cd): deploy 2f68b3f [skip ci]
|
||||
|
||||
Gitea Actions:
|
||||
2483 Code Review -> success
|
||||
2484 Type Sync -> success
|
||||
2482 CD -> success
|
||||
2491 Code Review -> success
|
||||
2490 CD -> success
|
||||
2495 Code Review -> success
|
||||
2494 CD -> success
|
||||
tests 3126 -> success
|
||||
build-and-deploy 3127 -> success
|
||||
post-deploy-checks 3128 -> success
|
||||
|
||||
K8s image:
|
||||
awoooi-api / awoooi-web -> 192.168.0.110:5000/awoooi/*:2f68b3f4722d0dd27f7bff74ed38bcb8fd58c03e
|
||||
|
||||
GET https://awoooi.wooo.work/api/v1/health
|
||||
-> healthy, prod, mock_mode=false
|
||||
|
||||
GET /api/v1/ai/governance/queue?dispatch_status=all&event_type=knowledge_degradation&size=30
|
||||
-> total=13, table_pending=false
|
||||
-> dispatch_status=pending
|
||||
-> executor_type=hermes_kb_growth_healthcheck
|
||||
-> next_action=run_kb_growth_healthcheck
|
||||
-> workflow_stage=queued_kb_healthcheck
|
||||
-> lead_agent=Hermes(新 payload);legacy payload 仍可能缺 ownership,但 dispatch context 已存在
|
||||
|
||||
Production Work Items Playwright smoke:
|
||||
-> hasTitle=true
|
||||
-> hasKmPanel=true
|
||||
-> hasKmWorkItem=true
|
||||
-> hasQueuedStage=true
|
||||
-> hasHermes=true
|
||||
-> hasBacklogTotal=true
|
||||
-> hasNav=true
|
||||
-> hasCriticalError=false
|
||||
-> consoleErrors=[]
|
||||
|
||||
Post-deploy evidence:
|
||||
-> Alert Chain Metric 最後告警成功: 4 分鐘前
|
||||
-> Alertmanager / SignOz / Sentry webhook HTTP 200
|
||||
-> SigNoz HTTP 200
|
||||
-> OTEL Collector 2 Pod(s) Running
|
||||
-> Event Exporter 1 Pod(s) Running
|
||||
-> Monitoring coverage 100% >= 70%
|
||||
-> CI/CD success notification mirrored through AWOOI API
|
||||
```
|
||||
|
||||
**已知技術債**:
|
||||
|
||||
- 全專案 `next lint` 仍會被既有舊頁面攔住,包含 `src/app/[locale]/demo/page.tsx` 的 hook rule error 與多個 legacy i18n warning;T88 目標檔案的 targeted lint 已通過。
|
||||
- T88 目前只建立「派工 / skipped / owner review」可追蹤鏈,不自動寫入 KM。真正 `draft_km_updates` / `km_writeback_after_approval` 仍需後續 Hermes KB growth worker 消費 dispatch row 後推進狀態。
|
||||
- 第一版 production smoke 抓到 9 筆 unresolved `knowledge_degradation` 事件但 dispatch total=0;本段已補 intake dispatch,下一次部署後 dispatcher 會對既有 unresolved 事件補建工作項。
|
||||
- 第一版 production smoke 抓到 unresolved `knowledge_degradation` 事件但 dispatch total=0;本段已補 intake dispatch 與 backlog drain,部署後 queue 已擴到 total=13。
|
||||
- `/api/v1/ai/governance/events` 目前仍回傳 `dispatch_ids=[]`,即使 queue 已有 dispatch rows;下一段需要把事件 detail/history endpoint 改成 join dispatch table,否則「詳情 / 歷史」仍會比 Work Items 少一段鏈路。
|
||||
|
||||
**目前整體進度**:
|
||||
|
||||
- AwoooP 告警可觀測鏈:約 98.5%。
|
||||
- AwoooP 告警可觀測鏈:約 98.7%。
|
||||
- 低風險自動修復閉環:約 95%。
|
||||
- 前端 AI 自動化管理介面同步:約 94.5%。
|
||||
- 治理告警可讀性 / 可處置性:約 94%。
|
||||
- AI Agent ownership 可追溯性:約 92%。
|
||||
- KM healthcheck 派工可追蹤性:約 72%。
|
||||
- 完整 AI 自動化管理產品化:約 91.8%。
|
||||
- 前端 AI 自動化管理介面同步:約 95%。
|
||||
- 治理告警可讀性 / 可處置性:約 95%。
|
||||
- AI Agent ownership 可追溯性:約 94%。
|
||||
- KM healthcheck 派工可追蹤性:約 88%。
|
||||
- 完整 AI 自動化管理產品化:約 92.4%。
|
||||
|
||||
## 2026-05-19|T87 KM 劣化治理告警 Agent ownership 可視化
|
||||
|
||||
|
||||
@@ -2296,11 +2296,13 @@ Phase 6 完成後
|
||||
- 觸發:`knowledge_degradation` 告警已能說明 stale KM 與 Hermes / OpenClaw / ElephantAlpha ownership,但 `run_kb_growth_healthcheck` 仍缺 DB 派工狀態與前端可見階段,Operator 無法確認 AI 是否已判斷、為何跳過、是否等待 owner。
|
||||
- 修正:`governance_remediation_dispatch` read model 顯示 lightweight decision context:`executor_type`、`decision_path`、`workflow_stage`、`workflow_steps`、`next_action`、`lead_agent`、`support_agents`、`human_owner`;`/ai/governance/queue` 支援 `dispatch_status=all` + `event_type=knowledge_degradation`。
|
||||
- Dispatcher:`decision_path=skip` 不再只落在 log,會留下 terminal `skipped` dispatch trail;skip 不等於 resolved,只代表目前不能自動派遣,讓 AwoooP 可顯示人工接手點。
|
||||
- Intake:`GovernanceAgent` 建立 `knowledge_degradation` event 時同步建立 non-executing `hermes_kb_growth_healthcheck` pending dispatch;`GovernanceDispatcher` 也會對既有 unresolved `run_kb_growth_healthcheck` 事件補建 intake dispatch,避免告警進 DB 但 Work Items 沒有可追蹤工作項。
|
||||
- Intake:`GovernanceAgent` 建立 `knowledge_degradation` event 時同步建立 non-executing `hermes_kb_growth_healthcheck` pending dispatch;`GovernanceDispatcher` 也會對既有 unresolved `run_kb_growth_healthcheck` 事件補建 intake dispatch,避免告警進 DB 但 Work Items 沒有可追蹤工作項。第二段 hotfix 另修正 legacy skip cooldown 與 poll starvation:KM healthcheck intake 不再被舊 skip cooldown 擋住,poll SQL 會排除已有 active dispatch 的事件,避免舊 backlog 卡住後續事件。
|
||||
- KM workflow metadata:`run_kb_growth_healthcheck` 對齊 `detected → ai_analyzed → queued_kb_healthcheck → draft_km_updates → waiting_owner_review → km_writeback_after_approval → stale_ratio_recheck`。此鏈路明確標記 `writes_km_without_approval=false`,避免 AI 自動固化錯誤知識。
|
||||
- UI:`/awooop/work-items` 新增 T88「KM 健康檢查派工」面板,顯示 dispatch status、stage、next action、Hermes 主責、OpenClaw / ElephantAlpha 支援與 KM owner 人工覆核。
|
||||
- Production:`c99be252`、`b85ab70c`、`2f68b3f4` 已推 Gitea main;deploy markers `aee0a700`、`271aadce`、`9e9b3068`;CD runs `2482`、`2490`、`2494` 全 success。Production `GET /api/v1/ai/governance/queue?dispatch_status=all&event_type=knowledge_degradation&size=30` 回 `total=13`、`table_pending=false`、`executor_type=hermes_kb_growth_healthcheck`、`workflow_stage=queued_kb_healthcheck`,Work Items Playwright smoke 顯示 KM 面板 / Hermes / backlog total / nav 均正常且無 console error。
|
||||
- 邊界:T88 完成派工 / skipped / owner review 可追蹤性,不代表 Hermes KB growth worker 已能自動產生 KM 草稿,也不代表 stale ratio 已下降;後續需由 worker 消費 dispatch row 並推進 executing / succeeded / failed。
|
||||
- 目前進度更新:治理告警可讀性 / 可處置性約 94%;AI Agent ownership 可追溯性約 92%;KM healthcheck 派工可追蹤性約 72%;完整 AI 自動化管理產品化約 91.8%。
|
||||
- 技術債:`/api/v1/ai/governance/events` 目前仍回 `dispatch_ids=[]`,即使 queue 已有 dispatch rows;下一段需把 event detail/history read model join dispatch table,補齊使用者在 Telegram「詳情 / 歷史」按鈕看到的鏈路。
|
||||
- 目前進度更新:治理告警可讀性 / 可處置性約 95%;AI Agent ownership 可追溯性約 94%;KM healthcheck 派工可追蹤性約 88%;完整 AI 自動化管理產品化約 92.4%。
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user