fix(scrapers): narrow domrf Level-1 status badge-class regex (#1609 follow-up) #1704
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#1704
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/domrf-badge-regex-narrow-1686"
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?
Проблема (ревью #1686)
_STATUS_BADGE_CLS_RE = status|badge|tag|chip|labelслишком широк — срабатывал на любой generictag/chip/label.Решение
(?<![a-z])status(?![a-z])— требует токенstatusв CSS-классе. Реальные бейджи (status-badge,flat-status-tag,status-label) матчатся; generic элементы уходят в Level-2/3 каскад.Verify
ruffclean;pytest -k domrf→ 85 passed, 6 skipped (+тест: generic label/tag/chip/badge не берётся как статус)._STATUS_BADGE_CLS_RE was too broad: `status|badge|tag|chip|label` matched generic UI elements (e.g. <span class="label">, <span class="chip">) that are unrelated to the sale-status badge, risking picking the wrong block. Narrowed to `(?<![a-z])status(?![a-z])` — requires the literal token "status" as a hyphen-delimited component of the CSS class (matches `status-badge`, `flat-status-tag`, `object-status` but not bare `label`, `tag`, `chip`, `badge`). Adds regression test: page with generic label/tag/chip/badge elements containing "В продаже" must NOT activate Level-1; only the real `status-badge` block ("Продана") should be returned → status=sold.