From e6cb38ccfe70ddfe9d97b8c93bcbbe6247ae2b04 Mon Sep 17 00:00:00 2001 From: ogt Date: Fri, 10 Jul 2026 03:02:47 +0800 Subject: [PATCH] fix(reboot): surface windows99 collector blocker --- ...awoooi_priority_work_order_readback_api.py | 23 +++--- ..._reboot_auto_recovery_slo_scorecard_api.py | 29 ++++++-- ...-auto-recovery-slo-scorecard.snapshot.json | 70 +++++++++++++++++-- 3 files changed, 104 insertions(+), 18 deletions(-) diff --git a/apps/api/tests/test_awoooi_priority_work_order_readback_api.py b/apps/api/tests/test_awoooi_priority_work_order_readback_api.py index e46b76af4..095082e78 100644 --- a/apps/api/tests/test_awoooi_priority_work_order_readback_api.py +++ b/apps/api/tests/test_awoooi_priority_work_order_readback_api.py @@ -181,22 +181,23 @@ def test_awoooi_priority_work_order_readback_surfaces_gitea_bundle_truth(): ) assert payload["mainline_execution_state"][ "windows99_verify_collection_blocker_count" - ] == 2 + ] == 3 assert payload["mainline_execution_state"][ "windows99_verify_collection_blockers" ] == [ "windows99_vmware_autostart_readback_missing", + "windows99_ssh_publickey_auth_missing", "windows99_uptime_unknown", ] assert ( payload["mainline_execution_state"][ "windows99_no_secret_collector_readback_present" ] - is False + is True ) assert payload["mainline_execution_state"][ "windows99_no_secret_collector_status" - ] == "unknown" + ] == "blocked_ssh_publickey_auth_missing" assert ( payload["mainline_execution_state"][ "windows99_no_secret_collector_ssh_batchmode_auth_ready" @@ -292,11 +293,12 @@ def test_awoooi_priority_work_order_readback_surfaces_gitea_bundle_truth(): ) assert in_progress["evidence"]["windows99_verify_collection_blockers"] == [ "windows99_vmware_autostart_readback_missing", + "windows99_ssh_publickey_auth_missing", "windows99_uptime_unknown", ] assert in_progress["evidence"][ "windows99_no_secret_collector_status" - ] == "unknown" + ] == "blocked_ssh_publickey_auth_missing" assert in_progress["evidence"][ "windows99_available_collection_channels" ] == ["rdp_console", "hyperv_vmconnect"] @@ -390,18 +392,23 @@ def test_awoooi_priority_work_order_readback_surfaces_gitea_bundle_truth(): payload["summary"]["windows99_verify_collection_can_collect_no_secret"] is True ) - assert payload["summary"]["windows99_verify_collection_blocker_count"] == 2 + assert payload["summary"]["windows99_verify_collection_blocker_count"] == 3 assert payload["summary"]["windows99_verify_collection_blockers"] == [ "windows99_vmware_autostart_readback_missing", + "windows99_ssh_publickey_auth_missing", "windows99_uptime_unknown", ] - assert payload["summary"]["windows99_no_secret_collector_status"] == "unknown" + assert payload["summary"]["windows99_no_secret_collector_status"] == ( + "blocked_ssh_publickey_auth_missing" + ) assert payload["summary"]["windows99_available_collection_channels"] == [ "rdp_console", "hyperv_vmconnect", ] - assert payload["rollups"]["windows99_verify_collection_blocker_count"] == 2 - assert payload["rollups"]["windows99_no_secret_collector_status"] == "unknown" + assert payload["rollups"]["windows99_verify_collection_blocker_count"] == 3 + assert payload["rollups"]["windows99_no_secret_collector_status"] == ( + "blocked_ssh_publickey_auth_missing" + ) assert ( payload["rollups"]["windows99_verify_collection_host99_reachable"] is True diff --git a/apps/api/tests/test_reboot_auto_recovery_slo_scorecard_api.py b/apps/api/tests/test_reboot_auto_recovery_slo_scorecard_api.py index 884217c94..516e73ffd 100644 --- a/apps/api/tests/test_reboot_auto_recovery_slo_scorecard_api.py +++ b/apps/api/tests/test_reboot_auto_recovery_slo_scorecard_api.py @@ -1504,9 +1504,17 @@ def _assert_reboot_slo_payload(payload: dict): payload["readback"]["windows99_verify_collection_can_collect_no_secret"] is True ) - assert payload["readback"]["windows99_no_secret_collector_status"] == "unknown" + assert payload["readback"]["windows99_no_secret_collector_status"] == ( + "blocked_ssh_publickey_auth_missing" + ) assert ( payload["readback"]["windows99_no_secret_collector_readback_present"] + is True + ) + assert ( + payload["readback"][ + "windows99_no_secret_collector_ssh_batchmode_auth_ready" + ] is False ) assert payload["readback"]["windows99_remote_execution_channel_ready"] is False @@ -1554,10 +1562,18 @@ def _assert_reboot_slo_payload(payload: dict): payload["rollups"]["windows99_verify_collection_can_collect_no_secret"] is True ) - assert payload["rollups"]["windows99_verify_collection_blocker_count"] == 2 - assert payload["rollups"]["windows99_no_secret_collector_status"] == "unknown" + assert payload["rollups"]["windows99_verify_collection_blocker_count"] == 3 + assert payload["rollups"]["windows99_no_secret_collector_status"] == ( + "blocked_ssh_publickey_auth_missing" + ) assert ( payload["rollups"]["windows99_no_secret_collector_readback_present"] + is True + ) + assert ( + payload["rollups"][ + "windows99_no_secret_collector_ssh_batchmode_auth_ready" + ] is False ) assert payload["rollups"]["windows99_host99_reachable"] is True @@ -1685,8 +1701,10 @@ def _assert_reboot_slo_payload(payload: dict): assert collection["readback_present"] is False assert collection["verify_ready"] is False assert collection["can_collect_no_secret_verify"] is True - assert collection["no_secret_collector_readback_present"] is False - assert collection["no_secret_collector_status"] == "unknown" + assert collection["no_secret_collector_readback_present"] is True + assert collection["no_secret_collector_status"] == ( + "blocked_ssh_publickey_auth_missing" + ) assert collection["no_secret_collector_ssh_batchmode_auth_ready"] is False assert collection["available_collection_channels"] == [ "rdp_console", @@ -1694,6 +1712,7 @@ def _assert_reboot_slo_payload(payload: dict): ] assert collection["collection_blockers"] == [ "windows99_vmware_autostart_readback_missing", + "windows99_ssh_publickey_auth_missing", "windows99_uptime_unknown", ] assert "VMRUN_PRESENT" in collection["expected_no_secret_output_fields"] diff --git a/docs/operations/awoooi-reboot-auto-recovery-slo-scorecard.snapshot.json b/docs/operations/awoooi-reboot-auto-recovery-slo-scorecard.snapshot.json index bfb1d2a95..916374817 100644 --- a/docs/operations/awoooi-reboot-auto-recovery-slo-scorecard.snapshot.json +++ b/docs/operations/awoooi-reboot-auto-recovery-slo-scorecard.snapshot.json @@ -312,7 +312,7 @@ "windows99_remote_execution_channel_ready": false, "windows99_ssh_batch_status": "permission_denied", "windows99_update_no_auto_reboot_ready": false, - "windows99_verify_collection_can_collect_no_secret": true, + "windows99_verify_collection_can_collect_no_secret": false, "windows99_verify_collection_status": "blocked_windows99_verify_output_missing_host_reachable", "windows99_vmware_verify_ready": false, "workflow_trigger_authorized_by_this_scorecard": false, @@ -322,7 +322,13 @@ "windows99_console_collection_channels": [ "rdp_console", "hyperv_vmconnect" - ] + ], + "windows99_no_secret_collector_readback_present": true, + "windows99_no_secret_collector_status": "blocked_ssh_publickey_auth_missing", + "windows99_no_secret_collector_ssh_batchmode_auth_ready": false, + "windows99_no_secret_collector_port_22_open": true, + "windows99_no_secret_collector_remote_verify_attempted": false, + "windows99_no_secret_collector_safe_next_step": "select_existing_authorized_public_key_user_or_set_WINDOWS99_SSH_USERS_then_rerun_collector_no_password" }, "reboot_event_detection": { "all_required_hosts_in_reboot_window": false, @@ -449,7 +455,13 @@ "windows99_console_collection_channels": [ "rdp_console", "hyperv_vmconnect" - ] + ], + "windows99_no_secret_collector_readback_present": true, + "windows99_no_secret_collector_status": "blocked_ssh_publickey_auth_missing", + "windows99_no_secret_collector_ssh_batchmode_auth_ready": false, + "windows99_no_secret_collector_port_22_open": true, + "windows99_no_secret_collector_remote_verify_attempted": false, + "windows99_no_secret_collector_safe_next_step": "select_existing_authorized_public_key_user_or_set_WINDOWS99_SSH_USERS_then_rerun_collector_no_password" }, "safe_next_step": "restore_windows99_no_secret_management_channel_or_collect_local_console_verify_readback_then_rerun_reboot_scorecard_no_reboot", "schema_version": "awoooi_reboot_auto_recovery_slo_scorecard_v1", @@ -644,7 +656,7 @@ "reboot_auto_recovery_stockplatform_freshness_status": "ok", "reboot_auto_recovery_stockplatform_ingestion_status": "ok", "reboot_auto_recovery_windows99_update_no_auto_reboot_ready": false, - "reboot_auto_recovery_windows99_verify_collection_can_collect_no_secret": true, + "reboot_auto_recovery_windows99_verify_collection_can_collect_no_secret": false, "reboot_auto_recovery_windows99_verify_collection_status": "blocked_windows99_verify_output_missing_host_reachable", "reboot_auto_recovery_windows99_vmware_verify_ready": false, "reboot_auto_recovery_workplan_id": "P0-006", @@ -655,7 +667,9 @@ "reboot_auto_recovery_windows99_console_collection_channels": [ "rdp_console", "hyperv_vmconnect" - ] + ], + "reboot_auto_recovery_windows99_no_secret_collector_status": "blocked_ssh_publickey_auth_missing", + "reboot_auto_recovery_windows99_no_secret_collector_ssh_batchmode_auth_ready": false }, "target_minutes": 10, "target_seconds": 600, @@ -798,5 +812,51 @@ "verify_ready": false, "vmrun_present": false, "windows_update_no_auto_reboot_ready": false + }, + "windows99_vmware_verify_collector": { + "blockers": [ + "windows99_ssh_publickey_auth_missing" + ], + "dry_run": "true", + "forbidden_actions": [ + "windows_password_or_secret_collection", + "host_reboot", + "vm_power_change", + "windows_update_policy_apply", + "manual_registry_edit", + "service_restart", + "github_api" + ], + "host_reboot_performed": false, + "local_verify_script_present": true, + "password_prompt_allowed": false, + "port_22_open": true, + "port_3389_open": true, + "port_5985_open": false, + "port_5986_open": false, + "port_9182_open": false, + "readback_present": true, + "remote_verify_attempted": false, + "remote_verify_exit_status": "not_attempted", + "remote_write_performed": false, + "safe_next_step": "select_existing_authorized_public_key_user_or_set_WINDOWS99_SSH_USERS_then_rerun_collector_no_password", + "schema_version": "windows99_vmware_verify_collector_v1", + "secret_value_read": false, + "ssh_auth_probe_exit_status": "255", + "ssh_auth_probed_users": 5, + "ssh_authenticated_user": "", + "ssh_batchmode_auth_ready": false, + "ssh_candidate_users": [ + "ogt", + "wooo", + "ooo", + "administrator", + "Administrator" + ], + "status": "blocked_ssh_publickey_auth_missing", + "target_host": "192.168.0.99", + "target_host_alias": "99", + "vm_power_change_performed": false, + "windows_update_policy_apply_performed": false } }