Atomic removal of 5 boolean feature flags from DQNConfig per `feedback_no_feature_flags.md`, all of which gated dead or redundant code. (use_iqn already removed in da632446c.) - `use_dueling`, `use_distributional`, `use_noisy_nets`, `use_branching`: pure-cosmetic always-on flags. Only metadata strings remained. 4 `if true /* always on */` blocks in dqn.rs collapsed to live arms; dead else arms (legacy non-branching code paths, 5-flat ExposureLevel) deleted. - `use_count_bonus`: redundant with `count_bonus_coefficient` (the live numeric kill-switch). Recording made unconditional; coefficient is the single dial. - `use_cvar_action_selection`: dead post-use_iqn cleanup (only consumers were inside the deleted IQN arms). cvar_alpha retained for cuda_pipeline CVaR loss usage. count_bonus.rs API tightened: `bonuses_branched_f32(&self, exp_out: &mut [f32], ord_out: &mut [f32], urg_out: &mut [f32])` write-into API alongside the existing Vec<f64> form (kept for tests). Production DQN::get_count_bonuses_branched() returns fixed `([f32; 4], [f32; 3], [f32; 3])` arrays — allocation-free, f32 throughout, fed directly to GPU action selector via stack-allocated buffers. Test 0.F outputs bit-identical vs pre-cleanup (sigma_C51, argmax, Thompson counts) — confirms legacy use_* arms were unreachable as expected. `docs/dqn-wire-up-audit.md` updated per Invariant 7. Precondition for the MoE regime redesign per `docs/superpowers/specs/2026-04-27-moe-regime-redesign-design.md`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
trading_service
Core execution engine for order placement, position keeping, risk integration, and real-time P&L tracking.
Key Types
TradingServiceImpl-- main gRPC serviceOrderExecutor-- high-throughput order handlingPositionManager-- real-time position and P&L trackingRiskIntegration-- pre-trade and post-trade compliance
gRPC Endpoints
PlaceOrder-- submit new ordersCancelOrder-- cancel existing ordersGetPosition-- query current positionsSubscribeMarketData-- market data feedsGetPnlUpdates-- real-time P&L updates
Configuration
GRPC_PORT-- gRPC listen portDATABASE_URL-- PostgreSQL connection stringTLS_ENABLED-- enable TLS 1.3 (default: false)TLS_CERT_PATH,TLS_KEY_PATH,TLS_CA_PATH-- TLS certificatesTLS_REQUIRE_CLIENT_CERT-- mutual TLS (default: false)
Testing
SQLX_OFFLINE=true cargo test -p trading_service --lib