fix(verification): align playbook and mcp evidence for canary alerts
This commit is contained in:
@@ -21,7 +21,6 @@ import pytest
|
||||
from src.plugins.mcp.interfaces import MCPTool, MCPToolProvider, MCPToolResult
|
||||
from src.services.mcp_tool_registry import (
|
||||
MCPToolRegistry,
|
||||
RegisteredTool,
|
||||
SensorDimension,
|
||||
_classify_tool,
|
||||
)
|
||||
@@ -267,6 +266,16 @@ class TestSuggestTools:
|
||||
assert "kubectl_describe" not in names
|
||||
assert "prometheus_query" in names
|
||||
|
||||
def test_custom_alert_with_deployment_label_gets_k8s_tool(self):
|
||||
registry = self._registry_with_tools()
|
||||
tools = registry.suggest_tools(
|
||||
alertname="AwoooPT16Canary",
|
||||
incident_labels={"deployment": "awoooi-auto-repair-canary", "namespace": "awoooi-prod"},
|
||||
)
|
||||
names = [t.tool.name for t in tools]
|
||||
assert "kubectl_describe" in names
|
||||
assert "prometheus_query" in names
|
||||
|
||||
def test_empty_alertname_gets_generic_only(self):
|
||||
registry = self._registry_with_tools()
|
||||
tools = registry.suggest_tools(alertname="")
|
||||
|
||||
Reference in New Issue
Block a user