3 fixes inside services/estimator.py from 2026-05-24 audit: * IMV link UPDATE moved inside main tx (finding #4) — closes race where two concurrent estimates sharing a cache_key could overwrite each other's estimate_id after the main commit. * _save_yandex_history_items batched under single try/except (finding #5) — prior per-item db.rollback() destroyed the parent transaction; next iteration could run on a rolled-back session. * Drop redundant CAST inside IS NOT NULL predicates in _fetch_analogs (finding #9) — CAST(NULL AS T) IS NOT NULL is equivalent to NULL IS NOT NULL but evaluates per-row. THEN-branch CASTs preserved (typed arithmetic). test: update test_save_history_items_db_error_continues → batch rollback semantics |
||
|---|---|---|
| .. | ||
| app | ||
| data/sql | ||
| tests | ||
| .dockerignore | ||
| Dockerfile | ||
| pyproject.toml | ||