fix(cian): persist detail rich fields (description) + stamp detail_enriched_at #1718
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#1718
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/cian-detail-rich-fields"
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
Fixes cian detail enrichment silently looping with no persistence. Root cause in
cian_detail.py::save_detail_enrichment:detail_enriched_atnever stamped (primary). The cian save UPDATE omitteddetail_enriched_at = NOW()(avito_detail.py:581 has it). The sweep selectsWHERE detail_enriched_at IS NULL(scrape_pipeline.py:1553/1935), enriches, bumps thedetail_enrichedcounter (~50/run — looked "healthy"), but never stamps → same rows re-selected every run, column stays NULL for ALL cian rows forever. Prod: 0/19461 cian rows stamped.descriptionnever extracted/saved —DetailEnrichmenthad nodescriptionfield; parser only readoffer.descriptionfor repair_state inference. Prod: cian description = 0 filled.(ceiling/kitchen already in the save UPDATE; low fill was a side-effect of the limping enrich loop.
ceiling_height_m=0 in prod is expected — that's avito's column; cian usesceiling_height.)Changes (cian_detail.py only)
DetailEnrichment+=description.description = offer.get("description") or None.save_detail_enrichmentUPDATE:+ description = COALESCE(:descr, description)anddetail_enriched_at = NOW().Test plan
pytest -k cian→ 222 passed; ruff cleanSELECT count(*) FILTER(WHERE detail_enriched_at IS NOT NULL), count(*) FILTER(WHERE description IS NOT NULL) FROM listings WHERE source='cian'both climb from 0.Existing cian rows self-heal (still match
detail_enriched_at IS NULL) — no backfill needed.Refs #1657