← Back to Pull requests

Greenfield: Prepopulate direct KRM types, identity, and judgement queue for DialogflowTool #14950

Closed
unknown closed this pull request without merging on Nov 27, 2026 19:09 UTC
View on GitHub
unknown unknown commented on Nov 05, 2026 03:09 UTC
Author

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

  • Added generate-types and generate-identity for DialogflowTool:Tool in apis/dialogflow/generate.sh backed by google.cloud.dialogflow.cx.v3.

  • Scaffolded apis/dialogflow/v1alpha1/dialogflowtool_types.go, generated dialogflowtool_identity.generated.go, dialogflowtool_reference.generated.go, and updated deepcopy implementations.

  • Added dialogflowtools.dialogflow.cnrm.cloud.google.com to knownInvalidCRDs in tests/apichecks/crds_test.go for empty fallbackPrompt option struct.

  • Updated alpha-missingfields.txt golden exception file.

  • Recorded entries in apis/dialogflow/judgement_queue.yaml with status open for Step 1b triage.

  • Recorded notes in .gemini/journals/dialogflow.md.
  • Fixes #14945

    ``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-14945/recipe-fix-20261105-013723-e192)</sub>
    
    <!-- factory:task-output kind=Change task=recipe-fix-20261105-013723-e192 -->
    
    ---
    
    ### Greenfield: Triage judgement queue and finalize direct KRM types and identity for DialogflowTool
    
    This pull request was generated by an AI coding agent.
    
    Triage `apis/dialogflow/judgement_queue.yaml` and finalize direct KRM types, IdentityV2, and reference types for `DialogflowTool` (`dialogflow.cnrm.cloud.google.com/v1alpha1`) following Greenfield Step 1b:
    
    - Modeled `DialogflowTool` as a child resource under `DialogflowCXAgent` (`projects/{project}/locations/{location}/agents/{agent}/tools/{tool}`). Replaced separate `ProjectRef`, `Location`, and guessed `AgentRef` with required, immutable `ParentRef *DialogflowCXAgentRef` (`json:"parentRef"`) per `PARENT_AND_IDENTITY.md` (Case B).
    - Regenerated `dialogflowtool_identity.generated.go` via `generate-identity` to parse ancestor segments directly from `spec.parentRef`.
    - Verified server-generated ID in `CreateToolRequest` (no `tool_id` parameter); maintained `identity.ServerGeneratedIdentity` conformance and updated `ResourceID` comment.
    - Moved `Tool_*` nested structs into `dialogflowtool_types.go` and converted reference fields:
      - `spec.openAPISpec.authentication.apiKeyConfig.secretVersionForAPIKey`: `secretVersionForAPIKeyRef (*refsv1beta1.SecretManagerSecretVersionRef)`.
      - `spec.openAPISpec.authentication.bearerTokenConfig.secretVersionForToken`: `secretVersionForTokenRef (*refsv1beta1.SecretManagerSecretVersionRef)`.
      - `spec.openAPISpec.authentication.oauthConfig.secretVersionForClientSecret`: `secretVersionForClientSecretRef (*refsv1beta1.SecretManagerSecretVersionRef)`.
      - `spec.openAPISpec.authentication.serviceAccountAuthConfig.serviceAccount`: `serviceAccountRef (*refsv1beta1.IAMServiceAccountRef)`.
      - `spec.openAPISpec.serviceDirectoryConfig.service`: `serviceRef (*servicedirectoryv1beta1.ServiceDirectoryServiceRef)`.
      - Forked `Tool_DataStoreConnection` with `dataStoreRef (*discoveryenginev1alpha1.DiscoveryEngineDataStoreRef)` to preserve shared `DataStoreConnection` used by untriaged `DialogflowFlow` and `DialogflowPage`.
    - Resolved `spec.openAPISpec.authentication.oauthConfig.clientID` and `clientSecret` as `not-applicable` for OAuth credentials from the OAuth provider.
    - Resolved all 13 queue entries in `apis/dialogflow/judgement_queue.yaml` for `DialogflowTool` including `untriaged-bulk-generation`.
    - Re-generated mappers in `pkg/controller/direct/dialogflow/mapper.generated.go`, CRD manifests, deepcopy, and updated `alpha-missingfields.txt`.
    - Documented service notes in `.gemini/journals/dialogflow.md`.
    
    Fixes #16543
    
    
    release-note
    NONE
    ``

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

    Diff: 480 lines (+360 / -120) across 6 files Reviewer: seans3 Review duration: 32639m
    All Vouch review confidence checks passed
    Residual risk 0.23 = Change Risk (0.52) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 480 lines diff across 6 files
    0.52
    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.369
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #14950"
    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: 52.3% (MEDIUM) · Higher = larger blast radius
    52.3%
    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: 22.6% · Safe to merge
    22.6%