Add MR title and description to duo code review prompt

What does this MR do and why?

  • This MR adds MR title and description to duo code review prompt
  • I ran a bunch of tests on LangSmith with MR title and description and the results appear positive so far.

LangSmith tests summary using the latest Claude 3.7 model

Test Case 1 (Security-Related Change):

Test case 2 (Intentional Code Removal):

Test case 3 (Refactoring with Intentional Changes):

Test case 4 (Enterprise SSO Integration with Complex Description):

  • Link: https://smith.langchain.com/public/cb8e9e05-f324-4f07-ba42-de6241d8a47a/r
  • AI effectively focused on code despite extremely lengthy description with non-essential elements
  • Identified critical security issues in SAML parsing and authentication state verification
  • Found practical edge case and error handling issues
  • Provided specific, actionable fixes with appropriate priority levels

How to set up and validate locally

Prerequisites:

  • Make sure the AI features are enabled locally using this guide
  • Open a MR (please add informative title and description) with some files being removed / refactored and assign GitLabDuo as a reviewer either by commenting /assign_reviewer @GitLabDuo or select GitLabDuo from the reviewers dropdown.

Validate:

  • Make sure GitLabDuo doesn't comment on obvious removal of outdated files.
  • Make sure there are no unwanted comments from GitLabDuo.

Screenshot

  • Tested a dummy MR where a bunch of files were removed and a new file was added with wrong code. GitLabDuo didn't comment about removal of files since the reasoning was provided in the title and description and successfully pointed out the mistake in the code Screenshot_2025-04-08_at_3.23.58_PM

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 #466684 (closed)

Edited by Kinshuk Singh (PTO June 4-19)

Merge request reports

Loading