feat(tradein): BrowserFetcher camoufox wrapper + Docker/config infra (Phase 0, #884) #892
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#892
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/884-browserfetcher-camoufox"
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
Epic #883 Phase 0 foundation. Provider-agnostic
BrowserFetcher(camoufox headless Firefox): async context manager + page-recycle (every 15) + crash-recovery (relaunch + 1 retry) + proxy support. camoufox/playwright imported lazily (try/except ImportError inside methods) → won't break app import when Firefox isn't installed.scraper_fetch_modedefaults tocurl_cffi→ behaviorally dormant (no parser/estimator/avito/cian change). config: 4browser_*settings. Dockerfile: +5 headless-Firefox libs +python -m camoufox fetchlayer. compose:mem_limit: 2.5g.uv lockregenerated (gitignored → re-resolved at build).Test plan
_proxy_dictparse, fetch lifecycle, recycle threshold) — no real Firefox;pytest -k browser_fetcher9 passed; ruff clean;uv lockresolved 95 pkgs.⚠️ MERGE-GATE — heavy Docker change, do NOT auto-merge
Merging auto-deploys and rebuilds the prod image with
RUN python -m camoufox fetch(~960MB Firefox download at build time). Hold merge until post-demo (2026-06-01) AND:Behaviorally dormant (flag off), so the risk is purely the image build/deploy, not runtime. Recommend a
do-not-mergelabel until Phase 1 is ready.Refs #884, #883
🔴 HOLD — heavy Docker/deploy merge-gate (не мержу).
Мерж auto-деплоит и пересобирает prod-образ с
RUN python -m camoufox fetch(~960MB Firefox на build-time) + 5 headless-Firefox libs +mem_limit: 2.5g. Риск — build/deploy, не runtime (фича behaviorally dormant:scraper_fetch_modedefaultcurl_cffi, camoufox/playwright lazy-import).За день до демо (2026-06-01) пересобирать prod-образ с +960MB слоем — нельзя без:
Сам автор рекомендует
do-not-mergeдо Phase 1. Согласен.Код-уровень (для будущего merge): provider-agnostic
BrowserFetcher(async ctx-mgr + page-recycle/15 + crash-recovery relaunch+retry + proxy), lazy import за try/except ImportError → app import не падает без Firefox; flag-gated dormant → нулевой runtime-риск сейчас. 9 mocked-тестов. Подход аккуратный. Но heavy image rebuild + auto-deploy за день до демо = человеческий/ops решение по таймингу.→
+needs-human +blocked. Человек: мержить post-demo, когда CI-сборка образа зелёная и деплой-окно безопасно.