diff --git a/scripts/cluster/run-production-acceptance.sh b/scripts/cluster/run-production-acceptance.sh index b46acd5..edef071 100755 --- a/scripts/cluster/run-production-acceptance.sh +++ b/scripts/cluster/run-production-acceptance.sh @@ -635,6 +635,7 @@ fi } verify_release_cas() { + local verify_capacity=${1:-true} cluster_ssh "$CLUSTER_NINGBO_HOST" "$remote_release_helper status" >"$current_manifest" node "$cluster_root/scripts/release-manifest.mjs" validate "$current_manifest" >/dev/null local current_sha current_api @@ -648,6 +649,7 @@ verify_release_cas() { [[ $(remote_kubectl get deployment "$deployment" -n "$namespace" \ -o 'jsonpath={.spec.template.spec.containers[0].image}') == "$api_image" ]] done + [[ $verify_capacity == true ]] || return 0 [[ $(remote_kubectl get deployment easyai-worker-ningbo -n "$namespace" \ -o 'jsonpath={.spec.replicas}') == "$AI_GATEWAY_ACCEPTANCE_BASE_REPLICAS_NINGBO" ]] [[ $(remote_kubectl get deployment easyai-worker-hongkong -n "$namespace" \ @@ -3384,7 +3386,7 @@ WHERE task.acceptance_run_id='$run_id'::uuid [[ $(jq -r '.promotion.ready' "$report_root/acceptance-report.json") == true ]] } -verify_release_cas +verify_release_cas false bootstrap_acceptance_primary_identity ensure_acceptance_user_group ensure_acceptance_identity_shards @@ -3394,6 +3396,19 @@ ensure_acceptance_model_access create_and_activate_run wait_for_existing_tasks_to_drain snapshot_pre_acceptance_capacity +if ! apply_capacity_profile P24; then + failure_gate_id=baseline_capacity_apply + failure_reason='failed to apply the drained P24 baseline topology' + mark_run_failed "$failure_reason" + exit 1 +fi +if ! wait_for_post_rollout_stability P24; then + failure_gate_id=baseline_control_plane_stability + failure_reason='P24 baseline topology did not stabilize after rollout' + mark_run_failed "$failure_reason" + exit 1 +fi +verify_release_cas if ! verify_resource_preconditions; then failure_gate_id=resource_preconditions failure_reason='production resource preconditions failed'