3.32.0 (2026-03-13)
New Features
- add _calculate_servers_price (fixed fallback) and _calculate_traffic_price (88369ee)
- add CLASSIC_PERIOD_PRICES to config (c3bb63f)
- add LIMITED subscription status and preserve extra devices on tariff switch (8f43452)
- add RenewalPricing dataclass and PricingEngine discount methods (83ca51c)
- implement calculate_renewal_price with tariff and classic modes (02e5401)
Bug Fixes
- add missing settings import in admin_users tariff switch (b2ee6c7)
- add per-category discounts and months multiplier to classic mode (1660b24)
- add period_days whitelist validation and type annotations (18e2e78)
- address 6-agent review findings for PricingEngine (c9f2dff)
- address review findings from 5-agent audit (08bea70)
- atomicity refactor, review fixes, and DELETED recovery logging (ba54819)
- change None assignment to [] + add "or []" guards at all 5 call sites. (a5fbd74)
- downgrade known-harmless RemnaWave 400s to warning level (0419781)
- guard rollback on commit flag, add flush to promo_offer_log (b7775b7)
- handle legacy telegram_id in YooKassa webhook recovery metadata (815a1d9)
- harden remnawave API error handling and YooKassa user cross-validation (585baaf)
- harden YooKassa webhook recovery user lookup (d35ee58)
- payment providers — lock_user_for_update + commit=False atomicity (b4ef52c)
- prevent balance loss on auto-purchase for DISABLED subscriptions and fix WATA expiration (266340a)
- pricing audit — display/charge parity, race conditions, balance locks (ae99358)
- resolve merge conflict with dev (accept calc_device_limit_on_tariff_switch) (ba049ca)
- user deletion FK error + connected_squads None TypeError (a5fbd74)
Refactoring
- add typed breakdowns + module-level singleton to PricingEngine (b551def)
- extract shared formatting helpers into app/utils/formatting.py (5e9a462)
- make finalize() accept both old and new pricing types (3efa24b)
- migrate admin user price calculation to PricingEngine (49c0f3f)
- migrate all callers to pricing_engine singleton + fix miniapp discount (e24b911)
- migrate bot renewal display to PricingEngine (ce82c2c)
- migrate bot renewal execute to PricingEngine (acf27a1)
- migrate cabinet renewal display + execute to PricingEngine (28fc36d)
- migrate cart auto-purchase to PricingEngine (fresh calc) (bd2e93a)
- migrate menu.py renewal pricing to PricingEngine (652b6da)
- migrate miniapp renewal display + execute to PricingEngine (cb43aca)
- migrate recurrent and monitoring services to PricingEngine (978f68e)
- migrate remaining callers to PricingEngine + cleanup dead CRUD (75dbd2b)
- migrate try_auto_extend_expired to PricingEngine (e6ebc67)
- remove dead pricing code and fix miniapp classic mode (c9a9816)
- unify first-purchase discount algorithm with PricingEngine (fe4e6ac)