comms: fix atlasbot node count matcher

This commit is contained in:
Brad Stein 2026-01-26 01:32:01 -03:00
parent 5f0bc3832d
commit 36f7de76e9
2 changed files with 6 additions and 4 deletions

View File

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

View File

@ -625,12 +625,14 @@ def sync_loop(token: str, room_id: str):
continue
lower_body = body.lower()
if re.search(r"\\bhow many nodes\\b|\\bnode count\\b|\\bnumber of nodes\\b", lower_body):
if re.search(r"\bhow many nodes\b|\bnode count\b|\bnumber of nodes\b", lower_body):
if any(word in lower_body for word in ("cluster", "atlas", "titan")):
summary = nodes_summary("Atlas")
if summary:
send_msg(token, rid, summary)
if not summary:
send_msg(token, rid, "I couldnt reach the cluster API to count nodes. Try again in a moment.")
continue
send_msg(token, rid, summary)
continue
# Only do live cluster/metrics introspection in DMs.
allow_tools = is_dm