# Jeannie self-heal webhook Install or reconcile the webhook from the checkout used for operations: ```bash LAB_CLUSTER_PROFILE=pimox ./jeannie self-heal install-service --apply ``` The installer records the selected profile, explicit kubeconfig, and current checkout path in the systemd unit. It restarts the webhook so new source and environment settings take effect. Without `--apply`, installation defaults to dry-run mode unless `LAB_SELF_HEAL_APPLY=true` is explicitly supplied. The rendered file is staged with its `.service` filename and checked using `systemd-analyze verify --man=no` on Debian before replacing the installed unit. An invalid rendered unit therefore leaves the existing unit file untouched. `HomelabStaleResidualPods`, `KubePodEvicted`, and `KubePodContainerStatusUnknown` select the guarded stale-pod cleanup directly. They do not invoke the broad doctor planner or choose unrelated VM restarts. The cleanup only selects supported residual states on controller-owned pods; Completed/Succeeded and ordinary Pending pods are not cleanup targets. It does not delete PVCs or change worker CPU configuration. Debian automatic disk cleanup remains disabled. Doctor stdout and stderr are stored separately under `~/.local/share/homelab/self-heal-events//`. The `.log` file contains stdout (JSON for the doctor), `.stderr.log` contains diagnostics, and `result.json` records the chosen command and outcome. Generic cleanup verification checks eligible residual records rather than requiring all unrelated Pending workloads to become healthy. Read-only validation: ```bash systemctl is-active jeannie-eventd systemctl show jeannie-eventd -p Environment --value LAB_CLUSTER_PROFILE=pimox ./jeannie heal cleanup-stale-pods ``` Alertmanager repeats matching firing alerts according to its configured route (currently one hour for this receiver); service installation does not itself trigger a cleanup. Existing failed/completed pod objects do not prove that their replacement workloads are unhealthy; Pending workloads need separate scheduling diagnosis.