Stop repeated volume decisions in Holmes
Homelab Main / validate (push) Failing after 1m53s Details
Homelab Main / running-update (push) Has been skipped Details
Homelab Main / debian-ops (push) Has been skipped Details

This commit is contained in:
juvenal.diaz 2026-11-14 23:52:04 -06:00
parent 7c88b42c61
commit 15f662a279
1 changed files with 4 additions and 0 deletions

View File

@ -178,6 +178,10 @@ def complete(request, bash_mode):
"Otherwise state what evidence is missing. Do not repeat the PVC or PV lookup."}]
retried = translate(query_ollama(retry), request["tools"])
print("resource_decision_retry", "tool_call=" + str(bool(retried["choices"][0]["message"].get("tool_calls"))), flush=True)
if same_as_last_call(retried["choices"][0]["message"], messages):
retried["choices"][0]["message"] = {"role": "assistant", "content":
"JEANNIE_STOP_REPEATED_TOOL_CALL: Holmes repeated the preceding command; investigation is incomplete."}
retried["choices"][0]["finish_reason"] = "stop"
return retried
next_check = ("The PVC was already inspected. Check the bound PV by its actual PV name; use kubectl get pv, not get pvc. "
if re.search(r"\bget\s+(?:pvc|persistentvolumeclaim)\b", previous) else