Skip to content

fix(mcp): reject misleading ADR sections writes#1141

Open
M-Marbouh wants to merge 2 commits into
DeusData:mainfrom
M-Marbouh:fix/manage-adr-sections-guard
Open

fix(mcp): reject misleading ADR sections writes#1141
M-Marbouh wants to merge 2 commits into
DeusData:mainfrom
M-Marbouh:fix/manage-adr-sections-guard

Conversation

@M-Marbouh

Copy link
Copy Markdown

Summary

  • remove the dead sections input from the manage_adr schema
  • explicitly reject legacy requests that still pass sections before opening a store
  • label successful update responses as whole-document replacement
  • add a regression proving rejected legacy requests leave the ADR byte-identical

Why

The schema advertised sections as an update argument, but the handler never consumed it. A caller could therefore believe it was performing a scoped update while replacing the complete ADR document.

Closes #1140.

Related context only: #516 and #507.

Verification

  • ASan/UBSan focused MCP suite: 166 passed
  • production code compiled with warnings as errors as part of the test-runner build
  • git diff --check clean

LeakSanitizer was disabled for the focused run because it is incompatible with the sandbox ptrace wrapper; AddressSanitizer and UndefinedBehaviorSanitizer remained enabled.

Signed-off-by: Mustapha <m88e54ik@gmail.com>
@M-Marbouh
M-Marbouh requested a review from DeusData as a code owner July 16, 2026 17:49
Signed-off-by: Mustapha <m88e54ik@gmail.com>
@M-Marbouh
M-Marbouh force-pushed the fix/manage-adr-sections-guard branch from 60b8587 to ae255d2 Compare July 16, 2026 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

manage_adr sections argument silently permits whole-document replacement

1 participant