test(mcp): prove tracedecay_multi_str_replace behavior - #1723
Merged
Merged
Conversation
Lock preview, apply, replay, and refusal results to the bytes and messages the production MCP dispatch returns. Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
|
…str-replace-9d0f Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Drive tracedecay_multi_str_replace through the production JSON-RPC connection and lock the wire result a client reads: preview, apply, replay, and the refusals that leave the file unchanged. Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Replay returns durable metadata on the effect payload, and the insertion preview diff is the unified hunk the server actually writes. Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
ScriptedAlchemy
marked this pull request as ready for review
September 18, 2026 08:56
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tracedecay_multi_str_replacethrough a production JSON-RPCtools/call, notcall_tool_for_test.Motivation
The tool is all-or-nothing and apply is bound to the preview
expected_state. These tests send the arguments a client sends and assert the JSON-RPC payload and the bytes left on disk.Changes
crates/tracedecay/tests/mcp_suite/mcp_handler_test/multi_str_replace_behavior_test.rsexercises only this tool over the production server connection:new-a/new-band the same receipt; replay reports durable metadata oneffect.payload, not a fresh edit body-32603,source_edit.idempotency_conflict) and does not rewrite the filefn keep() {}/fn target() {}/+fn target_renamed() {}expected_state, and a multi-byte miss all leave the original bytes in placeTest plan
cargo test -p tracedecay --test mcp_suite --features test-transport mcp_handler_test::multi_str_replace_behavior_test -- --test-threads=1reports 3 passed; 0 failed (350 filtered out)