fix(tradein): avito content-block (HTTP-200) не маскируется под end-of-pagination (Refs #754) #779
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#779
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/754-avito-content-block"
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?
Что
Avito content-block (HTTP 200 + captcha/challenge → 0 карточек) трактовался как легитимный «end of pagination» → sweep завершался
doneбез данных, тихо. Источник 99% NULL listing_date / 76% без гео.Как (
avito.pyempty-parse branch)logger.error+raise AvitoContentBlockedError. НЕ тихий break.break(сохранено).AvitoContentBlockedError(AvitoBlockedError)— новый subtype вavito_exceptions.py; existingexcept AvitoBlockedError(mark_banned, pipeline abort, city sweep) ловят его через наследование без правок call-site.capture_messageтолько в scheduler) →logger.errorдостаточно.403/429-обработка не тронута.
pytest -k avito→ 101 passed, ruff clean. Тесты: page1-empty→raise, subtype-catch, page>1-empty→graceful.Refs #754
✅ APPROVE
Avito content-block detection (#754).
Correctness
AvitoContentBlockedError(AvitoBlockedError)— наследование → existingexcept AvitoBlockedError(mark_banned, pipeline abort, city sweep) ловят без правки call-site. Чистый дизайн.page==1+ 0 карточек →logger.error+ raise (EKB-анкер всегда имеет объявления → content-block);page>1+ 0 → gracefulbreak(легитимный конец). По контракту issue.page1_empty(pages=1) raises,page_gt1_empty(pages=2, page1 valid + page2 empty) возвращает лоты page1 без raise → avitopage1-based, guardpage==1срабатывает на первой странице. Верно.done— корень 99% NULL listing_date. Риск легитимно-пустой page1 смягчён (EKB-анкеры всегда заполнены), задокументирован.Tests — 3 новых (page1→raise ContentBlocked, subtype-as-Blocked, page>1→graceful) + ruff-reformat pipeline-тестов. 101 passed, ruff clean. Sentry корректно пропущен (нет клиента в scraper-пути;
logger.errorдостаточно).Scope/security — avito.py + avito_exceptions.py + тест; нет secrets, нет self-extending триггера.
Verdict: ✅ APPROVE (Praktika #754). Live block-detection → qa.