← Back to Pull requests

hack/manual-validate: enable the service APIs a run needs before bring-up #16251

Closed
unknown closed this pull request without merging on Nov 21, 2026 00:41 UTC
View on GitHub
unknown unknown commented on Nov 20, 2026 23:10 UTC
Author

A manual-validation run now enables the service APIs it needs, instead of failing a create later because an API is off in the test project.

Change

  • hack/manual-validate/lib.sh: mv_enable_apis PHASE SERVICE.... For each service it checks gcloud services list --enabled; an API already on is recorded as such, a disabled one is enabled with gcloud services enable and recorded as "enabled by this run" (also listed as apis_enabled_by_run in the report). A URL or regional endpoint host is taken as its service (https://us-central1-aiplatform.googleapis.com/... -> aiplatform.googleapis.com). With MV_ENABLE_APIS=0 it only checks, and a disabled API fails the run with the command to enable it. APIs are never disabled again: the project is shared.

  • .gemini/skills/manual-validate-controller/SKILL.md: step 1 lists the APIs a Kind needs - every *.googleapis.com host in its fixture's _http.log files, plus what the out-of-band and functional checks call (e.g. logging.googleapis.com for the audit-log check); step 2 calls mv_enable_apis before mv_up; a SERVICE_DISABLED failure is now a script fix (add the API, re-run) rather than an escalation; a critical rule never to disable an API.

  • hack/manual-validate/bigqueryrowaccesspolicy/validate.sh: enables bigquery.googleapis.com and logging.googleapis.com before bring-up.
  • Enabling needs serviceusage.services.enable on the project; the factory sandboxes' service account has it on their test project (checked with testIamPermissions).

    Tested

    Against a test project, read-only paths: already-enabled APIs are recorded as such (including a full regional URL resolving to logging.googleapis.com), and with MV_ENABLE_APIS=0 a disabled API fails with gcloud services enable <api> --project <project>. The enabling path itself (a project change) was not exercised.

    ``release-note
    NONE
    ``

    Diff: 236 lines (+177 / -59) across 2 files Reviewer: barney-s Review duration: 90m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.42) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 236 lines diff across 2 files
    0.42
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.327
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #16251"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.2% (MEDIUM) · Higher = larger blast radius
    42.2%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 18.2% · Safe to merge
    18.2%