gendesign/tradein-mvp/backend/app/services
Light1YT 282243fb97
All checks were successful
CI / changes (pull_request) Successful in 11s
CI / backend-tests (pull_request) Has been skipped
CI / frontend-tests (pull_request) Has been skipped
CI / openapi-codegen-check (pull_request) Has been skipped
fix(cian): recover new-build house number via cadastral anchor + listings (source,source_id) dedup (#1773)
PART 1 — cian-новостройки теряли номер дома: geo.address[] для ЖК часто без
части {type:"house"}, адрес выходил house-less («…улица Евгения Савкова» без
«29») и раздробленные корпуса схлопывались в catch-all → same-building anchor
рвался. Теперь для новостроек без house восстанавливаем номер по приоритету:
(a) building.houseNumber / building.address, (b) building_cadastral_number как
anchor-ключ, (c) хвостовой дом-токен из newbuilding.name — без catch-all
фабрикации. building_cadastral_number предпочтён как house anchor
(house_source=cian_building_cad) → Tier 0 cadastr_exact схлопывает корпуса;
nb_id остаётся fallback'ом.

PART 2 — дубль-листинги: миграция 133 дедупит listings по (source, source_id)
(keeper = house_id_fk → активность → свежесть → id), безопасно перепривязывает
детей (price_history/snapshots/listing_sources/external_valuations/merged_into)
collision-safe и вешает частичный UNIQUE (source, source_id) WHERE source_id IS
NOT NULL. Идемпотентно, недеструктивно для keeper. save_listings оставлен на
ON CONFLICT (dedup_hash) — арбитр согласован с новым constraint, source_id=NULL
(yandex/url-only) не ломается.

Refs #1773
2026-06-26 12:29:25 +05:00
..
exporters fix(tradein): trade-in PDF cover uses estimate.expires_at, not hardcoded +30d (#1530) 2026-06-17 20:27:57 +03:00
matching fix(matching): conflict_resolution picks freshest (last_seen_at) value, deterministic (#1539) 2026-06-17 22:43:59 +03:00
scrapers fix(cian): recover new-build house number via cadastral anchor + listings (source,source_id) dedup (#1773) 2026-06-26 12:29:25 +05:00
__init__.py feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in) 2026-05-21 00:25:39 +03:00
account_quota.py fix(tradein): atomic conditional quota increment — close TOCTOU (#747) (#749) 2026-05-30 15:52:34 +00:00
brand.py feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in) 2026-05-21 00:25:39 +03:00
cache.py feat(tradein): Phase 3.2 — /api/v1/search endpoint + Redis cache (#479) 2026-05-23 14:44:22 +00:00
cian_price_history.py fix(week-review): автофиксы код-ревью — 169 issue (label «week ревью 1») 2026-06-15 20:21:11 +05:00
cian_session.py feat(tradein): dedicated Cian mobile proxy — separate egress from Avito (#923) 2026-05-31 19:30:14 +00:00
dadata.py fix(week-review): автофиксы код-ревью — 169 issue (label «week ревью 1») 2026-06-15 20:21:11 +05:00
estimator.py fix(estimator): enable split-home disclosure at validated threshold 1.2 (audit #1871) 2026-06-24 01:54:58 +05:00
geocoder.py fix(tradein): drop non-EKB avito detail coords on ingest (audit #1871 P2) 2026-06-23 14:33:10 +05:00
house_imv_backfill.py fix(week-review): cross-file добивка код-ревью (#1338, #1363, #1419, #1421, #1424, #1480) 2026-06-15 20:29:00 +05:00
house_metadata.py feat(tradein): postgres_fdw live read of gendesign.cad_buildings (replaces snapshot) (#493) 2026-05-24 08:57:30 +00:00
image_sanitizer.py fix(week-review): автофиксы код-ревью — 169 issue (label «week ревью 1») 2026-06-15 20:21:11 +05:00
rosreestr_poll.py feat(tradein): scheduled monthly Rosreestr new-quarter poll → ingest alert (#888) (#894) 2026-05-31 13:13:55 +00:00
sber_index.py fix(tradein): correct SberIndex hedonic/asking dataset-paths + 404 warning (#902) 2026-06-17 22:50:52 +03:00
scheduler.py feat(scheduler): per-source interval_days cadence (weekly exhaustive avito) 2026-06-18 23:10:18 +03:00
scrape_pipeline.py fix(scrapers): avito ban-triggered IP rotation (#1790) — changeip on block, bounded 2026-06-20 21:24:12 +03:00
scrape_runs.py feat(admin): unified scrape/runs + scraper/health + rotate-ip API для единой scrapers-страницы 2026-06-20 09:25:57 +03:00
scraper_settings.py chore(tradein): деактивировать N1.ru scraper — источник переехал в Cian 2026-06-16 14:50:51 +03:00
search_query.py feat(tradein): segment=vtorichka|novostroyki|all query-param on listings (#1188) 2026-06-17 21:43:01 +03:00
yandex_address_backfill.py fix(tradein): yandex address-enrich — city-agnostic title regex (спутники ЕКБ) (#875) 2026-05-31 09:08:29 +00:00
yandex_price_history.py feat(tradein): populate offer_price_history for yandex from gate price.previous/trend 2026-06-18 14:23:23 +03:00