Draft: Demo script for MergedCloudEvent merged-MR trigger (stacked) [skip ci]

What does this MR do and why?

Reviewer testing aid for !250220 (merged), stacked on top of its branch — not intended to be merged.

Ports scripts/duo/merged_trigger_demo.rb from !249523 (closed) and adapts it to the MergedCloudEvent branch:

  • Also enables the merge_request_merged_memory_distillation feature flag — ExecuteMergeRequestMergedWorkflowTriggersWorker now requires it in addition to merge_request_merged_flow_trigger.
  • Looks up the Developer flow catalog item via Ai::Catalog::FoundationalFlow::Definitions::Developer::REFERENCE, since DEVELOPER_FLOW_REFERENCE / find_by_foundational_flow_reference no longer exist on this branch.

Usage

Prerequisite: your GDK Duo setup works for the gitlab-duo group (you can already trigger a Developer flow via assign/mention).

bundle exec rails runner scripts/duo/merged_trigger_demo.rb [group-path] [username]

Defaults to group gitlab-duo and user root. One run sets up the demo project, MR, feature flags, Developer flow, merged trigger, and posts the mention comment that starts the first session.

What the reviewer watches

  1. The mention-triggered session: the agent discovers the non-obvious test command (PYTHONPATH=src python -m pytest spec/), fixes the integer-division bug, and pushes to the MR branch.
  2. Click Merge on the demo MR.
  3. Expected result: MergedCloudEvent starts a new Developer flow session (as the user who merged, carrying session_ids of the prior Developer session) that reads the previous session's trace and opens a follow-up MR adding the test command to AGENTS.md.

If nothing happens after merging, check Sidekiq logs for ExecuteMergeRequestMergedWorkflowTriggersWorker.

Merge request reports

Loading
Loading