- Archive: 85 agent .txt files → docs/archive/agents/legacy_txt/ - Scripts: Move 110 shell scripts → scripts/ (keep deploy.sh in root) - Models: Move 18 .safetensors → ml/models/checkpoints/training_artifacts/ - Delete: 34 directories (~33GB freed) - target/, coverage_*, test artifacts - Build: Clean 14 build artifacts (.rlib, .o, .pid, binaries) - Tests: Move 14 .rs files → tests/standalone/ - SQL: Move 5 files → sql/ (keep init-db*.sql for Docker) - Wave 153: Archive to docs/archive/historical/wave153/ - Docs: Archive 9 markdown files to wave_d/reports/ and historical/ Total impact: ~34GB freed (both waves), root directory cleaned from 583 to ~40 essential files Directory count reduced from 65 to 31 (52% reduction) All historical data preserved in organized archive structure
57 lines
1.8 KiB
Bash
Executable File
57 lines
1.8 KiB
Bash
Executable File
#!/bin/bash
|
|
# Quick Fix Commands - Foxhunt Codebase Cleanup
|
|
# Total Estimated Time: 3.5 minutes
|
|
# Impact: Cosmetic improvements only, zero functional changes
|
|
|
|
set -e
|
|
|
|
echo "=========================================="
|
|
echo "Foxhunt Codebase Quick Fixes"
|
|
echo "Total Time: ~3.5 minutes"
|
|
echo "=========================================="
|
|
|
|
echo ""
|
|
echo "[1/3] Fixing 4 Clippy Deny-Level Errors (35 seconds)..."
|
|
echo "Files affected:"
|
|
echo " - services/stress_tests/src/metrics.rs"
|
|
echo " - trading-data/src/models.rs"
|
|
echo " - trading_engine/src/types/events.rs"
|
|
|
|
# Manual fixes required (clippy --fix may not handle all):
|
|
echo ""
|
|
echo "Manual fixes needed:"
|
|
echo "1. stress_tests/src/metrics.rs:144"
|
|
echo " BEFORE: let mean_u64 = (mean_micros as u64).min(u64::MAX);"
|
|
echo " AFTER: let mean_u64 = (mean_micros as u64);"
|
|
echo ""
|
|
echo "2. trading-data/src/models.rs:98"
|
|
echo " BEFORE: assert_eq!(order.quantity.to_f64(), 100000.0);"
|
|
echo " AFTER: assert_relative_eq!(order.quantity.to_f64(), 100_000.0, epsilon = 1e-6);"
|
|
echo ""
|
|
echo "3. trading_engine/src/types/events.rs (4 locations)"
|
|
echo " BEFORE: 150000.0, 100000.0, 500000.0, 400000.0"
|
|
echo " AFTER: 150_000.0, 100_000.0, 500_000.0, 400_000.0"
|
|
|
|
read -p "Press Enter after making manual fixes..."
|
|
|
|
echo ""
|
|
echo "[2/3] Formatting entire codebase (2 minutes)..."
|
|
cargo fmt --all
|
|
echo "✅ Formatting complete"
|
|
|
|
echo ""
|
|
echo "[3/3] Verifying compilation (1 minute)..."
|
|
cargo build --workspace --release --quiet
|
|
echo "✅ Compilation successful"
|
|
|
|
echo ""
|
|
echo "=========================================="
|
|
echo "✅ Quick fixes complete!"
|
|
echo "=========================================="
|
|
echo ""
|
|
echo "Next steps:"
|
|
echo "1. Review changes: git diff"
|
|
echo "2. Run tests: cargo test --workspace --lib"
|
|
echo "3. Commit: git commit -m 'chore: Apply clippy fixes and rustfmt'"
|
|
echo "4. Deploy to production"
|