diff --git a/scripts/jeannie-eventd b/scripts/jeannie-eventd index 325f3ef..ee46a88 100755 --- a/scripts/jeannie-eventd +++ b/scripts/jeannie-eventd @@ -199,6 +199,20 @@ def handle_payload(payload: dict[str, Any], *, apply: bool) -> dict[str, Any]: disk_command = disk_self_heal_command(payload, set(names)) api_command = api_self_heal_command(set(names)) direct_command = disk_command or api_command + # Disk alerts are deliberately target-specific. Do not fall through to + # the generic doctor/heal planner when the alert does not identify a + # Pimox node that Jeannie can clean safely. A generic heal action could + # clean stale pods while leaving the actual filesystem pressure untouched + # and would produce a misleading "applied" result. + if set(names) & DISK_SELF_HEAL_ALERTS and not disk_command and not api_command: + result = { + "status": "skipped", + "reason": "disk alert target is not a recognized Pimox node", + "alerts": names, + "audit_dir": str(audit_dir), + } + write_text(audit_dir / "result.json", json.dumps(result, indent=2, sort_keys=True) + "\n") + return result if direct_command: result = { "status": "planned",