fix(auto-repair): 中低風險+無kubectl_command → TYPE-1 純資訊,不顯示審核按鈕
問題: HostHighCpuLoad 等主機層告警 affected_services=[] → OpenClaw 生成 kubectl unknown → safety guard 攔截 → 退回 READY + TYPE-3 帶按鈕卡片 用戶一直看到帶按鈕的中/低風險告警,按鈕無法修復任何東西 修復三處: 1. openclaw.py: _call_openclaw_analyze() 回傳 suggested_action 欄位 + target_resource 預設改為 "" (避免 "unknown" 進入 safety guard) 2. decision_manager.py: classify_notification() 傳入 suggested_action / risk_level / has_kubectl_command 3. telegram_gateway.py: classify_notification() 新規則 — 無 kubectl_command + risk=low/medium + action=investigate/no_action → TYPE-1 (純資訊,無按鈕) 搭配 clawbot-v5 f4b84d7 (OpenClaw prompt CRITICAL RULES) 一起生效 2026-04-14 Claude Sonnet 4.6 Asia/Taipei Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -367,7 +367,8 @@ class OpenClawService:
|
||||
"action": data.get("action_title", "AI 分析"),
|
||||
"description": data.get("description", ""),
|
||||
"kubectl_command": data.get("kubectl_command") or "",
|
||||
"target_resource": data.get("target_resource", "unknown"),
|
||||
"suggested_action": data.get("suggested_action", ""),
|
||||
"target_resource": data.get("target_resource") or "",
|
||||
"namespace": data.get("namespace", "awoooi-prod"),
|
||||
"risk_level": data.get("risk_level", "medium"),
|
||||
"reasoning": data.get("reasoning", ""),
|
||||
|
||||
Reference in New Issue
Block a user