feat(tradein): fill houses.year_built/material_walls from ДОМ.РФ КР1.1/1.2 + zhkh_year, propagate to listings (#2013) #2476

Merged
bot-backend merged 1 commit from feat/2013-domrf-year-backfill into main 2026-07-12 13:12:08 +00:00

1 commit

Author SHA1 Message Date
bot-backend
30195c30ce feat(tradein): fill houses.year_built/material_walls from ДОМ.РФ КР1.1/1.2 + zhkh_year, propagate to listings (#2013)
All checks were successful
CI / changes (pull_request) Successful in 7s
CI Trade-In / changes (pull_request) Successful in 8s
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 51s
houses.year_built is only 38% filled and material_walls 0%. The existing ГИС-ЖКХ
loader already populates houses.zhkh_year (70%) but never copies it into
year_built — that's the core gap. Adds a ДОМ.РФ капремонт open-data loader
(КР1.1 house registry + КР1.2 constructive elements, region 66) into a new
domrf_kapremont staging table, then backfills houses.year_built/material_walls/
total_floors via COALESCE(existing, domrf, zhkh_year) — folding in the
already-loaded ЖКХ year so houses without a ДОМ.РФ match still benefit — and
propagates houses.year_built into listings.year_built for still-NULL rows so
the estimator's year_built cohort filter runs on real years across all sources
(avito 0%→~36-52% once linked houses gain a year). Supersedes the parked
cohort-exclusion PR #2474.
2026-07-12 16:09:59 +03:00