feat(tradein): backfill 18k existing listings (PR J) #596
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#596
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/tradein-backfill-listing-sources"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
PR I (#595) hookнул matching в
save_listings()для NEW scrapes. PR J — repeatable script для EXISTING 18,428 listings (avito 9302, cian 5158, yandex 3704, n1 264) которые сейчас unlinked к houses (junctionlisting_sourcesпустая).Implementation
scripts/backfill_listing_sources.py:lot.house_source/house_ext_idесли есть (Avito Houses Catalog, Cian newbuilding)match_or_create_house()Tier 0-3 (advisory_xact_lock + PostGIS + address_aliases)upsert_listing_sourcemethod='backfill', confidence=0.9 (lower чем real-time 1.0 — forensic distinction)--batch-size N,--limit N(canary),--dry-runFiles (+1168 LOC)
scripts/backfill_listing_sources.py(new, 615 LOC)tests/scripts/test_backfill_listing_sources.py(new, 476 LOC, 19 tests)tests/scripts/__init__.py(new)scripts/README.md(+77 LOC, canonical docker exec instructions)Tests
19/19 pass:
Run post-merge
Expected ~5-15 min wall-time. Expected coverage ~80-90% (10% — listings без resolvable address/coords).
Verification
Closes #582 (matching gap full closure).