Loading
Enable ai_governance_sessions_api by default
What does this MR do and why?
This MR turns on the ai_governance_sessions_api feature flag by default. The flag stays a beta flag, so admins can still turn it off.
When the flag is on:
- The
aiGovernanceSessionsGraphQL field on groups and projects returns AI sessions from GitLab Duo and external agents. When the flag is off, it returns no sessions. - The AI governance dashboard metrics and tool call counts use session data.
- The governance settings pages pass the flag to the frontend, so the audit trail card reads sessions.
References
- Related to https://gitlab.com/gitlab-org/gitlab/-/work_items/630933
- Feature issue: https://gitlab.com/gitlab-org/gitlab/-/work_items/630095
- Flag introduced in !257545 (merged)
Before merging
- Roll out the flag in production. Right now it is only on for one test group (
compliance-group-testing-and-demos). There is no percentage rollout yet. - Merge !259922 (merged) first. Until it merges, self-managed instances without ClickHouse get no sessions. The audit trail card (!258897 (merged)) reads sessions when the flag is on.
- Confirm the backfill in !258135 (merged) has finished on GitLab.com.
- Merge the frontend MRs !259181 (merged) and !259899 (merged) first.
- Decide whether this MR needs a
Changelogtrailer. The feature flag docs say a default-on change should have one.
How to set up and validate locally
- Reset the flag so the YAML default applies:
Feature.remove(:ai_governance_sessions_api)in the Rails console. - Check that
Feature.enabled?(:ai_governance_sessions_api, group)returnstrue. - Query
aiGovernanceSessionson a group or project in GraphiQL and confirm sessions are returned.
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.