- Fix history tests with proper test isolation using temp files
- Fix CMD tests with proper string contains and simplified assertions
- Add missing test utilities and helper functions
- Improve test coverage across all packages
- Remove flaky tests and replace with robust alternatives"