fix(sync): apply all InstanceId removes for a recurring series - #97
Merged
Conversation
Store EAS 16 occurrence deletes as uid => [InstanceId, ...] so a Sync batch that removes several instances of the same series no longer keeps only the last one. Resolve Removes that omit ServerEntryId against a single co-batched Add (iOS pattern) so the EXDATE is applied in the same request instead of requiring a second delete.
🔍 CI ResultsOverall: ❌ 12/12 lanes failed TL;DR: ❌ Quality issues: PHPStan: 243 unique errors in 11 lanes; PHP-CS-Fixer: 29 files. Summary by PHP Version
Quality Metrics
❌ Failed Lanesphp8.0-dev
php8.0-stable
php8.1-dev
php8.1-stable
php8.2-dev
php8.2-stable
php8.3-dev
php8.3-stable
php8.4-dev
php8.4-stable
php8.5-dev
php8.5-stable
CI powered by horde-components • View full results |
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
InstanceIdRemove for the same recurring series (no longer overwrite prior deletes for one ServerEntryId).ServerEntryIdagainst a single co-batched series Add so the occurrence EXDATE is applied in the same Sync.Motivation
Deleting a calendar occurrence on iOS often required a second delete: the first Remove arrived without a ServerEntryId (paired with an Add of the series), failed with
(null) nicht gefunden, and the Add restored the series without an exception. Separately, deleting several occurrences of one series in one Sync only persisted the last InstanceId because removes were stored asuid => instanceid.Changes
Horde_ActiveSync_Request_Sync: collectinstanceid_removesasuid => [InstanceId, ...]; queue orphan InstanceIds when ServerEntryId is empty; after Adds, map orphans to the single new server uid; import all instance deletes (streaming and non-streaming).Horde_ActiveSync_Connector_Importer: correctimportMessageDeletion()@paramdocs (uid => instanceid).Test plan
vendor/bin/phpunit --bootstrap vendor/autoload.php vendor/horde/activesync/test/unit/Horde/ActiveSync/Request/SyncStreamingTest.php(15 tests)