fix(reboot): surface windows99 console channel readback
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / build-and-deploy (push) Has been cancelled
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / tests (push) Has been cancelled

This commit is contained in:
ogt
2026-07-02 18:32:52 +08:00
parent f237b25453
commit 5b5ef7fe2d
12 changed files with 269 additions and 10 deletions

View File

@@ -2680,6 +2680,15 @@ def _enrich_from_current_readbacks(payload: dict[str, Any]) -> None:
state["windows99_rdp_console_reachable"] = bool(
windows99_management.get("rdp_console_reachable") is True
)
state["windows99_hyperv_vmconnect_open"] = bool(
windows99_management.get("hyperv_vmconnect_open") is True
)
state["windows99_local_console_channel_reachable"] = bool(
windows99_management.get("local_console_channel_reachable") is True
)
state["windows99_console_collection_channels"] = _strings(
windows99_management.get("console_collection_channels")
)
state["windows99_winrm_http_open"] = bool(
windows99_management.get("winrm_http_open") is True
)
@@ -2873,6 +2882,15 @@ def _enrich_from_current_readbacks(payload: dict[str, Any]) -> None:
evidence["windows99_rdp_console_reachable"] = state[
"windows99_rdp_console_reachable"
]
evidence["windows99_hyperv_vmconnect_open"] = state[
"windows99_hyperv_vmconnect_open"
]
evidence["windows99_local_console_channel_reachable"] = state[
"windows99_local_console_channel_reachable"
]
evidence["windows99_console_collection_channels"] = state[
"windows99_console_collection_channels"
]
evidence["windows99_winrm_http_open"] = state["windows99_winrm_http_open"]
evidence["windows99_winrm_https_open"] = state["windows99_winrm_https_open"]
evidence["drill_preflight_status"] = str(reboot_preflight.get("status") or "")
@@ -3151,6 +3169,15 @@ def _set_rollups_and_summary(
"windows99_rdp_console_reachable": (
state.get("windows99_rdp_console_reachable") is True
),
"windows99_hyperv_vmconnect_open": (
state.get("windows99_hyperv_vmconnect_open") is True
),
"windows99_local_console_channel_reachable": (
state.get("windows99_local_console_channel_reachable") is True
),
"windows99_console_collection_channels": _strings(
state.get("windows99_console_collection_channels")
),
"p0_004_runtime_readback_ready": p0_004_ready,
"reboot_drill_preflight_runtime_readback_ready": (
state.get("reboot_drill_preflight_runtime_readback_state") == "ready"
@@ -3222,6 +3249,15 @@ def _set_rollups_and_summary(
"windows99_rdp_console_reachable": (
state.get("windows99_rdp_console_reachable") is True
),
"windows99_hyperv_vmconnect_open": (
state.get("windows99_hyperv_vmconnect_open") is True
),
"windows99_local_console_channel_reachable": (
state.get("windows99_local_console_channel_reachable") is True
),
"windows99_console_collection_channels": _strings(
state.get("windows99_console_collection_channels")
),
"windows99_winrm_http_open": (
state.get("windows99_winrm_http_open") is True
),

View File

@@ -229,10 +229,19 @@ def _build_payload(scorecard: dict[str, Any], path: Path) -> dict[str, Any]:
"windows99_winrm_https_open": (
windows99_management.get("winrm_https_open") is True
),
"windows99_hyperv_vmconnect_open": (
windows99_management.get("hyperv_vmconnect_open") is True
),
"windows99_rdp_console_reachable": (
windows99_management.get("rdp_console_reachable") is True
),
"runtime_readback_generated_at_present": True,
"windows99_local_console_channel_reachable": (
windows99_management.get("local_console_channel_reachable") is True
),
"windows99_console_collection_channels": _strings(
windows99_management.get("console_collection_channels")
),
}
return {
"schema_version": _API_SCHEMA_VERSION,
@@ -280,6 +289,9 @@ def _build_payload(scorecard: dict[str, Any], path: Path) -> dict[str, Any]:
"windows99_remote_execution_channel_ready"
],
"windows99_ssh_batch_status": rollups["windows99_ssh_batch_status"],
"windows99_local_console_channel_reachable": rollups[
"windows99_local_console_channel_reachable"
],
"readback": {
"workplan_id": "P0-006",
"workplan_title": "主機重啟自動偵測、自動觸發與 10 分鐘恢復 SLO",
@@ -322,6 +334,12 @@ def _build_payload(scorecard: dict[str, Any], path: Path) -> dict[str, Any]:
"windows99_remote_execution_channel_ready"
],
"windows99_ssh_batch_status": rollups["windows99_ssh_batch_status"],
"windows99_local_console_channel_reachable": rollups[
"windows99_local_console_channel_reachable"
],
"windows99_console_collection_channels": rollups[
"windows99_console_collection_channels"
],
},
"reboot_sop_progress": sop_progress,
"controlled_service_data_backup_readback": (