atlasbot: catch node-3 hallucinations

This commit is contained in:
Brad Stein 2026-02-03 03:04:50 -03:00
parent 68fbacf935
commit b4cff2e359

View File

@ -1571,7 +1571,7 @@ def _allowed_namespaces(summary: dict[str, Any]) -> list[str]:
def _find_unknown_nodes(reply: str, allowed: list[str]) -> list[str]:
if not reply or not allowed:
return []
pattern = re.compile(r"\b(titan-[0-9a-z]+|node\d+)\b", re.IGNORECASE)
pattern = re.compile(r"\b(titan-[0-9a-z]+|node-?\d+)\b", re.IGNORECASE)
found = {m.group(1) for m in pattern.finditer(reply)}
if not found:
return []