feat(tradein): conflict_resolution — register Yandex sources in priority dicts #471
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#471
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/tradein-yandex-matching"
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?
Motivation
Stage 7 of 9 for YandexRealtyScraper v1 (Wave 5). Integrates the 4 Yandex scrapers (
yandex/yandex_detail/yandex_realty_nb/yandex_valuation) into cross-source field-priority arbitration. Resolver engine (_resolve()) unchanged — only dict entries + new fields.Source names recap
nameyandexyandex_detailyandex_realty_nbyandex_valuationHOUSE_FIELD_PRIORITY changes
Updated entries:
lat/lon: legacy"yandex"→"yandex_realty_nb"(house geo comes from ЖК landing, not SERP)year_built: addedyandex_valuation,yandex_realty_nbhouse_type: addedyandex_valuation,yandex_realty_nbhouse_class,rating_score,reviews_count: addedyandex_realty_nbNew fields:
text_reviews_count[yandex_realty_nb]corpus_count[yandex_realty_nb]total_area_ha[yandex_realty_nb]commission_year[cian_serp, yandex_realty_nb]commission_month[yandex_realty_nb]developer_name[cian, yandex_realty_nb]has_panorama[yandex_valuation]yandex_total_listings[yandex_valuation]has_lift[cian_bti, cian_detail, yandex_valuation]ceiling_height[cian_detail, yandex_valuation]LISTING_FIELD_PRIORITY changes
Updated:
description,house_type— addedyandex_detail(NLP fallback for house_type)New fields (all
yandex_detailonly — OfferCardAuthorInfo + summary unique):agency_name,agency_founded_year,agency_objects_countviews_total_yandex(parallel to Cian'sviews_total, separate column per PR #453 schema)publish_date_relative(raw "6 часов назад" string)sale_type_text(raw RU phrase, vs Cian's enum)Tests
Pre-existing 3 collection errors for
test_houses/test_listings/test_normalizeare in modules not onforgejo/main(separate stash) — unrelated to this PR.Files
tradein-mvp/backend/app/services/matching/conflict_resolution.pytradein-mvp/backend/tests/matching/test_conflict_resolution.pyReviewer note
Reviewer: deep-code-reviewer — only merge after APPROVE. After merge → Wave 6 (Stage 8 estimator integration — Yandex Valuation as 7th source).
Stage 7 of YandexRealtyScraper v1 (Wave 5). Integrates the 4 Yandex scrapers (yandex / yandex_detail / yandex_realty_nb / yandex_valuation) into the cross-source field-priority arbitration. HOUSE_FIELD_PRIORITY: - Renamed legacy 'yandex' → 'yandex_realty_nb' for lat/lon (house geo comes from ЖК landing, not SERP) - Added yandex_valuation + yandex_realty_nb to year_built, house_type - Added yandex_realty_nb to house_class, rating_score, reviews_count - NEW fields: * text_reviews_count: ['yandex_realty_nb'] (the 353 — Yandex unique) * corpus_count: ['yandex_realty_nb'] ('три башни' → 3) * total_area_ha: ['yandex_realty_nb'] * commission_year: ['cian_serp', 'yandex_realty_nb'] * commission_month: ['yandex_realty_nb'] * developer_name: ['cian', 'yandex_realty_nb'] * has_panorama: ['yandex_valuation'] * yandex_total_listings: ['yandex_valuation'] * has_lift: ['cian_bti', 'cian_detail', 'yandex_valuation'] * ceiling_height: ['cian_detail', 'yandex_valuation'] LISTING_FIELD_PRIORITY: - Added yandex_detail to description, house_type (NLP fallback) - NEW fields: * agency_name / agency_founded_year / agency_objects_count: ['yandex_detail'] (OfferCardAuthorInfo — Yandex unique structured agency block) * views_total_yandex: ['yandex_detail'] (parallel to Cian's views_total) * publish_date_relative: ['yandex_detail'] * sale_type_text: ['yandex_detail'] (raw RU phrase, vs Cian enum) Tests: 30 new cases (37 total), all pre-existing tests preserved. Ruff clean. Resolver engine unchanged (existing list / first_non_null / union / cross_validate semantics still apply).Merged via deep-code-reviewer — verdict APPROVE (squash, commit
7d649f9).Highlights:
yandex/yandex_detail/yandex_realty_nb/yandex_valuationвсе matches scraper.name).text_reviews_count— harmless at dict level, нужна column в houses до Stage 8.x writes (suggest add в 031 или новый migration).cian_serp/cian_bti/cian_detail/cian_valuation,avito_houses_catalog/avito_detail/avito_domoteka) — логические, не scraper.name; vault-aligned (Cross_Source_Matching_Strategy.md sec 3.5/4.5). Caller-side mapping(scraper, page_type) -> logical_subsourceпотребуется в Stage 8.x integration.Coordination warning: PR #470 also adds
conflict_resolution.py(incompatible 64-line version). #470 needs rebase + drop its own conflict_resolution.py (use this version as superset) перед merge.