Give risk assessment confidence its own tier enum
What does this MR do and why?
This is a follow-up to the review notes on !252780 (merged), tracked in #627426 (closed).
This MR handles only the first suggestion, from !252780 (comment 3776674877): the confidenceTier field reused the risk tier enum, so the API described a confidence of 75 or higher as CRITICAL, "Critical risk." High confidence is good news, not a risk. This MR gives confidence its own enum, MergeRequestRiskConfidenceTier (LOW, MEDIUM, HIGH, VERY_HIGH). The MR widget now reads VERY_HIGH directly, instead of relabelling CRITICAL.
References
Screenshots or screen recordings
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
-
Enable both
show_duo_mr_risk_classification_widgetandduo_mr_risk_classificationfeature flags -
Enable the
risk_classification/v1flow for a project -
Open a merge request in that project and wait for the risk classification to finish. The risk assessment widget shows a result.
-
The widget should have no visual difference
-
Open GraphQL Explorer (
http://gdk.test:3000/-/graphql-explorer) and run this query, using the IID of the merge request from step 1:query { project(fullPath: "gitlab-duo/test") { mergeRequest(iid: "<iid>") { riskAssessment { confidence confidenceTier } } } }Expect
confidenceTierto be one of LOW, MEDIUM, HIGH, or VERY_HIGH.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

