arbitrage-engine/backend
fanziqi ad60a53262 review: add code audit annotations and REVIEW.md for v5.1
P0 issues annotated (critical, must fix before live trading):
- signal_engine.py: cooldown blocks reverse-signal position close
- paper_monitor.py + signal_engine.py: pnl_r 2x inflated for TP scenarios
- signal_engine.py: entry price uses 30min VWAP instead of real-time price
- paper_monitor.py + signal_engine.py: concurrent write race on paper_trades

P1 issues annotated (long-term stability):
- db.py: ensure_partitions uses timedelta(30d) causing missed monthly partitions
- signal_engine.py: float precision drift in buy_vol/sell_vol accumulation
- market_data_collector.py: single bare connection with no reconnect logic
- db.py: get_sync_pool initialization not thread-safe
- signal_engine.py: recent_large_trades deque has no maxlen

P2/P3 issues annotated across backend and frontend:
- coinbase_premium KeyError for XRP/SOL symbols
- liquidation_collector: redundant elif condition in aggregation logic
- auth.py: JWT secret hardcoded default, login rate-limit absent
- Frontend: concurrent refresh token race, AuthContext not synced on failure
- Frontend: universal catch{} swallows all API errors silently
- Frontend: serial API requests in LatestSignals, market-indicators over-polling

docs/REVIEW.md: comprehensive audit report with all 34 issues (P0×4, P1×5,
P2×6, P3×4 backend + FE-P1×4, FE-P2×8, FE-P3×3 frontend), fix suggestions
and prioritized remediation roadmap.
2026-03-01 17:14:52 +08:00
..
admin_cli.py feat: migrate auth system from SQLite to PostgreSQL 2026-03-01 07:29:14 +00:00
agg_trades_collector.py review: add code audit annotations and REVIEW.md for v5.1 2026-03-01 17:14:52 +08:00
auth.py review: add code audit annotations and REVIEW.md for v5.1 2026-03-01 17:14:52 +08:00
backfill_agg_trades.py tune: backfill改500ms/批(CPU100%→平衡模式) 2026-02-27 17:59:20 +00:00
backtest.py perf: backtest optimization - 15s eval interval + 50k batch + OHLC TP/SL check 2026-02-28 07:34:48 +00:00
db.py review: add code audit annotations and REVIEW.md for v5.1 2026-03-01 17:14:52 +08:00
liquidation_collector.py review: add code audit annotations and REVIEW.md for v5.1 2026-03-01 17:14:52 +08:00
main.py review: add code audit annotations and REVIEW.md for v5.1 2026-03-01 17:14:52 +08:00
market_data_collector.py review: add code audit annotations and REVIEW.md for v5.1 2026-03-01 17:14:52 +08:00
migrate_auth_sqlite_to_pg.py feat: migrate auth system from SQLite to PostgreSQL 2026-03-01 07:29:14 +00:00
migrate_sqlite_to_pg.py feat: SQLite→PG data migration script 2026-02-27 16:16:06 +00:00
paper_monitor.py review: add code audit annotations and REVIEW.md for v5.1 2026-03-01 17:14:52 +08:00
requirements.txt feat: 服务器监控面板(/server) - CPU/内存/硬盘/PM2进程/PG数据库/回补状态 2026-02-27 17:30:41 +00:00
signal_engine.py review: add code audit annotations and REVIEW.md for v5.1 2026-03-01 17:14:52 +08:00
signal_pusher.py feat: use discord bot api for signal push, add binance fallback 2026-02-26 16:54:45 +00:00
subscriptions.py feat: add auth and subscriptions backend modules 2026-02-27 02:28:21 +00:00