Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Fix the desktop clean-machine CI: asset patterns and the retired #7547 pins (#8026)
Daniel Hanc32f29f695c5
diff --git a/.github/workflows/desktop-app-clean-machine-ci.yml b/.github/workflows/desktop-app-clean-machine-ci.ymlindex 7ae3539ac96..178ab9386da 100644--- a/.github/workflows/desktop-app-clean-machine-ci.yml+++ b/.github/workflows/desktop-app-clean-machine-ci.yml@@ -30,9 +30,13 @@ on:workflow_dispatch:inputs:release_tag:- description: 'Release tag in the desktop release repo'+ description: 'Release tag in the desktop release repo (empty resolves the newest)'type: string- default: 'desktop-v0.1.50-beta'+ # Empty, not a pinned tag. desktop-v0.1.50-beta predates #7547, so with the+ # outcome pins retired a dispatch that took this default would fail all four+ # POSIX legs at the installer step -- on a bundle nobody meant to test. Empty+ # falls through to the same newest-desktop-v* resolution the schedule uses.+ default: ''release_repo:description: 'owner/name hosting the desktop release'type: string@@ -111,8 +115,14 @@ jobs:echo "resolved release tag: $REL_TAG"echo "REL_TAG=$REL_TAG" >> "$GITHUB_ENV"fi+ # Match on the extension, not on a filename fragment. The old '*aarch64.dmg'+ # was the Tauri default bundle name, and the release pipeline moved to its own+ # scheme at desktop-v0.1.512-beta (Unsloth-Desktop-<ver>-MacOS.dmg), which+ # silently turned every run red at this line with "no assets match the file+ # pattern". A release ships exactly one .dmg, and the arm64 assertion below is+ # what actually checks the architecture, so the fragment bought nothing.gh release download "$REL_TAG" --repo "$REL_REPO" \- --pattern '*aarch64.dmg' --dir dl+ --pattern '*.dmg' --dir dlls -la dl- name: Strip the developer toolchain@@ -178,27 +188,14 @@ jobs:# for the button, so launching alone sits for 90s without running the bundled# installer. Invoke it as src-tauri/src/install.rs does: --tauri, stdin closed,# no tty. --tauri rejects a custom studio home (install.sh:102-114).- # KNOWN OUTCOME PIN, retire when the desktop release catches up to #7547: REL_TAG- # predates it, so the bundle's own install.sh still hard-exits on the Xcode CLT- # gate #7547 turned into a warning. Only a new release moves that, not this PR.- # _check_macos_deps is the function #7547 added, so finding it retires the pin.SH="$APP/Contents/Resources/install.sh"- if grep -q '_check_macos_deps' "$SH"; then- echo "::error::the bundled install.sh now carries #7547; delete this pin block and let the venv + torch assertions below run unconditionally"- exit 1- firc=0env -u UNSLOTH_STUDIO_HOME \bash "$SH" --tauri \< /dev/null 2>&1 | tee logs/bundled-install.log || rc=$?echo "bundled installer exit code: $rc"- # Exit code AND the exact gate line, so any other non-zero exit still fails.- if [ "$rc" -eq 1 ] && grep -qE '^==> Xcode Command Line Tools are required\.[[:space:]]*$' logs/bundled-install.log; then- echo "::notice::known pre-#7547 outcome: the shipped bundle's install.sh stopped on the Xcode CLT gate and exited 1. Not a regression here; the next desktop release retires this pin."- exit 0- fi[ "$rc" -eq 0 ] || {- echo "::error::bundled installer exited $rc, which is neither success nor the pinned pre-#7547 outcome (exit 1 plus '==> Xcode Command Line Tools are required.')"+ echo "::error::bundled installer exited $rc"exit 1}PY="$HOME/.unsloth/studio/unsloth_studio/bin/python"@@ -224,7 +221,13 @@ jobs:echo "app still running after 90s (pid $APP_PID)"kill -TERM "$APP_PID" 2>/dev/null || trueelse- wait "$APP_PID" 2>/dev/null; rc=$?+ # `|| rc=$?`, not a bare `wait`: the step runs under `bash -e`, so a+ # non-zero `wait` aborted the step right here and the two diagnostic lines+ # below never printed. The failure showed up as a bare "Process completed+ # with exit code 1" with no annotation and no app output -- which is exactly+ # the information this branch exists to produce.+ rc=0+ wait "$APP_PID" 2>/dev/null || rc=$?echo "::error::desktop app exited early with rc=$rc"tail -50 logs/app-stdout.log || trueexit 1@@ -242,14 +245,29 @@ jobs:grep -E "disposition=|can_auto_repair=|Xcode Command Line|ModuleNotFoundError" "$f" || truefound=1if grep -qE "desktop_preflight completed disposition=" "$f"; then disposition=1; fi+ dispositions="${dispositions:-} $(grep -oE 'desktop_preflight completed disposition=[A-Za-z]+' "$f" | sed 's/.*disposition=//' | tr '\n' ' ')"done- # Everything above is `|| true`, so without these two lines the step could not+ # Everything above is `|| true`, so without these lines the step could not# fail while the header sells the disposition as an acceptance criterion.# setup_logging (src-tauri/src/main.rs:50-67) opens tauri.log unconditionally at# process start, so no log means the binary never got that far, and a process# that hangs before preflight must not pass.[ "${found:-0}" = "1" ] || { echo "::error::the app wrote no tauri.log; it never reached setup_logging"; exit 1; }[ "${disposition:-0}" = "1" ] || { echo "::error::tauri.log records no desktop_preflight disposition; the app never completed preflight"; exit 1; }+ # A recorded disposition is not enough. A post-#7547 bundle can install a+ # working venv and still have preflight regress to NotInstalled, and the app+ # then sits happily on the Install screen: alive, log written, disposition+ # present, nothing built recognised. Windows has always required a READY+ # disposition; the reason given for keeping that Windows-only was the install+ # root, and the source says otherwise -- preflight/managed.rs env_removes+ # UNSLOTH_STUDIO_HOME and STUDIO_HOME on every platform, not under a+ # cfg(windows), so all three read the same legacy root.+ echo "dispositions recorded: ${dispositions:-<none>}"+ case "${dispositions:-}" in+ *ManagedReady*|*OwnedReady*|*AttachedReady*) ;;+ *) echo "::error::preflight never reported a ready disposition (saw: ${dispositions:-<none>}); the app did not recognise the environment the bundled installer just built"+ exit 1 ;;+ esac- name: Restore the runnerif: always()@@ -389,29 +407,14 @@ jobs:fi[ -n "$SH" ] && [ -f "$SH" ] || { echo "::error::the bundle ships no install.sh resource"; exit 1; }echo "bundled installer: $SH"- # KNOWN OUTCOME PIN, retire when the desktop release catches up to #7547: the- # bundle carries its own install.sh and REL_TAG predates it, so on a stripped- # runner it still exits 2 at the NEED_SUDO handshake for the optional set rather- # than falling through to prebuilt llama.cpp. Only a new release moves that.- # _SMART_APT_OPTIONAL is the guard #7547 added, so finding it retires the pin.- if grep -q '_SMART_APT_OPTIONAL' "$SH"; then- echo "::error::the bundled install.sh now carries #7547; delete this pin block and let the venv + torch assertions below run unconditionally"- exit 1- fi# --tauri rejects a custom studio home (install.sh:102-114), so drop the# workspace-scoped override; close stdin as install.rs does.rc=0env -u UNSLOTH_STUDIO_HOME \bash "$SH" --tauri < /dev/null 2>&1 | tee logs/bundled-install.log || rc=$?echo "bundled installer exit code: $rc"- # Exit code AND the exact optional set, so a different NEED_SUDO list or any other- # non-zero exit is still a failure.- if [ "$rc" -eq 2 ] && grep -qE '^\[TAURI:NEED_SUDO\] cmake git build-essential libcurl4-openssl-dev[[:space:]]*$' logs/bundled-install.log; then- echo "::notice::known pre-#7547 outcome: the shipped bundle's install.sh asked to elevate for the optional set and exited 2. Not a regression here; the next desktop release retires this pin."- exit 0- fi[ "$rc" -eq 0 ] || {- echo "::error::bundled installer exited $rc, which is neither success nor the pinned pre-#7547 outcome (exit 2 plus exactly '[TAURI:NEED_SUDO] cmake git build-essential libcurl4-openssl-dev')"+ echo "::error::bundled installer exited $rc"exit 1}PY="$HOME/.unsloth/studio/unsloth_studio/bin/python"@@ -436,7 +439,13 @@ jobs:echo "app still running after 90s"kill -TERM "$APP_PID" 2>/dev/null || trueelse- wait "$APP_PID" 2>/dev/null; rc=$?+ # `|| rc=$?`, not a bare `wait`: the step runs under `bash -e`, so a+ # non-zero `wait` aborted the step right here and the two diagnostic lines+ # below never printed. The failure showed up as a bare "Process completed+ # with exit code 1" with no annotation and no app output -- which is exactly+ # the information this branch exists to produce.+ rc=0+ wait "$APP_PID" 2>/dev/null || rc=$?echo "::error::desktop app exited early with rc=$rc"tail -60 logs/app-stdout.log || trueexit 1@@ -451,11 +460,26 @@ jobs:grep -E "disposition=|can_auto_repair=|ModuleNotFoundError" "$f" || truefound=1if grep -qE "desktop_preflight completed disposition=" "$f"; then disposition=1; fi+ dispositions="${dispositions:-} $(grep -oE 'desktop_preflight completed disposition=[A-Za-z]+' "$f" | sed 's/.*disposition=//' | tr '\n' ' ')"done# Same criterion the macOS rows enforce, same reason: everything above is# `|| true` and the loop skips a missing log, so the step could not fail.[ "${found:-0}" = "1" ] || { echo "::error::the app wrote no tauri.log; it never reached setup_logging"; exit 1; }[ "${disposition:-0}" = "1" ] || { echo "::error::tauri.log records no desktop_preflight disposition; the app never completed preflight"; exit 1; }+ # A recorded disposition is not enough. A post-#7547 bundle can install a+ # working venv and still have preflight regress to NotInstalled, and the app+ # then sits happily on the Install screen: alive, log written, disposition+ # present, nothing built recognised. Windows has always required a READY+ # disposition; the reason given for keeping that Windows-only was the install+ # root, and the source says otherwise -- preflight/managed.rs env_removes+ # UNSLOTH_STUDIO_HOME and STUDIO_HOME on every platform, not under a+ # cfg(windows), so all three read the same legacy root.+ echo "dispositions recorded: ${dispositions:-<none>}"+ case "${dispositions:-}" in+ *ManagedReady*|*OwnedReady*|*AttachedReady*) ;;+ *) echo "::error::preflight never reported a ready disposition (saw: ${dispositions:-<none>}); the app did not recognise the environment the bundled installer just built"+ exit 1 ;;+ esac- name: Restore the runnerif: always()@@ -509,7 +533,10 @@ jobs:echo "resolved release tag: $REL_TAG"echo "REL_TAG=$REL_TAG" >> "$GITHUB_ENV"fi- gh release download "$REL_TAG" --repo "$REL_REPO" --pattern '*setup.exe' --dir dl+ # Extension, not fragment: see the macOS leg. '*setup.exe' was the Tauri NSIS+ # default; the current asset is Unsloth-Desktop-<ver>-Windows.exe, and a release+ # ships exactly one .exe.+ gh release download "$REL_TAG" --repo "$REL_REPO" --pattern '*.exe' --dir dlls -la dl- name: Strip the developer toolchain@@ -627,7 +654,7 @@ jobs:- name: Silent installshell: pwshrun: |- $exe = (Get-ChildItem dl/*setup.exe | Select-Object -First 1).FullName+ $exe = (Get-ChildItem dl/*.exe | Select-Object -First 1).FullName# /S is the NSIS silent switch: a user double-clicks, but an installer that cannot# run unattended cannot be scripted or MDM-deployed either.$p = Start-Process -FilePath $exe -ArgumentList '/S' -Wait -PassThru@@ -728,10 +755,10 @@ jobs:Write-Host '::error::tauri.log records no desktop_preflight disposition; the app never completed preflight'exit 1}- # Windows only, and stricter than macOS/Linux: those two accept the bundled- # installer's pre-#7547 pinned exit, so no venv exists there and NotInstalled is- # the honest answer. Here the installer was required to exit 0, create the venv- # and import torch, and the app reads the same default root it wrote+ # All three legs now require the installer to exit 0, create the venv and import+ # torch, AND a ready disposition -- the #7547 outcome pins are gone and the+ # POSIX legs carry the same case check. Kept spelled out here because the app+ # reads the same default root it wrote# (%USERPROFILE%\.unsloth\studio; it ignores UNSLOTH_STUDIO_HOME, which is why# the log is found at the second path). So anything but a ready disposition means# the app cannot boot what was just installed -- the reported failure, on the very