gendesign/tradein-mvp/backend/app
bot-backend f999011b30
All checks were successful
CI / changes (pull_request) Successful in 7s
CI / backend-tests (pull_request) Has been skipped
CI / openapi-codegen-check (pull_request) Has been skipped
CI / frontend-tests (pull_request) Has been skipped
fix(tradein/estimator): hedonic respects le_asking + hedonic unit test (#2002)
Review found the hedonic factor (≤1.30) was applied AFTER the
estimate_expected_sold_le_asking clamp, so expected_sold could exceed the
asking headline (median) by up to ~26% for new/small lots — an overpay risk
that violated the default-True le_asking invariant.

Fix: re-assert le_asking right after the hedonic block and before the
calibrated-PI range block. Final order: ratio clamp -> hedonic factor ->
le_asking re-clamp -> calibrated PI range (range still wraps the clamped
point). round(median_ppm2) keeps expected_sold_per_m2 an int.

The re-clamp does NOT materially erode the новостройка/бизнес benefit
(бизнес bias -9.15->-10.19, MAPE held 12.87) and actually improves overall
expected_sold MAPE on the frozen fixture (14.24->13.23) by capping
over-corrections that overshot actual sold prices.

Adds tests/test_estimator_hedonic.py (hermetic, no DB): factor magnitude vs
OFF, both clamp boundaries, neutral year term for target_year=None, and the
le_asking invariant under hedonic ON. Baseline regenerated; gate green.

Also clarifies the config comment: the quoted held-out fit metrics
(18.5->16.1 etc., n=2366) are distinct from the 277-deal backtest fixture
(18.63->13.23).
2026-06-27 19:03:01 +03:00
..
api feat(scrapers): live pacing-регулятор (GET/PUT /scraper/pacing) + data-quality coverage endpoint 2026-06-20 12:47:03 +03:00
core fix(tradein/estimator): hedonic respects le_asking + hedonic unit test (#2002) 2026-06-27 19:03:01 +03:00
observability feat(tradein): enrich GlitchTip SDK init — integrations + PII scrub (#396) (#643) 2026-05-29 09:23:17 +00:00
schemas fix(estimator): data-age guards — sber staleness + IMV thin-market (#audit-5) 2026-06-20 15:03:19 +03:00
services fix(tradein/estimator): hedonic respects le_asking + hedonic unit test (#2002) 2026-06-27 19:03:01 +03:00
tasks feat(tradein): бэкфилл координат листингов из ekb_geoportal_buildings (street+house match) 2026-06-20 17:08:46 +03:00
__init__.py feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in) 2026-05-21 00:25:39 +03:00
main.py feat(tradein): systemd timer scheduler — trigger script + units + SCHEDULER_ENABLE flag (#581) 2026-05-31 16:53:38 +00:00
scheduler_main.py feat(tradein): отдельный scraper-контейнер — scheduler вне API-процесса (#1182) 2026-06-12 10:50:50 +03:00