Loading
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_distillationfeature flag —ExecuteMergeRequestMergedWorkflowTriggersWorkernow requires it in addition tomerge_request_merged_flow_trigger. - Looks up the Developer flow catalog item via
Ai::Catalog::FoundationalFlow::Definitions::Developer::REFERENCE, sinceDEVELOPER_FLOW_REFERENCE/find_by_foundational_flow_referenceno 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
- 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. - Click Merge on the demo MR.
- Expected result:
MergedCloudEventstarts a new Developer flow session (as the user who merged, carryingsession_idsof the prior Developer session) that reads the previous session's trace and opens a follow-up MR adding the test command toAGENTS.md.
If nothing happens after merging, check Sidekiq logs for ExecuteMergeRequestMergedWorkflowTriggersWorker.