Route Standard Duo Code Review to structured findings behind a flag
What does this MR do and why?
Adds the duo_code_review_standard_structured_findings flag (gitlab_com_derisk, per user). When it is on, Standard Duo Code Review runs code_review 4.0.0 (feat(code-review): add structured findings for ... (gitlab-org/modelops/applied-ml/code-suggestions/ai-assist!7444 - merged)), which returns findings through the same code_review_findings schema as the deep flow. The comment processor accepts that JSON when either flag is on for the same user, so a run can't get 4.0.0 and then have its output rejected.
No change with the flag off.
Screenshots or screen recordings
N/A, backend-only change. On GDK with the flag on, a fresh review posted 5 findings with severity headers and a computed summary, and a clean MR posted "nothing to comment on".
How to set up and validate locally
- Check out feat(code-review): add structured findings for ... (gitlab-org/modelops/applied-ml/code-suggestions/ai-assist!7444 - merged) in your GDK's AI Gateway and restart
duo-workflow-service. - In the Rails console:
Feature.enable(:duo_code_review_standard_structured_findings, User.find(1)) - Request a Duo Code Review on any merge request. Findings now start with a
**[Severity] category**header and the summary lists findings by severity.
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.