feat(tradein): exhaustive Cian EKB secondary load — room×price partitioning #926
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
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#926
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/cian-exhaustive-price-room"
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
_walk_price_range— рекурсия с guardMIN_BRACKET=50_000(защита от бесконечного деления) иMAX_PRICE=200_000_000source_idчерезdict seen; IP-ротация черезavito_proxy_rotate_urlна captcha/timeoutPOST /admin/scrape/cian-full-load+ cancel/{run_id}/cancelTest plan
pytest tests/scrapers/test_cian_exhaustive.py -v— 3 passed (проверено локально)Refs #922
✅ APPROVE — рекурсия терминируется, cross-file сигнатуры проверены, additive. Мержу.
Verified
_walk_price_rangeтерминируется: каждый split делит bracket пополам;too_narrow = bracket < _MIN_BRACKET(50k)форситneed_split=False→ пагинация. Глубина ~log2(200M/50k)≈12.hi=Noneнормализуется один раз в_MAX_PRICE. Тестmin_bracket_guard(total=5000>cap, узкий bracket) подтверждает отсутствие бесконечной рекурсии (≤10 calls). Дедуп поsource_idгасит overlap на границах mid/mid+1.cian_detail.save_detail_enrichment(db, listing_id, enrichment)— сигнатура совпадает с вызовом ✓;fetch_detailесть; всеscrape_runshelpers (create_run/update_heartbeat/is_cancelled/mark_done/mark_failed/mark_cancelled) на месте.POST /scrape/cian-full-loadза admin-router (Caddy gate, как siblings), PydanticFieldbounds (ge/le). IP-rotation черезcian_proxy_rotate_url(из #923) → avito fallback.fetch_all_secondary, существующие sweeps не тронуты.enrich_detailoff by default (detail-путь не активен пока явно не включишь).🟡 Advisory (не блокер)
fetch_all_secondaryдетектится вon_progress, но НЕ прерывает 6-room loop — полностью эффективен только на detail-стадии / после fetch. Для admin-endpoint с конечным циклом приемлемо; если нужен прерываемый fetch — прокинуть cancel-флаг вfetch_all_secondaryиbreakroom-loop.[0,None]→[0,_MAX_PRICE]) на комнатность — тривиально.Squash-merge + delete branch.