refactor(fxt): rename all stale TLI references to FXT

57 references updated across source, tests, benches, and config.
Proto package name foxhunt.tli kept for wire compatibility.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jgrusewski
2026-03-04 14:01:19 +01:00
parent 48e2213adc
commit 091dee8dc5
18 changed files with 115 additions and 115 deletions

View File

@@ -19,7 +19,7 @@ name = "fxt"
path = "src/main.rs"
[dependencies]
# gRPC and protocol buffers (essential for TLI)
# gRPC and protocol buffers (essential for FXT)
# NOTE: Tonic 0.14 uses 'tls-ring' + 'tls-webpki-roots' instead of 'tls' + 'tls-roots'
# NOTE: Tonic 0.14 requires tonic-prost for generated code runtime
tonic = { workspace = true, features = ["transport", "tls-ring", "tls-webpki-roots"] }
@@ -31,7 +31,7 @@ tokio.workspace = true
tokio-stream.workspace = true
serde.workspace = true
serde_json.workspace = true
# futures.workspace = true # REMOVED: unused in TLI - only futures-util is used
# futures.workspace = true # REMOVED: unused in FXT - only futures-util is used
futures-util.workspace = true
uuid.workspace = true
@@ -92,15 +92,15 @@ base64 = "0.22" # Base64 encoding for encrypted token storage
# - Configuration operations use gRPC ConfigurationService
# - All database access goes through proper service layers
# Database dependencies removed - TLI is pure client using gRPC ConfigurationService
# Database dependencies removed - FXT is pure client using gRPC ConfigurationService
# sqlx = { version = "0.8", features = ["runtime-tokio-rustls", "sqlite", "chrono", "uuid"] } # REMOVED: Database access violation
# Terminal UI widgets will be added when TUI is implemented
# Workspace dependencies - REMOVED core dependency to avoid namespace collision
# core.workspace = true # REMOVED: TLI is pure client, should not depend on core business logic
# config = { workspace = true } # REMOVED: Database access violation - TLI is pure client
# TLI should NOT depend on ML, Risk, or Data modules
# core.workspace = true # REMOVED: FXT is pure client, should not depend on core business logic
# config = { workspace = true } # REMOVED: Database access violation - FXT is pure client
# FXT should NOT depend on ML, Risk, or Data modules
# All business logic should be accessed through gRPC services
# Logging setup will be added when needed
@@ -158,7 +158,7 @@ harness = false
name = "encryption_performance"
harness = false
# Server binary removed - TLI is now client-only
# Server binary removed - FXT is now client-only
[lints]
workspace = true

View File

@@ -1,6 +1,6 @@
//! Client connection and gRPC performance benchmarks
//!
//! This benchmark suite measures the performance of TLI client operations
//! This benchmark suite measures the performance of FXT client operations
//! including connection establishment, request/response cycles, and streaming.
//!
//! ============================================================================
@@ -8,8 +8,8 @@
//! ============================================================================
//!
//! This benchmark file references types that don't exist:
//! - `ServiceEndpoints` - not exported from tli crate
//! - `TliClient` - not exported from tli crate
//! - `ServiceEndpoints` - not exported from fxt crate
//! - `TliClient` - not exported from fxt crate
//! - `Order`, `ListOrdersResponse`, `OrderUpdate` - missing proto definitions
//!
//! TODO: Fix by either:

View File

@@ -1,6 +1,6 @@
//! Configuration management performance benchmarks
//!
//! This benchmark suite measures the performance of TLI configuration
//! This benchmark suite measures the performance of FXT configuration
//! operations including validation, serialization, and database operations.
//!
//! ============================================================================

View File

@@ -1,7 +1,7 @@
//! Serialization and data transformation performance benchmarks
//!
//! This benchmark suite measures the performance of protobuf serialization,
//! JSON conversion, and data transformation operations used in TLI.
//! JSON conversion, and data transformation operations used in FXT.
//!
//! ============================================================================
//! TEMPORARILY DISABLED - Missing protobuf definitions
@@ -20,7 +20,7 @@
//!
//! Related files:
//! - fxt/proto/trading.proto - contains actual protobuf definitions
//! - tli/build.rs - compiles proto files to Rust code
//! - fxt/build.rs - compiles proto files to Rust code
//!
//! See Wave 36 - Agent 1 for context
//! ============================================================================

View File

@@ -1,15 +1,15 @@
# TLI Configuration File Example
# FXT Configuration File Example
# Copy this file to ~/.foxhunt/config.toml to use it
#
# Configuration precedence (highest to lowest):
# 1. CLI arguments (--api-gateway-url, --log-level, --token-storage)
# 2. Environment variables (API_GATEWAY_URL, TLI_LOG_LEVEL, TLI_TOKEN_STORAGE)
# 2. Environment variables (API_GATEWAY_URL, FXT_LOG_LEVEL, FXT_TOKEN_STORAGE)
# 3. Config file (~/.foxhunt/config.toml)
# 4. Hardcoded defaults
#
# To use this configuration file:
# mkdir -p ~/.foxhunt
# cp tli/config.toml.example ~/.foxhunt/config.toml
# cp fxt/config.toml.example ~/.foxhunt/config.toml
# # Edit ~/.foxhunt/config.toml with your settings
# API Gateway URL

View File

@@ -1,4 +1,4 @@
//! JWT Token Generation for TLI
//! JWT Token Generation for FXT
//!
//! Provides JWT token generation for simulated authentication flows.
//! Uses the same configuration as API Gateway for compatibility.

View File

@@ -91,7 +91,7 @@ impl LoginClient {
&self,
auth_manager: &AuthTokenManager<S>,
) -> Result<()> {
println!("\n=== Foxhunt TLI Authentication ===\n");
println!("\n=== Foxhunt FXT Authentication ===\n");
// Prompt for username
print!("Username: ");

View File

@@ -1,6 +1,6 @@
//! TLI authentication module
//! FXT authentication module
//!
//! Provides JWT-based authentication for TLI connections to the API Gateway,
//! Provides JWT-based authentication for FXT connections to the API Gateway,
//! including secure token storage, automatic refresh, and gRPC interceptors.
pub mod encryption;

View File

@@ -1,6 +1,6 @@
//! Configuration file support for TLI
//! Configuration file support for FXT
//!
//! This module provides configuration file management for TLI client settings.
//! This module provides configuration file management for FXT client settings.
//! Configuration is loaded from `~/.foxhunt/config.toml` and can be overridden
//! by CLI arguments (following standard CLI precedence).
//!
@@ -77,9 +77,9 @@ impl Default for BrokerConfig {
}
}
/// TLI configuration structure
/// FXT configuration structure
///
/// Contains all configurable settings for the TLI client application.
/// Contains all configurable settings for the FXT client application.
/// Settings can be loaded from `~/.foxhunt/config.toml` and overridden
/// by CLI arguments or environment variables.
#[derive(Debug, Serialize, Deserialize)]

View File

@@ -1,10 +1,10 @@
//! Error types for TLI
//! Error types for FXT
use thiserror::Error;
/// Comprehensive error type for TLI operations
/// Comprehensive error type for FXT operations
///
/// Represents all possible errors that can occur in the TLI client system,
/// Represents all possible errors that can occur in the FXT client system,
/// including network connectivity, configuration, validation, and protocol errors.
#[derive(Error, Debug)]
pub enum TliError {
@@ -25,7 +25,7 @@ pub enum TliError {
/// Dashboard rendering or UI component errors
///
/// Occurs when terminal UI components fail to render, update, or handle
/// user input properly in the TLI dashboard interface.
/// user input properly in the FXT dashboard interface.
#[error("Dashboard error: {0}")]
Dashboard(String),
@@ -79,9 +79,9 @@ pub enum TliError {
Other(String),
}
/// Result type alias for TLI operations
/// Result type alias for FXT operations
///
/// Standard Result type using `TliError` as the error variant.
///
/// Used throughout the TLI codebase for consistent error handling.
/// Used throughout the FXT codebase for consistent error handling.
pub type TliResult<T> = Result<T, TliError>;

View File

@@ -47,7 +47,7 @@ impl FoxhuntClient {
let channel = endpoint.connect_lazy();
// Auth interceptor: reads cached JWT from ~/.config/foxhunt-tli/tokens/
// Auth interceptor: reads cached JWT from ~/.config/foxhunt-fxt/tokens/
// and injects "Authorization: Bearer <token>" on every RPC.
// If no token is cached, requests proceed without auth (allows login).
let storage = FileTokenStorage::new()?;

View File

@@ -1,6 +1,6 @@
//! Agent Commands Integration Tests
//!
//! Test suite for `tli agent` commands including portfolio allocation.
//! Test suite for `fxt agent` commands including portfolio allocation.
//! Uses TDD approach with tests written before implementation.
// Suppress false-positive unused_crate_dependencies warnings

View File

@@ -1,7 +1,7 @@
//! TLI CLI Integration Tests
//! FXT CLI Integration Tests
//!
//! Tests CLI argument parsing, command routing, and error handling for the TLI binary.
//! These tests use `assert_cmd` to invoke the TLI binary and verify behavior.
//! Tests CLI argument parsing, command routing, and error handling for the FXT binary.
//! These tests use `assert_cmd` to invoke the FXT binary and verify behavior.
// Suppress false-positive unused_crate_dependencies warnings
// dev-dependencies are shared across ALL test targets in the crate
@@ -11,10 +11,10 @@
use assert_cmd::Command;
use predicates::prelude::*;
/// Test that TLI binary can be invoked with --help
/// Test that FXT binary can be invoked with --help
#[test]
fn test_tli_help() {
let mut cmd = Command::cargo_bin("tli").unwrap();
fn test_fxt_help() {
let mut cmd = Command::cargo_bin("fxt").unwrap();
cmd.arg("--help")
.assert()
.success()
@@ -28,7 +28,7 @@ fn test_tli_help() {
/// Test tune command help output
#[test]
fn test_tune_help() {
let mut cmd = Command::cargo_bin("tli").unwrap();
let mut cmd = Command::cargo_bin("fxt").unwrap();
cmd.arg("tune")
.arg("--help")
.assert()
@@ -41,7 +41,7 @@ fn test_tune_help() {
/// Test tune start command help
#[test]
fn test_tune_start_help() {
let mut cmd = Command::cargo_bin("tli").unwrap();
let mut cmd = Command::cargo_bin("fxt").unwrap();
cmd.arg("tune")
.arg("start")
.arg("--help")
@@ -54,7 +54,7 @@ fn test_tune_start_help() {
/// Test tune status command help
#[test]
fn test_tune_status_help() {
let mut cmd = Command::cargo_bin("tli").unwrap();
let mut cmd = Command::cargo_bin("fxt").unwrap();
cmd.arg("tune")
.arg("status")
.arg("--help")
@@ -66,7 +66,7 @@ fn test_tune_status_help() {
/// Test auth command help output
#[test]
fn test_auth_help() {
let mut cmd = Command::cargo_bin("tli").unwrap();
let mut cmd = Command::cargo_bin("fxt").unwrap();
cmd.arg("auth")
.arg("--help")
.assert()
@@ -79,7 +79,7 @@ fn test_auth_help() {
/// Test auth login command help
#[test]
fn test_auth_login_help() {
let mut cmd = Command::cargo_bin("tli").unwrap();
let mut cmd = Command::cargo_bin("fxt").unwrap();
cmd.arg("auth")
.arg("login")
.arg("--help")
@@ -91,7 +91,7 @@ fn test_auth_login_help() {
/// Test auth status command (no authentication required)
#[test]
fn test_auth_status_no_auth() {
let mut cmd = Command::cargo_bin("tli").unwrap();
let mut cmd = Command::cargo_bin("fxt").unwrap();
cmd.arg("auth")
.arg("status")
.assert()
@@ -102,7 +102,7 @@ fn test_auth_status_no_auth() {
/// Test auth logout command (no authentication required)
#[test]
fn test_auth_logout_no_auth() {
let mut cmd = Command::cargo_bin("tli").unwrap();
let mut cmd = Command::cargo_bin("fxt").unwrap();
cmd.arg("auth")
.arg("logout")
.assert()
@@ -114,7 +114,7 @@ fn test_auth_logout_no_auth() {
/// This test expects failure when not authenticated
#[test]
fn test_tune_requires_auth() {
let mut cmd = Command::cargo_bin("tli").unwrap();
let mut cmd = Command::cargo_bin("fxt").unwrap();
cmd.arg("tune")
.arg("status")
.arg("--job-id")
@@ -127,7 +127,7 @@ fn test_tune_requires_auth() {
/// Test environment variable support for API Gateway URL
#[test]
fn test_env_var_api_gateway_url() {
let mut cmd = Command::cargo_bin("tli").unwrap();
let mut cmd = Command::cargo_bin("fxt").unwrap();
cmd.env("API_GATEWAY_URL", "http://test.example.com:50051")
.arg("--help")
.assert()
@@ -137,8 +137,8 @@ fn test_env_var_api_gateway_url() {
/// Test environment variable support for log level
#[test]
fn test_env_var_log_level() {
let mut cmd = Command::cargo_bin("tli").unwrap();
cmd.env("TLI_LOG_LEVEL", "debug")
let mut cmd = Command::cargo_bin("fxt").unwrap();
cmd.env("FXT_LOG_LEVEL", "debug")
.arg("--help")
.assert()
.success();
@@ -147,7 +147,7 @@ fn test_env_var_log_level() {
/// Test CLI flag precedence over environment variables
#[test]
fn test_cli_flag_precedence() {
let mut cmd = Command::cargo_bin("tli").unwrap();
let mut cmd = Command::cargo_bin("fxt").unwrap();
cmd.env("API_GATEWAY_URL", "http://env.example.com")
.arg("--api-gateway-url")
.arg("http://cli.example.com")
@@ -159,7 +159,7 @@ fn test_cli_flag_precedence() {
/// Test invalid command
#[test]
fn test_invalid_command() {
let mut cmd = Command::cargo_bin("tli").unwrap();
let mut cmd = Command::cargo_bin("fxt").unwrap();
cmd.arg("invalid_command")
.assert()
.failure()
@@ -169,7 +169,7 @@ fn test_invalid_command() {
/// Test tune start with invalid model type
#[test]
fn test_tune_start_invalid_model() {
let mut cmd = Command::cargo_bin("tli").unwrap();
let mut cmd = Command::cargo_bin("fxt").unwrap();
cmd.arg("tune")
.arg("start")
.arg("--model")
@@ -183,7 +183,7 @@ fn test_tune_start_invalid_model() {
/// Test tune start missing required argument
#[test]
fn test_tune_start_missing_trials() {
let mut cmd = Command::cargo_bin("tli").unwrap();
let mut cmd = Command::cargo_bin("fxt").unwrap();
cmd.arg("tune")
.arg("start")
.arg("--model")
@@ -197,7 +197,7 @@ fn test_tune_start_missing_trials() {
/// Test tune status with malformed UUID
#[test]
fn test_tune_status_invalid_uuid() {
let mut cmd = Command::cargo_bin("tli").unwrap();
let mut cmd = Command::cargo_bin("fxt").unwrap();
cmd.arg("tune")
.arg("status")
.arg("--job-id")
@@ -213,7 +213,7 @@ fn test_tune_status_invalid_uuid() {
#[test]
#[ignore = "Ignored because it tries to launch terminal UI"]
fn test_dashboard_command() {
let mut cmd = Command::cargo_bin("tli").unwrap();
let mut cmd = Command::cargo_bin("fxt").unwrap();
cmd.arg("dashboard")
.timeout(std::time::Duration::from_secs(2))
.assert();
@@ -223,17 +223,17 @@ fn test_dashboard_command() {
/// Test version flag
#[test]
fn test_version_flag() {
let mut cmd = Command::cargo_bin("tli").unwrap();
let mut cmd = Command::cargo_bin("fxt").unwrap();
cmd.arg("--version")
.assert()
.success()
.stdout(predicate::str::contains("tli"));
.stdout(predicate::str::contains("fxt"));
}
/// Test that all valid tune models are accepted by help
#[test]
fn test_tune_valid_models_in_help() {
let mut cmd = Command::cargo_bin("tli").unwrap();
let mut cmd = Command::cargo_bin("fxt").unwrap();
cmd.arg("tune")
.arg("start")
.arg("--help")
@@ -245,7 +245,7 @@ fn test_tune_valid_models_in_help() {
/// Test tune best command help
#[test]
fn test_tune_best_help() {
let mut cmd = Command::cargo_bin("tli").unwrap();
let mut cmd = Command::cargo_bin("fxt").unwrap();
cmd.arg("tune")
.arg("best")
.arg("--help")
@@ -258,7 +258,7 @@ fn test_tune_best_help() {
/// Test tune stop command help
#[test]
fn test_tune_stop_help() {
let mut cmd = Command::cargo_bin("tli").unwrap();
let mut cmd = Command::cargo_bin("fxt").unwrap();
cmd.arg("tune")
.arg("stop")
.arg("--help")
@@ -271,7 +271,7 @@ fn test_tune_stop_help() {
/// Test multiple CLI flags together
#[test]
fn test_multiple_cli_flags() {
let mut cmd = Command::cargo_bin("tli").unwrap();
let mut cmd = Command::cargo_bin("fxt").unwrap();
cmd.arg("--api-gateway-url")
.arg("http://test.example.com")
.arg("--log-level")
@@ -284,7 +284,7 @@ fn test_multiple_cli_flags() {
/// Test auth refresh command help
#[test]
fn test_auth_refresh_help() {
let mut cmd = Command::cargo_bin("tli").unwrap();
let mut cmd = Command::cargo_bin("fxt").unwrap();
cmd.arg("auth")
.arg("refresh")
.arg("--help")

View File

@@ -40,7 +40,7 @@ async fn debug_file_storage() -> Result<()> {
let token_dir = std::env::var("HOME")
.or_else(|_| std::env::var("USERPROFILE"))
.expect("Cannot find home directory")
+ "/.config/foxhunt-tli/tokens";
+ "/.config/foxhunt-fxt/tokens";
println!("\n3. Debug file system:");
println!(" Token dir: {}", token_dir);

View File

@@ -1,13 +1,13 @@
//! TLI Authentication Integration Test
//! FXT Authentication Integration Test
//!
//! Validates TLI client authentication flow with API Gateway:
//! Validates FXT client authentication flow with API Gateway:
//! 1. JWT token generation and storage in OS keyring
//! 2. gRPC authentication interceptor
//! 3. Token refresh mechanism
//! 4. MFA flow (TOTP enrollment and verification)
//! 5. Connection to API Gateway with JWT Bearer tokens
//!
//! **Wave 73 Agent 5: TLI Client Integration Testing**
//! **Wave 73 Agent 5: FXT Client Integration Testing**
#![allow(unused_crate_dependencies)]
@@ -198,7 +198,7 @@ async fn test_grpc_auth_interceptor() -> Result<()> {
async fn test_keyring_token_storage() -> Result<()> {
println!("\n=== Test: OS Keyring Token Storage ===");
let storage = KeyringTokenStorage::new("foxhunt-tli-test".to_string(), "test_user".to_string());
let storage = KeyringTokenStorage::new("foxhunt-fxt-test".to_string(), "test_user".to_string());
// Clear any existing tokens
let _ = storage.remove_refresh_token();
@@ -399,10 +399,10 @@ async fn test_connection_manager() -> Result<()> {
Ok(())
}
/// Test: TLI client builder with API Gateway endpoints
/// Test: FXT client builder with API Gateway endpoints
#[tokio::test]
async fn test_tli_client_builder() -> Result<()> {
println!("\n=== Test: TLI Client Builder ===");
async fn test_fxt_client_builder() -> Result<()> {
println!("\n=== Test: FXT Client Builder ===");
use fxt::client::{
backtesting_client::BacktestingClientConfig, connection_manager::ConnectionConfig,
@@ -435,11 +435,11 @@ async fn test_tli_client_builder() -> Result<()> {
.with_backtesting_config(BacktestingClientConfig::default())
.with_ml_training_config(MLTrainingClientConfig::default());
println!("TLI client builder configured with 3 services via API Gateway");
println!("FXT client builder configured with 3 services via API Gateway");
let client_suite = builder.build().await?;
println!("TLI client suite built successfully");
println!("FXT client suite built successfully");
println!(
" Trading client: {}",
client_suite.trading_client.is_some()
@@ -552,10 +552,10 @@ async fn test_full_authentication_flow() -> Result<()> {
Ok(())
}
/// Summary test: Report TLI authentication capabilities
/// Summary test: Report FXT authentication capabilities
#[test]
fn test_tli_auth_capabilities_summary() {
println!("\n=== TLI Authentication Capabilities ===");
fn test_fxt_auth_capabilities_summary() {
println!("\n=== FXT Authentication Capabilities ===");
println!("✓ JWT token generation and validation");
println!("✓ OS keyring integration for secure token storage:");
println!(" • macOS: Keychain");
@@ -570,12 +570,12 @@ fn test_tli_auth_capabilities_summary() {
println!("✓ Connection pooling and statistics tracking");
println!("✓ Multi-service client builder (Trading, Backtesting, ML Training)");
println!("\n=== Authentication Flow ===");
println!("1. User provides credentials → TLI calls API Gateway login endpoint");
println!("1. User provides credentials → FXT calls API Gateway login endpoint");
println!("2. API Gateway validates credentials → Returns JWT access + refresh tokens");
println!("3. TLI stores refresh token in OS keyring (production) or memory (dev)");
println!("4. TLI adds 'Authorization: Bearer <token>' to all gRPC requests");
println!("5. Before expiration, TLI refreshes access token using refresh token");
println!("6. On logout, TLI clears all tokens from memory and keyring");
println!("3. FXT stores refresh token in OS keyring (production) or memory (dev)");
println!("4. FXT adds 'Authorization: Bearer <token>' to all gRPC requests");
println!("5. Before expiration, FXT refreshes access token using refresh token");
println!("6. On logout, FXT clears all tokens from memory and keyring");
println!("\n=== API Gateway Endpoints ===");
println!("• API Gateway: https://localhost:50050 (all services proxied)");
println!("• Trading Service: Accessed via API Gateway");
@@ -589,7 +589,7 @@ fn test_tli_auth_capabilities_summary() {
println!("✓ Silent login flow");
println!("✓ Token refresh mechanism");
println!("✓ Connection manager");
println!("TLI client builder");
println!("FXT client builder");
println!("✓ MFA TOTP validation");
println!("✓ Full authentication flow integration");
}

View File

@@ -1,11 +1,11 @@
//! Integration tests disabled - needs refactoring after client architecture changes
//!
//! These tests reference old client types and configurations that were removed
//! when TLI was refactored to be a pure client without database dependencies.
//! when FXT was refactored to be a pure client without database dependencies.
//!
//! To re-enable:
//! 1. Update imports to use correct client module paths
//! 2. Remove database-related tests (TLI is pure client)
//! 2. Remove database-related tests (FXT is pure client)
//! 3. Use mock gRPC servers instead of direct database access
//! 4. Update config field references to match current TradingClientConfig

View File

@@ -1,12 +1,12 @@
//! TDD Tests for TLI ML Trading Commands
//! TDD Tests for FXT ML Trading Commands
//!
//! RED Phase: These tests are EXPECTED TO FAIL initially.
//! The implementation will be created after these tests are written.
//!
//! Test Coverage:
//! - `tli trade ml submit` - Submit ML-generated order
//! - `tli trade ml predictions` - View prediction history
//! - `tli trade ml performance` - View model performance
//! - `fxt trade ml submit` - Submit ML-generated order
//! - `fxt trade ml predictions` - View prediction history
//! - `fxt trade ml performance` - View model performance
//! - Error handling for missing required arguments
//! - Model filtering and limit options
@@ -52,7 +52,7 @@ mod test_auth {
// Create isolated temp directory for this test run
let temp_dir =
std::env::temp_dir().join(format!("foxhunt_tli_test_{}", std::process::id()));
std::env::temp_dir().join(format!("foxhunt_fxt_test_{}", std::process::id()));
// Create FileTokenStorage in temp directory
let storage = FileTokenStorage::with_directory(temp_dir.clone())
@@ -124,9 +124,9 @@ mod test_auth {
/// redirect FileTokenStorage to that temp directory.
///
/// Also sets FOXHUNT_ENCRYPTION_KEY to ensure consistent encryption/decryption
/// between test process and TLI binary process.
/// between test process and FXT binary process.
///
/// This approach allows the actual TLI binary to find the test tokens
/// This approach allows the actual FXT binary to find the test tokens
/// without code modifications.
///
/// # Returns
@@ -138,15 +138,15 @@ mod test_auth {
let original_encryption_key = std::env::var("FOXHUNT_ENCRYPTION_KEY").ok();
// Generate a consistent encryption key for this test run
// This ensures both the test process and TLI binary use the same key
// This ensures both the test process and FXT binary use the same key
let encryption_key = hex::encode([42u8; 32]); // Simple deterministic key for tests
std::env::set_var("FOXHUNT_ENCRYPTION_KEY", &encryption_key);
// Create temp directory structure: temp/foxhunt-tli/tokens/
let temp_base =
std::env::temp_dir().join(format!("foxhunt_tli_config_{}", std::process::id()));
std::env::temp_dir().join(format!("foxhunt_fxt_config_{}", std::process::id()));
let config_home = temp_base.clone();
let token_dir = config_home.join("foxhunt-tli").join("tokens");
let token_dir = config_home.join("foxhunt-fxt").join("tokens");
std::fs::create_dir_all(&token_dir)
.context("Failed to create token directory structure")?;
@@ -216,12 +216,12 @@ mod test_auth {
/// Expected to FAIL - command doesn't exist yet
#[test]
#[serial]
fn test_tli_trade_ml_submit_command() {
fn test_fxt_trade_ml_submit_command() {
// Setup test authentication
let (temp_base, original_config, original_key) = test_auth::setup_test_auth_with_env_override()
.expect("Failed to setup test authentication");
let mut cmd = Command::cargo_bin("tli").unwrap();
let mut cmd = Command::cargo_bin("fxt").unwrap();
cmd.arg("trade")
.arg("ml")
@@ -246,12 +246,12 @@ fn test_tli_trade_ml_submit_command() {
/// Expected to FAIL - command doesn't exist yet
#[serial]
#[test]
fn test_tli_trade_ml_predictions_command() {
fn test_fxt_trade_ml_predictions_command() {
// Setup test authentication
let (temp_base, original_config, original_key) = test_auth::setup_test_auth_with_env_override()
.expect("Failed to setup test authentication");
let mut cmd = Command::cargo_bin("tli").unwrap();
let mut cmd = Command::cargo_bin("fxt").unwrap();
cmd.arg("trade")
.arg("ml")
@@ -276,12 +276,12 @@ fn test_tli_trade_ml_predictions_command() {
/// Expected to FAIL - command doesn't exist yet
#[serial]
#[test]
fn test_tli_trade_ml_performance_command() {
fn test_fxt_trade_ml_performance_command() {
// Setup test authentication
let (temp_base, original_config, original_key) = test_auth::setup_test_auth_with_env_override()
.expect("Failed to setup test authentication");
let mut cmd = Command::cargo_bin("tli").unwrap();
let mut cmd = Command::cargo_bin("fxt").unwrap();
cmd.arg("trade").arg("ml").arg("performance");
@@ -300,12 +300,12 @@ fn test_tli_trade_ml_performance_command() {
/// Expected to FAIL - command doesn't exist yet
#[serial]
#[test]
fn test_tli_trade_ml_submit_with_model_filter() {
fn test_fxt_trade_ml_submit_with_model_filter() {
// Setup test authentication
let (temp_base, original_config, original_key) = test_auth::setup_test_auth_with_env_override()
.expect("Failed to setup test authentication");
let mut cmd = Command::cargo_bin("tli").unwrap();
let mut cmd = Command::cargo_bin("fxt").unwrap();
cmd.arg("trade")
.arg("ml")
@@ -328,12 +328,12 @@ fn test_tli_trade_ml_submit_with_model_filter() {
/// Expected to FAIL - command doesn't exist yet
#[serial]
#[test]
fn test_tli_trade_ml_predictions_with_filters() {
fn test_fxt_trade_ml_predictions_with_filters() {
// Setup test authentication
let (temp_base, original_config, original_key) = test_auth::setup_test_auth_with_env_override()
.expect("Failed to setup test authentication");
let mut cmd = Command::cargo_bin("tli").unwrap();
let mut cmd = Command::cargo_bin("fxt").unwrap();
cmd.arg("trade")
.arg("ml")
@@ -357,8 +357,8 @@ fn test_tli_trade_ml_predictions_with_filters() {
/// RED TEST 6: Error handling - missing required symbol argument
/// Expected to FAIL - command doesn't exist yet
#[test]
fn test_tli_trade_ml_submit_requires_symbol() {
let mut cmd = Command::cargo_bin("tli").unwrap();
fn test_fxt_trade_ml_submit_requires_symbol() {
let mut cmd = Command::cargo_bin("fxt").unwrap();
cmd.arg("trade")
.arg("ml")
@@ -375,8 +375,8 @@ fn test_tli_trade_ml_submit_requires_symbol() {
/// RED TEST 7: Error handling - missing required account argument
/// Expected to FAIL - command doesn't exist yet
#[test]
fn test_tli_trade_ml_submit_requires_account() {
let mut cmd = Command::cargo_bin("tli").unwrap();
fn test_fxt_trade_ml_submit_requires_account() {
let mut cmd = Command::cargo_bin("fxt").unwrap();
cmd.arg("trade")
.arg("ml")
@@ -394,12 +394,12 @@ fn test_tli_trade_ml_submit_requires_account() {
/// Expected to FAIL - command doesn't exist yet
#[serial]
#[test]
fn test_tli_trade_ml_performance_with_model_filter() {
fn test_fxt_trade_ml_performance_with_model_filter() {
// Setup test authentication
let (temp_base, original_config, original_key) = test_auth::setup_test_auth_with_env_override()
.expect("Failed to setup test authentication");
let mut cmd = Command::cargo_bin("tli").unwrap();
let mut cmd = Command::cargo_bin("fxt").unwrap();
cmd.arg("trade")
.arg("ml")
@@ -420,12 +420,12 @@ fn test_tli_trade_ml_performance_with_model_filter() {
/// Expected to FAIL - command doesn't exist yet
#[test]
#[serial]
fn test_tli_trade_ml_submit_ensemble_mode() {
fn test_fxt_trade_ml_submit_ensemble_mode() {
// Setup test authentication
let (temp_base, original_config, original_key) = test_auth::setup_test_auth_with_env_override()
.expect("Failed to setup test authentication");
let mut cmd = Command::cargo_bin("tli").unwrap();
let mut cmd = Command::cargo_bin("fxt").unwrap();
cmd.arg("trade")
.arg("ml")

View File

@@ -1,12 +1,12 @@
//! Comprehensive test suite for TLI system - DISABLED
//! Comprehensive test suite for FXT system - DISABLED
//!
//! All test modules have been disabled pending refactoring after client architecture changes.
//! Tests referenced old types and configurations that were removed when TLI was refactored
//! Tests referenced old types and configurations that were removed when FXT was refactored
//! to be a pure client without database dependencies.
//!
//! To re-enable:
//! 1. Update all imports to use correct client module paths
//! 2. Remove database-related tests (TLI is pure client)
//! 2. Remove database-related tests (FXT is pure client)
//! 3. Use mock gRPC servers instead of direct database access
//! 4. Update config field references to match current client configs
#![allow(unused_crate_dependencies)]
@@ -18,7 +18,7 @@ pub mod property_tests;
pub mod test_monitoring;
pub mod unit_tests;
// E2E tests for TLI training commands
// E2E tests for FXT training commands
#[cfg(test)]
pub mod e2e;