feat(delivery): expose p0 reboot drill readback
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 3m46s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled

This commit is contained in:
Your Name
2026-06-30 09:25:58 +08:00
parent fbea3b4626
commit a7e6de46aa
8 changed files with 401 additions and 4 deletions

View File

@@ -208,6 +208,40 @@ def test_delivery_closure_workbench_exposes_p0_006_reboot_slo_lane():
assert lane["metric"]["stockplatform_ingestion_blocker_count"] == 0
assert lane["metric"]["stockplatform_final_retry_window_passed"] is True
assert lane["metric"]["stockplatform_controlled_recovery_gate_required"] is False
assert lane["metric"]["drill_preflight_status"] == (
"ready_for_break_glass_reboot_drill_authorization"
)
assert lane["metric"]["drill_preflight_ready"] is True
assert lane["metric"]["drill_preflight_ready_count"] == 1
assert lane["metric"]["drill_preflight_blocker_count"] == 0
assert lane["metric"]["drill_preflight_active_blockers"] == []
assert (
lane["metric"]["drill_preflight_break_glass_authorization_required"]
is True
)
assert (
lane["metric"]["drill_preflight_execution_authorized_by_this_endpoint"]
is False
)
assert (
lane["metric"]["drill_preflight_host_reboot_authorized_by_this_endpoint"]
is False
)
assert lane["metric"]["drill_preflight_runtime_write_allowed"] is False
assert lane["metric"]["drill_preflight_target_required_host_count"] == 4
assert lane["metric"]["drill_preflight_target_observed_host_count"] == 4
assert lane["metric"]["drill_preflight_target_missing_host_count"] == 0
assert lane["metric"]["drill_preflight_target_unreachable_host_count"] == 0
assert lane["metric"]["drill_preflight_target_stale_host_count"] == 4
assert lane["metric"]["drill_preflight_verify_only_available"] is True
assert lane["metric"]["drill_preflight_post_apply_verifier_endpoint"] == (
"/api/v1/agents/reboot-auto-recovery-slo-scorecard"
)
assert (
lane["metric"]["drill_preflight_secret_value_collection_allowed"]
is False
)
assert lane["metric"]["drill_preflight_workflow_trigger_performed"] is False
assert lane["metric"]["host_reboot_performed"] is False
assert lane["metric"]["service_restart_performed"] is False
assert lane["metric"]["database_write_or_restore_performed"] is False
@@ -241,13 +275,27 @@ def _assert_delivery_workbench_shape(data: dict):
assert data["readback"]["current_p0_safe_next_step"] == data["safe_next_step"]
assert data["readback"]["current_p0_active_blockers"] == data["active_blockers"]
assert data["readback"]["current_p0_readiness_percent"] == 82
assert data["readback"]["current_p0_drill_preflight_status"] == (
"ready_for_break_glass_reboot_drill_authorization"
)
assert data["readback"]["current_p0_drill_preflight_ready"] is True
assert (
data["readback"]["current_p0_drill_preflight_break_glass_required"]
is True
)
assert (
data["readback"][
"current_p0_drill_preflight_execution_authorized_by_this_endpoint"
]
is False
)
assert data["readback"]["closed_p0_workplan_ids"] == ["P0-003", "P0-005"]
assert data["readback"]["github_lane_status"] == "stopped_retired_do_not_use"
assert data["readback"]["secret_value_collection_allowed"] is False
assert data["readback"]["workflow_trigger_authorized"] is False
assert data["readback"]["runtime_write_authorized"] is False
assert data["rollups"]["source_count"] == 8
assert data["rollups"]["loaded_source_count"] == 8
assert data["rollups"]["source_count"] == 9
assert data["rollups"]["loaded_source_count"] == 9
assert data["rollups"]["high_risk_blocker_count"] == data["summary"][
"high_risk_blocker_count"
]
@@ -259,14 +307,25 @@ def _assert_delivery_workbench_shape(data: dict):
assert data["rollups"]["current_p0_backup_core_green"] is True
assert data["rollups"]["current_p0_stockplatform_freshness_status"] == "ok"
assert data["rollups"]["current_p0_stockplatform_ingestion_status"] == "ok"
assert data["rollups"]["current_p0_drill_preflight_ready"] is True
assert data["rollups"]["current_p0_drill_preflight_ready_count"] == 1
assert data["rollups"]["current_p0_drill_preflight_blocker_count"] == 0
assert data["rollups"]["current_p0_drill_preflight_break_glass_required"] is True
assert (
data["rollups"][
"current_p0_drill_preflight_execution_authorized_by_this_endpoint"
]
is False
)
assert data["rollups"]["current_p0_drill_preflight_runtime_write_allowed"] is False
assert data["rollups"]["gitea_private_inventory_blocker_count"] == 0
assert data["rollups"]["credential_escrow_blocker_count"] == 0
assert data["rollups"]["production_deploy_hard_blocker_count"] == 0
assert data["rollups"]["secret_values_collected"] is False
assert data["rollups"]["workflow_trigger_authorized"] is False
assert data["rollups"]["runtime_write_authorized"] is False
assert data["summary"]["source_count"] == 8
assert data["summary"]["loaded_source_count"] == 8
assert data["summary"]["source_count"] == 9
assert data["summary"]["loaded_source_count"] == 9
assert data["summary"]["runtime_execution_authorized"] is False
assert data["summary"]["remote_write_authorized"] is False
assert data["summary"]["repo_creation_authorized"] is False
@@ -338,6 +397,43 @@ def _assert_delivery_workbench_shape(data: dict):
"timer_and_service_data_readback_green_wait_for_next_all_host_reboot_event_"
"or_approved_reboot_drill_to_prove_10_minute_slo"
)
assert data["summary"]["reboot_auto_recovery_drill_preflight_status"] == (
"ready_for_break_glass_reboot_drill_authorization"
)
assert data["summary"]["reboot_auto_recovery_drill_preflight_ready"] is True
assert data["summary"]["reboot_auto_recovery_drill_preflight_ready_count"] == 1
assert data["summary"]["reboot_auto_recovery_drill_preflight_blocker_count"] == 0
assert (
data["summary"][
"reboot_auto_recovery_drill_preflight_break_glass_required"
]
is True
)
assert (
data["summary"][
"reboot_auto_recovery_drill_preflight_execution_authorized_by_this_endpoint"
]
is False
)
assert (
data["summary"][
"reboot_auto_recovery_drill_preflight_host_reboot_authorized_by_this_endpoint"
]
is False
)
assert (
data["summary"]["reboot_auto_recovery_drill_preflight_runtime_write_allowed"]
is False
)
assert (
data["summary"][
"reboot_auto_recovery_drill_preflight_target_selector_scope"
]
== "awoooi_p0_reboot_slo_hosts"
)
assert data["summary"][
"reboot_auto_recovery_drill_preflight_post_apply_verifier_endpoint"
] == "/api/v1/agents/reboot-auto-recovery-slo-scorecard"
assert data["summary"]["gitea_private_inventory_status"] == (
"closed_gitea_private_inventory_controlled_closeout"
)