feat(recovery): close host112 guest readiness loop

This commit is contained in:
ogt
2026-07-11 20:00:16 +08:00
parent 23751a7fc3
commit 43a3a06a3a
8 changed files with 217 additions and 6 deletions

View File

@@ -95,6 +95,12 @@ def resolve_agent99_alert_kind(
annotations=annotations or {},
)
if re.search(
r"host112guest(?:readbackmissing|notready)|host112_guest|"
r"awoooi_host112_|host 112.*(?:guest|console|lightdm|vmware tools)",
text,
):
return "host112_guest_recovery"
if re.search(
r"provider_freshness_signal|source_provider_freshness_triage|"
r"raw_signal_normalized|controlled_runtime_candidate|freshness|"
@@ -168,6 +174,7 @@ def _suggested_mode_for_kind(kind: str) -> str | None:
"harbor_registry": "HarborRepair",
"awoooi_k3s": "AwoooRepair",
"host_recovery": "Recover",
"host112_guest_recovery": "Recover",
"application_ai_config_error": "Status",
"cicd_failure": "Status",
"monitoring_alert": "Status",
@@ -183,6 +190,7 @@ def _resolution_policy_for_kind(kind: str) -> str:
"harbor_registry",
"awoooi_k3s",
"host_recovery",
"host112_guest_recovery",
}:
return "mode_verifier_can_resolve"
return "external_source_receipt_required"
@@ -335,6 +343,12 @@ def build_agent99_sre_alert(
"directReference,verifierReadback; mark missing,expired,timeout,"
"no_false_green; do not switch provider, call paid model, edit env, or reload."
)
elif kind == "host112_guest_recovery":
instruction = (
"Run the allowlisted host 112 guest recovery; verify graphical.target, "
"LightDM, VMware Tools, Wazuh services and recovery timer; do not reboot "
"the host, change VM power, reset the VM, read secrets or change firewall."
)
payload: dict[str, Any] = {
"id": f"awoooi-alertmanager-{_safe_file_token(alert_id)}",