[tradein][backend] Estimator: вернуть rosreestr_deals в actual_deals (сейчас disabled) #571

Closed
opened 2026-05-25 06:02:34 +00:00 by lekss361 · 1 comment
Owner

Проблема

backend/app/api/v1/trade_in.py (deals section): # NOTE 2026-05-24: rosreestr_deals temporarily NOT included in actual_deals

Причина disable: cleanup ДКП vs ДДУ (фикс PR #549). Сейчас данные чистые (49 791 ДКП EKB, median 114 883 ₽/м²).

Что сделать

  1. Убрать NOTE.
  2. Подключить rosreestr_deals к actual_deals aggregation в estimator.
  3. Тiers per row:
    • T0 — exact cad_num match listing ↔ deal (confidence 1.0)
    • T1 — same street + area window ±5m² + deal_date within 365 days (confidence 0.8)
    • T2 — same street, no area constraint (confidence 0.5)
  4. Передать tier в response: actual_deals[i].tier.

Зависит от

  • Issue про связку ДКП ↔ listings (P0 #N) — желательно сначала view готов.

Acceptance

  • Estimator response для EKB target адресов содержит actual_deals.rosreestr_count > 0.
  • В PDF отчёте раздел "Реальные сделки" не пустой.

Refs

  • services/matching/listings.py (tier pattern)
## Проблема `backend/app/api/v1/trade_in.py` (deals section): `# NOTE 2026-05-24: rosreestr_deals temporarily NOT included in actual_deals` Причина disable: cleanup ДКП vs ДДУ (фикс PR #549). Сейчас данные чистые (49 791 ДКП EKB, median 114 883 ₽/м²). ## Что сделать 1. Убрать NOTE. 2. Подключить rosreestr_deals к `actual_deals` aggregation в estimator. 3. Тiers per row: - **T0** — exact `cad_num` match listing ↔ deal (confidence 1.0) - **T1** — same street + area window ±5m² + deal_date within 365 days (confidence 0.8) - **T2** — same street, no area constraint (confidence 0.5) 4. Передать tier в response: `actual_deals[i].tier`. ## Зависит от - Issue про связку ДКП ↔ listings (P0 #N) — желательно сначала view готов. ## Acceptance - Estimator response для EKB target адресов содержит `actual_deals.rosreestr_count > 0`. - В PDF отчёте раздел "Реальные сделки" не пустой. ## Refs - `services/matching/listings.py` (tier pattern)
lekss361 added the
tradein
data
labels 2026-05-25 06:02:34 +00:00
Owner

Выполнено. (1) NOTE убран + rosreestr_deals подключены к actual_deals в PR M (#564 Phase 3) — см. estimator.py line 580 «rosreestr_deals included в actual_deals output». (2) Tier classification (T0_per_house / T1_per_street) добавлена там же. (3) До сих пор actual_deals был пустой т.к. deals на 100% без координат — это пофикшено в #569 (backfill 42,840 deals.lat/lon из house-центроидов).

Verify на проде: /estimate Малышева 125 → actual_deals = 10 реальных ДКП (Мира 3.9M, Комсомольская 5.4M/11.5M, ...). Acceptance rosreestr_count > 0 выполнен. Closing.

Выполнено. (1) NOTE убран + rosreestr_deals подключены к actual_deals в PR M (#564 Phase 3) — см. estimator.py line 580 «rosreestr_deals included в actual_deals output». (2) Tier classification (T0_per_house / T1_per_street) добавлена там же. (3) До сих пор actual_deals был пустой т.к. deals на 100% без координат — это пофикшено в #569 (backfill 42,840 deals.lat/lon из house-центроидов). Verify на проде: `/estimate` Малышева 125 → actual_deals = 10 реальных ДКП (Мира 3.9M, Комсомольская 5.4M/11.5M, ...). Acceptance `rosreestr_count > 0` выполнен. Closing.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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#571
No description provided.