Skip to content

fix: upgrading to 3.11.2.5 from older firmwares. Fixes #183#185

Merged
Eeems merged 1 commit into
Jayy001:mainfrom
rmitchellscott:fix-3.11.2.5-install
Jun 17, 2026
Merged

fix: upgrading to 3.11.2.5 from older firmwares. Fixes #183#185
Eeems merged 1 commit into
Jayy001:mainfrom
rmitchellscott:fix-3.11.2.5-install

Conversation

@rmitchellscott

@rmitchellscott rmitchellscott commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Supersedes #184

Summary by CodeRabbit

Release Notes

  • Refactor
    • Updated the update engine version detection logic during the install, status, and restore workflow for improved efficiency.

Note: This release contains primarily internal optimizations with no user-facing feature changes.

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

In Manager.call_func, the check for whether an update file requires the new update engine is changed from a delegated UpdateManager.uses_new_update_engine(version_number) call to an inline integer-tuple comparison of the parsed version_number against (3, 11, 2, 5).

Changes

Update Engine Version Check

Layer / File(s) Summary
Inline update engine version check
codexctl/__init__.py
update_file_requires_new_engine is now computed by parsing version_number into a tuple of integers and comparing it to (3, 11, 2, 5), replacing the UpdateManager.uses_new_update_engine(version_number) call.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the specific firmware upgrade issue (upgrading to 3.11.2.5 from older versions) and references the GitHub issue being fixed, directly relating to the changeset's core purpose.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
codexctl/__init__.py (1)

333-335: ⚡ Quick win

Extract the transition cutoff into a shared constant.

Line 334 hardcodes (3, 11, 2, 5) again, while the same boundary is also encoded in UpdateManager logic. 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.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: bc92ffb5-7f81-4777-9d0f-d3a039786520

📥 Commits

Reviewing files that changed from the base of the PR and between 1e49233 and 5f3473f.

📒 Files selected for processing (1)
  • codexctl/__init__.py

@Eeems Eeems merged commit 837e468 into Jayy001:main Jun 17, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3.11.2.5 - This version requires the new update engine, please upgrade your device to version 3.11.2.5 first.

2 participants