Per-component gradient clipping: - 2 new CUDA kernels (dqn_clipped_saxpy, dqn_clip_grad) - CQL gradient isolated into separate scratch buffer - Budget allocation: C51=70%, CQL=15%, IQN=10%, Ens=5% - Dynamic budget — inactive components' share goes to C51 Spectral norm extended to all 10 weight matrices: - Was trunk-only (W_s1, W_s2), now covers all heads - 16 u/v power iteration buffers, batched GOFF sync-back - Uniform sigma_max, end-to-end Lipschitz bounded Bug fixes from 9-agent audit: - Backtest episode reset: all 8 fields (was 5), max_equity updated before floor check - gradient_clip_norm unified: 10.0 everywhere (was 10.0 vs 1.0) - entropy_coefficient: Option<f64> → f64, single default 0.001 - Close price: unwrap_or(1.0) → direct indexing (no silent wrong rewards) - step_count: only increments during training (was incrementing on inference) - Quantile loss: single CUDA context (was 3×), silent fallbacks removed - MaybeNoisyLinear: single-variant enum removed → direct NoisyLinear - Budget fractions: exported as pub(crate) constants, referenced not hardcoded Monitoring: - Per-component gradient Prometheus gauges (C51 raw, combined) - Diagnostic logging every 1000 steps Tests: 7 new gradient budget tests, 1 gradient bounds smoke test All 488 tests pass (359 ml-dqn + 129 ml) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
common
Shared types, error handling, and utilities for the Foxhunt HFT ecosystem.
Key Types
FoxhuntError— unified error enum withResultaliasModelType— canonical ML model enum (10 primary variants)CircuitBreakerTrait— async circuit breaker interfaceTlsProtocolVersion,ClientIdentity— TLS configuration types- Market data types (
Tick,OrderBook) and order types (LimitOrder,MarketOrder)
Modules
model_types— canonicalModelTypeenum re-exported by ml/ and model_loader/resilience—CircuitBreakerTraitasync traittls— TLS types and configurationquestdb— QuestDB client configuration
Usage
use common::{FoxhuntError, ModelType};