fix(tradein): run same-building anchor without radius analogs (#691) #704
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#704
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/691-anchor-no-geocode"
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?
Summary
lat/lon=None→ST_DWithinне находит радиусные аналоги →median_price=0, и якорь того же дома НЕ запускался (гейт требовалlistings_clean+median_price>0). При этом комплы того же дома есть —_fetch_anchor_compsрезолвит дом поpayload.addressбез гео (Ткачёва 13 → «улица Ткачей, 13», 27 комплов; Сакко 99).area_m2+ (payload.address|geo.full_address), независимо от радиусных аналогов.Safety
_compute_same_building_anchorвернётNone, мутации median/range нет (идентично insufficient-пути). Не фабрикуем число.Test plan
pytest tests/test_same_building_anchor.py→ 37 passed (+2: anchor при пустом радиусе median>0; контроль — без комплов median=0).median>0.Closes #691
Run same-building anchor without radius analogs (#691). Gate drops the listings_clean+median>0 requirement, keeps area + (raw address or geo.full_address). Verified safe: geo non-None at this point (early _empty_estimate return), seg_counts guarded (empty->None), _fetch_anchor_comps gates Tier C on lat/lon not-None (None -> Tier C skipped, no crash; Tier A is address-based), anchor None -> no mutation (identical to old). New gate is a documented superset of old (non-empty radius always has address). No #674/#682 regression. Tests cover both now-reachable paths: empty-radius+same-building-comps -> anchor fires median>0 range valid; empty-radius+no-comps -> median stays 0 (no fabrication). APPROVE.