Enable DAP access for free-tier namespaces

What does this MR do and why?

Enables Duo Agent Platform (DAP) access for free-tier SaaS namespaces that have an active gitlab_credits add-on.

This is the backend foundation for the feature. It introduces:

  • A dap_free_tier_gitlab_credits feature flag (default: disabled) to safely roll out access
  • Namespace#has_active_gitlab_credits_add_on? checks for an active gitlab_credits purchase, gated behind the flag
  • licensed_ai_features_available? on Group and Project, extended to return true for gitlab_credits namespaces on SaaS
  • StageCheck, llows credits-eligible DAP features to bypass the license check for gitlab_credits namespaces
  • Ai::Catalog#duo_agent_platform_enabled_for_user? falls back to a credits-based check when the user has no Premium+ group
  • UserPreference#duo_default_namespace_candidates — includes gitlab_credits purchases alongside duo_core for namespace selection

MR series

This change cannot be fully tested in isolation. End-to-end behaviour is only visible once all parts are merged.

References

Screenshots or screen recordings

Before After

How to set up and validate locally

This MR can't be tested in isolation, a full working PoC is available in this MR

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.

Edited by Fred de Gier

Merge request reports

Loading