← Back to Pull requests

Greenfield: Prepopulate direct KRM types, identity, and judgement queue for DLPContentPolicy #15363

Closed
unknown closed this pull request without merging on Nov 11, 2026 05:51 UTC
View on GitHub
unknown unknown commented on Nov 11, 2026 00:33 UTC
Author

Prepopulates direct KRM types, IdentityV2, reference, and judgement queue for
DLPContentPolicy under dlp.cnrm.cloud.google.com/v1alpha1 following Greenfield Step 1a
(prepopulate/SKILL.md):

  • Created proto overlay mockgcp/apis/google/privacy/dlp/v2/dlp.proto adding ContentPolicy,

  • its RPCs in DlpService, and its request/response/verdict messages on top of the pinned base
    proto, and wired it in dev/tools/controllerbuilder/generate-proto.sh and kccProtoOverrides.
  • Added generate-types with --prepopulate-resource and generate-identity for

  • DLPContentPolicy:ContentPolicy in apis/dlp/generate.sh.
    Generated dlpcontentpolicy_types.go, dlpcontentpolicy_identity.generated.go,
    and dlpcontentpolicy_reference.generated.go.
  • Added DLPContentPolicy to BLOCKED_KINDS in dev/tasks/build-release-bundle.

  • Added dlpcontentpolicies.dlp.cnrm.cloud.google.com to knownInvalidCRDs in

  • tests/apichecks/crds_test.go for empty oneof option spec.rules[].conditions[].infoTypeCondition.anyInfoType.
  • Initialized apis/dlp/judgement_queue.yaml with open findings for Step 1b triage.

  • Updated alpha-missingfields.txt golden exception file.

  • Documented service-specific learnings in .gemini/journals/dlp.md.
  • KCC Greenfield Step 1 (Prepopulate) Auto-Review Results


    Trigger criteria matched: Yes
    generate.sh & Flags Check: Pass (generate-types --prepopulate-resource, generate-identity, no --allow-non-ga-proto)
    Judgement Queue Open Check: Pass (apis/dlp/judgement_queue.yaml initialized with untriaged-bulk-generation and all findings status: open)
    Mechanical Output & Idempotency: Pass (./apis/dlp/generate.sh is 100% idempotent and produces zero diff on subsequent runs)
    Release Bundle Blocklist (BLOCKED_KINDS): Pass ("DLPContentPolicy" added in alphabetical order to BLOCKED_KINDS in dev/tasks/build-release-bundle)
    Mapper Compilation & apichecks: Pass (go build ./apis/dlp/... ./pkg/controller/direct/dlp/... and go test ./tests/apichecks/... pass cleanly)

    Workflow feedback


  • In services without existing direct controller implementations, generate.sh only requires generate-types and generate-identity for scaffolding new resource types.

  • When backporting protos from upstream googleapis into mockgcp/apis/, preserving the pinned base version for unaffected messages prevents unwanted diffs and false-positive reference violations on pre-existing resources.
  • Fixes #15352

    ``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-15352/recipe-fix-20261110-233852-ffa0)</sub>
    
    <!-- factory:task-output kind=Change task=recipe-fix-20261110-233852-ffa0 -->
    
    ---
    
    ### Greenfield: Triage judgement queue and finalize direct KRM types for DLPContentPolicy
    
    Triage all findings in `apis/dlp/judgement_queue.yaml` and finalize direct KRM types, CRD, and parent references for `DLPContentPolicy`:
    
    - Inlined `*parent.ProjectAndLocationRef` in `DLPContentPolicySpec`, replacing separate `ProjectRef` and `Location` fields while enforcing immutability on location.
    - Verified `CreateContentPolicyRequest` defines `content_policy_id` parameter, confirming client-specified resource ID support (`identity.IdentityV2`).
    - Resolved BigQuery logging destination fields (`logToBigQuery.{projectID,datasetID,tableID}`) as primitive string fields matching the proto definition and direct mappers.
    - Deferred `google.protobuf.Empty` (`anyInfoType`) per standard team conventions.
    - Maintained `.spec.inspectConfig.customInfoTypes[].storedType.createTime` in Spec as an optional field to match proto and direct mapper definitions.
    - Regenerated CRD and deepcopy methods via `./apis/dlp/generate.sh`.
    - Documented triage findings in `.gemini/journals/dlp.md`.
    
    Fixes #15379
    
    
    release-note
    NONE
    ``

    This pull request was generated by an AI coding agent.

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

    Diff: 505 lines (+378 / -127) across 6 files Reviewer: ada-coder-bot Review duration: 317m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.48) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.48 · 505 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%
    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.373
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #15363"
    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: 47.6% (MEDIUM) · Higher = larger blast radius
    47.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: 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: 20.6% · Safe to merge
    20.6%