← Back to Pull requests

Greenfield: Add E2E fixtures, golden logs, audit probes, and test exceptions for NetworkSecurityGatewaySecurityPolicyRule (#15074) #15087

Closed
unknown closed this pull request without merging on Nov 06, 2026 17:42 UTC
View on GitHub
unknown unknown commented on Nov 06, 2026 02:15 UTC
Author

Add minimal and maximal E2E test fixtures, authentic real GCP golden logs, audit probe logs, test exceptions, and service journal updates for NetworkSecurityGatewaySecurityPolicyRule (networksecurity.cnrm.cloud.google.com/v1alpha1).

Fixes #15074

Key Changes


  • Added minimal and maximal E2E test fixtures under pkg/test/resourcefixture/testdata/basic/networksecurity/v1alpha1/networksecuritygatewaysecuritypolicyrule/.

  • Recorded and verified authentic GCP golden logs with 7/7 passing checks for both minimal and maximal fixtures.

  • Added audit probe logs for minimal and maximal fixtures.

  • Updated test exceptions in tests/apichecks/testdata/exceptions/alpha-missingfields.txt.

  • Updated service journal in .gemini/journals/networksecurity.md.
  • ``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-15074/recipe-care-comments-20261106-044137-6995)</sub>
    
    <!-- factory:task-output kind=Change task=recipe-fix-20261106-003251-58f8 -->
    
    ---
    
    ### Greenfield: Implement MockGCP and Alignment for NetworkSecurityGatewaySecurityPolicyRule
    
    Implement Phase 3 (MockGCP and Alignment) for `NetworkSecurityGatewaySecurityPolicyRule` (`networksecurity.cnrm.cloud.google.com/v1alpha1`).
    
    Key changes:
    - Added MockGCP CRUD operations for `GatewaySecurityPolicyRule` in `mockgcp/mocknetworksecurity/gatewaysecuritypolicyrule.go`.
    - Enabled `NetworkSecurityGatewaySecurityPolicyRule` in mock test harness in `config/tests/samples/create/harness.go`.
    - Handled proto3 zero-value omissions for `applicationMatcher` and `tlsInspectionEnabled` in `mocknetworksecurity` normalizer and `golden_alignment_test.go`.
    - Generated mock golden HTTP logs (`_http_mock.log`) for `gatewaysecuritypolicyrule-minimal` and `gatewaysecuritypolicyrule-maximal`.
    - Verified with `hack/compare-mock`, `TestGoldenLogAlignment`, and `./dev/ci/presubmits/tests-e2e-fixtures-suite networksecurity`.
    
    This pull request was generated by an AI coding agent.
    
    Fixes #15107
    
    <!-- factory:group-step issue=15107 -->
    
    ---
    
    ### Greenfield: Release NetworkSecurityGatewaySecurityPolicyRule (remove it from BLOCKED_KINDS)
    
    Removes `NetworkSecurityGatewaySecurityPolicyRule` from `BLOCKED_KINDS` in `dev/tasks/build-release-bundle` so its CRD ships in the release bundle.
    
    Verified that all test fixtures under `pkg/test/resourcefixture/testdata/basic/networksecurity/v1alpha1/networksecuritygatewaysecuritypolicyrule/` (`gatewaysecuritypolicyrule-minimal` and `gatewaysecuritypolicyrule-maximal`) have authentic real-GCP logs (`_http.log`), audit probe logs (`_audit_probe.log`), and mock golden logs (`_http_mock.log`).
    
    
    release-note
    New Alpha Resources (Direct Reconciler):
    NetworkSecurityGatewaySecurityPolicyRule
    ``

    Fixes #15144

    This pull request was generated by an AI coding agent.

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

    Diff: 367 lines (+275 / -92) across 4 files Reviewer: lovelace-coder-bot Review duration: 926m
    All Vouch review confidence checks passed
    Residual risk 0.31 = Change Risk (0.71) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.71 · 367 lines diff across 4 files
    0.71
    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.353
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.071
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #15087"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% 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: 70.9% (HIGH) · Higher = larger blast radius
    70.9%
    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: 30.7% · Safe to merge
    30.7%