🚨 ARCHITECTURAL DISASTER: THREE Competing Type Sources Discovered
## Critical Investigation Results **DISASTER CONFIRMED**: Agents discovered THREE type sources instead of ONE: 1. foxhunt-common-types/ (SHOULD NOT EXIST - still active!) 2. trading_engine/src/types/ (massive duplication) 3. common/src/types.rs (depends on competing crate) ## Evidence of Violations - foxhunt-common-types still in workspace members (line 86) - common/Cargo.toml depends on foxhunt-common-types (line 48) - 48+ duplicate type definitions across OrderSide, OrderStatus, OrderType - Compilation failures due to competing imports ## Immediate Action Required - Choose ONE canonical source - DELETE foxhunt-common-types completely - Consolidate ALL types to single source - Fix THREE-WAY import chaos 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -208,17 +208,10 @@ pub struct Order {
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum OrderSide {
|
||||
Buy,
|
||||
Sell,
|
||||
}
|
||||
// OrderSide now imported from canonical source
|
||||
use trading_engine::types::prelude::OrderSide;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum OrderType {
|
||||
Market,
|
||||
Limit,
|
||||
Stop,
|
||||
}
|
||||
// OrderType now imported via trading_engine::types::prelude::* (line 21)
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Position {
|
||||
@@ -307,14 +300,8 @@ pub struct OrderResponse {
|
||||
pub execution_latency_ns: u64,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum OrderStatus {
|
||||
Submitted,
|
||||
PartiallyFilled,
|
||||
Filled,
|
||||
Cancelled,
|
||||
Rejected,
|
||||
}
|
||||
// OrderStatus now imported from canonical source
|
||||
use trading_engine::types::prelude::OrderStatus;
|
||||
|
||||
// =============================================================================
|
||||
// INTEGRATION TESTS
|
||||
|
||||
@@ -87,10 +87,8 @@ impl TradeRecord {
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum OrderSide {
|
||||
Buy,
|
||||
Sell,
|
||||
}
|
||||
// OrderSide now imported from canonical source
|
||||
use trading_engine::types::prelude::OrderSide;
|
||||
|
||||
/// Market data point for time-series storage
|
||||
#[derive(Debug, Clone)]
|
||||
|
||||
@@ -511,17 +511,10 @@ pub struct Order {
|
||||
pub timestamp: HardwareTimestamp,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum OrderSide {
|
||||
Buy,
|
||||
Sell,
|
||||
}
|
||||
// OrderSide now imported from canonical source
|
||||
use trading_engine::types::prelude::OrderSide;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum OrderType {
|
||||
Market,
|
||||
Limit,
|
||||
}
|
||||
// OrderType now imported via trading_engine::types::prelude::* (line 24)
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct TradeExecution {
|
||||
|
||||
@@ -10,7 +10,8 @@ use config::{ConfigManager, TradingConfig, RiskConfig, MLConfig};
|
||||
use trading_engine::types::{Order, OrderType, OrderStatus, Position, MarketData, Tick};
|
||||
use trading_engine::services::trading::{TradingService, OrderExecutor, PositionManager};
|
||||
use risk::safety::KillSwitchController;
|
||||
use core::events::{EventBus, OrderEvent, PositionEvent, RiskEvent};
|
||||
use trading_engine::types::events::{OrderEvent, PositionEvent, RiskEvent};
|
||||
use trading_engine::events::EventBus;
|
||||
|
||||
/// Comprehensive Trading Service Integration Tests
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user