Commit graph

5 commits

Author SHA1 Message Date
bot-backend
7833c354e9 fix(tradein/cian): extract_all_states — discover new .concat() format, not just legacy .push()
All checks were successful
CI Trade-In / changes (pull_request) Successful in 8s
CI / changes (pull_request) Successful in 9s
CI Trade-In / frontend-checks (pull_request) Has been skipped
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
CI Trade-In / backend-tests (pull_request) Successful in 51s
Found live 2026-07-04 while verifying #2435 (bti_data persistence): a real Cian
offer page (200 OK, 595KB) parsed fine via extract_state() (which already tries
.concat() first, .push() as fallback per the #639 2026-05 format drift), but
extract_all_states() returned {} — it only ever scanned the legacy .push()
pattern via _RE_CIAN_PUSH, never updated when .concat() became the live format.

This silently starved both of its consumers of real data on every current-format
page: cian/detail.py's bti sister-state (the exact gap #2435 built persistence
for, which could never receive data) and cian/newbuilding.py's sister-state
extraction. Confirmed via live re-fetch after the fix: extract_all_states() now
returns 6 real MFE containers instead of an empty dict.

No test file previously existed for cian_state_parser.py (a stale .pyc from a
pre-scraper_kit-migration test was the only trace) — added tests/test_cian_state_parser.py
covering concat discovery, legacy push fallback, mixed-format precedence, and the
extract_state()/extract_all_states() consistency invariant that the bug violated.

Full backend suite: 2345 passed, 6 skipped, 1 pre-existing unrelated failure
(test_search_cache_hit, verified via git stash against clean main).

Refs #2435
2026-07-04 23:45:55 +03:00
bot-backend
27bbd579c3 chore(tradein/scrapers): удалить весь legacy scrapers/ каталог — final E (#2397, #2277)
All checks were successful
CI Trade-In / changes (pull_request) Successful in 9s
CI / changes (pull_request) Successful in 9s
CI Trade-In / frontend-checks (pull_request) Has been skipped
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
CI Trade-In / backend-tests (pull_request) Successful in 47s
Удаляет весь `app/services/scrapers/` (16 файлов, ~7100 строк) — Part D (D1-D5)
убрал всех внешних вызывающих, 0 runtime importers подтверждено grep'ом на main.

Заодно:
- удалены 7 осиротевших локальных probe/sweep-скриптов (tradein-mvp/scripts/),
  импортировавших уже-удалённые или удаляемые сейчас legacy-модули
- тест-хирургия по 65+ файлам: DELETE прямых legacy-юнит-тестов, RETARGET
  тестов, тестирующих ещё живую бизнес-логику (переключены на scraper_kit.*
  эквиваленты, включая quality-gate #781/#753/#754/#755/#773/#740), partial-delete
  golden-parity тестов, потерявших legacy-оракл
- kit save_listings/AvitoScraper/etc. требуют инжектируемые matcher/config —
  ретаргетированные тесты обновлены под новую сигнатуру (RealScraperConfig(),
  MagicMock HouseMatcher, region_code=66)

Полный pytest suite зелёный (2255 passed, 6 skipped) кроме известного флейка
#2208 (test_search_cache_hit, не связан со scrapers).
2026-07-04 15:58:15 +03:00
7bd5a834dc fix(tradein): cian _cianConfig concat-формат + auth из header-frontend (#639) (#819)
All checks were successful
Deploy Trade-In / test (push) Successful in 25s
Deploy Trade-In / build-backend (push) Successful in 41s
Deploy Trade-In / deploy (push) Successful in 35s
Deploy Trade-In / changes (push) Successful in 5s
Deploy Trade-In / build-frontend (push) Has been skipped
Co-authored-by: bot-backend <bot-backend@gendsgn.local>
Co-committed-by: bot-backend <bot-backend@gendsgn.local>
2026-05-30 19:08:01 +00:00
4c275e04ea fix(tradein): word-boundary street match + cian unescape robustness (Refs #769 A1+D) (#798)
All checks were successful
Deploy Trade-In / changes (push) Successful in 5s
Deploy Trade-In / build-frontend (push) Has been skipped
Deploy Trade-In / test (push) Successful in 24s
Deploy Trade-In / build-backend (push) Successful in 40s
Deploy Trade-In / deploy (push) Successful in 35s
Co-authored-by: bot-backend <bot-backend@gendsgn.local>
Co-committed-by: bot-backend <bot-backend@gendsgn.local>
2026-05-30 17:18:33 +00:00
9ba776f2ca feat(tradein): cian_state_parser shared utility + ScrapedLot Cian fields (#447)
Some checks failed
Deploy Trade-In / build-backend (push) Blocked by required conditions
Deploy Trade-In / build-frontend (push) Blocked by required conditions
Deploy Trade-In / deploy (push) Blocked by required conditions
Deploy Trade-In / changes (push) Has been cancelled
2026-05-23 12:35:01 +00:00