From 3e63a7d73cf3f4f5a5f6a93d7d5cfd56e0369314 Mon Sep 17 00:00:00 2001 From: Jessie Young Date: Tue, 21 Oct 2025 14:20:40 -0700 Subject: [PATCH 1/2] Update experiment/beta docs to clarify toggle is for Duo features only Based on the discussion in !150916, the experiment and beta feature toggle in namespace settings should only be used for AI/Duo features, not for general experiment/beta features across GitLab. This updates the documentation to: - Clarify that the namespace setting toggle is specifically for GitLab Duo - Direct developers to use feature-specific toggles for non-Duo features - Reference the GitLab Duo documentation for enabling beta/experiment features Related to #460719 --- doc/development/documentation/experiment_beta.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/development/documentation/experiment_beta.md b/doc/development/documentation/experiment_beta.md index c024697c29f45b..66d5bd0cc9a305 100644 --- a/doc/development/documentation/experiment_beta.md +++ b/doc/development/documentation/experiment_beta.md @@ -11,6 +11,18 @@ When you document an [experiment or beta](../../policy/development_stages_suppor - Include [feature flag details](feature_flags.md) if behind a feature flag. - [Update the feature status](styleguide/availability_details.md#changed-feature-status) when it changes. +## Experiment and beta feature toggles + +The **Use experiment and beta features** toggle in namespace settings is specifically for +[GitLab Duo features](../../user/gitlab_duo/turn_on_off.md#turn-on-beta-and-experimental-features) only. +This setting should not be used for non-AI/Duo experiment or beta features. + +For non-Duo experiment and beta features: + +- Use feature-specific toggles or feature flags appropriate to your feature. +- Do not tie your feature to the namespace-level experiment and beta setting. +- Document the specific controls for your feature in its own documentation. + ## When features become generally available When the feature changes from experiment or beta to generally available: -- GitLab From 98dc01358ce1a1a0afcfea3a5ebe913b0da7c158 Mon Sep 17 00:00:00 2001 From: Jessie Young Date: Tue, 21 Oct 2025 14:24:55 -0700 Subject: [PATCH 2/2] Clarify different settings for SaaS vs Self-Managed instances Add documentation explaining the two different settings that control experiment and beta features for GitLab Duo: - GitLab.com uses namespace-level `experiment_features_enabled` - Self-Managed/Dedicated use instance-level `instance_level_ai_beta_features_enabled` This clarifies that each instance type should only check its relevant setting and not mix the two approaches. Related to #460719 --- .../documentation/experiment_beta.md | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/doc/development/documentation/experiment_beta.md b/doc/development/documentation/experiment_beta.md index 66d5bd0cc9a305..b88776f19efb53 100644 --- a/doc/development/documentation/experiment_beta.md +++ b/doc/development/documentation/experiment_beta.md @@ -23,6 +23,28 @@ For non-Duo experiment and beta features: - Do not tie your feature to the namespace-level experiment and beta setting. - Document the specific controls for your feature in its own documentation. +### Settings by GitLab instance type + +There are two different settings that control experiment and beta features for GitLab Duo, +depending on the type of GitLab instance: + +- **GitLab.com (SaaS)**: Uses the top-level namespace setting `experiment_features_enabled`. + This is a namespace-level setting that allows each top-level group to control whether + experiment and beta GitLab Duo features are enabled for their namespace. + +- **GitLab Self-Managed and GitLab Dedicated**: Uses the instance-level setting + `instance_level_ai_beta_features_enabled`. This is an instance-wide setting controlled + by administrators that applies to all namespaces on the instance. + +When implementing GitLab Duo features: + +- Check the appropriate setting based on the instance type. +- On GitLab.com, check the namespace's `experiment_features_enabled` setting. +- On Self-Managed and Dedicated instances, check the `instance_level_ai_beta_features_enabled` setting. +- Do not mix these settings or check both - each instance type should only use its relevant setting. + +For implementation examples, see [`ee/lib/gitlab/llm/stage_check.rb`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/lib/gitlab/llm/stage_check.rb). + ## When features become generally available When the feature changes from experiment or beta to generally available: -- GitLab