← Back to Pull requests

Greenfield: Implement direct controller, E2E fixtures, and fuzzer for ComputeNotificationEndpoint #15570

Open
unknown opened this pull request with 334 lines diff across 4 files
View on GitHub
unknown unknown commented on Nov 13, 2026 08:34 UTC
Author

Implement direct controller, round-trip fuzzer, and E2E test fixtures for ComputeNotificationEndpoint under compute.cnrm.cloud.google.com/v1alpha1 following Greenfield Step 2 (.gemini/skills/kcc-direct-controller-logic-greenfield-implementer/generated/SKILL.md).

Summary of Changes


  • Controller & Client: Generated direct controller in pkg/controller/direct/compute/computenotificationendpoint_controller.go and added newRegionNotificationEndpointsClient to pkg/controller/direct/compute/client.go using GAPIC REST client (compute.NewRegionNotificationEndpointsRESTClient).

  • Immutability Handling: Reconciler verifies spec with common.CompareGreenfieldSpec and rejects in-place updates (as Compute regionNotificationEndpoints has no Update or Patch RPC), updating status on no-op reconciliations.

  • Round-Trip Fuzzer: Generated and verified round-trip fuzzer in pkg/controller/direct/compute/computenotificationendpoint_fuzzer.generated.go. Verified with FOCUS=ComputeNotificationEndpoint go test -v -count=1 ./pkg/fuzztesting/fuzztests -run TestFocusedMappers.

  • Static Config: Registered ComputeNotificationEndpoint with k8s.ReconcilerTypeDirect in pkg/controller/resourceconfig/static_config.go.

  • E2E Test Fixtures: Created minimal and maximal test fixtures under pkg/test/resourcefixture/testdata/basic/compute/v1alpha1/computenotificationendpoint/ with manifests and identities.

  • Exceptions & Journal: Updated tests/apichecks/testdata/exceptions/alpha-missingfields.txt to remove resolved field entries and documented service notes in .gemini/journals/compute.md.

  • Test List: Listed test fixtures in tests/e2e/testdata/fixtures-compute-list.txt to keep parallel test runner catch-all checks passing in presubmit.
  • Real GCP Execution & Allowlist Gating


    During E2E testing against real GCP (cnrm-barni-4) via hack/record-gcp, creating regionNotificationEndpoints failed with 400 Bad Request: "Invalid resource usage: 'HealthCheck as a Service feature is not available for this project.'.". The resource is gated behind an internal Google Cloud project feature allowlist ("HealthCheck as a Service"). Following repository standards, failing HTTP logs and report files were omitted, and synthetic logs were not committed. Greenfield progress for this kind is blocked on project allowlisting on real GCP.

    Fixes #15565

    ``release-note
    NONE
    ``

    <sub>🤖 Agent session</sub>

    <!-- factory:task-output kind=Change task=recipe-fix-20261113-073536-b75e -->

    Diff: 334 lines (+250 / -84) across 4 files Reviewer: lovelace-coder-bot Review duration: 24847m
    All Vouch review confidence checks passed
    Residual risk 0.25 = Change Risk (0.47) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.47 · 334 lines diff across 4 files
    0.47
    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%
    46%
    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.348
    Shallow Review Depth shallow_review_depth
    0.344
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #15570"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% 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.2% (MEDIUM) · Higher = larger blast radius
    47.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: 46.7% · Lower = rushed or shallow review
    46.7%
    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: 25.1% · Safe to merge
    25.1%