Correct Remote Change Propagation to File Provider Framework - #10252
Merged
Conversation
…ogic Signed-off-by: Iva Horn <[email protected]>
…standing Signed-off-by: Iva Horn <[email protected]>
Collaborator
Author
|
/backport to stable-34.0 |
Signed-off-by: Iva Horn <[email protected]>
Collaborator
Author
|
A (partial) backport to |
i2h3
marked this pull request as ready for review
June 25, 2026 13:16
Signed-off-by: Iva Horn <[email protected]>
Contributor
|
Artifact containing the AppImage: nextcloud-appimage-pr-10252.zip Digest: To test this change/fix you can download the above artifact file, unzip it, and run it. Please make sure to quit your existing Nextcloud app and backup your data. |
|
i2h3
added a commit
that referenced
this pull request
Jun 26, 2026
Port #10252 back manually to stable-33.0
This was referenced Jun 26, 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.



Community and paying-support reports describe server-side changes that intermittently fail to appear in the macOS File Provider domains, with no reliable reproduction. This PR pins down three concrete derivation bugs in the file-provider extension that silently drop remote changes, fixes them, and adds deterministic reproducers. Scope is macOS File Provider only (Windows / Linux / classic sync folders are unaffected).
The branch has two logically separate commits and can be reviewed (or split) accordingly:
1. Fix: remote changes silently dropped during working-set change enumeration
Because a change notification only ever signals
.workingSet, working-set change enumeration is the path that drives remote updates into the framework. Three issues there caused changes to be discovered but never reported:syncTime > anchorquery, which excludes non-materialised items and items whose parent directory did not itself change. The scan now returns the discovered creations/updates/deletions, which are reported directly, merged and de-duplicated with the database-derived pending local changes.isInSameDatabaseStoreableRemoteStatedid not comparesize, so a content change carrying a stale/unchanged ETag + date was treated as "no change." It now also comparessize.Adds
RemoteChangePropagationTests— deterministic reproducers driven through the real working-set path via the existing mock harness. Three reproduced the drops above and now pass as regression guards; one documents that the notify_push fileId gate correctly matches on the parent folder id (the server propagates the changed ETag up to the user's root, so the gate is not a source of dropped new items — see #6430).2. Refactor (behavior-preserving): make the enumerator legible
No behavior change — guarded by the unchanged, fully-passing test suite:
readServerUrlwith a namedRemoteReadResult, and the three parallel new/updated/deleted arrays with aChangeSetvalue type.Enumerator.swift(now ~135 lines) into focused, documentedEnumerator+*.swiftextensions by concern (item enumeration, change enumeration, working-set scan, observer reporting, sync anchor; trash beside the existing trash code). The twoNSFileProviderEnumeratormethods are now thin dispatchers.checkMaterializedItemsOnServer→scanMaterialisedItemsForRemoteChanges; added doc comments throughout.Checklist
AI (if applicable)