feat: add validation to prevent anyOf misconfiguration #418
All Vouch review confidence checks passed
Residual risk 0.23 = Change Risk (0.59) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.59 · 175 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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.309
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.059
Real PR Conversation Timeline
1 comments
"Review active on #418"
general
weight: 0.35
ajaysundark
Description
This PR adds CEL validation to the CRD to explicitly reject
NodeReadinessRuleconfigurations where theconditionPolicyis set toanyOfand any of the defined conditions has adefaultStatusequal to itsrequiredStatus.As discussed with @ajaysundark & @AnuragThePathak in PR #315, allowing
defaultStatus == requiredStatuswithin ananyOfrule creates a silent logical short-circuit, causing the rule to be considered satisfied even if the condition is never reported by the Node.By enforcing this natively via CEL XValidation, we keep the webhook lean while still preventing the misconfiguration. This PR also adds a warning to the concepts documentation.
Related Issue
Fixes #414
Type of Change
/kind feature
/kind documentation
Testing
nodereadinessrule_controller_test.goto includeenvtestcoverage verifying that the API server actively rejectsanyOf+defaultStatusconfigurations via CEL.Checklist
make testpassesmake lintpassesDoes this PR introduce a user-facing change?
``
release-noteconditionPolicy: anyOfFeature: Added CEL validation to the NodeReadinessRule CRD to reject configurations using
when a condition'sdefaultStatusis equal to itsrequiredStatus`, as this results in a silent evaluation short-circuit.