[FF] duo_code_review_advanced_flow - Rollout

Summary

Roll out the feature currently behind the duo_code_review_advanced_flow feature flag.

  • DRI: @kinsingh
  • Team Slack channel: #g_ai_coding

Note

Process and guidance live in the docs, this issue is just the commands and a place to track the rollout. "Rolling out" means incrementally enabling the flag on GitLab.com to validate stability, it is not the same as releasing the feature, which happens when the flag is removed. Feature flag controls · Feature flag lifecycle

What could go wrong?

  • Cost: the advanced flow costs about 1.6x the current flow per review. Watch spend if enabled broadly.
  • Review quality regressions or runaway agent cycles. max_cycles: 25 bounds a single review, so the worst case is a truncated review, not an unbounded one.
  • If the flag is disabled while a review is in flight, the JSON payload is rejected and the MR gets the generic "encountered some problems" note instead of a review. This is by design.
  • Any regression is contained to flagged users. Disabling the flag returns them to the current flow immediately.

Detection: Duo Workflow session logs for advanced_code_review, Sentry for Gitlab::Duo::CodeReview::FindingsParser::Error and Ai::DuoWorkflows::CodeReview::PublishCommentsWorker, and feedback in #g_ai_coding.

Rollout

Run all production /chatops in #production and cross-post the results to #g_ai_coding. Background: incremental rollout process, feature actors.

Before enabling for anyone, confirm both prerequisites are deployed:

  1. Monolith MR !253786 (merged) deployed to production. Without this, the flag does not exist.
  2. Monolith MR !253794 (merged) deployed to production. This adds Gitlab::Duo::CodeReview::FindingsParser. It ships in a separate deploy from the flag above, so check it separately: with the ai-assist MR below already deployed and this one not, a review publishes zero comments and the author gets the "nothing to comment on" note.
  3. ai-assist MR gitlab-org/modelops/applied-ml/code-suggestions/ai-assist!6773 (merged) deployed to the GitLab-managed AI Gateway / Duo Workflow Service fleet. Enabling before this MR is deployed means the flow posts XML, which still works.

Non-production

/chatops gitlab run feature set duo_code_review_advanced_flow true --dev --pre --staging --staging-ref

Production

This rollout is actor based, not percentage based. Step 1: enable for Code Review team members by username. Step 2: enable for all internal GitLab team members.

/chatops gitlab run feature set --user=<username> duo_code_review_advanced_flow true
/chatops gitlab run feature set --group=gitlab-com duo_code_review_advanced_flow true

A global percentage rollout is not planned. See "Before global rollout" below.

Before global rollout

Confirm the relevant gotchas before going to 100%, see enabling a feature for GitLab.com:

No global rollout is planned before the flow is renamed and a production min_confidence is chosen. Tracked in #627791 (closed).

Cleanup

The flag is expected to be replaced by a user-facing effort setting, or removed once the medium-effort flow becomes the default, pending the rename in #627791 (closed).

Remove the flag and its YAML definition from the codebase, then:

/chatops gitlab run release check <merge-request-url> <milestone>
/chatops gitlab run feature delete duo_code_review_advanced_flow --dev --pre --staging --staging-ref --production

Rollback

/chatops gitlab run feature set duo_code_review_advanced_flow false                                         # production
/chatops gitlab run feature set duo_code_review_advanced_flow false --dev --pre --staging --staging-ref     # non-production
/chatops gitlab run feature delete duo_code_review_advanced_flow --dev --pre --staging --staging-ref --production  # remove entirely
Edited by Kinshuk Singh