fix(yandex): read predicted price from entity.predictions.predictedPrice (#1725) #1734
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#1734
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/yandex-predicted-price-path-1725"
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?
Problem
predicted_price_rubis 0/NULL for every Yandex listing in prod (pp=0 across all 6189 yandex rows inlistings). #1725 added the rich-field plumbing (ScrapedLot field → INSERT → ON CONFLICT COALESCE → DB column — all correct), but the extraction read the wrong gate-API key.Root cause (verified live against gate-API, 2026-06-18)
The Yandex gate-API nests the per-offer valuation under:
_predicted_prices()readentity["predictedPrice"]["predictedPrice"]— that outer key does not exist (the real key ispredictions), so it returned(None, None, None)for every offer.Live verification (home residential IP,
rgid=559132EKB,roomsTotal=2,newFlat=NO): 23 entities, 0 hadpredictedPrice, all 23 hadpredictions.predictedPricewith{value,min,max}strings.Fix
_predicted_prices:entity.get("predictedPrice")→entity.get("predictions")(innerpredictedPricekey +_to_bigintstring-cast already correct). Docstring updated with the live-verified path._ENTITY_RICH_OWNERused the same wrong wrapper → the assertion passed vacuously. Updated to the realpredictions.predictedPriceshape; with the old code the assertions now fail, confirming the test is non-vacuous.Verification
pytest tests/test_yandex_realty_serp.py→ 62 passedpytest -qwith the 2 standard deselects) → 1906 passed, 2 deselectedPost-deploy expectation
After deploy + a yandex vtorichka sweep,
predicted_price_rubshould populate for vtorichka offers (novostroyki carry no valuation — expected NULL there).