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:

  1. AiCatalogItemConsumerBulkCreate mutation — add pinnedVersion argument (reusing the exact description from the single-create mutation)
  2. EnqueueBulkCreateService — accept pinned_version: keyword, store it, include in worker_params (with .compact)
  3. BulkCreateWorker — read pinned_version from params and pass to BulkCreateService
  4. BulkCreateService — accept pinned_version: keyword, store it, include in create_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

Screenshots or screen recordings

Backend-only change. No UI changes.

How to set up and validate locally

  1. Enable the feature flag: Feature.enable(:ai_catalog_bulk_item_consumer_create)
  2. Create an AI catalog agent with a released version (e.g. 1.2.3)
  3. Call the aiCatalogItemConsumerBulkCreate mutation with pinnedVersion: "1.2.3"
  4. Verify the created Ai::Catalog::ItemConsumer records have pinned_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.

Merge request reports

Loading
Loading