fix: avoid hardware usage override for node queries

This commit is contained in:
Brad Stein 2026-02-02 11:41:31 -03:00
parent 789fbfa5f2
commit be1df4dcd0

View File

@ -614,8 +614,10 @@ class AnswerEngine:
if classify.get("question_type") in {"metric", "diagnostic"}:
lowered_q = f"{question} {normalized}".lower()
if any(tok in lowered_q for tok in ("hardware", "class", "type", "rpi", "jetson", "amd64", "arm64")) and any(
tok in lowered_q for tok in ("average", "avg", "mean", "ram", "memory", "cpu", "load")
if (
focus_entity != "node"
and any(tok in lowered_q for tok in ("hardware", "class", "type", "rpi", "jetson", "amd64", "arm64"))
and any(tok in lowered_q for tok in ("average", "avg", "mean", "per hardware", "by hardware", "typical"))
):
hw_top = None
for line in summary_lines: