gendesign/backend/app/services/forecasting
bot-backend 3a13bce468
All checks were successful
CI / changes (pull_request) Successful in 11s
CI Trade-In / changes (pull_request) Successful in 11s
CI / frontend-tests (pull_request) Has been skipped
CI Trade-In / backend-tests (pull_request) Has been skipped
CI Trade-In / frontend-checks (pull_request) Has been skipped
CI / openapi-codegen-check (pull_request) Successful in 3m1s
CI / backend-tests (pull_request) Successful in 16m4s
fix(forecasting): savepoint db.execute failures to stop §22 session poisoning (#2464)
One layer's caught DB error left the shared §22 report Session in Postgres's
"aborted transaction" state with no rollback, silently emptying every later
layer on the same report. Wrap each failure point in db.begin_nested()
(SAVEPOINT): orchestrator._safe_call, macro_series _query_key_rate_monthly /
_query_inflation_monthly / _query_mortgage_monthly (per indicator),
special_indices._run (per index), and sales_series _query_source_a /
_query_source_b — so a sibling builder's failure no longer cascades.

Also close the RELEASE-SAVEPOINT trap: inner helpers that swallowed a
db.execute failure without their own savepoint left the tx aborted, so the
outer builder's savepoint failed at RELEASE (illegal in an aborted tx) and
poisoning still cascaded. Add savepoints at the inner catch sites —
special_indices._query_parcel_centroid and district_resolver._admin_names /
resolve_objective_districts.

Refs #2464 (cluster A session-poisoning).
2026-07-07 17:50:17 +05:00
..
__init__.py feat(forecasting): §13 report assembler (#988, 955-A2) (#1021) 2026-06-03 08:51:23 +00:00
affordability.py fix(week-review): backend-аудит v2 — 82 фиксов (#1660) 2026-06-17 17:13:38 +00:00
confidence_engine.py fix(report): human RU microcopy in Site Finder Section 6 (#1963) 2026-06-27 17:42:27 +05:00
demand_normalization.py perf(forecast): per-request memoization cache for §22 cold build (#1129) 2026-06-08 05:26:27 +00:00
demand_supply_forecast.py fix(forecast): посегментный+дедуплицированный индекс дефицита (#1959) 2026-06-27 22:50:58 +05:00
macro_coefficient.py feat(macro): CBR inflation (ИПЦ YoY) -> macro_indicator + activate §9.5 channel (#946) 2026-06-08 11:41:14 +05:00
macro_series.py fix(forecasting): savepoint db.execute failures to stop §22 session poisoning (#2464) 2026-07-07 17:50:17 +05:00
normalize.py fix(forecasting): count non-zero observations in normalize guard, not zero-filled buckets (#1638) 2026-06-17 20:39:00 +03:00
orchestrator.py fix(forecasting): savepoint db.execute failures to stop §22 session poisoning (#2464) 2026-07-07 17:50:17 +05:00
product_scoring.py merge: resolve conflicts with main (#1660) into week-review-finish 2026-06-17 20:21:06 +03:00
rate_sensitivity.py feat(forecasting): seasonal (month-of-year) demand normalization (#979) 2026-06-04 11:19:50 +05:00
recommendation.py docs(forecast): исправить устаревшие комментарии #1959 (deep-review follow-up) 2026-06-27 23:02:09 +05:00
regression.py fix(week-review): backend-аудит v2 — 82 фиксов (#1660) 2026-06-17 17:13:38 +00:00
report.py fix(forecasting): honest scenarios collapse when β rate-sensitivity gate fails (audit #1871 P1) 2026-06-22 19:06:22 +05:00
report_assembler.py fix(objective): physflat-dedup current-state consumers + honest n_sold window (#1964) 2026-06-28 04:27:43 +05:00
sales_series.py fix(forecasting): savepoint db.execute failures to stop §22 session poisoning (#2464) 2026-07-07 17:50:17 +05:00
scenarios.py fix(report): human RU microcopy in Site Finder Section 6 (#1963) 2026-06-27 17:42:27 +05:00
special_indices.py fix(forecasting): savepoint db.execute failures to stop §22 session poisoning (#2464) 2026-07-07 17:50:17 +05:00
what_to_build.py fix(forecast): посегментный+дедуплицированный индекс дефицита (#1959) 2026-06-27 22:50:58 +05:00