Summary
Fix semantic cache clear behavior to remove JSON cache artifacts as well as legacy pickle files.
Why
Cache save/load favors JSON, but clear logic currently targets only one path pattern.
Tasks
- Update clear flow in
nexum_ai/optimizer.py to remove active cache format files consistently
- Handle
.json, .json.backup, and legacy .pkl safely
- Add/adjust tests in
nexum_ai/tests/
Acceptance Criteria
- Clearing cache removes persisted cache artifacts
- No exceptions when files are already absent
- Tests validate file cleanup behavior
Summary
Fix semantic cache clear behavior to remove JSON cache artifacts as well as legacy pickle files.
Why
Cache save/load favors JSON, but clear logic currently targets only one path pattern.
Tasks
nexum_ai/optimizer.pyto remove active cache format files consistently.json,.json.backup, and legacy.pklsafelynexum_ai/tests/Acceptance Criteria