Decouple IDE default flow advertising from duo_cli_default_flow

What does this MR do and why?

Decouple IDE default flow advertising from duo_cli_default_flow

Add a clientType argument to aiFlowsMetadata and a new duo_ide_default_flow feature flag so IDE and CLI rollouts of the duo_developer capability can be controlled independently.

When clientType is omitted, falls back to checking duo_cli_default_flow for backwards compatibility with existing CLI clients that have not yet migrated to passing the argument.

References

Closes #616381 (closed)

Screenshots or screen recordings

N/A - No UI changes

How to set up and validate locally

  1. Enable the IDE flag for your user in the Rails console:
Feature.enable(:duo_ide_default_flow, User.find_by_username('your-username'))
  1. Query aiFlowsMetadata with clientType: IDE and confirm duo_developer is returned:
query {
  aiFlowsMetadata(clientType: IDE) {
    capabilities { name metadata }
  }
}
  1. Disable duo_cli_default_flow and confirm clientType: CLI (or no clientType) no longer returns duo_developer, while clientType: IDE still does
Feature.disable(:duo_cli_default_flow)

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
Loading