Skip to content

test(mcp): prove tracedecay_source_edit_reconcile behavior - #1700

Closed
ScriptedAlchemy wants to merge 1 commit into
masterfrom
cursor/prove-source-edit-reconcile-7b53
Closed

ScriptedAlchemy wants to merge 1 commit into
masterfrom
cursor/prove-source-edit-reconcile-7b53

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

  • Prove tracedecay_source_edit_reconcile through the production MCP dispatch, not a schema pin or unit-level journal fixture.
  • Assert the tool refuses an uninspected or unretained effect, confirms a rolled-back preimage, and confirms committed bytes only when the live file matches the exact preview.
  • Exact retries replay the reconciliation receipt and do not rewrite the file.

Motivation

The MCP suite covered source-edit apply and retry, but never called tracedecay_source_edit_reconcile. Agents that see EffectUnknown have to conclude the retained effect from the live candidate file. This test is that journey.

Changes

  • crates/tracedecay/tests/mcp_suite/mcp_handler_test/source_edit_reconcile_test.rs drives the real tool. Publication is interrupted by making the candidate directory unwritable after the journal is durable, which is the production EffectUnknown boundary. Assertions are the returned messages, receipt fields, and the literal file bytes.

Test plan

  • cargo test -p tracedecay --features test-transport --test mcp_suite -- source_edit_reconcile reports a non-zero count
  • No production code change; clippy is limited to the new test module
  • Not a workspace-wide nextest run; this change is one MCP behavior test

Checklist

  • CHANGELOG.md not updated: test-only, no user-facing contract change
  • No secrets, credentials, or .env files included
  • Breaking changes documented (if any): none
Open in Web Open in Cursor 

Call the production MCP tool and assert retained-unknown refusal,
rolled-back confirmation, committed confirmation, and exact retry
against live file bytes.

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: 0e04211

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 #1648.

Evidence from the triage: git log origin/master --diff-filter=A -- mcp_handler_test/source_edit_reconcile_test.rs => f241ad3, carried by b33e5a1 'merge: PR #1648 test(mcp): prove tracedecay_source_edit_reconcile behavior'; same path added in both, 8 conflict hunks

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