Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Contributing to GitLab & MCP: Lessons from a Week of Upstream Open-Source Engineering

说明与用途

通过添加评论编辑、公开用户事件、合并流水线创建以及修复 GitLab 语言服务器中的会话泄漏,提升了 AI 助手的稳定性和 CI 可靠性。

问题

AI agents could not edit existing comments or refine feedback in-place in GitLab’s Model Context Protocol (MCP), leading to comment sprawl.

结果

All enhancements were merged with 100% green CI pipelines, improving MCP functionality, reducing API fragmentation, and eliminating stale state leaks in the language server.

工作流

  • Introduce update_note mutation and schema changes
  • Add list_user_events MCP tool and date type mapping
  • Consolidate merge‑request pipeline logic into save_pipeline
  • Add parent_iid to list_work_items and improve validation errors
  • Wrap pending wake operations with session IDs in gitlab-lsp
  • Run automated tests and CI to ensure 100% green pipelines

证据

The MCP save_note tool allowed AI agents to post comments, reply to discussion threads, and resolve discussions on merge requests and work items. However, agents could not edit their existing comments or refine feedback in-place, leading to comment sprawl.

来源

We introduced the update_note method to save_note

来源

Bound the endpoint as list_user_events in the :core toolset with pagination, action, and target-type filters.

来源

Consolidated the merge request trigger directly into SavePipelineService using an optional merge_request_iid parameter.

来源

Wrapped pending wake operations with session IDs and implemented await flushMicrotasks() during session teardown.

来源

Achieved a 100% green CI pipeline across all 82 jobs.

来源

  • 记录日期: 2026-11-01T22:28:59.521Z