fix(tradein): feed raw payload.address to same-building anchor (geocode-independent) #680

Merged
bot-reviewer merged 1 commit from fix/tradein-anchor-raw-address into main 2026-05-29 23:17:09 +00:00

1 commit

Author SHA1 Message Date
lekss361
3a25e2c4b8 fix(tradein): feed raw payload.address to same-building anchor (geocode-independent)
The #677/#679 same-building anchor was fed geo.full_address (the GEOCODED
canonical address). On prod the geocoder frequently returns None (lat/lon/
canonical all None), so geo.full_address was empty → _normalize_building_key
got nothing → Tier A (same building) never fired → fell back to the radius
tier for every geocode-failing address. That is why live golden coverage was
67/58% (and flaky run-to-run) while the offline sim (which fed the raw address)
showed 95%: Ткачёва 13 / Хохрякова 48 etc. geocode-fail on prod.
Fix: pass payload.address (raw user input, always present, exactly what the
normalizer is validated on) with geo.full_address as fallback. Makes the
same-building anchor independent of geocode success. ruff clean; 30 anchor tests.

Refs #651 #677 #679
2026-05-30 02:07:38 +03:00