9056d461d8844ead81957f0d0d5c7af065db6739
Bite-sized task plan derived from the Phase 3 spec (docs/plans/2026-05-12-sp22-h6-phase3-alpha-beta.md). Tasks grouped into six phases; all EDIT tasks land in a single atomic commit at Phase F per `feedback_no_partial_refactor`. There are NO intermediate commits across Phase A–E; each task's cargo-check step is the in-flight gate. Phase A (5 tasks): foundation — new ISV slots (REWARD_AUX_ALIGN_EMA_INDEX + SP22_AUX_ALIGN_SCALE_INDEX), state_reset_registry entries, new alpha forward + backward kernels, build.rs registration. Phase B (11 tasks): 7-component contract migration — experience_kernels.cu (producer + beta), backtest_env_kernel.cu (eval producer + beta), reward_component_ema_kernel.cu (0..7 iteration), reward_decomp_diag_kernel.cu (column 6), reward_component_mag_ratio_compute_kernel.cu (axis 6), reward_subsystem_controller_kernel.cu (7-weight emit + w_aux_align anchor), health_diag_kernel.cu (snap slot), gpu_experience_collector.rs (7-slot buffer + HEALTH_DIAG print), gpu_dqn_trainer.rs (7-slot buffer + HEALTH_DIAG + alpha param + Adam + captured graph wiring), reward_component_monitor.rs (reader), training_loop.rs (sp11_reward + reward_split print lines). Phase C (1 task): alpha plumbing collector-side / rollout-time captured graph (Phase C is otherwise folded into Phase B Task B9). Phase D (7 tasks): A2 eval-side — aux trunk weight loading + per-window prev_aux_dir_prob buffer + per-step aux trunk forward + softmax-to-per-env launch + alpha forward + non-NULL state-gather wiring across 3 launchers + W ptr sharing trainer ↔ evaluator. Phase E (7 tasks): verification gates — cargo check, gpu_backtest_validation, compute-sanitizer, captured-graph integrity (deferred to smoke), alpha weight movement (deferred to smoke), 7-component contract sanity (deferred to smoke), A2 eval-side aux activity (deferred to validation eval). Phase F (5 tasks): audit doc append (Invariant 7), single atomic commit covering all changes, push, smoke dispatch, verdict monitoring + audit doc verdict. Total: 36 tasks. Each task has exact file paths, exact commands with expected output, and code-block-level specificity for kernel signatures, struct field additions, and HEALTH_DIAG format-string extensions. Self-review section maps every spec requirement to a specific task. Refs ──── - docs/plans/2026-05-12-sp22-h6-phase3-alpha-beta.md (spec) - pearl_no_partial_refactor (single atomic commit Phase F) - feedback_push_before_deploy (Phase F3) - feedback_no_redundant_monitor (Phase F5 single-channel waiter) - feedback_kill_runs_on_anomaly_quickly (verdict criteria) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…
…
…
…
…
…
…
…
…
…
…
Foxhunt
Production HFT trading system in Rust.
Architecture
The workspace contains 32 crates organized as follows:
Core Libraries (16)
| Crate | Purpose |
|---|---|
trading_engine |
Order processing, FIX 4.4, IB TWS, SIMD, RDTSC timing |
risk |
VaR, Kelly, circuit breakers, kill switches, compliance |
risk-data |
Risk data types and shared structures |
trading-data |
Trading data types |
ml |
DQN Rainbow, PPO, TFT, Mamba2, ensemble inference |
ml-data |
ML data types and feature definitions |
data |
Market data ingestion and storage |
backtesting |
Replay engine, strategy tester |
adaptive-strategy |
Ensemble execution, microstructure analysis |
common |
Shared types, resilience, error handling |
storage |
S3 and local model storage |
model_loader |
Model serialization and loading |
market-data |
Market data feed handlers |
database |
PostgreSQL access layer (SQLx) |
config |
Configuration management |
tli |
CLI commands and tooling |
Services (8)
| Service | Purpose |
|---|---|
backtesting_service |
gRPC backtesting service |
broker_gateway_service |
FIX routing, broker connectivity |
trading_service |
Core trading operations |
ml_training_service |
Model training orchestration |
data_acquisition_service |
Market data acquisition |
trading_agent_service |
Autonomous trading agents |
api_gateway |
gRPC API gateway with auth |
web-gateway |
Axum REST + WebSocket gateway |
Frontend
web-dashboard/ -- React 19 + TypeScript + Vite + TradingView charts.
Building
# Check compilation (no PostgreSQL required)
SQLX_OFFLINE=true cargo check --workspace
# Run tests for a specific crate
SQLX_OFFLINE=true cargo test -p <crate> --lib
# Clippy
SQLX_OFFLINE=true cargo clippy --workspace
ML Models
Four production model architectures on Candle v0.9.1 with CUDA:
- DQN Rainbow -- Deep Q-Network with prioritized replay, dueling heads, noisy nets
- PPO -- Proximal Policy Optimization with GAE and LSTM policies
- TFT -- Temporal Fusion Transformer for multi-horizon forecasting
- Mamba2 -- State space model for sequence prediction
Each model has a standalone trainer and a UnifiedTrainable adapter for the hyperopt pipeline.
Infrastructure
- Git: Gitea at
git.fxhnt.ai(Tailscale-only), Scaleway DEV1-S - Observability: OpenTelemetry OTLP (env
OTEL_EXPORTER_OTLP_ENDPOINT) - Database: PostgreSQL with SQLx offline mode for CI
License
Proprietary. All rights reserved.
Description
Languages
Rust
88.2%
Cuda
7.7%
Python
1.3%
Shell
1.1%
PLpgSQL
0.8%
Other
0.8%