← Back to Pull requests

tests/e2e: validate out-of-process k8s.io ext_proc redirector #1704

Closed
unknown closed this pull request without merging on Nov 29, 2026 20:04 UTC
View on GitHub
unknown unknown commented on Nov 29, 2026 19:14 UTC
Author

Implements Issue 4 of docs/ext-proc-extensions.md (Section 5).

Stacked on PR #1703 (760ccc308019547737648320b672a0bd844293ed).

Summary

  • Add a minimal out-of-process Envoy ext_proc v3 gRPC server (tests/e2e/extproc) implementing k8s.io-style vanity redirects, ?go-get=1 Go import HTML responses, CONTINUE header mutation for fallback backends, and delayed responses for timeout testing, along with unit tests and a distroless Dockerfile.

  • Add --no-redirect and --expected-status flags to tests/toolbox/main.go so e2e tests can verify redirect Location headers and non-200 status codes (301, 302, 500, 504) directly.

  • Add TestExtProc in tests/e2e/extproc_test.go (and wire it into dev/tasks/test-e2e) verifying end-to-end in kind:

  • - Runtime CRD annotation discovery via gateway.gke-labs.io/ext-proc-service (transitioning HTTPRoute from ResolvedRefs=False / HTTP 500 to ResolvedRefs=True without restarting the controller).
    - Ordered k8s.io-style redirects (bare repo before subpath, optional .sig suffix capture, pre-encoded query string capture, path + #fragment captures, and trailing-slash rule ordering).
    - ?go-get=1 coexistence via HTTPRoute query-parameter precedence (Pattern A) and single ext_proc with CONTINUE fallback to backendRefs (Pattern B).
    - Fail-closed HTTP 504 Gateway Timeout behavior when ext_proc exceeds the per-call timeout (verifying it does not fall through to backendRefs).

    Fixes #1698

    Diff: 187 lines (+140 / -47) across 2 files Reviewer: justinsb Review duration: 49m
    All Vouch review confidence checks passed
    Residual risk 0.25 = Change Risk (0.59) × (1 − Review Confidence (0.58)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.59 · 187 lines diff across 2 files
    0.59
    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%
    57%
    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.313
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.059
    Real PR Conversation Timeline
    1 comments
    "Review active on #1704"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 58.0% 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: 59.0% (MEDIUM) · Higher = larger blast radius
    59.0%
    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: 58.0% · Lower = rushed or shallow review
    58.0%
    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.8% · Safe to merge
    24.8%