gendesign/backend
Light1YT c5d1069e2c fix(tradein): per-bucket velocity uses district+class competitors (#574)
Deep-review BLOCK: prior fix divided market velocity by region-wide active
ЖК count (~442) → срок продажи 379-1180 мес (нереалистично).

FIX: divide by district+class competitor count (competitors_weighted from
_active_competitors_count cascade, ~5-15 ЖК) in BOTH fallback sites —
aggregate and per-bucket. Срок now lands ~12-24 мес.

- Delete unused _n_active_zhk_region helper + lazy _n_active_cache closure.
- n_comp = max(round(competitors_weighted), 1) — district+class, not region-wide.
- Rename scope["n_active_region"] → scope["n_competitors"] (new field this
  branch, nothing else reads it; frontend confirmed clean).
- Keep static-mix fix: per-bucket velocities stay keyed off MARKET
  bucket_deal_counts (independent of user share_pct slider).
- Tests: drop TestNActiveZhkRegion (helper removed); retarget n_active_region
  → n_competitors via _competitors_two_dim mock; replace misleading "≈404 мес"
  comment with assertion 12<=срок<=24 across n_comp 5-15.
2026-05-28 20:33:38 +05:00
..
alembic ops: alembic baseline, pre-commit, TIGER cleanup, pg_dump scripts 2026-04-26 13:08:51 +03:00
app fix(tradein): per-bucket velocity uses district+class competitors (#574) 2026-05-28 20:33:38 +05: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(tradein): per-bucket velocity uses district+class competitors (#574) 2026-05-28 20:33:38 +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