gendesign/tradein-mvp/backend
Light1YT a85e6d8e77 feat(tradein): estimator computes additive expected_sold price (#648 S3)
Estimator ADDITIVELY derives expected_sold from asking-median × per-rooms
asking_to_sold_ratio (table from #648 S2 / migration 080). Headline asking
median, ranges, confidence and actual_deals are UNCHANGED. Graceful: missing/
empty ratio table → expected_sold fields None, estimate still returns 200
(ratio lookup rolls back the shared session on error so the subsequent INSERT
isn't poisoned — mirrors sibling cache helpers).

- estimator: _get_asking_sold_ratio(db, rooms) cached lookup (per-rooms →
  global -1 fallback → None, try/except+rollback), applied after repair-coef.
- schema: 6 optional expected_sold_* / ratio fields on AggregatedEstimate.
- api: rehydrate the new columns in GET /estimate/{id} + /pdf reopen SELECTs
  and both constructors (the documented reopen-path bug).
- migration 081: ADD COLUMN IF NOT EXISTS for the persisted subset.
- tests: 10 new (lookup/apply/graceful) + fix pre-existing test_estimator_
  source_quota 2→3 tuple unpack of _fetch_analogs (was RED on main).
2026-05-29 18:37:05 +05:00
..
app feat(tradein): estimator computes additive expected_sold price (#648 S3) 2026-05-29 18:37:05 +05:00
data/sql feat(tradein): estimator computes additive expected_sold price (#648 S3) 2026-05-29 18:37:05 +05:00
scripts feat(backtest): per-rooms asking→sold correction block (#648 S1) (#650) 2026-05-29 13:11:55 +00:00
tests feat(tradein): estimator computes additive expected_sold price (#648 S3) 2026-05-29 18:37:05 +05:00
.dockerignore feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in) 2026-05-21 00:25:39 +03:00
Dockerfile feat(tradein): persistent infra для backfill scripts (PR F) (#592) 2026-05-27 06:59:54 +00:00
pyproject.toml feat(rbac): role-based access control via X-Authenticated-User middleware (#585) 2026-05-26 06:18:40 +00:00