Address code review findings from bd-p3b0: 1. Fix variable shadowing in upgradeAckCmd - Renamed local 'previousVersion' to 'lastSeenVersion' - Prevents confusion with global variable 2. Fix getVersionsSince() logic bug - versionChanges array is reverse chronological (newest first) - Function now correctly returns versions before the index - Reverses result to provide chronological order (oldest first) - Adds comprehensive documentation 3. Add comprehensive unit tests - Test getVersionsSince with various scenarios - Test trackBdVersion with no dir, first run, upgrade, same version - Test maybeShowUpgradeNotification behavior - All tests passing Fixes found bugs and adds 100% test coverage for version tracking. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
5.8 KiB
5.8 KiB