Your Name
2c57b71db9
CD Pipeline / build-and-deploy (push) Successful in 10m45s
feat(wave5-p2): GovernanceAgent 4 項自檢 + Ollama 健康告警規則 + Prometheus metrics 整合
MASTER plan_complete_v3.md Wave 5 P2.2 + P2.3 完成(multiple engineers 在限額前完成代碼,補 commit):
P2.2 — GovernanceAgent 4 項自檢:
- governance_agent.py (342 行) — 每 1 小時自檢循環:
· trust_drift(信任度漂移檢測)
· knowledge_degradation(知識退化檢測)
· llm_hallucination(LLM 幻覺檢測)
· execution_blast_radius(執行爆炸半徑檢測)
- main.py lifespan: asyncio.create_task(run_governance_loop()) 啟動
try/except 包裹,schedule 失敗不阻斷主流程
- failover_alerter.py: alert_governance(event_type, payload) 1h dedup
四類事件 → Telegram MarkdownV2 告警
P2.3 — Ollama 健康規則 + Prometheus Metrics:
- ops/monitoring/ollama_health_rules.yaml (148 行):
· OllamaHealthDegraded / OllamaPrimaryDown
· OllamaFailoverTriggered / GeminiQuotaExceeded
· 補 Prometheus 取資料的 alert rules
- core/metrics.py (57 行):
· GEMINI_DAILY_CALL_COUNT / GEMINI_DAILY_QUOTA Gauge
· OLLAMA_FAILOVER_TRIGGERED_TOTAL Counter
· OLLAMA_CURRENT_PRIMARY_IS_OLLAMA Gauge
- ollama_failover_manager.py:
· _check_gemini_quota: 每次 check 同步更新 Gauge(讓 Prometheus 取最新值)
· select_provider: failover 時 inc Counter + 切 Primary Gauge
· try/except 包裹,metric 失敗不阻斷主路由
E2E 測試:
- test_failover_e2e_dispatch.py (365 行)
完整 dispatch 路徑:health check → failover decide → alerter → metrics
Tests: 54 passed (e2e_dispatch + failover_manager + failover_alerter)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Multiple Engineers (上 session Wave 5) <noreply@anthropic.com>
2026-04-26 20:56:19 +08:00
..
2026-04-25 03:29:38 +08:00
2026-04-26 20:19:46 +08:00
2026-03-26 16:06:20 +08:00
2026-04-25 02:33:43 +08:00
2026-04-05 14:45:02 +08:00
2026-03-31 16:25:00 +08:00
2026-04-10 11:22:57 +08:00
2026-04-06 11:49:24 +08:00
2026-04-26 20:39:53 +08:00
2026-04-22 01:33:30 +08:00
2026-04-20 04:13:02 +08:00
2026-04-22 01:41:34 +08:00
2026-04-20 19:40:01 +08:00
2026-04-20 19:40:01 +08:00
2026-04-14 14:39:14 +08:00
2026-04-14 15:10:10 +08:00
2026-04-25 00:14:07 +08:00
2026-03-29 15:27:49 +08:00
2026-04-14 14:39:14 +08:00
2026-03-29 15:27:49 +08:00
2026-04-08 18:17:48 +08:00
2026-04-14 20:43:40 +08:00
2026-03-29 15:48:03 +08:00
2026-04-12 22:50:20 +08:00
2026-04-11 22:05:52 +08:00
2026-04-26 20:28:29 +08:00
2026-04-26 20:56:19 +08:00
2026-03-31 12:16:54 +08:00
2026-04-15 12:44:53 +08:00
2026-04-14 18:43:29 +08:00
2026-04-11 21:33:19 +08:00
2026-04-26 20:17:17 +08:00
2026-04-01 11:11:50 +08:00
2026-04-07 11:17:40 +08:00
2026-03-31 16:16:16 +08:00
2026-04-26 20:44:19 +08:00
2026-03-31 12:20:29 +08:00
2026-04-26 20:18:33 +08:00
2026-03-26 16:06:20 +08:00
2026-04-15 13:08:38 +08:00
2026-04-12 13:32:42 +08:00
2026-03-29 20:49:23 +08:00
2026-04-03 14:00:21 +08:00
2026-04-26 20:18:33 +08:00
2026-04-26 20:52:11 +08:00
2026-04-26 20:18:33 +08:00
2026-04-16 00:13:00 +08:00
2026-04-09 08:55:21 +08:00
2026-04-05 00:14:50 +08:00
2026-04-05 00:14:50 +08:00
2026-03-26 16:06:20 +08:00
2026-04-14 15:19:54 +08:00
2026-04-15 13:08:38 +08:00
2026-04-15 13:08:38 +08:00
2026-03-31 14:17:36 +08:00
2026-03-29 16:23:30 +08:00
2026-03-23 23:51:37 +08:00
2026-04-14 14:39:14 +08:00
2026-04-15 13:08:38 +08:00
2026-04-20 04:23:09 +08:00
2026-04-09 09:01:59 +08:00
2026-04-10 01:12:00 +08:00
2026-04-26 20:48:51 +08:00
2026-04-12 21:08:48 +08:00
2026-04-12 21:20:16 +08:00
2026-03-31 16:16:16 +08:00
2026-04-22 01:27:39 +08:00