Repository navigation
fix(mlx): address cache recovery and Python compatibility reviews - #927
Merged
Merged
Conversation
Validate Qwen snapshots and resume missing files at the cached revision. Require Python 3.11, repair negative Bats assertions, and document a process-group timeout runner for macOS and Linux. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 99d7cebd-e0b2-454f-babb-30613dcb1016
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 18 minutes. View limit details
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 |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Closed output pipes can bypass timeout cleanup, and missing Python causes setup failures instead of test skips.
2 open issues
What changed in this PR
Follows up on #923 to improve global MLX chat cache recovery, Python compatibility, and portable validation.
Changes:
- Validate cached model files and retry incomplete snapshots at the cached revision.
- Require Python 3.11+ consistently.
- Strengthen regression checks and add a portable process-group timeout runner.
| File | Description |
|---|---|
| tests/with-timeout.py | Adds portable timeout and interrupt cleanup. |
| tests/python/test_timeout.py | Tests timeout cleanup and exit statuses. |
| tests/python/test_mlx_chat.py | Covers cache recovery and Python compatibility. |
| tests/bash/global-mlx-chat.bats | Strengthens assertions and Python fallback checks. |
| home/Taskfile.yml | Raises Python preflight minimum to 3.11. |
| home/dot_config/mlx/chat.py | Validates snapshots and retries missing downloads. |
| docs/development-tools.md | Documents recovery, requirements, and portable validation. |
Review effort: Balanced
Terminate and reap validation children before best-effort unbuffered stderr diagnostics. Cover closed stdout and stderr during timeout and interruption, and skip the MLX fixture when Python is unavailable. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 99d7cebd-e0b2-454f-babb-30613dcb1016
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description
Focused follow-up to #923, including the Copilot review submitted 2026-10-17 20:48:44 UTC, after #923 was merged at 20:42:51 UTC. This PR is intentionally left open and unmerged, with no auto-merge. A passing CI or CodeRabbit check is not evidence that all reviews are complete or findings resolved. Original review threads remain unresolved while these fixes are only in this follow-up.
Changes
! grepassertions in the focused Bats file withrun grepplus an exact exit-status assertion.Review dispositions
subprocess.run(timeout=...)one-liner would not reliably clean up grandchildren, so the runner uses a dedicated process group.Dependency evidence: mlx-lm 0.32.2 metadata, Transformers 5.7.0 metadata, Hub 1.5.0 snapshot implementation. No real model downloads or inference were used.
Validation
--upgrade,create-venvandinstall-pythonactions into temporary copies of the actual Bats fixtures: all three mutations wrongly pass before the assertion changes and correctly fail afterward.Checklist
mise exec -- lefthook run pre-commit)