Menu

Part 6: Sequential Patch Edits (description_edits) & Whole-Document Quick-Action Defense in MCP save_work_item
📰

Part 6: Sequential Patch Edits (description_edits) & Whole-Document Quick-Action Defense in MCP save_work_item

DEV Community: gitlab·Pavan Kumar Sadashiv·5 days ago
#BeZGQbkn
Reading 0:00
15s threshold

Series Context: Part 6 of 10 in GitLab Core Engineering: Architecture, MCP & CI/CD Deep Dives .

Featured MR: gitlab-org/gitlab!264862 ( Merged into master ) · Work Item: #635910

Why Sending Full Markdown Descriptions Over MCP Does Not Scale

When an AI agent fixes a typo or updates a single status checkbox in a GitLab issue or epic containing tables and implementation checklists, forcing it to resend the entire description string via save_work_item creates two real problems:

Token waste & truncation risk: Large GitLab issues run thousands of tokens. Re-generating the whole body risks subtly rewriting unrelated paragraphs.

Concurrent edit clobbering: Full-body overwrites silently erase edits another engineer made to a different section moments earlier.

In !264862 , we added an update-only description_edits array to save_work_item :

{ "project_id" : "gitlab-org/gitlab" , "work_item_iid" : 635910 , "description_edits" : [ { "old_str" : "- [ ] Verify CI" , "new_str" : "- [x] Verify CI" } , { "old_str" :…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.