Skip to content

test(mcp): prove tracedecay_rename_symbol behavior - #1725

Closed
ScriptedAlchemy wants to merge 1 commit into
masterfrom
cursor/prove-rename-symbol-behavior-7cb9
Closed

ScriptedAlchemy wants to merge 1 commit into
masterfrom
cursor/prove-rename-symbol-behavior-7cb9

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

  • Prove tracedecay_rename_symbol through the production MCP tool dispatch, not a mock planner.
  • Lock the dry-run plan, the bytes an apply writes, an idempotent replay, and the typed denials to literal expected values.

Motivation

A rename test that only checks contains or success != true still passes when the tool returns an empty payload or leaves the tree untouched. These tests call tracedecay_rename_symbol the 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.rs

Test 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=1
  • Confirm the summary is 3 passed; 0 failed, not a vacuous filter match
  • No production code changes

Checklist

  • No secrets, credentials, or .env files included
  • CHANGELOG.md updated — not required for a test-only change
  • Breaking changes documented — none
Open in Web Open in Cursor 

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>
@changeset-bot

changeset-bot Bot commented Sep 18, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 739adc6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ScriptedAlchemy

Copy link
Copy Markdown
Owner Author

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.

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.

2 participants