gendesign/tradein-mvp/backend/app/services
lekss361 e9eb812d8b fix(tradein): recompute expected_sold_* after IMV blend + band-guard anchor (#651)
Review-bot findings:
- CRITICAL: expected_sold_* were derived from PRE-blend median/range/ppm2, so
  after the #651 blend raised median_price the UI showed asking (blended) vs
  expected-sold (un-blended) → nonsensical discount. Moved the asking→sold
  derivation to AFTER the blend block; INSERT + returned estimate now use the
  post-blend values.
- IMV anchor had no rooms/area band → a studio-only IMV row could anchor a
  3-room target and inflate via the x1.15 trigger. Added NULL-tolerant guard
  (abs(Δrooms)<=1 AND area_m2 BETWEEN area*0.7..1.3) in _fetch_house_imv_anchor.
- Tests: expected_sold↔blended-median consistency, band rejection, weight clamp
  [0,1], corridor count branch. ruff clean; 26 + 145 estimator regression pass.
2026-05-29 20:11:25 +03:00
..
exporters feat(tradein): expected-sold price in estimate PDF (#648 S5b — final) (#665) 2026-05-29 14:09:46 +00:00
matching feat(tradein): same-building матчинг аналогов по house_id (#6) 2026-05-28 13:55:51 +05:00
scrapers feat(tradein): infer repair_state from listing description text (#622) (#632) 2026-05-28 15:37:34 +00:00
__init__.py feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in) 2026-05-21 00:25:39 +03:00
account_quota.py feat(tradein): configurable estimate quota + new exhausted-quota copy (#658) (#671) 2026-05-29 16:07:02 +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_session.py fix(tradein): CIAN_REQUIRED_COOKIES — add real auth cookies (DMIR_AUTH + Cian session) (#480) 2026-05-23 14:52:24 +00:00
dadata.py feat(tradein): DaData /suggest tier в /suggest endpoint (PR Q2) 2026-05-27 19:08:58 +05:00
estimator.py fix(tradein): recompute expected_sold_* after IMV blend + band-guard anchor (#651) 2026-05-29 20:11:25 +03:00
geocoder.py feat(tradein): DaData /suggest tier в /suggest endpoint (PR Q2) 2026-05-27 19:08:58 +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(tradein-photos): sanitize uploaded images via Pillow re-encode (#511) 2026-05-24 11:32:04 +00:00
scheduler.py feat(tradein): daily asking→sold ratio refresh (#648 S4) (#663) 2026-05-29 13:49:36 +00:00
scrape_pipeline.py feat(scheduler): dormant Yandex Realty city-sweep (#561) (#642) 2026-05-29 08:50:10 +00:00
scrape_runs.py fix(tradein/avito): anti-bot hardening — sleep + abort + shared session (#487) 2026-05-23 20:08:40 +00:00
scraper_settings.py feat(tradein): global scraper delay setting (applies across all scrapers) (#485) 2026-05-23 15:43:28 +00:00
search_query.py feat(tradein): Phase 3.2 — /api/v1/search endpoint + Redis cache (#479) 2026-05-23 14:44:22 +00:00