gendesign/tradein-mvp/backend/app/services
lekss361 3ce76b4beb fix(tradein): floor/total_floors NULL — migration + PDF defaults
Bot review #558 нашёл 🔴: trade_in_estimates.floor/total_floors имеют
NOT NULL constraint в DDL (001_trade_in_estimates.sql) — INSERT в
estimator.py:893 и _empty_estimate шлют payload.floor=None →
psycopg.errors.NotNullViolation на user-submit без этажа.

- new migration 065: DROP NOT NULL для обеих колонок (idempotent)
- PDF exporter: fallback "—" вместо "0" при missing floor/total_floors
- estimator.py:744 style: `is not None` для consistency с pre-call gates
- integration test: estimate без floor не крашится

Bot reviewer ⚠️ findings addressed:
🔴 NOT NULL DB violation — FIXED via migration 065
🟠 PDF "0 / 0" regression — FIXED via or "—"
🟡 style inconsistency — FIXED
🟢 test coverage gap — FIXED via test_estimator_floor_optional.py
2026-05-25 00:36:49 +03:00
..
exporters fix(tradein): floor/total_floors NULL — migration + PDF defaults 2026-05-25 00:36:49 +03:00
matching fix(tradein-matching): pg_advisory_xact_lock to prevent duplicate house INSERTs (#501) 2026-05-24 10:52:10 +00:00
scrapers fix(yandex-valuation): off-by-one cell index in _parse_row_cells (#552) 2026-05-24 19:57:17 +00:00
__init__.py feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in) 2026-05-21 00:25:39 +03:00
brand.py feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in) 2026-05-21 00:25:39 +03:00
cache.py feat(tradein): Phase 3.2 — /api/v1/search endpoint + Redis cache (#479) 2026-05-23 14:44:22 +00:00
cian_session.py fix(tradein): CIAN_REQUIRED_COOKIES — add real auth cookies (DMIR_AUTH + Cian session) (#480) 2026-05-23 14:52:24 +00:00
estimator.py fix(tradein): floor/total_floors NULL — migration + PDF defaults 2026-05-25 00:36:49 +03:00
geocoder.py feat(tradein): postgres_fdw live read of gendesign.cad_buildings (replaces snapshot) (#493) 2026-05-24 08:57:30 +00:00
house_metadata.py feat(tradein): postgres_fdw live read of gendesign.cad_buildings (replaces snapshot) (#493) 2026-05-24 08:57:30 +00:00
image_sanitizer.py fix(tradein-photos): sanitize uploaded images via Pillow re-encode (#511) 2026-05-24 11:32:04 +00:00
scheduler.py feat(tradein): in-app scheduler — UI-managed schedule (replaces SSH crontab) (#482) 2026-05-23 14:54:25 +00:00
scrape_pipeline.py fix(tradein/avito): anti-bot hardening — sleep + abort + shared session (#487) 2026-05-23 20:08:40 +00:00
scrape_runs.py fix(tradein/avito): anti-bot hardening — sleep + abort + shared session (#487) 2026-05-23 20:08:40 +00:00
scraper_settings.py feat(tradein): global scraper delay setting (applies across all scrapers) (#485) 2026-05-23 15:43:28 +00:00
search_query.py feat(tradein): Phase 3.2 — /api/v1/search endpoint + Redis cache (#479) 2026-05-23 14:44:22 +00:00