Draft: PoC - Route GitLabDuo mentions through messaging adapter

What

PoC to validate routing @GitLabDuo MR mentions through the existing messaging adapter pattern (Ai::Messaging::TriggerFlowService + CallbackWorker) instead of the DuoCodeReviewChatWorker.

Why

We want to evaluate whether the messaging adapter architecture (currently used for Slack) can serve as a single extensible entry point for all conversational surfaces — Slack, MR mentions, issues, Telegram, etc.

This PoC demonstrates that @GitLabDuo mentions can reuse the same adapter pattern with minimal code (~230 lines across 3 files):

  • Adapters::GitlabNote — posts agent responses as threaded MR notes, with progress indicator
  • PostProcessService — wires up mentions to TriggerFlowService with structured goal context
  • CallbackWorker — registers the new adapter

How it works

  1. User posts @GitLabDuo <question> on an MR
  2. A progress system note ("··· is working on a reply") appears
  3. TriggerFlowService starts a developer/v1 workflow in the lightweight duo-workspace project
  4. On completion, CallbackWorker extracts the agent's response and posts it as a threaded reply via the GitlabNote adapter

Note that the latency below is probably a bit biased by my local runners since they tend to wait a bit until they pick up a job 😅

Edited by Thomas Schmidt

Merge request reports

Loading