fix: return empty result on rule reconcile errors #472
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.35) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.35 · 178 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.310
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #472"
general
weight: 0.35
Karthik-K-N
Description
In
RuleReconciler.Reconcile, five return sites returnedctrl.Result{RequeueAfter: time.Minute}, erron errors. Whenerr != nil, controller-runtime always ignoresRequeueAfterand logs:Warning: Reconciler returned both a result with either RequeueAfter or Requeue set and a non-nil error. RequeueAfter and Requeue will always be ignored if the error is non-nil.This change updates those sites to
return ctrl.Result{}, err, matching the pattern used inNodeReconciler.Reconcile(internal/controller/node_controller.go:107), and adds a unit test innodereadinessrule_controller_test.goverifying the result on reconcile failure.Related Issue
Fixes #468
Type of Change
/kind bug
Testing
Ran unit tests and linters locally:
make test: all controller tests passing, 86.9% statement coverage ininternal/controller.make lint: clean run, 0 issues across active linters.Checklist
make testpassesmake lintpassesDoes this PR introduce a user-facing change?
``
release-note
``NONE
Doc #(issue)
Generative AI Usage Disclosure
How they were used:
Used an AI assistant to edit the five return statements in nodereadinessrule_controller.go and add a unit test in nodereadinessrule_controller_test.go. Verified all changes through local code review, make test, and make lint.