fix(api): expose delivery workbench mainline readback
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 22s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 22s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been cancelled
This commit is contained in:
@@ -1120,12 +1120,69 @@ def build_delivery_closure_workbench(
|
||||
if _int(lane["blocker_count"]) > 0 or _int(lane["completion_percent"]) < 80
|
||||
][:5]
|
||||
|
||||
delivery_status = (
|
||||
"blocked_delivery_actions_required" if high_risk_blocker_count else "ready"
|
||||
)
|
||||
current_p0_safe_next_step = str(reboot_readback.get("safe_next_step") or "")
|
||||
current_p0_workplan_id = str(reboot_readback.get("workplan_id") or "P0-006")
|
||||
current_p0_active_blockers = _strings(reboot_slo.get("active_blockers"))
|
||||
|
||||
return {
|
||||
"schema_version": _SCHEMA_VERSION,
|
||||
"generated_at": max(generated_candidates) if generated_candidates else "",
|
||||
"status": "blocked_delivery_actions_required"
|
||||
if high_risk_blocker_count
|
||||
else "ready",
|
||||
"status": delivery_status,
|
||||
"safe_next_step": current_p0_safe_next_step,
|
||||
"active_blockers": current_p0_active_blockers,
|
||||
"readback": {
|
||||
"workbench_status": delivery_status,
|
||||
"current_p0_workplan_id": current_p0_workplan_id,
|
||||
"current_p0_source_id": "reboot_auto_recovery_slo_scorecard",
|
||||
"current_p0_status": str(reboot_slo.get("status") or ""),
|
||||
"current_p0_safe_next_step": current_p0_safe_next_step,
|
||||
"current_p0_active_blockers": current_p0_active_blockers,
|
||||
"current_p0_readiness_percent": _int(
|
||||
reboot_rollups.get("readiness_percent")
|
||||
),
|
||||
"closed_p0_workplan_ids": ["P0-003", "P0-005"],
|
||||
"github_lane_status": "stopped_retired_do_not_use",
|
||||
"secret_value_collection_allowed": False,
|
||||
"workflow_trigger_authorized": False,
|
||||
"runtime_write_authorized": False,
|
||||
},
|
||||
"rollups": {
|
||||
"source_count": len(source_statuses),
|
||||
"loaded_source_count": loaded_source_count,
|
||||
"average_completion_percent": average_completion,
|
||||
"high_risk_blocker_count": high_risk_blocker_count,
|
||||
"current_p0_blocker_count": reboot_blockers,
|
||||
"current_p0_readiness_percent": _int(
|
||||
reboot_rollups.get("readiness_percent")
|
||||
),
|
||||
"current_p0_blocked_by_fresh_reboot_window_only": (
|
||||
reboot_rollups.get("blocked_by_fresh_reboot_window_only") is True
|
||||
),
|
||||
"current_p0_service_green": reboot_rollups.get("service_green") is True,
|
||||
"current_p0_product_data_green": (
|
||||
reboot_rollups.get("product_data_green") is True
|
||||
),
|
||||
"current_p0_backup_core_green": (
|
||||
reboot_rollups.get("backup_core_green") is True
|
||||
),
|
||||
"current_p0_stockplatform_freshness_status": str(
|
||||
reboot_rollups.get("stockplatform_freshness_status") or ""
|
||||
),
|
||||
"current_p0_stockplatform_ingestion_status": str(
|
||||
reboot_rollups.get("stockplatform_ingestion_status") or ""
|
||||
),
|
||||
"gitea_private_inventory_blocker_count": private_inventory_blockers,
|
||||
"credential_escrow_blocker_count": credential_escrow_missing_items,
|
||||
"production_deploy_hard_blocker_count": _int(
|
||||
production_deploy_rollups.get("hard_blocker_count")
|
||||
),
|
||||
"secret_values_collected": False,
|
||||
"workflow_trigger_authorized": False,
|
||||
"runtime_write_authorized": False,
|
||||
},
|
||||
"summary": {
|
||||
"source_count": len(source_statuses),
|
||||
"loaded_source_count": loaded_source_count,
|
||||
|
||||
Reference in New Issue
Block a user