Repository navigation
cmux link sync push: a file deleted here but changed on the machine stays a conflict - #28729
Open
teamleaderleo wants to merge 4 commits into
Open
teamleaderleo wants to merge 4 commits into
teamleaderleo wants to merge 4 commits into
Conversation
… machine stays a conflict Red on cf5c99c: the delete pass spares the machine's changed file but drops its record entry, so a later pull treats it as new and brings it back here with no conflict (Codex review follow-up on #28675). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-22973a84aab760788504
…s the conflict The delete pass left a file the machine had changed since the last push, but dropped it from the next record. A pull then saw it as new on the machine and brought it back here, quietly choosing the machine's edit over this Mac's delete. The spared file now keeps the last push's entry (counted as `kept`), and a pull reports the delete against the edit as a conflict. Test: link_sync a_file_deleted_here_but_changed_on_the_machine_stays_a_conflict_after_a_push. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-22973a84aab760788504
…-keeps-spared-deletes
…it (panic ratchet) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-22973a84aab760788504
Collaborator
Author
|
Closing this one; I own it. It was stacked on #28675, which is closed (the reason is there). The case it covers stays as it is on feat-cmux-next: a file deleted on this Mac that the machine changed is left on the machine but dropped from the record, and a later pull brings it back. Changing that is part of the same sync-semantics question; it's noted on #28675 and with #28111's owner. |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HOLD: abandoned with #28675, which it is stacked on. To be closed; do not land.
Stacked on #28675 (base
lane/sync-push-keeps-machine-edits; it retargets to feat-cmux-next when that lands).cmux link sync push: when this Mac deleted a file that the machine changed since the last push, the push leaves the machine's copy in place, as before. It now also keeps the file in the record, so a pull reports the delete here against the edit there as a conflict.Why
The Codex review of #28675 named this as a follow-up (P1): "A machine-edited file deleted locally is left on the machine but removed from the next manifest... A subsequent pull therefore treats the machine file as new and restores it, silently choosing the machine edit instead of reporting the expected delete-vs-edit conflict." The bug was already on feat-cmux-next; #28675 didn't add it.
What changes
In the delete pass, a file the machine still has but changed since the last push keeps the last push's record entry, and is counted as
kept. A file the machine still has as the push left it is deleted, as before. A file missing on both sides drops out of the record, as before. The count usessaturating_add, so the Rust panic ratchet gets no new hit.Tests
link_synca_file_deleted_here_but_changed_on_the_machine_stays_a_conflict_after_a_push:notes.txtand this Mac deletes it;kept: 1);notes.txtas async_conflictand doesn't bring the file back here.The test is committed before the fix (4b22f75). The red and green results run on cmux-ci at this head and will be added here.
Observed / Not run
Changelog
Fixed: Bring Back Local reports a file you deleted on this Mac but changed on the Cloud machine as a conflict, instead of bringing the machine's copy back.
Risk: normal. Sync record only; nothing new is deleted.
Agent session: agent session
🤖 Generated with Claude Code