chore(geofence): remove unused FETCH_ALL sync mode#774
Merged
mrehan27 merged 1 commit intoJul 10, 2026
Conversation
Sample app builds 📱Below you will find the list of the latest versions of the sample apps. It's recommended to always download the latest builds of the sample apps to accurately test the pull request. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/geofence-on-device #774 +/- ##
================================================================
+ Coverage 67.45% 67.76% +0.30%
- Complexity 1123 1127 +4
================================================================
Files 206 206
Lines 6410 6400 -10
Branches 890 888 -2
================================================================
+ Hits 4324 4337 +13
+ Misses 1776 1746 -30
- Partials 310 317 +7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
|
|
Build available to test |
📏 SDK Binary Size Comparison Report
|
aab2dff to
aec4dfe
Compare
cd08b4a to
625fe47
Compare
|
|
mahmoud-elmorabea
approved these changes
Jul 10, 2026
Base automatically changed from
mbl-2008-geofence-nearest-geoset
to
feature/geofence-on-device
July 10, 2026 15:11
FETCH_ALL was never active (NEARBY is the only mode) and, since the switch to POST /geofences/nearest, its bodyless-POST path was dead code. Remove the GeofenceSyncMode abstraction entirely: the device location is always sent, the re-fetch rule is inlined in the repository, and RefreshAction moves to its own file. iOS drops its GET /geofences/nearby fetch-all path in a parallel change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
625fe47 to
05f0750
Compare
|
|
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.
What
Remove the
GeofenceSyncModeabstraction entirely.FETCH_ALLwas never active (NEARBYis the only mode), and since #773 switched nearby sync toPOST /geofences/nearest, theFETCH_ALLpath was a dead bodyless POST.GeofenceApiService.fetchGeofencesnow always sends the device location (no nullable-locationbranch).distance >= remoteFetchRefreshTriggerRadius) is inlined inGeofenceRepository;syncModefield/param dropped from the repository + DI.RefreshActionmoves to its own file;GeofenceSyncMode.kt+ its test are deleted.No runtime behavior change —
NEARBYwas already the only active mode. Net: main −33 LOC.Notes
GET /geofences/nearbyfetch-all path in a parallel change (same cleanup, other repo).MBL-2008
PRs Stack
POST /geofences/nearest)Note
Low Risk
Refactor and test cleanup only; production path already used NEARBY. Risk is mainly if anything external still depended on FETCH_ALL or nullable fetch APIs (none found in-module).
Overview
Removes the
GeofenceSyncModeabstraction (FETCH_ALL/NEARBY) and standardizes on the nearby sync path that was already the only active mode.GeofenceRepositoryno longer takessyncMode; the “re-fetch when device moves pastremoteFetchRefreshTriggerRadius” rule lives inmovedBeyondFetchRadius. Remote refreshes always pass device location into the API.RefreshActionis split into its own file;GeofenceSyncMode.ktand its unit test are deleted.GeofenceApiService.fetchGeofencesrequires a non-nulllocationandradiusMetersand always POSTs a JSON body to/geofences/nearest(the bodyless fetch-all branch is gone). DI wiring drops the sync-mode parameter.Tests are renamed/consolidated around the single behavior; FETCH_ALL–specific cases and the “no body” API test are removed.
No intended runtime change for shipped SDKs—behavior matches former
NEARBY/GeofenceSyncMode.active.Reviewed by Cursor Bugbot for commit 05f0750. Bugbot is set up for automated code reviews on this repo. Configure here.