← Back to Pull requests

Greenfield: Implement direct controller, E2E fixtures, and fuzzer for DataformReleaseConfig #14830

Closed
unknown closed this pull request without merging on Nov 05, 2026 00:38 UTC
View on GitHub
unknown unknown commented on Nov 03, 2026 22:12 UTC
Author

Implements the direct controller, fuzzer registration, and live recorded E2E fixtures for DataformReleaseConfig (dataform.cnrm.cloud.google.com/v1alpha1).

Summary of Changes


  • Direct Controller Implementation (pkg/controller/direct/dataform/dataformreleaseconfig_controller.go):

  • - Ensured common.NormalizeGreenfieldReferences is called prior to obj.GetIdentity(ctx, reader) in AdapterForObject.
    - Utilizes GAPIC REST client (dataform.NewRESTClient) with m.config.RESTClientOptions().
    - Reconciled steady-state and diffs via common.CompareGreenfieldSpec and structuredreporting.ReportDiff.
    - Handled mandatory setStatus across all Create and Update execution paths.
  • E2E Test Fixtures & Real GCP Recording:

  • - Recorded authentic golden HTTP logs (_http.log), probe logs (_audit_probe.log), and object golden files against real GCP (cnrm-barni-4) using RECORD_AUDIT_PROBE=1 ./hack/record-gcp.
    - Added dataformreleaseconfig-minimal verifying creation with required fields (parentRef, gitCommitish) and update of gitCommitish.
    - Added dataformreleaseconfig-maximal verifying all supported spec fields, including codeCompilationConfig, and updating mutable fields (gitCommitish, cronSchedule, timeZone, disabled).
  • Fuzzer Verification:

  • - Verified round-trip fuzzer passes with 200 seeds via FOCUS=DataformReleaseConfig go test -v ./pkg/fuzztesting/fuzztests -run TestFocusedMappers.
  • Journal Entry:

  • - Added service-specific learnings in .gemini/journals/dataform.md documenting API immutability rules (code_compilation_config is immutable in GCP Dataform API) and automatic release restrictions (requires gitRemoteSettings on the parent repository).

    Real GCP Recording Details


  • Recorded against GCP Project: cnrm-barni-4
  • Fixes #14701

    ``release-note
    NONE
    ``

    This pull request was generated by an AI coding agent.

    <sub>🤖 Agent session</sub>

    <!-- factory:task-output kind=Change task=recipe-fix-20261103-211356-f8cf -->

    Diff: 268 lines (+201 / -67) across 3 files Reviewer: sdowell Review duration: 1585m
    All Vouch review confidence checks passed
    Residual risk 0.25 = Change Risk (0.63) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.63 · 268 lines diff across 3 files
    0.63
    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.335
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.063
    Real PR Conversation Timeline
    1 comments
    "Review active on #14830"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    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: 62.6% (MEDIUM) · Higher = larger blast radius
    62.6%
    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: 24.7% · Safe to merge
    24.7%