fix(tradein): feed raw payload.address to same-building anchor (geocode-independent) #680
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#680
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/tradein-anchor-raw-address"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
ROOT CAUSE of the live golden coverage being 67/58% (and flaky) while the offline sim was 95%.
The #677/#679 same-building anchor call passed
address=geo.full_address(the GEOCODED canonical address). On prod the geocoder frequently returns None (lat/lon/canonical all None — observed for Ткачёва 13, Хохрякова 48, Олимп 13, …), so geo.full_address was empty → _normalize_building_key got nothing → Tier A (same building) never fired → the estimate fell back to the radius tier. The offline validation fed the RAW address directly, so it never hit this.Fix (1 line):
address=payload.address or geo.full_address— use the raw user input (always present, exactly what the normalizer is validated on); geo as fallback. Makes the same-building anchor independent of geocode success.ruff clean; 30 anchor tests pass. After merge+deploy I will re-run the 53-case live golden E2E; expect the premium/business buildings (Ткачёва 27 comps, Iset 44, Олимп, Сакко) to finally fire Tier A and coverage to jump toward the ~95% sim.
Separately noted: prod geocoder returning None broadly is a distinct issue (possibly the #654 geocode time-budget) — to investigate next; this fix removes the SB anchor's dependence on it.
Refs #651 #677 #679
Feed raw payload.address (fallback geo.full_address) to _fetch_anchor_comps. Correct: on prod geocode often returns None so full_address empty -> SB anchor Tier A missed building, fell to radius; raw address always present and is exactly what the #677/#679 normalizer was validated on. Graceful when both empty (no comps -> radius). No pricing-math/median/expected_sold impact; does not touch #674 bug class. Only estimator.py PR this pass. MINOR: no test for the trivial or-fallback (normalizer itself tested in #679). APPROVE.