Add audit event for enabled_foundational_flows changes

What does this MR do and why?

Add audit event for enabled_foundational_flows changes

Add enabled_foundational_flows_updated audit event to track when the selected foundational flows are changed on a group. Uses a custom auditor that captures previous and new flow references, emitting a human-readable audit message.

  • Create audit event type YAML definition
  • Add EnabledFoundationalFlowsAuditor class
  • Wire auditor into Groups::UpdateService
  • Add spec coverage for the new auditor

References

Screenshots or screen recordings

Screenshot_2026-03-23_at_17.36.58

Before After

How to set up and validate locally

  1. Start a GDK instance with EE license features enabled and foundational flows catalog seeded
  2. As a group owner, navigate to a group's settings -> GitLab Duo, and change the enabled foundational flows selection
  3. Check the audit events log for the group
  4. Verify an audit event was created with:
    • Event type: enabled_foundational_flows_updated
    • Message like: Changed enabled foundational flows from none to chat/v1, code_review/v1
  5. Verify that submitting the same set of flows again does NOT create a duplicate audit event

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading