← Back to Pull requests

hack/manual-validate: add validation script for DialogflowConversationProfile #16287

Closed
unknown closed this pull request without merging on Nov 22, 2026 22:03 UTC
View on GitHub
unknown unknown commented on Nov 22, 2026 01:44 UTC
Author

Validate the DialogflowConversationProfile controller against real GCP.

Result: PASS (27 passed, 0 failed)
Controller bugs: none
Not checked: nothing
Script fixes during the run: none

Fixes #16286

This pull request was generated by an AI coding agent.

``release-note
NONE


<details>
<summary>📎 <code>receipts.md</code></summary>

# Validation receipts

1 run(s), each from a clean start. Copied from the run directories; project numbers and email addresses masked.

## Run 1: `DialogflowConversationProfile/20261122T013800Z`

### Manual validation: DialogflowConversationProfile

**Verdict: PASS** (27 passed, 0 failed)

yaml
kind: DialogflowConversationProfile
project_id: cnrm-barni-4
project_number: <project-number>
unique_id: mv311480075e
namespace: mv311480075e
git_sha: 93b6bcc3de76b9fb346ac9ef874b5f763d6089ae
git_dirty: 0
gcloud_account: cnrm-barni-1.svc.id.goog
controller_credentials: application-default (ADC)
rest_token_cmd: gcloud auth application-default print-access-token
started_utc: 2026-11-22T01:38:02Z
started_pdt: 2026-11-21T17:38:02PST
host: Linux 6.12.105+ x86_64
fixture_dir: pkg/test/resourcefixture/testdata/basic/dialogflow/v1alpha1/dialogflowconversationprofile/dialogflowconversationprofile-maximal
apis_enabled_by_run: none
finished_utc: 2026-11-22T01:40:47Z
finished_pdt: 2026-11-21T17:40:47PST
`

Local KCC (hack/manual-validate/kcc-local): envtest apiserver + KCC admission webhooks + the same kccmanager as cmd/manager + deletion defender.
Every Kubernetes step was cross-checked out of band with bq/gcloud and raw REST (curl),
never through the controller's client libraries or KCC status (REST token: see rest_token_cmd above).
Webhooks ran, except deny-immutable-field-updates (excluded under envtest, same as the e2e harness).

| Time (UTC) | Phase | Check | Result | Evidence | Detail |
|---|---|---|---|---|---|
| 2026-11-22T01:38:04Z | setup | API dialogflow.googleapis.com enabled | INFO |
cloud/setup-api-dialogflow.txt | already enabled |
| 2026-11-22T01:38:06Z | setup | API logging.googleapis.com enabled | INFO |
cloud/setup-api-logging.txt | already enabled |
| 2026-11-22T01:39:48Z | setup | local KCC up: envtest + webhooks + manager + deletion defender | INFO |
manager.log | 874 CRDs; webhooks serving (8 configs); deny-immutable-field-updates webhook excluded (as in e2e) |
| 2026-11-22T01:39:48Z | deps | dependencies | INFO |
| none required for DialogflowConversationProfile |
| 2026-11-22T01:39:53Z | create | kubectl apply create.yaml | PASS |
k8s/create-apply.txt | dialogflowconversationprofile.dialogflow.cnrm.cloud.google.com/dialogflowconversationprofile-max-mv311480075e created; |
| 2026-11-22T01:39:59Z | create | DialogflowConversationProfile/dialogflowconversationprofile-max-mv311480075e Ready (gen 1) | PASS |
k8s/create-dialogflowconversationprofile-dialogflowconversationprofile-max-mv311480075e.yaml | after 6s reason=UpToDate |
| 2026-11-22T01:39:59Z | create | status.externalRef | INFO |
k8s/create-dialogflowconversationprofile-dialogflowconversationprofile-max-mv311480075e.json | projects/cnrm-barni-4/locations/global/conversationProfiles/z8pPD-A4SQOqNmKwdMFmdw |
| 2026-11-22T01:40:00Z | create | ListConversationProfiles contains profile matching displayName | PASS |
cloud/create-list-profiles.json | projects/cnrm-barni-4/locations/global/conversationProfiles/z8pPD-A4SQOqNmKwdMFmdw |
| 2026-11-22T01:40:00Z | create | status.externalRef matches cloud resource name | PASS |
k8s/create-dialogflowconversationprofile-dialogflowconversationprofile-max-mv311480075e.json | 'projects/cnrm-barni-4/locations/global/conversationProfiles/z8pPD-A4SQOqNmKwdMFmdw' |
| 2026-11-22T01:40:01Z | create | REST GET profile returns 200 | PASS |
cloud/create-profile.json | HTTP 200 |
| 2026-11-22T01:40:01Z | create | cloud displayName matches spec | PASS |
cloud/create-profile.json | .displayName == conv-profile-max-mv311480075e |
| 2026-11-22T01:40:01Z | create | cloud languageCode matches spec | PASS |
cloud/create-profile.json | .languageCode == en-US |
| 2026-11-22T01:40:01Z | create | cloud loggingConfig.enableStackdriverLogging matches spec | PASS |
cloud/create-profile.json | .loggingConfig.enableStackdriverLogging // false \| tostring == true |
| 2026-11-22T01:40:01Z | create | gcloud CLI surface | INFO |
cloud/create-profile.json | no gcloud CLI command for dialogflow conversation-profiles; REST GET used out of band |
| 2026-11-22T01:40:02Z | create | REST GET verify-list-profiles returns 200 | PASS |
cloud/create-verify-list-profiles.json | HTTP 200 |
| 2026-11-22T01:40:02Z | create | ListConversationProfiles returns created profile | PASS |
cloud/create-verify-list-profiles.json | 'projects/cnrm-barni-4/locations/global/conversationProfiles/z8pPD-A4SQOqNmKwdMFmdw' |
| 2026-11-22T01:40:12Z | update | kubectl apply update.yaml | PASS |
k8s/update-apply.txt | dialogflowconversationprofile.dialogflow.cnrm.cloud.google.com/dialogflowconversationprofile-max-mv311480075e configured; |
| 2026-11-22T01:40:14Z | update | DialogflowConversationProfile/dialogflowconversationprofile-max-mv311480075e Ready (gen 2) | PASS |
k8s/update-dialogflowconversationprofile-dialogflowconversationprofile-max-mv311480075e.yaml | after 0s reason=UpToDate |
| 2026-11-22T01:40:15Z | update | k8s generation advanced to 2 | PASS |
k8s/update-dialogflowconversationprofile-dialogflowconversationprofile-max-mv311480075e.json | .metadata.generation == 2 |
| 2026-11-22T01:40:16Z | update | REST GET profile returns 200 | PASS |
cloud/update-profile.json | HTTP 200 |
| 2026-11-22T01:40:16Z | update | cloud displayName updated to new spec | PASS |
cloud/update-profile.json | .displayName == conv-profile-max-mv311480075e-updated |
| 2026-11-22T01:40:16Z | update | cloud languageCode matches spec | PASS |
cloud/update-profile.json | .languageCode == en-US |
| 2026-11-22T01:40:16Z | update | cloud loggingConfig.enableStackdriverLogging updated to new spec | PASS |
cloud/update-profile.json | .loggingConfig.enableStackdriverLogging // false \| tostring == false |
| 2026-11-22T01:40:16Z | update | createTime preserved, updateTime updated | INFO |
cloud/update-profile.json | createTime=2026-11-22T01:39:53.904764Z updateTime=2026-11-22T01:40:12.543015Z |
| 2026-11-22T01:40:17Z | update | REST GET verify-list-profiles returns 200 | PASS |
cloud/update-verify-list-profiles.json | HTTP 200 |
| 2026-11-22T01:40:17Z | update | ListConversationProfiles reflects updated displayName | PASS |
cloud/update-verify-list-profiles.json | 'conv-profile-max-mv311480075e-updated' |
| 2026-11-22T01:40:37Z | steady | still Ready, observedGeneration == generation | PASS |
k8s/steady-dialogflowconversationprofile-dialogflowconversationprofile-max-mv311480075e.json | (([.status.conditions[]? \| select(.type=="Ready")][0].status) + ":" + ((.status.observedGeneration == .metadata.generation) \| tostring)) == True:true |
| 2026-11-22T01:40:40Z | delete | DialogflowConversationProfile/dialogflowconversationprofile-max-mv311480075e removed from k8s | PASS |
k8s/delete-delete.txt | after 3s |
| 2026-11-22T01:40:41Z | delete | REST GET profile-gone returns 404 | PASS |
cloud/delete-profile-gone.json | HTTP 404 |
| 2026-11-22T01:40:43Z | delete | audit log write calls on z8pPD-A4SQOqNmKwdMFmdw | PASS |
cloud/delete-audit-profile.json | 'CreateConversationProfile,UpdateConversationProfile,DeleteConversationProfile' |
| 2026-11-22T01:40:44Z | delete | REST GET verify-list-profiles returns 200 | PASS |
cloud/delete-verify-list-profiles.json | HTTP 200 |
| 2026-11-22T01:40:44Z | delete | ListConversationProfiles no longer contains deleted profile | PASS |
cloud/delete-verify-list-profiles.json | '' |
| 2026-11-22T01:40:44Z | teardown | manager log free of panics | PASS |
manager.log | |
| 2026-11-22T01:40:45Z | cleanup | no leaked GCP resources (profile gone) | PASS |
cloud/cleanup-leakcheck-profile.json | HTTP 404 |

Files

  • rendered/: the exact manifests applied

  • k8s/: kubectl output and object snapshots after each phase

  • cloud/: raw gcloud/bq/REST responses (cloud/requests.txt lists every REST call)

  • manager.log (kcc-local: apiserver, webhooks, controllers), run.log`
  • </details>

    <sub>🤖 Agent session</sub>

    <!-- factory:task-output kind=Change task=recipe-fix-20261122-011613-70cc -->

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: barney-s Review duration: 1218m
    All Vouch review confidence checks passed
    Residual risk 0.22 = 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 · 650 lines diff across 8 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.388
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #16287"
    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% (MEDIUM) · Higher = larger blast radius
    52%
    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.5% · Safe to merge
    22.5%