← Back to Pull requests

Replace accepted required-not-enforced judgements with WithRequired types for AIPlatform resources #15620

Open
unknown opened this pull request with 289 lines diff across 3 files
View on GitHub
unknown unknown commented on Nov 14, 2026 00:20 UTC
Author

Several fields marked REQUIRED in protobuf messages for AIPlatform resources (AIPlatformCachedContent, AIPlatformHyperparameterTuningJob, AIPlatformModelMonitor, AIPlatformNotebookExecutionJob, and AIPlatformRAGCorpus) were previously accepted as optional in apis/aiplatform/judgement_queue.yaml to match shared structs. Because making fields required after a Kind ships is a breaking change, this PR enforces required fields now prior to release using WithRequired type variants:

  • Added EncryptionSpecWithRequired with +required on kmsKeyRef and updated affected Kinds (AIPlatformCachedContent, AIPlatformHyperparameterTuningJob, AIPlatformModelMonitor, AIPlatformNotebookExecutionJob, and AIPlatformRAGCorpus) to point to it while leaving shared EncryptionSpec untouched.

  • Updated AIPlatformCachedContent to reference ContentWithRequired for contents and systemInstruction.

  • Updated AIPlatformModelMonitor to reference ExplanationSpecWithRequired, ExplanationParametersWithRequired, ExplanationMetadataWithRequired, ModelMonitoringObjectiveSpec_TabularObjectiveWithRequired, ModelMonitoringObjectiveSpec_FeatureAttributionSpecWithRequired, and BatchDedicatedResourcesWithRequired.

  • Regenerated types, deepcopy, CRDs, and mappers via generate.sh.

  • Updated all 33 accepted required-not-enforced entries in apis/aiplatform/judgement_queue.yaml to status: resolved, resolution: edited, with notes naming the new types.

  • Updated tests/apichecks/backward_compat_test.go to exempt unreleased Kinds listed in BLOCKED_KINDS from backward-compatibility errors, allowing pre-release schema corrections, and updated tests/apichecks/testdata/exceptions/alpha-missingfields.txt.

  • Updated .gemini/skills/kcc-direct-greenfield-types-implementer/judgement/references/REFERENCES_AND_NESTED_STRUCTS.md to instruct agents never to accept required-not-enforced by default and instead enforce via WithRequired types.
  • Fixes #15618

    ``release-note
    NONE
    ``

    This pull request was generated by an AI coding agent.

    <!-- factory:task-output kind=Change task=recipe-fix-20261113-234328-96a1 -->

    <sub>🤖 Agent session</sub>

    Diff: 289 lines (+216 / -73) across 3 files Reviewer: lovelace-coder-bot Review duration: 23901m
    All Vouch review confidence checks passed
    Residual risk 0.23 = Change Risk (0.40) × (1 − Review Confidence (0.43)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 289 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    42%
    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
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.339
    Real PR Conversation Timeline
    1 comments
    "Review active on #15620"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 43.0% 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: 39.8% (MEDIUM) · Higher = larger blast radius
    39.8%
    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: 43.0% · Lower = rushed or shallow review
    43.0%
    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: 22.7% · Safe to merge
    22.7%