fix(governance): intake km healthcheck dispatches
All checks were successful
Code Review / ai-code-review (push) Successful in 22s
CD Pipeline / tests (push) Successful in 6m3s
CD Pipeline / build-and-deploy (push) Successful in 4m26s
CD Pipeline / post-deploy-checks (push) Successful in 1m21s

This commit is contained in:
Your Name
2026-05-19 21:27:25 +08:00
parent aee0a70021
commit b85ab70c45
6 changed files with 256 additions and 3 deletions

View File

@@ -2296,6 +2296,7 @@ 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 trailskip 不等於 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 沒有可追蹤工作項。
- 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 人工覆核。
- 邊界T88 完成派工 / skipped / owner review 可追蹤性,不代表 Hermes KB growth worker 已能自動產生 KM 草稿,也不代表 stale ratio 已下降;後續需由 worker 消費 dispatch row 並推進 executing / succeeded / failed。