gendesign/tradein-mvp/backend/app/services
bot-backend e042e9bbfd
Some checks failed
CI Trade-In / changes (pull_request) Successful in 10s
CI / changes (pull_request) Successful in 10s
CI Trade-In / frontend-checks (pull_request) Has been skipped
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
CI Trade-In / backend-tests (pull_request) Failing after 54s
fix(tradein/estimator): scope year_built NULL cohort-bypass away from avito (#2013)
Cohort/era WHERE clause carried `OR year_built IS NULL`, meant to let avito's
frequently-missing year_built field through the filter. In practice this let
ANY-era avito listing bypass the cohort filter entirely once cohort_year_min/
max were set — pollution bug: khrushchevka target could pull in a modern avito
comp with no year parsed, and vice versa.

Narrow the escape to `OR (year_built IS NULL AND source <> 'avito')` in both
places that must stay in sync:
- _COMMON_WHERE (Tier S/H, ~estimator.py:4210)
- Tier W inline SQL copy (~estimator.py:4640)

Non-avito NULL-year rows (cian/domklik/etc without a parsed year) still pass
through untouched; avito NULL-year rows now must satisfy the same
year_built BETWEEN cohort_year_min AND cohort_year_max test as everything
else.

Added tests/test_estimator_avito_cohort_null_2013.py: SQL-source assertions
that both cohort blocks carry the new guard, stay in sync (exactly 2
occurrences), and that the old unscoped escape is gone. A full DB-backed
integration test was impractical — this suite's estimator tests run against
a dummy DATABASE_URL with no live DB.
2026-07-12 15:22:32 +03:00
..
exporters feat(tradein/pdf): редизайн отчёта в реальном языке МЕРА (v2 HUD) (#2434) 2026-07-04 18:41:21 +00:00
matching fix(tradein/pii): удалить телефоны продавцов (NULL) + PII клиента (DROP) (#2217, #1969) 2026-07-03 23:00:42 +03: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
buildings_query.py fix(tradein/sale-share): гард по этажности — отсечь near-neighbor mis-match 2026-06-29 00:31:09 +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(tradein/cian): персист bti_data/valuation house_info в houses + дедуп УК (#2435) (#2437) 2026-07-04 20:21:32 +00:00
cian_session.py chore(tradein/scrapers): удалить весь legacy scrapers/ каталог — final E (#2397, #2277) 2026-07-04 15:58:15 +03:00
dadata.py fix(week-review): автофиксы код-ревью — 169 issue (label «week ревью 1») 2026-06-15 20:21:11 +05:00
domclick_session.py feat(tradein/domclick): cookie-injection MVP для обхода QRATOR-блока (#2000) (#2433) 2026-07-04 17:49:40 +00:00
estimator.py fix(tradein/estimator): scope year_built NULL cohort-bypass away from avito (#2013) 2026-07-12 15:22:32 +03:00
gar_flats_loader.py feat(tradein): канонический матч ГАР↔houses (0%→41% yield) + tradein_canon_addr + --match-only (#2063) 2026-06-28 15:50:07 +00:00
geocoder.py feat(tradein/matching): fias_exact tier + estimate fias persist + suggest fias_id contract 2026-07-02 20:49:04 +03:00
house_dedup_merge.py refactor(tradein/scheduler): удалить legacy scheduler_loop + scraper-scheduling, kit единственный путь (#2397 Part C) 2026-07-04 13:00:30 +03:00
house_imv_backfill.py refactor(tradein/scrapers): удалить legacy scrape_pipeline.py + тест-хирургия (#2397 Part E1) 2026-07-04 13:56:06 +03: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
location_coef.py feat(tradein): location-coef MVP через FDW-мост к OSM POI Птицы (#2045) 2026-07-03 23:44:55 +03:00
product_handlers.py feat(tradein/domclick): production Layer B detail-backfill orchestrator (#2000) (#2436) 2026-07-04 19:49:07 +00:00
proxy_pool.py feat(proxy-pool): pool service (acquire/release/health) + healthcheck scheduler task (#2162) 2026-07-02 16:41:39 +00: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 refactor(tradein/scheduler): удалить legacy scheduler_loop + scraper-scheduling, kit единственный путь (#2397 Part C) 2026-07-04 13:00:30 +03:00
scrape_runs.py fix(tradein): persist scrape_runs.total_seen/new_count from sweep counters (#1926) (#1928) 2026-06-26 18:09:17 +00:00
scraper_adapters.py feat(tradein/scraper-kit): shared base/utils для providers/* (#2358, Foundation) 2026-07-04 03:50:55 +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 chore(tradein/scrapers): удалить весь legacy scrapers/ каталог — final E (#2397, #2277) 2026-07-04 15:58:15 +03:00
zhkh_flats_loader.py fix(tradein): cadastre ЖКХ-fallback + COALESCE merge-key + median-floors guard 2026-06-29 01:32:48 +03:00