feat(governance): emit adr100 slo metrics
All checks were successful
Code Review / ai-code-review (push) Successful in 10s
CD Pipeline / tests (push) Successful in 1m0s
CD Pipeline / build-and-deploy (push) Successful in 3m21s
CD Pipeline / post-deploy-checks (push) Successful in 1m16s

This commit is contained in:
Your Name
2026-05-14 18:57:03 +08:00
parent 1670ff1960
commit 13cf02b740
7 changed files with 334 additions and 9 deletions

View File

@@ -2125,6 +2125,13 @@ Phase 6 完成後
- Production deploy`08d28dc4` 與 enum cast hotfix `6220f522` 已推 Gitea mainCode Review runs `2151` / `2153` successCD runs `2150` / `2152` success最新 deploy marker `9b32d3a9 chore(cd): deploy 6220f52 [skip ci]`API / Worker / Web image 均為 `6220f5226693330a378f363202bd79065ab7fc34``governance/events` 200、`governance/queue` 200 且 `table_pending=false``/zh-TW/awooop/work-items` 200。
- 目前進度更新Alertmanager 低風險自動修復主線約 96%;完整 AI 自動化管理產品化約 76%。下一段收斂 governance dispatcher skipped reason / leader-dedupe / ADR-100 SLO emitter並把治理 dispatch 階段完整呈現在 Operator Console。
**T18 ADR-100 SLO emitter 接入2026-05-14 台北)**
- 觸發:治理告警 `governance_slo_data_gap` 反覆推 Telegram但 production 查核顯示 API Pod 已有 `PROMETHEUS_MULTIPROC_DIR``emptyDir`,真正缺口是 `/metrics` 未輸出 ADR-100 recording rules 所需底層 series導致 `sli:*` 全部 empty result。
- 修正:新增 DB-derived `/metrics` emitter`automation_operation_log``incident_evidence``knowledge_entries``approval_records` 暴露 `automation_operation_log_total``post_execution_verification_total``knowledge_entries_total``approval_records_high_confidence_total``approval_records_high_confidence_success_total`;不新增 schema、不改 scrape target。
- 訊息治理:`GovernanceAgent` no-data hint 改為 emitter / recording rule / multiprocess mount 三段式,避免 Operator 被誤導成只有 `PROMETHEUS_MULTIPROC_DIR` 未設。
- 驗證:`py_compile` pass`pytest tests/test_adr100_slo_metrics_service.py tests/test_governance_agent.py tests/test_ai_governance_endpoints.py -q` 47 passedruff F/E9 passdiff check passproduction SQL dry-run 通過。
- 目前進度更新Alertmanager 低風險自動修復主線約 96%;完整 AI 自動化管理產品化約 78%。推版後需等 Prometheus scrape / recording rule evaluation再確認 `sli:*` 不再全空。
---
### 2026-04-20 晚 (台北) — C1-C4 全流程串接 — Playbook 鏈路保護commit de2d34d