fix(upgrade): report undefined-origin for sources no record covers #3394
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 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.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3394"
general
weight: 0.35
yuanchen8911
Summary
upgrade-checknow reportsundefined-originwhen no record'sfromcovers the source version, instead ofmultiple-boundariesorrecord-blockstelling the operator to upgrade to a floor that nothing describes the hop to.Motivation / Context
From below every recorded starting point, a jump crossing two boundaries said "Upgrade to <first floor> first". No record describes that hop either, so checking it on its own lands on the same question. The MariaDB components reproduce it today: from
25.10.0to26.10.1,mariadb-operatorandmariadb-operator-crdsreportmultiple-boundarieswith "Upgrade to 26.10.0 first".Fixes: #3138
Related: N/A
Type of Change
Component(s) Affected
cmd/aicr,pkg/cli)cmd/aicrd,pkg/server)pkg/recipe)pkg/bundler,pkg/component)pkg/collector,pkg/snapshotter)pkg/validator)pkg/errors,pkg/k8s)docs/,examples/)pkg/upgrade(verdict selection behindaicr upgrade-check)Implementation Notes
matchVersions: when no record'sfromcovers the source, crossed or not, the result isblocked/undefined-origin.StoppedAtis the lowest crossed record'sto, and the explanation names the earliest recorded starting point when the source sits below it. It outranksrecord-blocksandmultiple-boundariesbecause both tell the operator to upgrade to their stop first, and that hop starts from the same undescribed origin.fromdomains), the new rule only fires below the earliest origin or above the pin.crossingPhraseis shared by themultiple-boundariesandundefined-originexplanations. Themultiple-boundariestext is unchanged.cli-reference.mdandupgrading.mdare updated to the new order. Tests use synthetic fixtures only.Out of scope: older, related problems where some record does cover the source (shared
tofloors, and stops no record reaches) are tracked in #3397.Testing
make qualifyon macOS:-raceGo suite, lint (0 issues), tuning-check, coverage-check, e2e (31 passed), scan and license-check pass. The shell and release-script tests needed a local GNUtimeoutstand-in, since macOS ships none.pkg/ociTestHelmPinnedVersionExplicitVersionPullwants the pinnedhelmv4.3.1, and this machine has v4.2.0. Unrelated to this diff.api-diffandopenapi-diffdid not run (apidiffandoasdiffare not installed). The diff adds and changes only unexported functions and touches nothing underapi/orpkg/client/.pkg/upgradecoverage: 97.8% → 97.8% (0.0%).anyFromCoversto look only at crossed records, or dropping the origin guards on the twomultiple-boundariesexemptions, fails the suite.25.10.0and26.10.1(aicr upgrade-check --from <recipe> --to <recipe> --deployer helm). Before:multiple-boundaries, "Upgrade to 26.10.0 first". After: all three components reportundefined-origin, naming26.3.0as the earliest recorded starting point. From26.3.0and26.10.0the output is identical before and after.Risk Assessment
Rollout notes: N/A. Only jumps from a source no record covers change, and they stay
blockedwith a different reason and stop.Checklist
make testwith-race)make lint)git commit -s -S) — GPG signing info