gendesign/tradein-mvp/backend/app
bot-backend 9c59586be6
All checks were successful
CI / changes (pull_request) Successful in 8s
CI Trade-In / changes (pull_request) Successful in 9s
CI Trade-In / frontend-checks (pull_request) Has been skipped
CI / backend-tests (pull_request) Has been skipped
CI / frontend-tests (pull_request) Has been skipped
CI / openapi-codegen-check (pull_request) Has been skipped
CI Trade-In / backend-tests (pull_request) Successful in 4m57s
fix(tradein/backfill): rollback on listings save failure + nonnegative used quota
1. cian_history_backfill.py listings block was missing the same
   db.rollback() the houses block already has: save_detail_enrichment()
   runs several unprotected db.execute() and only commits at the end.
   A single bad row (e.g. a non-standard Cian change_time hitting
   CAST(:ct AS timestamptz)) leaves the session in a failed-transaction
   state, and every subsequent listing in the batch (up to 49) then
   fails with PendingRollbackError -- one real failure looked like N
   independent ones in the logs.

2. account_estimate_usage.used had no floor. Prod audit: praktika
   2026-06 shows used=-3 against 42 real estimates. Migration 185
   already fixed this class of bug for user2 (negative used from a
   retired SQL-runbook bonus hack) but only reset that one username.
   No decrement path exists anywhere in app.services.account_quota --
   increment() only ever does used+1 under a WHERE used < lim guard
   (#747) -- so the minus is external (manual UPDATE), not an app bug.
   Migration 189 resets all remaining negative used rows and adds
   CHECK (used >= 0) so a future manual UPDATE can't reintroduce it.
2026-07-27 00:30:52 +03:00
..
api feat(tradein/support): веб-чат поддержки — серверная часть поверх Telegram-моста (#2532) 2026-07-26 20:43:47 +00:00
core feat(tradein/support): веб-чат поддержки — серверная часть поверх Telegram-моста (#2532) 2026-07-26 20:43:47 +00:00
observability feat(tradein/tgbot): Telegram support-мост @MERAsupport_bot 2026-07-16 16:58:53 +03:00
schemas feat(tradein/admin): audit + analytics read API over user_events (#2520) 2026-07-13 20:26:58 +00:00
services fix(tradein/backfill): rollback on listings save failure + nonnegative used quota 2026-07-27 00:30:52 +03:00
tasks fix(tradein/backfill): rollback on listings save failure + nonnegative used quota 2026-07-27 00:30:52 +03: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/support): веб-чат поддержки — серверная часть поверх Telegram-моста (#2532) 2026-07-26 20:43:47 +00:00
scheduler_main.py refactor(tradein/scheduler): удалить legacy scheduler_loop + scraper-scheduling, kit единственный путь (#2397 Part C) 2026-07-04 13:00:30 +03:00
tgbot_main.py feat(tradein/tgbot): Telegram support-мост @MERAsupport_bot 2026-07-16 16:58:53 +03:00