gendesign/backend/app
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
..
api feat(rbac): role-based access control via X-Authenticated-User middleware (#585) 2026-05-26 06:18:40 +00:00
core feat(rbac): role-based access control via X-Authenticated-User middleware (#585) 2026-05-26 06:18:40 +00:00
models feat(jobs): centralized job_settings API + DB-driven beat schedule 2026-05-11 15:38:13 +03:00
observability feat(backend): sentry-sdk init для FastAPI + Celery (#204 backend) (#207) 2026-05-16 15:09:16 +00:00
schemas feat(sf-b1): GET /parcels/by-bbox — map entry endpoint + parcel_user_status table (#336) 2026-05-17 21:25:48 +00:00
scrapers Merge pull request 'feat(#263 sub-A): cad_* overlay schemas + cadastre territorial_zones (ПЗЗ)' (#265) from feat/263-sub-a-cad-nspd-overlay-schemas-and-pzz into main 2026-05-17 07:50:08 +00:00
services fix(tradein): per-bucket velocity uses district+class competitors (#574) 2026-05-28 20:33:38 +05:00
templates feat(sf-b7): GET /parcels/{cad}/snapshot.pdf — 1-page WeasyPrint export (#334) 2026-05-17 21:11:03 +00:00
workers fix(beat): distinguish DB-unreachable from intentional-empty schedule (#520) 2026-05-24 13:14:11 +00:00
__init__.py init 2026-04-25 13:45:19 +03:00
main.py feat(rbac): role-based access control via X-Authenticated-User middleware (#585) 2026-05-26 06:18:40 +00:00