test(mcp): prove tracedecay_str_replace behavior - #1717
ScriptedAlchemy wants to merge 2 commits into
Conversation
Call the production MCP dispatch for one unique replacement, refusals, and stale preview state, and assert the file bytes and response text. Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
|
…place-behavior-d5ba # Conflicts: # crates/tracedecay/tests/mcp_suite/mcp_handler_test.rs
|
Closing as superseded. A sibling change proving the same tool landed first as #1701. Evidence from the triage: git log origin/master -- mcp_handler_test/str_replace_behavior_test.rs shows 383ca3f/4faeffbb9d/ff9daac008 from cursor/prove-str-replace-behavior-e3e0 = merged #1701 (also #1723); master file already has str_replace_writes_the_unique_span_and_reports_the_completed_edit, _dry_run_previews_the_exact_diff_without_writing, _reports_a_missing_span_and_leaves_the_file, _refuses_an_ambiguous_span_and_leaves_the_file, _apply_without_preview_state_is_refused Reopen if the landed version misses an assertion this branch carries; name it and it can be ported as a small follow-up. |
Summary
tracedecay_str_replacethrough the production MCP tool dispatch, not a stand-in editor.Motivation
The public contract is one exact string swap. Existing edit tests mix this tool with other editors and check fragments of the message. These tests call only
tracedecay_str_replaceand lock the observable result.Changes
crates/tracedecay/tests/mcp_suite/mcp_handler_test/str_replace_behavior_test.rsexercises the livecall_tool_for_testpath.Test plan
cargo test -p tracedecay --test mcp_suite --features test-transport str_replace_behavior_test -- --test-threads=1reports the new tests passed (non-zero count)Checklist
.envfiles includedCHANGELOG.mdnot updated (tests only)