Repository navigation
Keep items that have a clean marker in the import order - #1182
Merged
Merged
Conversation
A clean marker has the same key as the item it cleans and no level, so it sorts ahead of the item. Container handlers then took the first entry for each key, which dropped the item from the report and import lists. Clean markers now stay out of that distinct and go at the end of the list, after the renames. Publisher only sees this when a pack keeps its markers, which is when the report has something to delete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 tasks done
This was referenced Nov 3, 2026
Merged
This was referenced Nov 9, 2026
This was referenced Nov 27, 2026
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.
Summary
A clean marker has the same key as the item it cleans and no
Level, soSyncHandlerLevelBasesorts it ahead of the item.SyncHandlerContainerBase.GetMergedItemsAsyncthen took the first entry for each key, so the marker replaced the item in the report and import lists.Clean markers now stay out of that
DistinctByand go at the end of the list, after the renames. Delete markers are handled as before.This affects handlers built on
SyncHandlerContainerBase. uSync.Complete's Publisher hits it when a pack keeps its clean markers, which it does when the report has something to delete. A delete can then run while the changed and new items in the same pack aren't imported. It's needed for Jumoo/uSync.Complete#194.Related: Jumoo/uSync.Complete.Issues#279
Testing
CleanMarkerOrderTests: 3 new tests that fail without the change. FulluSync.Testssuite passes (197).Only document types were pushed for real. Data, media and member types share the code but weren't tested that way. v18 still needs a forward port.
🤖 Generated with Claude Code