diff --git a/apps/api/src/services/decision_manager.py b/apps/api/src/services/decision_manager.py index 1d1d99495..5917de298 100644 --- a/apps/api/src/services/decision_manager.py +++ b/apps/api/src/services/decision_manager.py @@ -263,6 +263,15 @@ async def _push_decision_to_telegram( _notification_type = getattr(incident, "notification_type", "") or (_notif_type.value if _notif_type else "") _alertname = incident.signals[0].labels.get("alertname", "MetaSystemAlert") if incident.signals else "MetaSystemAlert" + # 2026-04-16 ogt + Claude Sonnet 4.6: YAML NO_ACTION → TYPE-1(資訊通知,無按鈕) + # 根因:YAML 規則標記 NO_ACTION(如 host_resource/postgresql_disk_monitoring) + # 但 classify_notification() 不知道 NO_ACTION → 判為 TYPE-4(confidence 不足) + # → SRE 看到審核按鈕卻沒有任何可執行動作,完全無意義 + # 修復:偵測 blocked_reason 含 "NO_ACTION" → 強制 TYPE-1(純資訊,告知 SRE 即可) + _blocked_reason = proposal_data.get("blocked_reason", "") + if "NO_ACTION" in _blocked_reason: + _notif_type = NotificationType.TYPE_1 + # 2026-04-12 ogt: classify_alert_early() 設的 notification_type 優先於 classify_notification() # 場景:backup/info 告警被 classify_notification() 誤判為 TYPE-3(confidence=0, 無 auto_executed) # 規則:incident.notification_type 明確為 TYPE-1 → 強制走 info 路徑