Use orbit flow version for developer/v1 when user has orbit enabled
What does this MR do and why?
When a user has the duo_developer_orbit feature flag enabled and has the Orbit master toggle turned on in their preferences, the developer/v1 flow is routed to the 2.0.0-orbit flow version instead of the default 2.0.0.
This allows internal testing of the Orbit-aware developer flow variant (introduced in gitlab-org/modelops/applied-ml/code-suggestions/ai-assist#2246 (closed)) without affecting users who have not opted in.
Key changes
FoundationalFlowStartParamsResolver:
- Updated
callto accept an optionaluser:keyword argument - In
resolve_with_overrides, checksduo_developer_orbitfeature flag +Ai::Orbit::Settings.killswitch_on?(user)before theduo_developer_next_unstablecheck — when both conditions are true, returnsdeveloper/v1with version2.0.0-orbit
Callers (CreateAndStartWorkflowService, ExecuteWorkflowService, DuoWorkflowHelpers):
- Each caller now passes
user: current_usertoFoundationalFlowStartParamsResolver.call
Behavior matrix
| Flow | Condition | DEFINITION |
CONFIG_ID |
SCHEMA_VERSION |
FLOW_VERSION |
|---|---|---|---|---|---|
| developer/v1 | default (no flags) | developer/v1 | developer | v1 | 2.0.0 |
| developer/v1 | duo_developer_orbit on + orbit master toggle on |
developer/v1 | developer | v1 | 2.0.0-orbit |
| developer/v1 | duo_developer_next_unstable on |
developer_unstable/experimental | developer_unstable | experimental | 1.0.0 |
| developer/v1 | both duo_developer_orbit (+ toggle) and duo_developer_next_unstable |
developer/v1 | developer | v1 | 2.0.0-orbit |
Gating logic
duo_developer_orbitfeature flag is the top-level gate — when disabled (default), behavior is unchangedAi::Orbit::Settings.killswitch_on?(user)checks the Orbit master toggle in user preferences as a safety netduo_developer_orbittakes priority overduo_developer_next_unstable, so users can explicitly opt into the orbit flow even when the unstable flag is globally enabled
References
- Closes: #599229 (closed)
- Feature flag rollout: #599968
- Related: gitlab-org/modelops/applied-ml/code-suggestions/ai-assist#2246 (closed)
Screenshots or screen recordings
| Before | After |
|---|---|
| N/A (backend only) | N/A (backend only) |
How to set up and validate locally
-
Spin up your GDK on latest
master -
Enable the feature flag for a user:
user = User.find_by_username('your-username') Feature.enable(:duo_developer_orbit, user) -
Enable the Orbit master toggle in user preferences:
user.user_preference.update!(orbit_settings: { 'enabled' => true }) -
Trigger the Duo Developer flow
-
Check the CI job variables —
DUO_WORKFLOW_FLOW_VERSIONshould be2.0.0-orbit
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.