fix(forecasting): thread room_bucket velocity into format ranking (#1593) #1696
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#1696
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/base-pace-room-bucket-1593"
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?
Проблема (#1593)
recommendation.py:base_paceсчитался без room_bucket,compute_market_metricsне имел per-bucket velocity → ранжирование форматов определялось толькоmacro_coef, per-bucket рекомендации не различались.Решение
Данные уже были (
_query_sales_windowиспользуетROLLUP(rooms_int)→sold_by_room). Добавлено полеMarketMetrics.velocity_by_room: dict|None(per-bucket velocity = sold_by_room/window_months; None при отсутствии выборки)._demand_only_overlayберётbucket_base_paceиз него (маппинг_FORECAST_TO_METRIC_BUCKETS, «80+ м²» = «4»+«5+»), fallback на агрегат при None. Остальные 6 callerscompute_market_metricsпроверены — никто не конструируетMarketMetricsнапрямую, не затронуты.Verify
ruffclean;pytest→ 1246 passed, 1 skipped (+5 тестов: per-bucket values, None-кейсы, ranking определяется velocity не macro_coef, graceful fallback).Closes #1593