brighter-trading/tests
rob ee16023b6b Add public strategy subscription system
Implement a subscription system for public strategies:

Security & Auth:
- Bind WebSocket user identity at connect time (prevents spoofing)
- Add server-side ownership verification for all destructive operations
- Invalidate socket connections on logout
- Add XSS protection with HTML/JS escaping in frontend

Database:
- Add strategy_subscriptions table with proper indexes
- Fix get_all_rows_from_datacache to fall back to DB when cache empty

Backend:
- Add subscribe/unsubscribe endpoints with authorization checks
- Add get_user_strategies (owned + subscribed) and get_public_strategies_catalog
- Propagate indicator_owner_id through strategy instances for subscribed strategies
- Redact strategy internals (code, workspace) for non-owners

Frontend:
- Add "Add Public" button to browse and subscribe to public strategies
- Show subscribed strategies with creator badge and unsubscribe button
- Prevent editing of subscribed strategies (show info modal instead)
- Add public strategy browser modal

Tests:
- Update authorization tests for new subscription-required model

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-08 16:59:52 -03:00
..
__pycache__ Updated project structure and staged modified files 2024-07-25 08:21:15 -03:00
BrighterTrading.db Updated project structure and staged modified files 2024-07-25 08:21:15 -03:00
Brng.db Updated project structure and staged modified files 2024-07-25 08:21:15 -03:00
__init__.py Classes implemented in python and javascript. UML class diagram. Rough sequence uml. TODO: local file getting dirty from refresh. Signals implemented. Strategies implemented. Trades implemented but still needs some testing. 2023-02-17 22:47:13 -04:00
config.yml Many improvements. 2023-05-14 17:33:13 -03:00
conftest.py Phase 0: Stabilize baseline 2026-02-28 16:44:11 -04:00
test_BrighterTrades.py Add Bollinger %B indicator and fix credential handling 2026-03-06 06:31:31 -04:00
test_DataCache.py Fix backtest data source and chart view detection bugs 2026-03-06 00:05:31 -04:00
test_Exchange.py Fix KuCoin balance fetching and add balance refresh functionality 2026-03-06 06:10:31 -04:00
test_Users.py Fix backtest data source and chart view detection bugs 2026-03-06 00:05:31 -04:00
test_app.py Fix backtest data source and chart view detection bugs 2026-03-06 00:05:31 -04:00
test_backtest_determinism.py Fix high-severity issues identified by Codex 2026-02-28 17:23:58 -04:00
test_brokers.py Live trading infrastructure functional on testnet 2026-03-01 15:23:34 -04:00
test_candles.py Fix backtest data source and chart view detection bugs 2026-03-06 00:05:31 -04:00
test_database.py Fix backtest data source and chart view detection bugs 2026-03-06 00:05:31 -04:00
test_edm_client.py Integrate EDM for candle data and improve UI dialogs 2026-03-04 11:42:06 -04:00
test_exchangeinterface.py Fix backtest data source and chart view detection bugs 2026-03-06 00:05:31 -04:00
test_execution_loop.py Implement execution loop, paper persistence, and CI pipeline 2026-02-28 19:48:50 -04:00
test_indicators.py Phase 0: Stabilize baseline 2026-02-28 16:44:11 -04:00
test_live_broker.py Live trading infrastructure functional on testnet 2026-03-01 15:23:34 -04:00
test_live_exchange_integration.py Fix backtest data source and chart view detection bugs 2026-03-06 00:05:31 -04:00
test_live_integration.py Live trading infrastructure functional on testnet 2026-03-01 15:23:34 -04:00
test_live_strategy_instance.py Live trading infrastructure functional on testnet 2026-03-01 15:23:34 -04:00
test_paper_persistence.py Implement execution loop, paper persistence, and CI pipeline 2026-02-28 19:48:50 -04:00
test_paper_trading.py Phase 4: Paper trading implementation 2026-02-28 17:07:34 -04:00
test_shared_utilities.py Fix backtest data source and chart view detection bugs 2026-03-06 00:05:31 -04:00
test_strategy_execution.py Add public strategy subscription system 2026-03-08 16:59:52 -03:00
test_strategy_generation.py Fix backtest data source and chart view detection bugs 2026-03-06 00:05:31 -04:00
test_trade.py Fix backtest data source and chart view detection bugs 2026-03-06 00:05:31 -04:00
test_trade2.py Fix backtest data source and chart view detection bugs 2026-03-06 00:05:31 -04:00