1. score_top_3_negatives — rewrite to unambiguously "most-negative first" via
explicit `sorted(negatives, key=contribution)[:3]` (ascending sort). Раньше
использовался trick `[-3:][::-1]` на desc-sorted — давал тот же результат
для N>=3 negatives, но неинтуитивно читать.
2. _compute_confidence(recent_deals_count) — guard `int(... or 0)` через
try/except (ValueError, TypeError). Защищает от non-numeric строки в
external/legacy market_trend payload.
3. Style: `import datetime as _dt` перенесён из function-scope в module-level.
Per auto-review on
|
||
|---|---|---|
| .. | ||
| alembic | ||
| app | ||
| db/init | ||
| output | ||
| tests | ||
| .dockerignore | ||
| .env.example | ||
| .env.runtime.example | ||
| alembic.ini | ||
| debug.log | ||
| Dockerfile | ||
| pyproject.toml | ||
| uv.lock | ||