New API to detect fid change on rebase

Open
#274 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
46/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python

Research direction

The issue describes exposing feature ID remapping from the rebase API and points to geodiff logs showing the mapping, but names no files or tests. First read the rebase API implementation and locate where the mapping is produced. Decide how the API should return those remapped IDs, then add coverage showing a rebase reports the mapping; the issue gives no test path.

Written by the indexing model from the issue text.

Description

enhancement

Problem:
If an application is holding a reference to Feature and a geodiff rebase happens on the background, currently there is no mechanism to detect if the ID of the feature has been changed. This stale data can lead to deletion/modification of wrong feature. https://github.com/MerginMaps/mobile/issues/4693

Workaround:
It's possible to create changeset before and after rebase. Comparing these changesets should yield the remapping, however we need to make some assumptions when doing it this way (e.g. geodiff creates the changeset in the same order of features).

Solution:
Either create a new API, which would do a dry-run rebase and return the list of remapped ID's or add another parameter to rebase API, which would be populated with the remapped ID's. Geodiff should already have this information available (see logs below), so it's just the matter of exposing it to consumers.

"2026-10-31T09:58:39.875Z GEODIFF debug: rebase info (base2their / old)
 TABLE survey
  inserted 12,
  deleted  --none --
  updated  --none --"
"2026-10-31T09:58:39.876Z GEODIFF debug: mapping
  survey
  12->13,"
"2026-10-31T09:58:39.877Z GEODIFF debug: No conflicts present"
Dominant language
Python
Stars
185
Forks
22
Avg merge
1h 31m
Merged PRs (30d)
2

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MerginMaps/geodiff

All issues in MerginMaps/geodiff

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.