← Back to Pull requests

Greenfield: Implement direct controller, E2E fixtures, and fuzzer for DesignCenterApplication #16522

Closed
unknown closed this pull request without merging on Nov 26, 2026 23:12 UTC
View on GitHub
unknown unknown commented on Nov 26, 2026 11:07 UTC
Author

This pull request was generated by an AI coding agent.

Implement direct controller, round-trip fuzzer, and real-GCP E2E fixtures for DesignCenterApplication (designcenter.cnrm.cloud.google.com/v1alpha1) following Greenfield Step 2:

  • Autogenerated direct controller and round-trip fuzzer for DesignCenterApplication using one-shot controllerbuilder generate-controller and generate-fuzzer --prepopulate-resource commands.

  • Updated pkg/controller/resourceconfig/static_config.go via generate_static_config.py.

  • Created minimal (designcenterapplication-minimal) and maximal (designcenterapplication-maximal) E2E fixtures referencing parent DesignCenterSpace (enableGCPSharedTemplates: true) with shared template revision URI from Google Catalog (googlespace-simple-agent-runtime-1kqzt4m/revisions/r-2).

  • Recorded authentic HTTP logs and Cloud Audit Probe logs against real GCP (cnrm-barni-4) using RECORD_AUDIT_PROBE=1 ./hack/record-gcp.

  • Added sorting normalizers in tests/e2e/normalize.go for Design Center roles in projectParameters and rolesApisConfig (in both HTTP response logs and KRM observedState) to prevent non-deterministic sorting diffs across re-reconciliation runs.

  • Synchronized tests/apichecks/testdata/exceptions/alpha-missingfields.txt with newly covered fields.

  • Recorded service learnings in .gemini/journals/designcenter.md.
  • Fixes #16521

    ``release-note
    NONE

    
    ## Review Instructions
    
    Use .gemini/skills/reviewgen-greenfield-controller/SKILL.md to conduct the review.
    
    ### KCC Greenfield Controller Auto-Review Results
    * **Trigger criteria matched**: Yes
    * **Post-Judgement, One-Shot Generation, & `static_config.go`**: Pass
    * **Client Creation & Reference Normalization**: Pass
    * **CompareGreenfieldSpec & Structured Reporting**: Pass
    * **LRO Wait & Mandatory Status Updates**: Pass
    * **Fuzzer & Real-GCP Test Coverage**: Pass
    
    <sub>🤖 [Agent session](https://staging.repoagent.dev/#/overseers/kcc/task-session/fix-k8s-config-connector-16521/recipe-fix-20261126-101003-efdf)</sub>
    
    <!-- factory:task-output kind=Change task=recipe-fix-20261126-101003-efdf -->
    
    ---
    
    ### Greenfield: Implement MockGCP and Alignment for DesignCenterApplication
    
    Implement MockGCP support and HTTP log alignment for DesignCenterApplication
    (designcenter.cnrm.cloud.google.com/v1alpha1) following Greenfield Step 3:
    
    - Supported DesignCenterApplication in harness.go.
    - Implemented parseApplicationName and Application CRUD handlers (GetApplication,
      CreateApplication, UpdateApplication, DeleteApplication with LRO support) in mockdesigncenter.
    - Added default field population in mockdesigncenter for Application metadata,
      projectParameters, rolesApisConfig, componentParameters, and serializedApplicationTemplate.
    - Generated and matched _http_mock.log for minimal and maximal test fixtures against
      real-GCP _http.log golden baselines with 0 diff.
    
    This pull request was generated by an AI coding agent.
    
    Fixes #16526
    
    
    release-note
    NONE
    
    ## Review Instructions
    
    Use .gemini/skills/reviewgen-greenfield-mockgcp/SKILL.md to conduct the review.
    
    <!-- factory:group-step issue=16526 -->
    
    ---
    
    ### Greenfield: Release DesignCenterApplication (remove it from BLOCKED_KINDS)
    
    This pull request was generated by an AI coding agent.
    
    Release `DesignCenterApplication` by removing it from the `BLOCKED_KINDS` array in `dev/tasks/build-release-bundle` so its CRD ships in the release bundle.
    
    All test fixtures for `DesignCenterApplication` under `pkg/test/resourcefixture/testdata/basic/designcenter/v1alpha1/designcenterapplication/` (`designcenterapplication-minimal` and `designcenterapplication-maximal`) contain authentic real-GCP HTTP logs (`_http.log`), audit probe logs (`_audit_probe.log`), and mock golden logs (`_http_mock.log`).
    
    Fixes #16538
    
    
    release-note
    New Alpha Resources (Direct Reconciler):
    DesignCenterApplication
    `

    Review Instructions

    Use .gemini/skills/reviewgen-greenfield-release/SKILL.md to conduct the review.

    KCC Greenfield Release Auto-Review Results


    Only
    BLOCKED_KINDS Changed: Pass
    Fixture Evidence (_http.log, _audit_probe.log, _http_mock.log`): Pass
  • Release Note: Pass
  • Detailed Findings / Actions Required:


    None.

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

    Diff: 536 lines (+402 / -134) across 6 files Reviewer: lovelace-coder-bot Review duration: 724m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.48) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.48 · 536 lines diff across 6 files
    0.48
    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%
    60%
    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.376
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #16522"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% 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: 47.9% (MEDIUM) · Higher = larger blast radius
    47.9%
    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: 60.5% · Lower = rushed or shallow review
    60.5%
    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.9% · Safe to merge
    18.9%