feat(rewire): scheduler_main → kit-scheduler behind USE_KIT_SCHEDULER flag, ship-dark (#2192) #2196
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#2196
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/rewire-scheduler-kit"
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?
Закрывает #2192. Первый шаг боевой активации scraper-kit. Ship-dark — флаги дефолт off, прод НЕ меняет поведение на деплое; активация = флип env + recreate (откат за секунды).
Что (4 файла, боевые scheduler/pipeline/scrapers НЕ тронуты)
config.py— 3 флага (дефолт False):use_kit_scheduler,use_proxy_pool_curl,use_proxy_pool_browserscheduler_main.py— развилка в_run(): False → старыйapp.services.scheduler.scheduler_loop()(дословно, lazy-import для тестов); True →SchedulerContext(config=RealScraperConfig, matcher=RealMatcherAdapter, enrichment=RealEnrichmentJobs, session_factory=RealSessionFactory, runs=app.scrape_runs)+build_registry(product_handlers=...)+ kit-loop. SIGTERM/drain сохранён.product_handlers.py(new) —build_product_handlers(ctx)— 17 named + 1 wildcard. Каждый переиспользует боевую функцию (без дублирования). Особое: cianpre_claimcookie-gate, proxy_healthcheckpost_claimreschedule,deactivate_stale_*wildcard.test_kit_registry_completeness.py(new) — парсит боевой dispatch → каждый source резолвится в kit registry.Тест полноты (главный предохранитель)
Боевой dispatch = 25 exact + 1 wildcard. 8 kit-native sweeps из
build_registryдефолтов + 17 product + wildcard из моих. Registry 26 ключей, каждый боевой source резолвится — пропущенный source (тихий провал) исключён.Verify
settings.use_kit_scheduler is Falsescheduler/adapters/registry/config109 passedimport app.scheduler_mainOKАктивация (отдельно, НЕ в этом PR)
USE_KIT_SCHEDULER=true+ recreate scraper после prod-smoke по одному source; откат = флаг false + recreate. Боевой scheduler — мгновенный fallback.Примечание: mypy-заметка RealScraperConfig read-only property vs Protocol — pre-existing дизайн адаптеров, runtime_checkable ок, не gated (в tradein CI mypy-гейта нет).