← Back to Pull requests

Pass ListenerSet conflict and ReferenceGrant conformance tests (ListenerSet part 2a) #623

Closed
unknown closed this pull request without merging on Oct 05, 2026 13:26 UTC
View on GitHub
unknown unknown commented on Oct 05, 2026 12:03 UTC
Author

This PR implements conflict detection (hostname and protocol), precedence merging, ReferenceGrant support, and aggregate status calculation for ListenerSet resources (ListenerSet part 2a).

Summary of Changes

1. Precedence Ordering & Precedence Merging:
- Merge Gateway listeners and attached ListenerSets in CompileModel in strict precedence order: Gateway listeners first, followed by allowed ListenerSets ordered by CreationTimestamp (oldest first), breaking ties by namespace/name.
2. Conflict Detection Pass:
- Add a conflict detection pass over effective listeners in CompileModel. Lower-precedence listeners on the same port that have conflicting protocols (ProtocolConflict) or identical hostnames on compatible protocols (HostnameConflict) are marked Accepted=False, Programmed=False, and Conflicted=True.
3. Data Plane Isolation:
- Exclude conflicted listeners from data-plane proxy generation (BuildProxyConfig, ExtractCertificates) and route binding candidate selection (bindRouteParentRef).
4. ListenerSet-Level Status Aggregation & Gateway attachedListenerSets:
- If all listeners in a ListenerSet are invalid or conflicted, mark the ListenerSet top-level conditions as Accepted=False / Programmed=False with reason ListenersNotValid, while populating per-listener statuses.
- If at least one listener is valid, mark Accepted=True / Programmed=True.
- Gateway status.attachedListenerSets counts only accepted ListenerSets.
5. ReferenceGrant Support:
- Cross-namespace Secret references on ListenerSets without a matching ReferenceGrant get ResolvedRefs=False (RefNotPermitted) and propagate to ListenerSet ListenersNotValid.
6. Controller Watches:
- Add watches in ListenerSetReconciler for sibling ListenerSets, ReferenceGrants, and Secrets.
7. Tests & Journal:
- Add table-driven unit tests in pkg/state/compiled_test.go.
- Enable ListenerSetHostnameConflict, ListenerSetProtocolConflict, and ListenerSetReferenceGrant in tests/e2e/conformance_test.go.
- Update conformance skill journal at .agents/skills/implement-conformance-test/journal/listenerset.md.

Fixes #618

Diff: 277 lines (+207 / -70) across 3 files Reviewer: justinsb Review duration: 83m
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 277 lines diff across 3 files
0.40
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%
60%
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.337
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #623"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% 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: 39.6% (MEDIUM) · Higher = larger blast radius
39.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: 60.5% · Lower = rushed or shallow review
60.5%
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: 15.6% · Safe to merge
15.6%