# Legacy 256-Feature Test Cleanup Checklist **Start Date**: __________ (Recommended: Week 2 after production deployment) **Completion Target**: __________ (Before ML retraining) **Estimated Effort**: 8-10 hours **Priority**: MEDIUM --- ## Phase 1: Critical Feature Tests (7 hours) ### Task 1: Update test_extract_256_dim_features.rs (2h) - [ ] Create branch: `git checkout -b cleanup/legacy-256-tests` - [ ] Open file: `ml/tests/test_extract_256_dim_features.rs` - [ ] Line 40-48: Change assertions `256 → 225` - [ ] Line 9: Rename test function `test_extract_256_dim_features → test_extract_225_dim_features` - [ ] Line 1-4: Update file header documentation - [ ] Run test: `cargo test --test test_extract_256_dim_features` - [ ] Verify: All tests pass - [ ] Commit: `git commit -am "Update test_extract_256_dim_features.rs to 225 features"` ### Task 2: Update dbn_256_feature_validation.rs (3h) - [ ] Open file: `ml/tests/dbn_256_feature_validation.rs` - [ ] Line 1-21: Update file header (256 → 225) - [ ] Line 172: Change loop bounds `0..256 → 0..225` - [ ] Line 230, 242, 268, 294: Update assertions (256 → 225) - [ ] Line 313, 331, 359: Update feature count assertions - [ ] Line 411: Update performance targets - [ ] Run test: `cargo test --test dbn_256_feature_validation` - [ ] Verify: All tests pass with real DBN data - [ ] Commit: `git commit -am "Update dbn_256_feature_validation.rs to 225 features"` ### Task 3: Update test_dbn_sequence_256_features.rs (2h) - [ ] Open file: `ml/tests/test_dbn_sequence_256_features.rs` - [ ] Line 1-4: Update file header (256 → 225) - [ ] Line 38: Change default d_model `256 → 225` - [ ] Line 69, 98: Update shape documentation - [ ] Line 237-259: Add multi-d_model test `[128, 225, 256, 512]` - [ ] Run test: `cargo test --test test_dbn_sequence_256_features` - [ ] Verify: Backward compatibility with d_model=256 still works - [ ] Commit: `git commit -am "Update test_dbn_sequence_256_features.rs to default 225, add multi-d_model test"` --- ## Phase 2: Documentation Update (1 hour, parallel) ### Task 4: Global Comment Update - [ ] Find all files with 256 feature references: ```bash grep -r "256.*feature" ml/tests/ --include="*.rs" -l > /tmp/docs_to_update.txt ``` - [ ] For each file in `/tmp/docs_to_update.txt`: - [ ] Open file - [ ] Search: `256.*feature|256.*dim|256-dimensional` - [ ] Replace: `225 features|225-dim|225-dimensional` (in comments only) - [ ] Skip: Model config files (keep d_model=256) - [ ] Skip: Non-feature uses (buffer sizes, layer dimensions) - [ ] Files to update (24 total): - [ ] ml/tests/feature_cache_tests.rs - [ ] ml/tests/microstructure_tests.rs - [ ] ml/tests/alternative_bars_integration_test.rs - [ ] ml/tests/calibration_dataset_test.rs - [ ] ml/tests/dbn_feature_config_test.rs - [ ] ml/tests/e2e_ensemble_integration.rs - [ ] ml/tests/model_registry_tests.rs - [ ] ml/tests/model_validation_comprehensive.rs - [ ] ml/tests/ppo_gae_test.rs - [ ] ml/tests/ppo_training_pipeline_test.rs - [ ] ml/tests/test_feature_cache_service.rs - [ ] ml/tests/test_tft_cuda_layernorm.rs - [ ] ml/tests/tft_attention_gradient_flow.rs - [ ] ml/tests/tft_attention_int8_quantization_test.rs - [ ] ml/tests/tft_e2e_training.rs - [ ] ml/tests/tft_inference_latency_benchmark.rs - [ ] ml/tests/tft_int8_inference_integration_test.rs - [ ] ml/tests/tft_int8_memory_benchmark_test.rs - [ ] ml/tests/tft_varmap_checkpoint_test.rs - [ ] ml/tests/training_chaos_tests.rs - [ ] ml/tests/wave_d_normalization_integration_test.rs - [ ] ml/tests/mamba_test.rs - [ ] ml/tests/mamba2_hardware_aware_test.rs - [ ] ml/tests/ensemble_4_model_trainable_integration.rs - [ ] Commit: `git commit -am "Update documentation: 256 → 225 features in comments"` --- ## Phase 3: Validation (2 hours) ### Task 5: Run Updated Test Suite - [ ] Run all updated tests: ```bash cargo test --test test_extract_256_dim_features -- --nocapture cargo test --test dbn_256_feature_validation -- --nocapture cargo test --test test_dbn_sequence_256_features -- --nocapture ``` - [ ] Verify output: - [ ] All tests pass - [ ] Feature vectors have 225 dimensions - [ ] Real data validation succeeds (ES.FUT, NQ.FUT, 6E.FUT, ZN.FUT) - [ ] Backward compatibility with d_model=256 works ### Task 6: Verify Feature Extraction with Real DBN Data - [ ] Run full ML test suite: ```bash cargo test -p ml --features "test-utils" | grep -i "feature" ``` - [ ] Check results: - [ ] Test pass rate ≥99% (target: 2,062/2,074 or better) - [ ] No 256-dimension assertion failures - [ ] All feature extraction tests use 225 dimensions - [ ] Model config tests still pass (d_model=256 valid) ### Task 7: Update Documentation - [ ] Update `WAVE_D_VALIDATION_COMPLETE.md`: ```bash echo "## Legacy Test Cleanup ($(date +%Y-%m-%d))" >> WAVE_D_VALIDATION_COMPLETE.md echo "- Updated 3 critical test files (1,209 lines) to 225 features" >> WAVE_D_VALIDATION_COMPLETE.md echo "- Updated 24 documentation files with comment corrections" >> WAVE_D_VALIDATION_COMPLETE.md echo "- Test suite: 100% pass rate, backward compatible with d_model=256" >> WAVE_D_VALIDATION_COMPLETE.md ``` - [ ] Update `CLAUDE.md` if needed (add completion note) - [ ] Update `LEGACY_256_TEST_CLEANUP.md` status to COMPLETE --- ## Final Validation Checklist - [ ] All 3 critical test files pass with 225 features - [ ] Feature extraction produces 225-dimensional vectors - [ ] DBN validation tests succeed for all symbols - [ ] DbnSequenceLoader supports d_model=225 (default) - [ ] Backward compatibility: d_model=256 still works - [ ] Test suite still at 99%+ pass rate - [ ] No regression in model config tests - [ ] Documentation updated - [ ] Git branch merged: ```bash git checkout main git merge cleanup/legacy-256-tests git branch -d cleanup/legacy-256-tests ``` --- ## Completion Sign-off **Completed by**: __________ **Completion date**: __________ **Test pass rate**: __________ **Issues encountered**: __________ **Notes**: __________ --- ## Reference **Full Documentation**: `/home/jgrusewski/Work/foxhunt/LEGACY_256_TEST_CLEANUP.md` **Wave D Validation**: `/home/jgrusewski/Work/foxhunt/WAVE_D_VALIDATION_COMPLETE.md` **Test Status**: 99.4% pass rate (2,062/2,074) before cleanup