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#921
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/794-test-regressions"
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?
Why
PR #919 was squash-merged at 18:48 — before the test-fix push (
d2722df) landed — somaincurrently carries the pre-existing tests that the #794 refactor broke. The suite is red onmain:tests/test_sber_index.py— calls the old 2-argbuild_sber_routeand passeslist[str]dashboards →TypeError/AttributeError: 'str' object has no attribute 'slug'tests/test_estimator_imv_blend.py— two_fetch_dkp_corridortests now hit the extra_load_sber_index_seriesdb call →KeyError: 'period_month'tests/services/test_sber_index.py(same basename as the root file)(9 failures in the #919 CI run.)
Fix (tests-only, no app/ changes)
tests/test_sber_index.pyto the new API: 3-argbuild_sber_route(slug, ref_area, extra_filter),SberDashboardobjects,dashboard.slugguards; merge in the per-dashboard route assertion + real-fixture decode + period-parse tests.tests/test_estimator_imv_blend.pydkp tests withpatch("app.services.estimator._load_sber_index_series", return_value={})(preserves original corridor-math assertions).test_estimator_sber_time_adjust.pytotests/root; drop the duplicatetests/services/copies.Verify
Affected suite green:
42 passed(tests/test_sber_index.py,test_estimator_sber_time_adjust.py,test_estimator_imv_blend.py). ruff + pre-commit clean. (Local full-suite has 2 unrelatedapp.main→psycopg2env failures that pass in CI.)Follow-up to #794 / #919.
🤖 Generated with Claude Code
✅ APPROVE — tests-only fix, восстанавливает зелёный main. Мержу.
Контекст: регрессию внёс ранний squash-merge #919 (на проверенном мной head
468bdb0test-fixd2722dfещё не прилетел) — main остался с pre-existing тестами под старый API. Mea culpa: при ревью #919 не grep'нул существующих вызововbuild_sber_route(2-arg)/test_estimator_imv_blendна cross-file impact. Этот PR закрывает дыру.Verified (line-by-line, tests-only — 0 app/ изменений)
tests/services/test_sber_index.py— дубль из #919; его тесты (per_dashboard,real_fixture,period_month) смержены в roottest_sber_index.py. Покрытие не потеряно, дубль-basename pytest-коллизия устранена.test_estimator_imv_blend.py— 2 dkp-теста обёрнутыpatch("...estimator._load_sber_index_series", return_value={})→ пустой series →_sber_time_factor=1.0 → corridor-математика без изменений, исходные assert'ы (count/low/high) сохранены. Остальное — косметика ruff (multi-linepatch(...)).test_estimator_sber_time_adjust.pyservices/→root (100% similarity, чистый move).test_sber_index.py— всеbuild_sber_route("slug","ref")→ 3-arg(d.slug,"ref",d.extra_filter)через_DASH;_mock_fetchsig →SberDashboard;dashboard==→dashboard.slug==;dashboards=[_DASH[...]]. Fixture-path скорректирован (parent/fixtures).Все пути
tradein-mvp/backend/tests/**, без секретов, без self-extending. Автор:42 passed, ruff clean.Squash-merge + delete branch. Восстанавливает CI на main для последующих PR/деплоев.