fix(priority): surface windows99 verify collection status
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 1s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 48s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled

This commit is contained in:
ogt
2026-07-02 15:18:57 +08:00
parent 77a08cf066
commit 25148d0752
3 changed files with 157 additions and 4 deletions

View File

@@ -2561,6 +2561,9 @@ def _enrich_from_current_readbacks(payload: dict[str, Any]) -> None:
reboot_service_data_backup = _dict(
reboot_slo.get("controlled_service_data_backup_readback")
)
windows99_verify_collection = _dict(
reboot_slo.get("windows99_verify_collection")
)
reboot_preflight_rollups = _dict(reboot_preflight.get("rollups"))
reboot_preflight_target_selector = _dict(reboot_preflight.get("target_selector"))
reboot_active_blockers = _strings(reboot_slo.get("active_blockers"))
@@ -2570,6 +2573,9 @@ def _enrich_from_current_readbacks(payload: dict[str, Any]) -> None:
service_data_backup_blocking_fields = _strings(
reboot_service_data_backup.get("blocking_fields")
)
windows99_verify_collection_blockers = _strings(
windows99_verify_collection.get("collection_blockers")
)
p0_006_event_gated = bool(
reboot_slo_rollups.get("blocked_by_fresh_reboot_window_only") is True
)
@@ -2630,6 +2636,27 @@ def _enrich_from_current_readbacks(payload: dict[str, Any]) -> None:
state["controlled_service_data_backup_next_safe_action"] = str(
reboot_service_data_backup.get("next_safe_action") or ""
)
state["windows99_verify_collection_status"] = str(
windows99_verify_collection.get("status") or "unknown"
)
state["windows99_verify_collection_can_collect_no_secret"] = bool(
windows99_verify_collection.get("can_collect_no_secret_verify") is True
)
state["windows99_verify_collection_blocker_count"] = len(
windows99_verify_collection_blockers
)
state["windows99_verify_collection_blockers"] = (
windows99_verify_collection_blockers
)
state["windows99_verify_collection_host99_reachable"] = bool(
windows99_verify_collection.get("host99_reachable") is True
)
state["windows99_verify_collection_host99_uptime_known"] = bool(
windows99_verify_collection.get("host99_uptime_known") is True
)
state["windows99_verify_collection_post_verifier"] = str(
windows99_verify_collection.get("post_verifier") or ""
)
state["stale_snapshot_or_old_cd_runs_must_not_reopen_closed_work"] = True
state["p0_004_template_copy_apply_gate_production_http_status"] = 200
state["p0_004_template_copy_apply_gate_runtime_readback_state"] = (
@@ -2787,6 +2814,21 @@ def _enrich_from_current_readbacks(payload: dict[str, Any]) -> None:
evidence["controlled_service_data_backup_next_safe_action"] = str(
reboot_service_data_backup.get("next_safe_action") or ""
)
evidence["windows99_verify_collection_status"] = str(
windows99_verify_collection.get("status") or "unknown"
)
evidence["windows99_verify_collection_can_collect_no_secret"] = bool(
windows99_verify_collection.get("can_collect_no_secret_verify") is True
)
evidence["windows99_verify_collection_blockers"] = (
windows99_verify_collection_blockers
)
evidence["windows99_verify_collection_host99_reachable"] = bool(
windows99_verify_collection.get("host99_reachable") is True
)
evidence["windows99_verify_collection_host99_uptime_known"] = bool(
windows99_verify_collection.get("host99_uptime_known") is True
)
evidence["drill_preflight_status"] = str(reboot_preflight.get("status") or "")
evidence["drill_preflight_ready"] = (
reboot_preflight_rollups.get("preflight_ready") is True
@@ -2848,10 +2890,12 @@ def _enrich_from_current_readbacks(payload: dict[str, Any]) -> None:
"service, product-data, backup, 188 service, host reachability, "
"disk, and Wazuh blockers in controlled lanes; keep the "
"controlled service/data/backup readback visible as the source "
"selector for these blockers. For StockPlatform freshness/ingestion "
"postgres_not_ready, use the production migration/control-channel "
"path with target selector, dry-run, rollback, public API verifier, "
"and KM/RAG/MCP/PlayBook writeback. "
"selector for these blockers. For Windows 99, use the "
"windows99_verify_collection packet to collect no-secret Verify "
"stdout and rerun the scorecard. For StockPlatform "
"freshness/ingestion postgres_not_ready, use the production "
"migration/control-channel path with target selector, dry-run, "
"rollback, public API verifier, and KM/RAG/MCP/PlayBook writeback. "
"Do not reboot, restart services, write DB rows, fake freshness, "
"trigger workflows, or read secrets from this lane."
)
@@ -3033,6 +3077,21 @@ def _set_rollups_and_summary(
"controlled_service_data_backup_can_clear_blockers": (
state.get("controlled_service_data_backup_can_clear_blockers") is True
),
"windows99_verify_collection_status": str(
state.get("windows99_verify_collection_status") or "unknown"
),
"windows99_verify_collection_can_collect_no_secret": (
state.get("windows99_verify_collection_can_collect_no_secret") is True
),
"windows99_verify_collection_blocker_count": _int(
state.get("windows99_verify_collection_blocker_count")
),
"windows99_verify_collection_host99_reachable": (
state.get("windows99_verify_collection_host99_reachable") is True
),
"windows99_verify_collection_host99_uptime_known": (
state.get("windows99_verify_collection_host99_uptime_known") is True
),
"p0_004_runtime_readback_ready": p0_004_ready,
"reboot_drill_preflight_runtime_readback_ready": (
state.get("reboot_drill_preflight_runtime_readback_state") == "ready"
@@ -3068,6 +3127,27 @@ def _set_rollups_and_summary(
"controlled_service_data_backup_next_safe_action": str(
state.get("controlled_service_data_backup_next_safe_action") or ""
),
"windows99_verify_collection_status": str(
state.get("windows99_verify_collection_status") or "unknown"
),
"windows99_verify_collection_can_collect_no_secret": (
state.get("windows99_verify_collection_can_collect_no_secret") is True
),
"windows99_verify_collection_blocker_count": _int(
state.get("windows99_verify_collection_blocker_count")
),
"windows99_verify_collection_blockers": _strings(
state.get("windows99_verify_collection_blockers")
),
"windows99_verify_collection_host99_reachable": (
state.get("windows99_verify_collection_host99_reachable") is True
),
"windows99_verify_collection_host99_uptime_known": (
state.get("windows99_verify_collection_host99_uptime_known") is True
),
"windows99_verify_collection_post_verifier": str(
state.get("windows99_verify_collection_post_verifier") or ""
),
"latest_successful_deployed_source_sha": latest_source_sha,
"latest_successful_deployed_source_short_sha": latest_source_sha[:10],
"latest_successful_deploy_marker": str(