Add GA rollout FF check to bypass beta/experiment requirements for DCR on DAP

What does this MR do and why?

Adds the feature flag check to bypass beta and experimental feature requirements for Duo Code Review on the Duo Agent Platform. This enables a controlled rollout of DAP-based Code Review to Duo Pro and Duo Core customers without requiring them to enable experimental/beta features.

Currently, Duo Pro and Duo Core customers can only access Duo Code Review on DAP if they have experimental features (SaaS) or beta features (self-managed) enabled. As we approach GA in %18.7, we need a mechanism to gradually roll out DAP-based Code Review to production customers without forcing them to enable experimental/beta features across their entire namespace/instance.

The ai_duo_agent_platform_ga_rollout feature flag provides this controlled rollout mechanism by overriding the experimental/beta feature checks specifically for Code Review on DAP.

How to set up and validate locally

  1. Create a namespace with Duo Pro or Duo Core add-on
  2. Ensure experimental/beta features are disabled
  3. Verify Code Review settings are NOT available:
   namespace.auto_duo_code_review_settings_available? # => false
  1. Enable the GA rollout flag:
   Feature.enable(:ai_duo_agent_platform_ga_rollout)
  1. Verify Code Review settings are now available:
   namespace.auto_duo_code_review_settings_available? # => true
  1. Test via API:
   curl --request PUT --header "PRIVATE-TOKEN: <token>" \
     "https://gitlab.example.com/api/v4/groups/:id" \
     --data "auto_duo_code_review_enabled=true"

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.

Related to https://gitlab.com/gitlab-org/gitlab/-/work_items/579921

Edited by Kinshuk Singh

Merge request reports

Loading