Skip to content

fix: resolve 3 critical bugs (#12, #13, #14)#18

Open
caiovicentino wants to merge 6 commits intomainfrom
fix/critical-bugs-12-13-14
Open

fix: resolve 3 critical bugs (#12, #13, #14)#18
caiovicentino wants to merge 6 commits intomainfrom
fix/critical-bugs-12-13-14

Conversation

@caiovicentino
Copy link
Copy Markdown
Owner

Summary

Test plan

  • Verify portfolio tools (get_all_positions, analyze_portfolio_risk, etc.) no longer crash
  • Verify WebSocket real-time subscriptions receive messages after server init
  • Verify create_limit_order with outcome="NO" selects the correct NO token
  • Verify create_market_order with outcome="NO" works correctly
  • Verify execute_smart_trade with intent containing "NO" resolves to NO token
  • Verify backward compatibility — omitting outcome defaults to YES

Closes #12, closes #13, closes #14

🤖 Generated with Claude Code

caio vicentino and others added 6 commits April 3, 2026 11:06
- #12: Fix portfolio tools crash by passing rate_limiter instead of safety_limits
- #13: Start WebSocket background loop after connect, fix auth using separate API_SECRET, fix channel starvation in background loop
- #14: Add outcome (YES/NO) token selection instead of always using tokens[0]

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove unused imports (asyncio, os, Decimal, List, PriceChangeEvent, OrderbookUpdate)
- Fix f-strings without placeholders in test_performance.py
- Fix asyncio.run() called from running event loop in benchmark tests
- Fix invalid inline import syntax in test_e2e.py (use try/except)
- Fix tomllib import for Python 3.10 compat in test_issue_fixes.py
- Prefix unused test variables with underscore

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add rate_limiter as global variable in server.py (fixes F821 undefined name)
- Remove unused imports across all src/ and tests/ files
- Fix f-strings without placeholders
- Fix bare except clause in trading.py
- Prefix unused variables with underscore
- Fix test_e2e.py and test_issue_fixes.py for Python 3.10 compat

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove extra blank lines after imports and refactor assert
statements to avoid black version-dependent formatting.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant