← Back to Pull requests

Greenfield: Prepopulate direct KRM types, identity, and judgement queue for ComputeInstantSnapshot #15372

Closed
unknown closed this pull request without merging on Nov 11, 2026 05:50 UTC
View on GitHub
unknown unknown commented on Nov 11, 2026 01:31 UTC
Author

Prepopulate direct KRM types, identity, and judgement queue for ComputeInstantSnapshot under compute.cnrm.cloud.google.com/v1alpha1 following Greenfield Step 1a (prepopulate/SKILL.md):

  • Configured apis/compute/generate.sh with dedicated generate-types --prepopulate-resource and generate-identity for ComputeInstantSnapshot:InstantSnapshot, and added --prepopulate-resource to generate-mapper.

  • Scaffolded apis/compute/v1alpha1/computeinstantsnapshot_types.go, types.generated.go, and updated deepcopy implementations.

  • Generated deterministic IdentityV2 and refs.Ref implementations along with conformance tests via controllerbuilder generate-identity.

  • Generated CRD computeinstantsnapshots.compute.cnrm.cloud.google.com.

  • Added ComputeInstantSnapshot to BLOCKED_KINDS in dev/tasks/build-release-bundle.

  • Recorded review items in apis/compute/judgement_queue.yaml with status open for Step 1b triage.

  • Added proto comment exception to tests/apichecks/testdata/exceptions/comments.txt and updated tests/apichecks/testdata/exceptions/alpha-missingfields.txt.

  • Documented findings in .gemini/journals/compute.md.
  • Fixes #15354

    ``release-note
    NONE

    
    This pull request was generated by an AI coding agent.
    
    <sub>🤖 [Agent session](https://staging.repoagent.dev/#/overseers/kcc/task-session/fix-k8s-config-connector-15354/recipe-fix-20261110-235952-3cde)</sub>
    
    <!-- factory:task-output kind=Change task=recipe-fix-20261110-235952-3cde -->
    
    ---
    
    ### Greenfield: Triage judgement queue and finalize direct KRM types and identity for ComputeInstantSnapshot
    
    Triage all 24 entries in `apis/compute/judgement_queue.yaml` and finalize direct KRM types, identity, and references for `ComputeInstantSnapshot` under `compute.cnrm.cloud.google.com/v1alpha1` (Greenfield Step 1b):
    
    - **Judgement Queue Triage**: Triaged and resolved all 24 entries for `ComputeInstantSnapshot` in `apis/compute/judgement_queue.yaml`.
    - **Identity Implementation**: Promoted identity to handwritten `computeinstantsnapshot_identity.go`, supporting both zonal (`projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}`) and regional (`projects/{project}/regions/{region}/instantSnapshots/{instantSnapshot}`) templates matching `ComputeDisk` and GCP CAIS formats.
    - **References**: Implemented `ComputeInstantSnapshotRef` in `computeinstantsnapshot_reference.go`, delegating `Normalize` to `refs.Normalize` via `status.externalRef`. Converted `spec.sourceDisk` to `SourceDiskRef *computev1beta1.ComputeDiskRef` with proto field annotation `// +kcc:proto:field=google.cloud.compute.v1.InstantSnapshot.source_disk`.
    - **Spec vs ObservedState**: Maintained `spec.location` as required string representing zone or region. Moved output-only fields (`architecture`, `diskSizeGB`, `labelFingerprint`, `region`, `resourceStatus`, `satisfiesPzi`, `satisfiesPzs`, `sourceDiskID`, `status`, `zone`) to `ComputeInstantSnapshotObservedState`, and removed top-level `labels` from Spec.
    - **Build & Artifacts**: Updated `apis/compute/generate.sh` to include `ComputeInstantSnapshot:InstantSnapshot` in the primary `generate-types` command and removed prepopulation flags/block. Regenerated CRDs, deepcopy, and mappers. Verified all tests pass.
    - **Journal**: Added service-specific learnings to `.gemini/journals/compute.md`.
    
    Fixes #15378
    
    
    release-note
    NONE
    ``

    This pull request was generated by an AI coding agent.

    <!-- factory:group-step issue=15378 -->

    Diff: 435 lines (+326 / -109) across 5 files Reviewer: anhdle-sso Review duration: 259m
    All Vouch review confidence checks passed
    Residual risk 0.20 = Change Risk (0.45) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 435 lines diff across 5 files
    0.45
    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.364
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #15372"
    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: 45.2% (MEDIUM) · Higher = larger blast radius
    45.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: 19.6% · Safe to merge
    19.6%