feat(tradein): infer repair_state from listing description text (#622) #632

Merged
Light1YT merged 1 commit from feat/622-infer-repair-state-from-text into main 2026-05-28 15:37:35 +00:00

1 commit

Author SHA1 Message Date
96c09c30ee feat(tradein): infer repair_state from listing description text (#622)
Structured repair coverage was too low for data-derived repair coefficients
(#7 v2): avito ~1% / cian ~5% / yandex 0%. When the structured field is absent
we now extract repair state from the listing description via Russian-phrase
regexes (евроремонт / без отделки / черновая / дизайнерский / косметический,
...), centralized in repair_state_normalizer.infer_repair_state_from_text().

Wired as a fallback into avito_detail, cian SERP + cian_detail, and both yandex
SERP and detail parsers — the structured field always wins; only NULLs fall back
to inference. Patterns are checked strongest-first (excellent > good >
needs_repair > standard) so mixed descriptions resolve to the latest state.
Migration 075 backfills existing rows with the same patterns; unknown stays NULL
(no fabrication).
2026-05-28 20:35:46 +05:00