fix(mcp): reject misleading ADR sections writes#1141
Conversation
60b8587 to
ae255d2
Compare
|
Thanks for pairing the report with a focused fail-closed regression. I’ve classified this as a high-priority 0.9.1-rc bug. Exact-head review will verify that stale |
|
Thanks for this, and sorry for the delay in acknowledging it. Queued for review. Currently CONFLICTING against Rejecting misleading ADR section writes is a correctness-of-contract fix rather than a feature, which is the kind I like receiving. |
Signed-off-by: Mustapha <m88e54ik@gmail.com>
ae255d2 to
2934800
Compare
Signed-off-by: Mustapha <m88e54ik@gmail.com>
2934800 to
58ab633
Compare
|
No worries. Thanks for the clear review criteria. I’ve rebased the PR onto current main, and it’s conflict-free now. The resolution keeps the newer manage_adr lifecycle intact while ensuring legacy sections requests are rejected before mutation coordination or store access. I also tightened the regression to confirm the existing ADR remains byte-identical and that the mutation guard is never entered. Local verification passed with 179 MCP tests and 2 platform-only skips. I also removed the guard temporarily as a negative control, and the new regression failed as expected, so the test is proven to catch the old behavior. One heads-up, GitHub cancelled two CI attempts across all active runners with a “runner received a shutdown signal” message. The checks that finished beforehand were green, but I don’t have permission to rerun the upstream workflow from the fork. When convenient, could you please rerun the cancelled checks? The diff remains limited to the original contract fix and its regression, nothing else was bundled in. |
Summary
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
LeakSanitizer was disabled for the focused run because it is incompatible with the sandbox ptrace wrapper; AddressSanitizer and UndefinedBehaviorSanitizer remained enabled.