fix(tradein/estimator): дедуп кросс-source дублей в anchor-пути (#2265 follow-up) #2311
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#2311
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/tradein-anchor-dedup-gap"
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
Живой QA-smoke на проде (2026-07-03) после мерджа PR #2273 воспроизвёл тот же класс бага дублей в analogs — gap оказался в покрытии дедупа, не в алгоритме.
_dedup_cross_source()(введена PR #2273) вызывалась только на радиусном пути (_price_from_inputs()→listings). Anchor-тиры (Tier A same_building / Tier C micro_radius,_fetch_anchor_comps()— отдельный raw SQL) никогда не дедуплицировались, аanchor_comps_usedфидит и показываемыеanalogs[], иn_analogs, как только сработал анкорный тир — именно этот путь и сработал на реальном тестовом адресе («Рассветная 5», физлот ул. Сыромолотова 11 показан дважды через cian+domklik).Фикс:
anchor_comps = _dedup_cross_source(anchor_comps)перед_compute_same_building_anchorи передanchor_comps_used— оба потребителя читают один и тот же постдедуп список, n_analogs и показанные analogs остаются синхронными без отдельной логики.Test plan
test_estimator_anchor_dedup_gap_2265.py): точный live-репро физлот на anchor-пути (2→1), честность n_analogs, дедуп на пуле >2, anti-false-merge контрольRefs #2265, #2262