Update DCR prompt to include all diffs in one go
What does this MR do and why?
- This MR updates the DCR prompt to send all diffs in one-go
- Major prompt changes are behind the feature flag,
duo_code_review_multi_file - Feature flag rollout issue: [Feature flag] Rollout of `duo_code_review_mult... (#536005 - closed)
How to set up and validate locally
Prerequisites:
- Make sure the AI features are enabled locally using this guide
- Enable
duo_code_review_multi_filefeature flag for the user - Open a MR with some files where context from multiple files in one-go is relevant such as adding scope in one file and using the wrong scope in another file.
- Assign
GitLabDuoas a reviewer either by commenting/assign_reviewer @GitLabDuoor selectGitLabDuofrom the reviewers dropdown.
Validate:
-
Make sure GitLabDuoworks as expected withoutduo_code_review_multi_filebeing enabled. -
Enable duo_code_review_multi_fileand make sureGitLabDuopoints out the usage of wrong scope. -
Make sure there are no unwanted comments from GitLabDuo.
Screenshot
-
Tested a dummy MR where a scope was not defined in the model file and was still used in the controller file. GitLabDuosuccessfully pointed out the mistake since it did have full MR level context.
-
With feature disabled, the GitLabDuodidn't comment on the mistake given it reviewed the files one by one and lacking full MR context
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.
Related to #532653 (closed)
Edited by Kinshuk Singh

