gendesign/tradein-mvp/backend
Light1YT 1e44ef09f4 feat(tradein): per-source listing price history — schema + daily snapshot (#570)
Migration 079 adds listing_source_snapshots (daily per-source snapshot, plain
table — partitioning deferred), listing_source_events (change-log), an
offer_price_history.listing_source_id backlink, and v_listing_source_price_on_date.

snapshot_listing_sources() (app/tasks) writes a daily snapshot of the existing
18,355 listing_sources rows and diffs today's price vs the prior snapshot into
price_change events — both set-based SQL (CTE), no row loop. Wired into the
in-app scheduler (source='listing_source_snapshot', enabled=true: pure internal
DB, no external calls, window 01:00-02:00 UTC before the backfill jobs). History
accumulates immediately, independent of the dormant scrapers.

Prod dry-run (rollback): migration applies clean; snapshot inserts 18,355 rows.
Same-day double-fire impossible (_claim_run advances next_run_at + has_running_run
guard) so no duplicate price_change events.

Closes #570
2026-05-29 17:14:22 +05:00
..
app feat(tradein): per-source listing price history — schema + daily snapshot (#570) 2026-05-29 17:14:22 +05:00
data/sql feat(tradein): per-source listing price history — schema + daily snapshot (#570) 2026-05-29 17:14:22 +05:00
scripts feat(tradein): приоритизировать DaData house-backfill на дома с листингами (accuracy #2) 2026-05-28 15:17:01 +05:00
tests feat(tradein): per-source listing price history — schema + daily snapshot (#570) 2026-05-29 17:14:22 +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