Repository navigation
fix(config-sync): merge entities absent from one side as implicit deletes - #2457
Merged
Merged
Conversation
…etes A record present in the acknowledged base but missing entirely from the remote head (or the local snapshot) while the other side edited it made three_way() fail with "remote merge state missing". Sync then failed on every retry with no way for the user to recover. An absent record is already treated as an implicit delete when the other side is unchanged. Extend that to the changed cases: a matching local tombstone converges on delete, an edit becomes a delete-versus-edit conflict for review, and an unresolved remote :local/:remote pair keeps the local edit instead of being read as a deletion.
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.
Problem
Cloud sync failed permanently with
remote merge state missingwhen an entity existed in the acknowledged base, was edited (or deleted) locally, and was entirely absent from the remote head (e.g. the remote carried an unresolved:local/:remotepair, or a device dropped the record). Retrying hit the same error.Fix
config_sync::merge::three_waynow treats an absent side as an implicit delete in the changed cases too:delete-versus-editconflict for reviewValidation
merge.rs(fail on old code, pass now)cargo test -p host-core config_sync55/55,cargo fmt --checkclean/Applications/PI-Desktop.appbundled plugins)