atlasbot: refine insight tone and status

This commit is contained in:
Brad Stein 2026-01-27 19:42:04 -03:00
parent 20364a262c
commit 18e543d95a
2 changed files with 7 additions and 2 deletions

View File

@ -16,7 +16,7 @@ spec:
labels:
app: atlasbot
annotations:
checksum/atlasbot-configmap: manual-atlasbot-67
checksum/atlasbot-configmap: manual-atlasbot-68
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

@ -118,7 +118,7 @@ CONFIDENCE_RE = re.compile(r"confidence\s*:\s*(high|medium|low)\b", re.IGNORECAS
OPERATION_HINTS = {
"count": ("how many", "count", "number", "total"),
"list": ("list", "which", "what are", "show", "names"),
"top": ("top", "hottest", "highest", "most", "largest", "max", "maximum"),
"top": ("top", "hottest", "highest", "most", "largest", "max", "maximum", "busiest", "busy"),
"status": ("ready", "not ready", "unready", "down", "missing", "status"),
}
@ -1414,6 +1414,11 @@ def structured_answer(
names = [node["name"] for node in filtered]
if op == "status":
if "missing" in q and ("ready" in q or "readiness" in q):
return _format_confidence(
"Not ready nodes: " + (", ".join(names) if names else "none") + ".",
"high",
)
if "missing" in q and expected_workers:
missing = sorted(set(expected_workers) - {n["name"] for n in inventory})
return _format_confidence(