fix(verifier): recognize rollout success evidence
This commit is contained in:
@@ -235,10 +235,10 @@ def _classify_tool(tool: MCPTool, provider: MCPToolProvider) -> RegisteredTool:
|
||||
priority = 5
|
||||
|
||||
# D1 K8s 狀態
|
||||
if any(k in name for k in ("describe", "pod", "deployment", "node", "hpa", "event", "k8s_get")):
|
||||
if any(k in name for k in ("describe", "pod", "deployment", "node", "hpa", "event", "k8s_get", "rollout")):
|
||||
dims.append(SensorDimension.D1_K8S_STATE)
|
||||
hints = ["Kube", "Pod", "Deploy", "Node", "Velero", "ArgoCD"]
|
||||
priority = 2
|
||||
priority = 1 if "rollout" in name else 2
|
||||
|
||||
# D2 日誌(精確匹配:避免 "topology" 中的 "log" substring 誤觸)
|
||||
elif any(k in name for k in ("logs", "stderr", "journal")) or "_log" in name or name.startswith("log"):
|
||||
|
||||
@@ -464,7 +464,17 @@ def _assess_recovery(
|
||||
return "failed"
|
||||
|
||||
# 成功信號
|
||||
success_signals = ["running", "ready", "1/1", "2/2", "3/3", "healthy"]
|
||||
success_signals = [
|
||||
"running",
|
||||
"ready",
|
||||
"1/1",
|
||||
"2/2",
|
||||
"3/3",
|
||||
"healthy",
|
||||
"successfully rolled out",
|
||||
"'success': true",
|
||||
'"success": true',
|
||||
]
|
||||
if any(sig in post_str for sig in success_signals):
|
||||
# 但如果 pre_state 已經是 running,可能是無效操作
|
||||
if pre_str and any(sig in pre_str for sig in success_signals):
|
||||
|
||||
Reference in New Issue
Block a user