diff --git a/apps/api/src/services/decision_manager.py b/apps/api/src/services/decision_manager.py index 319981b2..4ae43b85 100644 --- a/apps/api/src/services/decision_manager.py +++ b/apps/api/src/services/decision_manager.py @@ -232,6 +232,16 @@ 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-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 路徑 + if _notification_type == "TYPE-1": + _notif_type = NotificationType.TYPE_1 + elif _notification_type == "TYPE-4D": + _notif_type = NotificationType.TYPE_4_DRIFT + elif _notification_type == "TYPE-8M": + _notif_type = NotificationType.TYPE_8M + if _notif_type == NotificationType.TYPE_1: # 純資訊通知 — 無按鈕 tg_result = await gateway.send_info_notification(