Draft: Make the MCP artifact archive cap an application setting

What does this MR do and why?

Option A of #629157 (closed): make the get_artifact_file archive download cap admin-tunable instead of a hard-coded constant.

  • Adds mcp_max_artifact_archive_size_mb (integer, default 20) to the existing mcp_server_settings JSONB accessor on ApplicationSetting — no migration.
  • JSON-schema entry plus a numericality validation (integer, greater than 0).
  • Exposed through visible_attributes in the same self-managed-only branch as mcp_server_enabled, so self-managed admins tune it through the settings API while GitLab.com stays on the shipped default; the OpenAPI document is regenerated accordingly.
  • Mcp::Tools::Jobs::GetArtifactFileService reads the setting per call instead of MAX_ARCHIVE_BYTES, and a spec covers a raised cap admitting an archive the default would refuse.

Why this is a Draft

The competing option — ranged reads that remove the whole-archive download entirely — is implemented in !255762 (merged). If that lands, this setting loses its reason to exist, and settings are permanent surface once shipped. The direction is being decided in #629157 (closed); this MR leaves draft only if that discussion picks the setting.

Related to #629157 (closed)

Edited by Tian Gao

Merge request reports

Loading
Loading