🔧 Wave 33: Test Compilation Improvements - 57 errors remaining

**Progress: 1,178 → 57 test errors (95% reduction)**

## Status Summary
-  Production code: Compiles cleanly (0 errors)
- ⚠️  Test code: 57 errors remain (massive improvement)
- ⚙️  All services build successfully
- 📊 Warning count: 253 (target: <20) - AGENTS WILL FIX

## Remaining Test Errors (57 total)
### Primary Issues:
1. 23× E0308 mismatched types
2. 17× E0433 undeclared Decimal
3. 15× E0433 compliance module not found
4. 6× E0624 private method access
5. Various import and type issues

## Next Phase: Wave 33-2
Launch 10+ parallel agents to:
- Fix remaining 57 test compilation errors
- Reduce 253 warnings to <20
- Achieve 95% test coverage
- Ensure all tests pass

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
jgrusewski
2025-10-01 21:24:28 +02:00
parent bb1042b848
commit 6bd5b18465
444 changed files with 15714 additions and 11339 deletions

View File

@@ -6,7 +6,7 @@
//! targets for HFT applications. Features SIMD operations, memory pooling,
//! and cache-friendly data layouts.
// For canonical types
// For canonical types
use std::collections::VecDeque;
@@ -328,24 +328,24 @@ impl BatchProcessor {
for i in 0..result.len() {
result[i] += input[i];
}
}
},
ElementWiseOp::Multiply => {
for i in 0..result.len() {
result[i] = (result[i] * input[i]) / PRECISION_FACTOR as i64;
}
}
},
ElementWiseOp::Subtract => {
for i in 0..result.len() {
result[i] -= input[i];
}
}
},
ElementWiseOp::Divide => {
for i in 0..result.len() {
if input[i] != 0 {
result[i] = (result[i] * PRECISION_FACTOR as i64) / input[i];
}
}
}
},
}
}
@@ -369,12 +369,12 @@ impl BatchProcessor {
} else {
alpha * x
}
}
},
ActivationFunction::Sigmoid => 1.0 / (1.0 + (-x).exp()),
ActivationFunction::Tanh => x.tanh(),
ActivationFunction::Gelu => {
0.5 * x * (1.0 + (x * std::f64::consts::FRAC_2_SQRT_PI * 0.7978845608).tanh())
}
},
};
result[i] = (activated * PRECISION_FACTOR as f64) as i64;
}
@@ -402,7 +402,7 @@ impl BatchProcessor {
let total_sum = input.sum();
Ok(Array1::from_elem(1, total_sum))
}
}
},
ReductionOp::Mean => {
if let Some(ax) = axis {
if ax >= input.ndim() {
@@ -418,7 +418,7 @@ impl BatchProcessor {
let mean = input.sum() / input.len() as i64;
Ok(Array1::from_elem(1, mean))
}
}
},
ReductionOp::Max => {
if let Some(ax) = axis {
if ax >= input.ndim() {
@@ -432,7 +432,7 @@ impl BatchProcessor {
let max_val = input.iter().max().copied().unwrap_or(0);
Ok(Array1::from_elem(1, max_val))
}
}
},
ReductionOp::Min => {
if let Some(ax) = axis {
if ax >= input.ndim() {
@@ -446,7 +446,7 @@ impl BatchProcessor {
let min_val = input.iter().min().copied().unwrap_or(0);
Ok(Array1::from_elem(1, min_val))
}
}
},
}
}
}
@@ -539,10 +539,8 @@ mod tests {
let a = Array1::from_vec(vec![100, 200, 300]);
let b = Array1::from_vec(vec![50, 100, 150]);
let result = BatchProcessor::standard_element_wise_operation(
&ElementWiseOp::Add,
&[a, b],
).unwrap();
let result =
BatchProcessor::standard_element_wise_operation(&ElementWiseOp::Add, &[a, b]).unwrap();
assert_eq!(result, Array1::from_vec(vec![150, 300, 450]));
}
@@ -552,10 +550,9 @@ mod tests {
let a = Array1::from_vec(vec![100_000_000, 200_000_000, 300_000_000]);
let b = Array1::from_vec(vec![200_000_000, 300_000_000, 400_000_000]);
let result = BatchProcessor::standard_element_wise_operation(
&ElementWiseOp::Multiply,
&[a, b],
).unwrap();
let result =
BatchProcessor::standard_element_wise_operation(&ElementWiseOp::Multiply, &[a, b])
.unwrap();
// Result: 2.0, 6.0, 12.0 in fixed point
assert_eq!(result[0], 200_000_000);
@@ -568,10 +565,9 @@ mod tests {
let a = Array1::from_vec(vec![100, 200, 300]);
let b = Array1::from_vec(vec![50, 100, 150]);
let result = BatchProcessor::standard_element_wise_operation(
&ElementWiseOp::Subtract,
&[a, b],
).unwrap();
let result =
BatchProcessor::standard_element_wise_operation(&ElementWiseOp::Subtract, &[a, b])
.unwrap();
assert_eq!(result, Array1::from_vec(vec![50, 100, 150]));
}
@@ -581,10 +577,9 @@ mod tests {
let a = Array1::from_vec(vec![200_000_000, 600_000_000, 1_200_000_000]);
let b = Array1::from_vec(vec![100_000_000, 200_000_000, 300_000_000]);
let result = BatchProcessor::standard_element_wise_operation(
&ElementWiseOp::Divide,
&[a, b],
).unwrap();
let result =
BatchProcessor::standard_element_wise_operation(&ElementWiseOp::Divide, &[a, b])
.unwrap();
assert_eq!(result[0], 200_000_000); // 2.0
assert_eq!(result[1], 300_000_000); // 3.0
@@ -596,10 +591,9 @@ mod tests {
let a = Array1::from_vec(vec![100_000_000, 200_000_000]);
let b = Array1::from_vec(vec![0, 100_000_000]);
let result = BatchProcessor::standard_element_wise_operation(
&ElementWiseOp::Divide,
&[a, b],
).unwrap();
let result =
BatchProcessor::standard_element_wise_operation(&ElementWiseOp::Divide, &[a, b])
.unwrap();
// Division by zero protection
assert_eq!(result[0], 100_000_000);
@@ -608,10 +602,7 @@ mod tests {
#[test]
fn test_element_wise_empty_inputs() {
let result = BatchProcessor::standard_element_wise_operation(
&ElementWiseOp::Add,
&[],
);
let result = BatchProcessor::standard_element_wise_operation(&ElementWiseOp::Add, &[]);
assert!(result.is_err());
}
@@ -620,10 +611,7 @@ mod tests {
let a = Array1::from_vec(vec![100, 200, 300]);
let b = Array1::from_vec(vec![50, 100]); // Different size
let result = BatchProcessor::standard_element_wise_operation(
&ElementWiseOp::Add,
&[a, b],
);
let result = BatchProcessor::standard_element_wise_operation(&ElementWiseOp::Add, &[a, b]);
assert!(result.is_err());
}
@@ -664,7 +652,10 @@ mod tests {
assert_eq!(format!("{}", ActivationFunction::Sigmoid), "Sigmoid");
assert_eq!(format!("{}", ActivationFunction::Tanh), "Tanh");
assert_eq!(format!("{}", ActivationFunction::Gelu), "GELU");
assert_eq!(format!("{}", ActivationFunction::LeakyReLU { alpha: 0.01 }), "LeakyReLU(α=0.01)");
assert_eq!(
format!("{}", ActivationFunction::LeakyReLU { alpha: 0.01 }),
"LeakyReLU(α=0.01)"
);
}
#[test]