Skip to content

test(mcp): prove tracedecay_source_edit_rollback behavior - #1686

Merged
ScriptedAlchemy merged 11 commits into
masterfrom
cursor/prove-source-edit-rollback-7cfc
Sep 19, 2026
Merged

ScriptedAlchemy merged 11 commits into
masterfrom
cursor/prove-source-edit-rollback-7cfc

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Sep 18, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Proves tracedecay_source_edit_rollback through the production MCP tools/call path, not a handler unit double.
  • A completed move receipt restores the exact retained preimages. An exact retry replays that receipt (replayed: true, same effect id, durable metadata on the effect payload) without rewriting the files.
  • Foreign workspace bytes are left untouched and the refusal is replayed. An edit that retained no preimage is refused and stays applied.

Motivation

Rollback is the journaled inverse of one completed move_symbol effect. Callers must consume the returned receipt identity. These tests lock the bytes and JSON-RPC results that callers observe.

Changes

  • crates/tracedecay/tests/mcp_suite/mcp_handler_test/source_edit_rollback_test.rs calls tracedecay_source_edit_rollback on the production project server and asserts literal file contents and response fields.

Test plan

  • REQUIRE_EXACT_TEST_COUNT=3 scripts/require-exact-test.sh cargo test --features test-transport --test mcp_suite source_edit_rollback -- --test-threads=1 reports 3 passed
  • No production behavior change
  • Not merged
Open in Web Open in Cursor 

Exercise rollback through production MCP tools/call: restore retained
move preimages, replay the receipt, refuse foreign bytes, and refuse
edits that kept no preimage.

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: 4770639

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

cursoragent and others added 2 commits September 18, 2026 08:51
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
The production tools/call path omits isError on success and keeps
durable replay metadata on the effect payload, not the top-level
outcome.

Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
@ScriptedAlchemy
ScriptedAlchemy marked this pull request as ready for review September 18, 2026 09:21
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

cursoragent and others added 2 commits September 18, 2026 10:07
The ready-for-review run sat in the queue for 42 minutes and was
cancelled before any job started a step.

Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
The durable replay is the receipt callers see; the comment records why
the live reconciled flag is not on that response.

Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
@ScriptedAlchemy ScriptedAlchemy added the ci-full label Sep 18, 2026 — with Cursor
cargo fmt --all rejects the multi-line try_lock_shared chains that
already exist on master, so repository gates fail this head too.

Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
cursoragent and others added 5 commits September 18, 2026 18:39
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Clippy rejects the unindented continuation under doc_lazy_continuation.

Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
The current tree emits new partitioned segment bytes and query-fallback
digests. The pins now match those observed results.

Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
@ScriptedAlchemy ScriptedAlchemy added the ci-full label Sep 18, 2026 — with Cursor
@ScriptedAlchemy
ScriptedAlchemy merged commit e84441e into master Sep 19, 2026
4 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants