fix(scraper-kit): sync RealScraperConfig adapter with ScraperConfig protocol (cookie_encryption_key) #2170

Merged
lekss361 merged 1 commit from fix/scraper-config-adapter-sync into main 2026-07-02 16:46:07 +00:00
Owner

Чинит упавший на main тест test_scraper_config_satisfies_protocol.

Причина

Protocol ScraperConfig объявляет 12 полей, адаптер RealScraperConfig имел 11 — не хватало cookie_encryption_key (добавлено в D-cian #2157). @runtime_checkable isinstance требует ВСЕ атрибуты → False. Не рантайм-регрессия (адаптер инертен до rewire) — guard-тест поймал рассинхрон контракта раньше времени.

Фикс

Property-прокси в RealScraperConfig (+4 строки): cookie_encryption_key → _settings.cookie_encryption_key (поле есть в Settings, config.py:41). Полная сверка 12 полей → missing = [].

Verify

  • pytest test_scraper_adapters_contracts.py → 5 passed (вкл. test_scraper_config_satisfies_protocol)
  • ruff clean; contracts.py/провайдеры не тронуты, только адаптер
Чинит упавший на main тест `test_scraper_config_satisfies_protocol`. ## Причина Protocol `ScraperConfig` объявляет 12 полей, адаптер `RealScraperConfig` имел 11 — не хватало `cookie_encryption_key` (добавлено в D-cian #2157). `@runtime_checkable isinstance` требует ВСЕ атрибуты → False. Не рантайм-регрессия (адаптер инертен до rewire) — guard-тест поймал рассинхрон контракта раньше времени. ## Фикс Property-прокси в `RealScraperConfig` (+4 строки): `cookie_encryption_key → _settings.cookie_encryption_key` (поле есть в Settings, `config.py:41`). Полная сверка 12 полей → `missing = []`. ## Verify - `pytest test_scraper_adapters_contracts.py` → 5 passed (вкл. test_scraper_config_satisfies_protocol) - ruff clean; contracts.py/провайдеры не тронуты, только адаптер
lekss361 added 1 commit 2026-07-02 16:45:58 +00:00
fix(scraper-kit): sync RealScraperConfig adapter with ScraperConfig protocol (cookie_encryption_key)
All checks were successful
CI / changes (pull_request) Successful in 20s
CI / backend-tests (pull_request) Has been skipped
CI / frontend-tests (pull_request) Has been skipped
CI / openapi-codegen-check (pull_request) Has been skipped
344292f87b
lekss361 merged commit f7063d49b5 into main 2026-07-02 16:46:07 +00:00
lekss361 deleted branch fix/scraper-config-adapter-sync 2026-07-02 16:46:08 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lekss361/gendesign#2170
No description provided.