fix(decision): derive telegram dedup from incident signals
All checks were successful
CD Pipeline / tests (push) Successful in 58s
Code Review / ai-code-review (push) Successful in 10s
CD Pipeline / build-and-deploy (push) Successful in 3m30s
CD Pipeline / post-deploy-checks (push) Successful in 2m19s

This commit is contained in:
Your Name
2026-05-06 00:19:35 +08:00
parent 6e96623884
commit 5ed396e390
3 changed files with 60 additions and 2 deletions

View File

@@ -6,6 +6,15 @@
---
## 2026-05-06 | Decision Telegram dedup no longer reads missing Incident.title
**背景**:新 Ollama-first 部署後production log 顯示 alert diagnosis 已走 `ollama_gcp_a -> ollama_gcp_b -> ollama_local -> gemini``phase24_ai_router_used` provider=`ollama`,但 DecisionManager 推送 Telegram decision card 時出現 `telegram_decision_push_failed: 'Incident' object has no attribute 'title'`
**本次修補**
- 新增 `_incident_alertname_for_dedup()`Telegram fingerprint dedup 改從 `signal.labels.alertname -> signal.alert_name -> signal.annotations -> incident_id` 取值。
- `_push_decision_to_telegram()` 與 stale READY token resend 共用同一個 dedup helper避免兩條路徑再次漂移。
-`test_decision_manager_telegram_dedup.py`,鎖住 `Incident``title` 欄位時仍能產出 alertname fingerprint。
## 2026-05-05 | Alert diagnosis prioritizes resolution over speed
**背景**:統帥明確修正策略:告警不是為了快速發卡片,而是為了把問題想清楚並完成 AI 自動化解決GCP-A/GCP-B 有 SSD可承擔深度診斷等待時間Gemini 只能作 GCP-A → GCP-B → 111 全失敗後的備援。