feat(tradein/estimator): elite-segment manual_review trigger by asking ppm² (#2002) #2027

Merged
lekss361 merged 1 commit from feat/tradein-manual-review-elite into main 2026-06-27 20:15:39 +00:00
Owner

Summary

Every expensive-segment estimate now carries an honest "auto-estimate is conservative" warning. Closes the gap left by #2019: an elite unit that is NOT in a curated premium building, is < 20M, and has decent confidence previously got NO warning — yet the backtest proved élit is systematically under-estimated ~−29% (premium is unit-level: finish/view/class, absent from deal data). Metadata only — gate byte-identical.

New trigger in _manual_review (gated on estimate_manual_review_enabled):

asking_ppm2 ≥ estimate_manual_review_elite_ppm2 (=250 000)
→ "элитный/дорогой сегмент — авто-оценка консервативна: премия за отделку, вид и класс
   дома не отражена в данных сделок, фактическая цена может быть выше"

Key: uses the ASKING/headline median_ppm2, NOT expected_sold_per_m2. The schema is explicit that the headline median stays asking-side while expected_sold_* = asking × ratio; because the estimate under-prices elite, expected_sold_per_m2 drags an elite unit into the бизнес band and wouldn't identify it — the un-discounted asking median cleanly marks the segment. Reasons are additive (a curated premium elite unit shows both bullets). Frontend already renders manual_review_reasons → no UI change.

Test plan

  • regression gate byte-identical (pure flag, no pricing path)
  • tests/test_estimator_manual_review.py +6 cases (elite alone < 20M / decent-confidence fires; ==250k boundary; 249 999 no-fire; None/0 safe; 5-reason accumulation) → 25 passed with the gate
  • full suite 2588 passed / 2 skipped (1 pre-existing unrelated test_search_cache_hit)
  • ruff strict clean

Refs #2002

## Summary Every expensive-segment estimate now carries an honest **"auto-estimate is conservative"** warning. Closes the gap left by #2019: an elite unit that is NOT in a curated premium building, is < 20M, and has decent confidence previously got NO warning — yet the backtest proved élit is systematically **under-estimated ~−29%** (premium is unit-level: finish/view/class, absent from deal data). **Metadata only — gate byte-identical.** New trigger in `_manual_review` (gated on `estimate_manual_review_enabled`): ``` asking_ppm2 ≥ estimate_manual_review_elite_ppm2 (=250 000) → "элитный/дорогой сегмент — авто-оценка консервативна: премия за отделку, вид и класс дома не отражена в данных сделок, фактическая цена может быть выше" ``` **Key: uses the ASKING/headline `median_ppm2`, NOT `expected_sold_per_m2`.** The schema is explicit that the headline median stays asking-side while `expected_sold_* = asking × ratio`; because the estimate under-prices elite, `expected_sold_per_m2` drags an elite unit into the бизнес band and wouldn't identify it — the un-discounted asking median cleanly marks the segment. Reasons are additive (a curated premium elite unit shows both bullets). Frontend already renders `manual_review_reasons` → no UI change. ## Test plan - [x] regression gate **byte-identical** (pure flag, no pricing path) - [x] `tests/test_estimator_manual_review.py` +6 cases (elite alone < 20M / decent-confidence fires; ==250k boundary; 249 999 no-fire; None/0 safe; 5-reason accumulation) → 25 passed with the gate - [x] full suite **2588 passed / 2 skipped** (1 pre-existing unrelated `test_search_cache_hit`) - [x] ruff strict clean Refs #2002
lekss361 added 1 commit 2026-06-27 20:15:29 +00:00
feat(tradein/estimator): elite-segment manual_review trigger by asking ppm² (#2002)
All checks were successful
CI / backend-tests (pull_request) Has been skipped
CI / changes (pull_request) Successful in 7s
CI / frontend-tests (pull_request) Has been skipped
CI / openapi-codegen-check (pull_request) Has been skipped
aa65809cd2
Backtest показал систематическую недооценку бизнес/элита (bias ≈ −29%):
премия unit-level (отделка/вид/класс) отсутствует в данных сделок, поэтому
expected_sold затягивает элит-юнит в бизнес-полосу. Элит-юнит вне curated
premium-дома, < 20 млн и с приличной уверенностью раньше не получал предупреждения.

Новый триггер _manual_review по asking/headline ₽/м² (median_price_per_m2,
«по объявлениям» — НЕ занижённый expected_sold_per_m2): asking_ppm2 ≥
estimate_manual_review_elite_ppm2 (250к) → честное предупреждение, что
авто-оценка консервативна. Только метаданные — median/expected_sold/ranges
не тронуты, regression-gate byte-identical.
lekss361 merged commit 44b9305d89 into main 2026-06-27 20:15:39 +00:00
lekss361 deleted branch feat/tradein-manual-review-elite 2026-06-27 20:15:39 +00:00
lekss361 added the
priority/p2
scope/backend
tradein
labels 2026-06-27 20:15:40 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lekss361/gendesign#2027
No description provided.