Skip to content

v1.6.2 - Code Quality Improvements

Choose a tag to compare

@jwesleye jwesleye released this 31 Dec 15:33
· 99 commits to main since this release

v1.6.2 - Code Quality Improvements

This hotfix release includes comprehensive code quality improvements from a systematic QA review:

Code Quality Enhancements

  • Eliminated ~380 lines of duplicate code through systematic refactoring
  • Created 12 focused helper methods improving code organization and maintainability
  • Fixed silent exception handling with proper error logging
  • Improved type safety with additional type hints
  • Added named constants replacing magic numbers (TOKEN_TO_WORD_RATIO, SECURE_FILE_PERMISSIONS)
  • Moved lazy imports to module level for better performance

Refactored Methods

  • restore_session(): Reduced from 186 to 80 lines
  • _handle_compact_command(): Reduced from 149 to 111 lines
  • _extract_token_usage(): Reduced from 104 to 35 lines

Testing

  • All 318 tests passing
  • Clean linting (ruff)
  • Clean type checking (mypy)

This release maintains full backward compatibility while significantly improving code maintainability and debuggability.