Repository navigation
Keep the MLX install ordering tests off the package index - #18354
Conversation
The no-torch update cases reach _desktop_unsloth_spec, which since #16157 resolves the unsloth / unsloth-zoo pair against the live index. When the runner cannot reach it the resolver returns None and 8 parametrized cases fail with 'Could not resolve a compatible unsloth / unsloth-zoo pair'. Stub _no_torch_pair in the helper; the resolver has its own tests.
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
… and pip (#18358) ## Summary On a runner whose own `certifi` or `pip` is below the CA trust floor and has no `uv` on PATH, 59 cases in `tests/studio/install/test_mlx_install.py` fail: ``` studio/install_python_stack.py:8272: in _ensure_trust_floor studio/install_python_stack.py:9653: in pip_install_try FileNotFoundError: [Errno 2] No such file or directory: 'uv' ``` This showed up on the macOS leg of the cross-platform staging run for #16799 (runner certifi 2026.7.22, below the `certifi>=2026.10.19` floor). ## Cause `install_python_stack()` calls `_ensure_trust_floor()` on every setup and update (#14887). That raises certifi, and pip on 3.10+, through `pip_install_try` whenever the running interpreter does not already meet the floor. The `_run_to_extras` helper stubs `pip_install`, `run`, `_bootstrap_uv` and the torch steps, but not this path. So whether these tests spawn a real installer depended on the runner image's certifi and pip versions. On hosts that already meet the floor, nothing runs and the tests pass. The installer behaviour is correct. The test was not hermetic. ## Fix Stub `_trust_floor_specs` to return `[]` in the helper, next to the `_no_torch_pair` stub from #18354. The floor logic keeps its own coverage in `tests/studio/install/test_ca_trust_floor.py`. ## Verification Reproduced by raising the certifi floor above any installed version and running with `uv` removed from PATH: | Tree | floor unmet, no `uv` | normal | |---|---|---| | main | 59 failed, 15 passed | 74 passed | | this branch | 74 passed | 74 passed | `test_ca_trust_floor.py` passes unchanged, and ruff is clean.
Summary
tests/studio/install/test_mlx_install.py::test_mlx_install_respects_platform_mode_and_pinsfails its 8*-gguf_only-update-*cases whenever the runner cannot reach the package index:This has shown up on the cross-platform staging runs (Ubuntu and macOS legs).
Cause
Since #16157,
_desktop_unsloth_specin no-torch mode calls_no_torch_pair, which resolves the unsloth / unsloth-zoo pair against the live index. The_run_to_extrashelper stubs every other installer side effect (run,pip_install,_bootstrap_uv, the torch ensure steps), but not this one. The no-torch update cases therefore make a real resolver call, and aNonefrom it aborts the install before the step ordering being tested is reached.The installer behaviour is correct. The test was missing a stub.
Fix
Stub
_no_torch_pairin the helper with the same fixed pair the other suites use (("2026.11.1", "2026.11.1", 0), as intests/python/test_no_torch_filtering.pyandtests/studio/install/test_rocm_support.py). The resolver keeps its own coverage intests/python/test_desktop_unsloth_spec_no_deps_pair.py.Verification
With the index made unreachable (
PIP_INDEX_URL/UV_INDEX_URL/UV_DEFAULT_INDEXpointed at127.0.0.1:9,UV_OFFLINE=1,PIP_NO_INDEX=1):With network access, this branch also passes 74 out of 74.
ruffis clean.