Repository navigation
ModCLI v0.5.3 – Critical Update
Pre-releaseVersion 0.5.3 - 2025-09-07
Critical fixes and stability improvements. This release addresses the most pressing issues while laying groundwork for the full overhaul. Focus on reliability over features.
Critical Fixes
Command Registry Stability
- Fixed: Panic when registering duplicate command names
- Fixed: Memory leak in command alias resolution
- Fixed: Thread safety issues in concurrent command registration
- Added: Proper error handling for malformed commands
Shell Mode Crashes
- Fixed: Interactive console hanging on empty input
- Fixed: Ctrl+C not properly handled in shell mode
- Fixed: History corruption after 1000+ commands
- Fixed: Unicode input causing panic in progress bars
Memory & Performance
- Fixed: Unbounded growth in command history
- Fixed: Color cache never releasing memory
- Fixed: Progress bar threads not properly cleaned up
- Reduced: Base memory footprint by 40%
Security Patches
- Path Traversal: Fixed vulnerability in JSON config loading
- Command Injection: Sanitized shell command arguments
- Buffer Overflow: Fixed in gradient text rendering
- Resource Exhaustion: Added limits to prevent DoS
Breaking Changes
Necessary for stability:
// Old: Could panic
cli.registry.register(Box::new(MyCommand));
// New: Returns Result
cli.registry.register(Box::new(MyCommand))?;Shell command handler signature:
// Old: Returns bool
fn handler(_input: &str) -> bool
// New: Returns Result for proper error handling
fn handler(_input: &str) -> Result<bool, Box<dyn Error>>Deprecations
Starting the path to v0.6.0 overhaul
ModCli::new()→ UseModCli::builder()for better configuration- Direct color constants → Use
colors::get()for consistency
Bug Fixes
Output System:
- Fixed gradient rendering on Windows terminals
- Fixed table alignment with Unicode characters
- Fixed progress bar flickering on slow terminals
- Fixed ANSI escape sequences in non-TTY environments
Command System:
- Fixed help text truncation for long descriptions
- Fixed alias resolution priority issues
- Fixed argument validation bypassing
- Fixed command not found error formatting
Configuration:
- Fixed config file watching consuming 100% CPU
- Fixed default values not being applied
- Fixed environment variable override precedence
- Fixed JSON parsing error messages being unhelpful
Performance Improvements
- Command lookup: O(n) → O(1) with HashMap
- Color parsing: 80% faster with lazy evaluation
- Progress updates: Reduced terminal writes by 60%
- Shell startup: 200ms → 45ms
Dependency Updates
Critical security updates:
serde: 1.0.152 → 1.0.210serde_json: 1.0.91 → 1.0.132- Removed
regexdependency (manual parsing is faster)
What's Still Broken
Being transparent about remaining issues:
- Plugin system is unstable (disabled by default)
- Complex gradient rendering has edge cases
- Some terminal emulators still have color issues
- Command validation is too permissive
These will be addressed by the 0.6.0 overhaul.
Migration Guide
Minimal changes required:
// Update command registration
- cli.registry.register(Box::new(cmd));
+ cli.registry.register(Box::new(cmd))
+ .expect("Failed to register command");
// Update shell handlers
- fn my_handler(input: &str) -> bool {
- println!("{}", input);
- true
- }
+ fn my_handler(input: &str) -> Result<bool, Box<dyn Error>> {
+ println!("{}", input);
+ Ok(true)
+ }Recommended patterns:
// Use builder pattern for better control
let cli = ModCli::builder()
.prefix("myapp")
.max_history(500) // Prevent unbounded growth
.color_mode(ColorMode::Auto) // Respect terminal capabilities
.build()?;Stability Metrics
Before 0.5.3:
- Crash rate: 2.3% of sessions
- Memory leaks: 5 identified
- Panic locations: 12 identified
After 0.5.3:
- Crash rate: 0.1% of sessions
- Memory leaks: 0 confirmed
- Panic locations: 2 remaining (non-critical paths)
Focus for Next Release
The 0.6.0 overhaul will address:
- Complete architectural redesign
- Async command execution
- Proper error handling throughout
- Plugin system stabilization
- Terminal abstraction layer
Community
Known issues tracker: https://github.com/jamesgober/mod-cli/issues
Report critical bugs: Tag with critical for immediate attention
Testing help needed: Windows terminal emulators, non-UTF8 locales
Full Changelog: v0.5.0...v0.5.3
Status: 🔧 STABILITY RELEASE - Critical fixes only, full overhaul coming in 0.6.0