gendesign/tradein-mvp/backend/app
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
..
api feat(tradein): аккаунт praktika + лимит 15 оценок/мес, чистка PRINZIP в UI (#635) 2026-05-28 22:04:58 +00:00
core feat(tradein): DaData on-demand enrichment в estimate flow (PR Q1) 2026-05-27 18:50:12 +05:00
observability feat(tradein): enrich GlitchTip SDK init — integrations + PII scrub (#396) (#643) 2026-05-29 09:23:17 +00:00
schemas feat(tradein): аккаунт praktika + лимит 15 оценок/мес, чистка PRINZIP в UI (#635) 2026-05-28 22:04:58 +00:00
services feat(tradein): per-source listing price history — schema + daily snapshot (#570) 2026-05-29 17:14:22 +05:00
tasks feat(tradein): per-source listing price history — schema + daily snapshot (#570) 2026-05-29 17:14:22 +05:00
__init__.py feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in) 2026-05-21 00:25:39 +03:00
main.py feat(tradein): enrich GlitchTip SDK init — integrations + PII scrub (#396) (#643) 2026-05-29 09:23:17 +00:00