gendesign/tradein-mvp/backend/app
bot-backend d39e136d88
All checks were successful
CI Trade-In / changes (pull_request) Successful in 7s
CI / changes (pull_request) Successful in 7s
CI / backend-tests (pull_request) Has been skipped
CI / frontend-tests (pull_request) Has been skipped
CI Trade-In / frontend-checks (pull_request) Has been skipped
CI / openapi-codegen-check (pull_request) Has been skipped
CI Trade-In / backend-tests (pull_request) Successful in 1m36s
fix(tradein/estimator): kitchen_area_m2/ceiling_height_m/is_apartments comp-scoring (#2012)
Three independent feature flags, all default OFF pending live A/B
backtest (no DB access in worker/main sessions this round — see PR
body for exact before/after commands to run once available):

- estimate_kitchen_area_signal_enabled / estimate_ceiling_height_signal_enabled:
  house_type/year_built have a user-input target to compare candidates
  against; kitchen_area_m2/ceiling_height_m have neither a target
  (TradeInEstimateInput doesn't collect them) nor ground-truth on
  rosreestr deals (backtest DealSample lacks these columns). Inventing
  an external "typical" constant would be unfounded, so the penalty is
  self-referential: deviation from the CANDIDATE POOL's own median in
  Tier H/W relevance_score. NULL-safe (no penalty, excluded from
  median) and sparse-safe (fully skipped when <5 non-null values in
  the pool).
- estimate_is_apartments_filter_enabled: hard-filter in _COMMON_WHERE +
  Tier W, symmetric to the existing novostroyki-guard (#1186). NULL
  passes through untouched, only explicit true excluded.

Review fixup: _stratify_candidates requires its input pre-sorted by
relevance_score (its per-source guaranteed-quota selection depends on
that order). _apply_kitchen_ceiling_signal mutates relevance_score
in-place after the SQL fetch but before stratify — added an explicit
re-sort in both call sites (Tier H, Tier W) so the diversity-quota
selection sees the post-adjustment order once either flag ships live.
Currently a no-op (flags off), but was a latent footgun for the first
PR to flip one on.
2026-07-04 11:21:54 +03:00
..
api feat(tradein/lead): POST /api/v1/trade-in/lead — persist contact leads (#2376) (#2390) 2026-07-04 07:12:22 +00:00
core fix(tradein/estimator): kitchen_area_m2/ceiling_height_m/is_apartments comp-scoring (#2012) 2026-07-04 11:21:54 +03:00
observability feat(tradein): enrich GlitchTip SDK init — integrations + PII scrub (#396) (#643) 2026-05-29 09:23:17 +00:00
schemas fix(tradein/estimator): lock honest asking_to_sold_ratio invariant + disambiguate torg bases (#2087 M2/M3) (#2387) 2026-07-04 06:48:51 +00:00
services fix(tradein/estimator): kitchen_area_m2/ceiling_height_m/is_apartments comp-scoring (#2012) 2026-07-04 11:21:54 +03:00
tasks fix(tradein/houses): персистить house_class из avito «Класс жилья» и yandex parse (#2003) (#2359) 2026-07-04 00:49:48 +00: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/lead): POST /api/v1/trade-in/lead — persist contact leads (#2376) (#2390) 2026-07-04 07:12:22 +00:00
scheduler_main.py feat(proxy-pool): P4 — browser dynamic pool-proxy (acquire→/fetch→relaunch) + orchestration wiring, ship-dark (#2164) 2026-07-02 19:20:29 +00:00