Add pinnedVersion support to AI catalog bulk enablement mutation
What does this MR do and why?
Thread pinned_version through the four bulk-path layers of the AI catalog bulk enablement mutation so it reaches the per-project CreateService call. The single-project mutation AiCatalogItemConsumerCreate already supports pinned_version, and Ai::Catalog::ItemConsumers::CreateService already consumes params[:pinned_version]. The bulk path simply never threaded the argument through.
Changes:
AiCatalogItemConsumerBulkCreatemutation — addpinnedVersionargument (reusing the exact description from the single-create mutation)EnqueueBulkCreateService— acceptpinned_version:keyword, store it, include inworker_params(with.compact)BulkCreateWorker— readpinned_versionfromparamsand pass toBulkCreateServiceBulkCreateService— acceptpinned_version:keyword, store it, include increate_service_params(with.compact)
CreateService is not modified — it already handles params[:pinned_version] via resolved_requested_version / requested_version_invalid?.
Also updates GraphQL docs (doc/api/graphql/reference/_index.md) and introspection schema (public/-/graphql/introspection_result.json) manually (the Rake task cannot run in this environment due to a jemalloc TLS issue; CI will regenerate them correctly).
Adds specs for each layer mirroring the existing pinned_version coverage in the single-create path.
References
- Issue: #605220 (closed)
- Agreed in: !238269 (comment 3534618429)
Screenshots or screen recordings
Backend-only change. No UI changes.
How to set up and validate locally
- Enable the feature flag:
Feature.enable(:ai_catalog_bulk_item_consumer_create) - Create an AI catalog agent with a released version (e.g.
1.2.3) - Call the
aiCatalogItemConsumerBulkCreatemutation withpinnedVersion: "1.2.3" - Verify the created
Ai::Catalog::ItemConsumerrecords havepinned_version_prefix: "1.2.3"
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.