Compare commits

...

2 Commits

2 changed files with 7 additions and 2 deletions

View File

@ -16,7 +16,7 @@ spec:
labels: labels:
app: atlasbot app: atlasbot
annotations: annotations:
checksum/atlasbot-configmap: manual-atlasbot-28 checksum/atlasbot-configmap: manual-atlasbot-29
vault.hashicorp.com/agent-inject: "true" vault.hashicorp.com/agent-inject: "true"
vault.hashicorp.com/role: "comms" vault.hashicorp.com/role: "comms"
vault.hashicorp.com/agent-inject-secret-turn-secret: "kv/data/atlas/comms/turn-shared-secret" vault.hashicorp.com/agent-inject-secret-turn-secret: "kv/data/atlas/comms/turn-shared-secret"

View File

@ -713,7 +713,12 @@ def structured_answer(prompt: str, *, inventory: list[dict[str, Any]], metrics_s
if scope_parts: if scope_parts:
scope = " ".join(scope_parts) scope = " ".join(scope_parts)
overall_note = "" overall_note = ""
base_res = vm_query(entry["exprs"][0], timeout=20) base_expr = entry["exprs"][0]
if inventory:
all_nodes = "|".join([n["name"] for n in inventory])
if all_nodes:
base_expr = _apply_node_filter(base_expr, all_nodes)
base_res = vm_query(base_expr, timeout=20)
base_node, base_val = _primary_series_metric(base_res) base_node, base_val = _primary_series_metric(base_res)
scoped_node, scoped_val = _primary_series_metric(res) scoped_node, scoped_val = _primary_series_metric(res)
if base_node and scoped_node and base_node != scoped_node: if base_node and scoped_node and base_node != scoped_node: