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 indicatorPostProcessService— wires up mentions toTriggerFlowServicewith structured goal contextCallbackWorker— registers the new adapter
How it works
- User posts
@GitLabDuo <question>on an MR - A progress system note ("··· is working on a reply") appears
TriggerFlowServicestarts adeveloper/v1workflow in the lightweightduo-workspaceproject- On completion,
CallbackWorkerextracts the agent's response and posts it as a threaded reply via theGitlabNoteadapter
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