mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-19 05:26:47 +00:00
c8c11fdb7a
The importer's parsed item spells the provider id `googleFtid`; the match rule reads `google_ftid`. `isPlaceDuplicate` was handed a mapped object, but `findDuplicatePlace` got the raw one, so its id strategy was always empty. The name then decided the match, and a second place sharing that name could take the ftid belonging to the renamed one. One candidate now serves all three calls. Sharing the strategy list shares the ORDER, not the comparison, and two differences survive it. SQLite `lower()` is ASCII-only where JavaScript's is not, so a row stored as CAFÉ CENTRAL does not match the candidate Café Central in SQL while it does in memory. The coordinate fallback used to paper over that for a named candidate, sometimes with the wrong row. And `buildDedupSet` collects coordinates only for unnamed rows while the coordinate query considers every row, which is the answer `findMatchingPlaceId` wants and the opposite of what the in-memory half says. Both are now written down where someone will read them, and pinned by tests, rather than implied away. PLACE-SVC-028e covers the backfill landing on the right row. PLACES-SVC-014 to -017 cover the id beating a misleading name, both remaining divergences, and the tolerance as a number rather than as a reference to itself.