Repository navigation
Assert the Vulkan installer bailouts fail closed via the setup failure helper - #7644
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a1b2d6821e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
| if [ "$_explicit_vulkan_backend" = true ]; then | ||
| step "llama.cpp" "Vulkan was explicitly requested, so the installer will not keep the existing backend" "$C_ERR" | ||
| exit 1 | ||
| setup_fail 1 "Vulkan was explicitly requested, so the installer will not keep the existing backend" |
There was a problem hiding this comment.
Keep failure text visible in non-Tauri installs
When UNSLOTH_TAURI_MODE is unset during a normal CLI installation, setup_fail intentionally prints nothing and only exits, so replacing the preceding step with this call suppresses the explanation that an explicit Vulkan request prevents retaining the existing backend. The other two new calls similarly hide their actionable detail, and Exit-SetupFailure causes the same regression in setup.ps1; retain the terminal step/substep output before routing all six exits through the helpers.
Useful? React with 👍 / 👎.
|
Pushed fb64112 to fix the two
That also removes a genuine contradiction: as written, those four assertions and Verified locally: The other red check, |
…exit main routed the explicit-Vulkan bailouts in studio/setup.sh and studio/setup.ps1 through setup_fail / Exit-SetupFailure, so every failure emits [TAURI:ERROR] in desktop mode. These four assertions still required the literal string "exit 1" at those sites, so they now fail and take Repo tests (CPU) down with them for every open PR. The behaviour they exist to protect is unchanged, since both helpers exit; only the spelling moved. Assert the helper instead, so the checks cover "this path fails closed" rather than one way of writing it.
fb64112 to
792c079
Compare
|
Rebased and narrowed. What This PR is now that one-file fix, and with it both invariants hold together for the first time: |
A fourth instance of the class 9541cc5 fixed: the merge took main's studio/setup.sh, which #7644 changed to abort through the setup_fail helper so desktop mode still emits [TAURI:ERROR], but kept this branch's older copy of the test, which still asserted the literal 'exit 1'. setup.sh is byte-identical to main here and the only diff in this file was the reverted assertions, so take main's version. 60 passed.
…ulkan setup-fail helpers)
What
studio/backend/tests/test_setup_llama_cpp_backend.pyasserts the literal stringexit 1at the four explicit-Vulkan bailouts instudio/setup.shandstudio/setup.ps1. Those sites now abort throughsetup_fail/Exit-SetupFailure, so the assertions fail:That takes
Repo tests (CPU)down onmain, and because CI builds the PR merge commit, every open PR inherits the red job.The behaviour these tests exist to protect is unchanged: both helpers exit, so the paths still fail closed. Only the spelling moved. They now assert the helper, which covers "this path fails closed" rather than one way of writing it, and additionally checks the part that matters for the desktop app, that the failure is reported rather than silent.
Scope change
This PR originally also routed those bailouts through the helpers in
studio/setup.shandstudio/setup.ps1.mainhas since made that change independently, and did it better by keeping thestep/substeplines and using fuller messages. I have dropped my version and rebased ontomain, so this is now a one-file test fix, which is the piecemainis still missing.Verification
On a pristine
origin/mainworktree, before this change:tests/sh/test_tauri_retry_failure_context.shpasses (main fixed it)studio/backend/tests/test_setup_llama_cpp_backend.pygives2 failed, 58 passedWith this change:
test_setup_llama_cpp_backend.pygives60 passedtests/sh/test_tauri_retry_failure_context.shstill passes, so both invariants hold togethertests/sh/gives 27 pass; the one remaining failure,test_install_host_defaults.sh, fails identically on pristinemainand is on the workflow's explicit skip listruff check studio tests unsloth_clipasses