nmo-operator: fix upgrade stale-check for same-second reconciliation #135
All Vouch review confidence checks passed
Residual risk 0.05 = Change Risk (0.15) × (1 − Review Confidence (0.65)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.15 · 5 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.47 · 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.107
Real PR Conversation Timeline
1 comments
"Review active on #135"
general
weight: 0.35
jmontleon
redhat-chai-bot
Summary
Fixes a flaky failure in the NMO source upgrade test (
upgrades a GA subscription through the candidate file-based catalog) whereVerifyMaintenanceincorrectly reports staleness when the controller reconciles within the same wall-clock second.Details
In
tests/nmo-operator/internal/nmoutils/upgrade.go, the staleness check uses!updated.After(since). Go'stime.Time.Afteris strict — it returnsfalsewhen timestamps are equal. So when the NMO controller reconciles in the same second thatsincewas captured,updated == since,Afterreturnsfalse, and the negation makes the check think the status is stale.The fix changes the condition to
updated.Before(since), which is also strict: it returnsfalsewhen equal. This means same-second reconciliation is correctly accepted as fresh. The spec-preservation assertion that follows already validates the controller actually ran.Failing job
---
AI-generated. Review for accuracy.
@abrugaro requested from Slack
Chai persona:
Workload Availability<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Bug Fixes
Maintenance verification now accepts controller status updated exactly at the specified start time and continues to reject status updates from before that time. This clarifies the freshness boundary: updates at the start time are considered current, while earlier updates remain stale.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->