gendesign/backend
Light1YT 1f30e3d234 fix(mv): weighted AVG в mv_layout_velocity (#295)
naive AVG() over objective_corpus_room_month rows gives equal weight to
zero-deal months, diluting per-project averages by 2-10x. Projects with
sparse deal history (e.g. 5 active months out of 24) were shown avg_area
≈27m² instead of the correct ≈81m² for 3-room flats.

Replace both aggregates with SUM(val*cnt)/NULLIF(SUM(cnt),0) so only
months with actual deals contribute weight. NULLIF prevents division-by-zero
and returns NULL for all-zero projects instead of a misleading 0.

Prod check (Vitamin-квартал на Титова, last 24 mo): studio 26m²/176k,
1-rm 37m²/174k, 2-rm 56m²/135k, 3-rm 81m²/136k — matches expected ranges.
2026-05-28 18:23:55 +05:00
..
alembic ops: alembic baseline, pre-commit, TIGER cleanup, pg_dump scripts 2026-04-26 13:08:51 +03:00
app feat(rbac): role-based access control via X-Authenticated-User middleware (#585) 2026-05-26 06:18:40 +00:00
db/init ops: alembic baseline, pre-commit, TIGER cleanup, pg_dump scripts 2026-04-26 13:08:51 +03:00
output feat(geo): NSPD bulk-fetcher без Playwright + resume-friendly UI 2026-05-11 08:53:28 +03:00
tests fix(mv): weighted AVG в mv_layout_velocity (#295) 2026-05-28 18:23:55 +05:00
.dockerignore fix(scraper): диагностируем «кнопка не работает» — Redis lock + task_received log 2026-04-28 23:17:42 +03:00
.env.example refactor(security): убрать X-Admin-Token (Caddy basic_auth достаточен) (#437) 2026-05-23 10:41:22 +00:00
.env.runtime.example sprint1: nspd scraper industrialization, per-bucket elasticity, cadastre cross-check, sentry releases 2026-04-30 21:51:19 +03:00
alembic.ini ops: alembic baseline, pre-commit, TIGER cleanup, pg_dump scripts 2026-04-26 13:08:51 +03:00
debug.log feat(geo): NSPD bulk-fetcher без Playwright + resume-friendly UI 2026-05-11 08:53:28 +03:00
Dockerfile fix(scraper): диагностируем «кнопка не работает» — Redis lock + task_received log 2026-04-28 23:17:42 +03:00
pyproject.toml feat(rbac): role-based access control via X-Authenticated-User middleware (#585) 2026-05-26 06:18:40 +00:00
uv.lock feat(rbac): role-based access control via X-Authenticated-User middleware (#585) 2026-05-26 06:18:40 +00:00