Tier A (same building) dropped cian listings tagged listing_segment='novostroyki' even in delivered buildings where that tag marks owner resales/переуступки (sale_type=free). Gated relaxation of the #1186 guard, Tier A ONLY: include novostroyki rows iff the same house has secondary (vtorichka/NULL) listings AND secondary_count >= primary_count — secondary-dominant signal of a delivered house. Prevents a lone vtorichka + clustered developer-priced novostroyki from anchoring on застройщик prices after MAD-clip drops the rare secondary (~27% overvaluation). Pure-primary / primary-dominated houses keep the #1186 guard. Behind estimate_sb_tier_a_allow_primary_if_secondary_present (default True). Dedup duplicate active rows by (source, source_id) primary key (codebase canon, namespaced id/url tags, source_url fallback) — collapses rows whose source_url differs only by trailing slash / query-param (e.g. cian source_id=330047129 ×2). Tier C / radius / asking_to_sold_ratio paths untouched. 84 unit tests pass. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| auth.py | ||
| config.py | ||
| db.py | ||
| fdw.py | ||
| ratelimit.py | ||