fix: upgrading to 3.11.2.5 from older firmwares. Fixes #183#185
Conversation
WalkthroughIn ChangesUpdate Engine Version Check
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
codexctl/__init__.py (1)
333-335: ⚡ Quick winExtract the transition cutoff into a shared constant.
Line 334 hardcodes
(3, 11, 2, 5)again, while the same boundary is also encoded inUpdateManagerlogic. Centralizing this cutoff avoids future semantic drift across install gating and download path selection.♻️ Proposed refactor
+UPDATE_ENGINE_TRANSITION_VERSION = (3, 11, 2, 5) + ... update_file_requires_new_engine = ( - tuple(int(x) for x in version_number.split(".")) > (3, 11, 2, 5) + tuple(int(x) for x in version_number.split(".")) + > UPDATE_ENGINE_TRANSITION_VERSION )🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@codexctl/__init__.py` around lines 333 - 335, Extract the hardcoded version tuple (3, 11, 2, 5) that appears on line 334 in the update_file_requires_new_engine assignment into a shared module-level constant with a descriptive name (such as ENGINE_UPDATE_VERSION_CUTOFF or similar). Replace the hardcoded tuple in this location and also in the UpdateManager logic where the same boundary is encoded with a reference to this new constant to ensure consistency and prevent future semantic drift between the install gating logic and download path selection.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@codexctl/__init__.py`:
- Around line 333-335: Extract the hardcoded version tuple (3, 11, 2, 5) that
appears on line 334 in the update_file_requires_new_engine assignment into a
shared module-level constant with a descriptive name (such as
ENGINE_UPDATE_VERSION_CUTOFF or similar). Replace the hardcoded tuple in this
location and also in the UpdateManager logic where the same boundary is encoded
with a reference to this new constant to ensure consistency and prevent future
semantic drift between the install gating logic and download path selection.
Supersedes #184
Summary by CodeRabbit
Release Notes
Note: This release contains primarily internal optimizations with no user-facing feature changes.