Let Duo Code Review summaries chain flows through mentions

What does this MR do and why?

Lets a Duo Code Review summary that mentions a flow's service account start that flow, behind the existing ai_flow_trigger_chaining flag.

The summary is posted by GitLabDuo, which has no Duo seat and isn't a composite identity, so its mentions are dropped today. The summary already carries duo_metadata naming the review workflow, so this treats it as part of that chain and checks the human who requested the review instead. No change to the review flow is needed.

Screenshots

Validated on GDK: the summary's mention started Duo Developer as a child of the review session, it pushed a fix, and the re-review was clean.

Duo Developer tagged by GitLabDuo Re-review by GitLabDuo
tagged rereview

How to set up and validate locally

  1. Feature.enable(:ai_flow_trigger_chaining, project.root_ancestor) and make sure the project has a Duo Developer mention trigger.
  2. Add a custom review instruction asking the reviewer to mention Duo Developer at the end of its summary.
  3. Request a review from GitLabDuo on an MR with a bug. A developer/v1 workflow should start with parent_workflow_id set to the review workflow.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist.

References

Edited by Kinshuk Singh

Merge request reports

Loading
Loading