test(mcp): prove tracedecay_rename_symbol behavior - #1725
ScriptedAlchemy wants to merge 1 commit into
Conversation
Lock the production rename tool to the source it writes, the preview diff it reports, and the typed denials it returns. Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
|
|
Closing as superseded. A sibling change proving the same tool landed first as #1679. Evidence from the triage: git log origin/master -- mcp_handler_test/rename_symbol_test.rs shows 9776017 landed via 3062799 'merge: PR #1679 test(mcp): prove tracedecay_rename_symbol behavior'; master's file already has test_rename_symbol_dry_run_default_reports_plan_and_writes_nothing and _apply_rewrites_declaration_and_callers 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_rename_symbolthrough the production MCP tool dispatch, not a mock planner.Motivation
A rename test that only checks
containsorsuccess != truestill passes when the tool returns an empty payload or leaves the tree untouched. These tests calltracedecay_rename_symbolthe way a host does and compare the observed source and stable response fields to literals.Identity digests, receipt timestamps, and occurrence ids are omitted from the comparison because they change with each fixture commit. The source file, the preview diff, the site spans, and the denial hazards do not.
Changes
crates/tracedecay/tests/mcp_suite/mcp_handler_test/rename_symbol_test.rsTest plan
REQUIRE_EXACT_TEST_COUNT=3 scripts/require-exact-test.sh cargo test -p tracedecay --test mcp_suite --features test-transport rename_symbol_literal -- --test-threads=13 passed; 0 failed, not a vacuous filter matchChecklist
.envfiles includedCHANGELOG.mdupdated — not required for a test-only change