gendesign/tradein-mvp/backend/app/core
bot-backend 1cbd4bd4b2 fix(estimator): sanity-clamp quarter-index factor in _apply_quarter_index (#859)
Follow-up hardening from PR #858 review. The quarter-index factor
(target_index / avg_analog_index) was unbounded — pathological FDW data could
yield an extreme multiplier on a client-visible price. Clamp factor to
[estimate_quarter_index_factor_min, _max] = [0.6, 1.8] (outside the realistic
quarter-to-quarter location spread for EKB вторичка). Bounds in settings;
passed as kwargs so _apply_quarter_index stays pure/testable. Clamp fires
logged at INFO. Formula and #764 guards unchanged.

Refs #859, #764
2026-05-31 10:11:16 +03:00
..
__init__.py feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in) 2026-05-21 00:25:39 +03:00
auth.py feat(tradein): brand-by-account + result IA redesign (distinct asking/sale prices) (#683) 2026-05-30 06:45:14 +00:00
config.py fix(estimator): sanity-clamp quarter-index factor in _apply_quarter_index (#859) 2026-05-31 10:11:16 +03:00
db.py feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in) 2026-05-21 00:25:39 +03:00
fdw.py feat(tradein): postgres_fdw live read of gendesign.cad_buildings (replaces snapshot) (#493) 2026-05-24 08:57:30 +00:00
ratelimit.py fix(tradein): bypass rate-limit for authenticated pilots + configurable limit (#655) (#669) 2026-05-29 15:56:30 +00:00