gendesign/tradein-mvp/backend
lekss361 e868b01278 feat(tradein): Phase C — Avito IMV per-house backfill
SQL migration 064: adds houses.imv_status + last_imv_attempt_at + imv_error_reason
columns, creates house_imv_evaluations (1:1 with houses, latest IMV result)
and house_suggestions (8 Avito similar lots per house, UNIQUE on (house_id, ext_item_id)).

Script scripts/backfill-house-imv.py: resumable iterator that picks houses with
imv_status='pending' AND lat/lon NOT NULL, runs evaluate_via_imv() per house with
median lot-params from linked listings, saves house_imv_evaluations +
house_placement_history (from result.placement_history items) + house_suggestions
(from result.suggestions items). Configurable --batch, --delay, --limit-total.

Survives restart via imv_status state machine ('pending' -> 'ok'/'not_found'/
'transient_error'/'error'/'no_params'/'no_address'). Long backoff on
IMVAuthError (anti-captcha).
2026-05-24 17:40:24 +03:00
..
app fix(tradein-api): PlacementHistoryEntry schema + None checks (PR #528 follow-up) (#532) 2026-05-24 14:33:53 +00:00
data/sql feat(tradein): Phase C — Avito IMV per-house backfill 2026-05-24 17:40:24 +03:00
tests feat(yandex-valuation): link history rows to houses via match_or_create_house (#531) 2026-05-24 14:28:30 +00:00
.dockerignore feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in) 2026-05-21 00:25:39 +03:00
Dockerfile feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in) 2026-05-21 00:25:39 +03:00
pyproject.toml fix(tradein-photos): sanitize uploaded images via Pillow re-encode (#511) 2026-05-24 11:32:04 +00:00