Move foundational flow contexts into Context modules
What does this MR do and why?
Foundational flows keep the extra context they send to the AI Gateway in three different places. Risk Classification keeps it in a Context module beside its definition. Code Review writes it inline in the definition. Recommend Reviewers calls a separate service under ee/app/services.
This MR moves the Code Review and Recommend Reviewers context next to their definitions, the same way Risk Classification does it. Now you can find a flow's context beside the flow. ReviewerDataBuilder becomes RecommendReviewers::Context, so the separate service is gone.
There is no change in behavior. Each flow sends the same categories and the same content as before.
References
- Follow-up MR, stacked on this one, which makes the category name come from the flow reference: !263604 (merged)
Screenshots or screen recordings
Not applicable. There is no UI change.
How to set up and validate locally
Use the gitlab-duo/test project with Duo Agent Platform enabled for its group.
Recommend Reviewers
- Turn on the Recommend Reviewers flow for the group.
- In
gitlab-duo/test, add an approval rule that has two or more eligible approvers. - Create a merge request.
- Open the agent session that the merge request starts. Make sure it finishes and recommends reviewers from the approval rule's approvers, the same as on
master.
Code Review
- On a merge request in
gitlab-duo/test, request a review from the Duo Code Review bot. - Make sure the bot posts its review, the same as on
master. - Push a new commit and request a review from the bot again. Make sure the second review runs and posts as it does on
master.
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.