gendesign/tradein-mvp/backend
bot-backend 4e95cf622c fix(matching): Tier 2b alias sync + collapse double SAVEPOINT (#849)
#774-2 Parts 2/3/4 (Part 1 UNIQUE/dedup deferred — cadnum data not flowing).

Part 2 — fingerprint<->alias sync: two scrapers with same address but coords
beyond the 4-decimal fingerprint rounding produced distinct fp -> duplicate
houses. Add Tier 2b lookup by normalized_address after Tier 2a (fingerprint)
misses, register the new fp via _insert_alias; alias upsert DO NOTHING ->
DO UPDATE SET fingerprint to keep alias synced.

Part 3 — collapse double-nested SAVEPOINT: removed redundant inner
db.begin_nested() around match_or_create_house inside _link_listing_to_house.
Outer per-row SAVEPOINT in save_listings already isolates a failing lot from
siblings and from the listings INSERT (per backend.md). BEHAVIOR NOTE: a
house-match failure now aborts the whole hook for that lot (incl. listing_source
link) atomically instead of partially committing it.

Part 4 — confidence/method wiring deferred to #774-3 (matcher not on ingestion
path; listing_sources columns exist, written as source_link=1.0).

Refs #849
2026-05-31 10:58:34 +03:00
..
app fix(matching): Tier 2b alias sync + collapse double SAVEPOINT (#849) 2026-05-31 10:58:34 +03:00
data/sql feat(tradein): schedule yandex address backfill task (#855) (#866) 2026-05-31 07:31:10 +00:00
scripts feat(backtest): per-rooms asking→sold correction block (#648 S1) (#650) 2026-05-29 13:11:55 +00:00
tests fix(matching): Tier 2b alias sync + collapse double SAVEPOINT (#849) 2026-05-31 10:58:34 +03: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