Make the POSIX legs actually run the installer, and fail if they do not

install.sh --tauri rejects a custom UNSLOTH_STUDIO_HOME outright (the desktop app
still uses the legacy ~/.unsloth/studio root), and this workflow set one at
workflow level for every job. So all 11 macOS and Linux legs exited about a second
in with

    ERROR: UNSLOTH_STUDIO_HOME is not supported with --tauri.

produced no CLI, took the probe's NO_CLI 'safe' branch and reported success. They
were vacuously green. Only the two Windows legs were real, because install.ps1 has
no equivalent guard.

The override now applies to the Windows job only, and the POSIX legs read the
legacy root, which is where --tauri installs. The runner is ephemeral so the real
home is as disposable as the override.

Also adds the check that makes this class of mistake loud: a leg asserts its kill
actually landed on the marker it was aimed at, using the interrupt_reason the
driver already records. A leg that never reached its kill point proves nothing,
and NO_CLI made that indistinguishable from a pass.
This commit is contained in:
Daniel Han 2026-07-28 12:13:18 +00:00
commit 958052e44f

View file

@ -44,7 +44,6 @@ permissions:
contents: read
env:
UNSLOTH_STUDIO_HOME: ${{ github.workspace }}/.studio-home
UNSLOTH_STUDIO_DISABLE_PUBLIC_CHECK: '1'
jobs:
@ -101,11 +100,25 @@ jobs:
bash .github/scripts/interrupt-install.sh \
'${{ matrix.marker }}' logs/install.log -- --tauri --local
- name: The kill must have landed where it was aimed
run: |
. logs/interrupt.env
echo "reason=$interrupt_reason killed=$interrupt_killed exit=$installer_exit"
if [ "$interrupt_reason" != "marker-hit" ]; then
echo "::error::installer never reached '${{ matrix.marker }}' (reason=$interrupt_reason)."
echo "::error::This leg proves nothing. Without this check it passes via the"
echo "::error::NO_CLI 'safe' path, which is how a --tauri/UNSLOTH_STUDIO_HOME"
echo "::error::conflict once made all 11 POSIX legs vacuously green."
tail -30 logs/install.log || true
exit 1
fi
- name: What state is the install in?
id: probe
run: |
BIN="$UNSLOTH_STUDIO_HOME/unsloth_studio/bin/unsloth"
[ -x "$BIN" ] || BIN="$UNSLOTH_STUDIO_HOME/bin/unsloth"
# --tauri refuses a custom UNSLOTH_STUDIO_HOME, so it installs here.
BIN="$HOME/.unsloth/studio/unsloth_studio/bin/unsloth"
[ -x "$BIN" ] || BIN="$HOME/.unsloth/studio/bin/unsloth"
if [ ! -x "$BIN" ]; then
# No CLI at all is a SAFE outcome: preflight reports NotInstalled and the
# app offers a normal install. Nothing to assert beyond that.
@ -133,8 +146,8 @@ jobs:
echo "::error::re-run reported the venv up to date without repairing it"
exit 1
fi
BIN="$UNSLOTH_STUDIO_HOME/unsloth_studio/bin/unsloth"
[ -x "$BIN" ] || BIN="$UNSLOTH_STUDIO_HOME/bin/unsloth"
BIN="$HOME/.unsloth/studio/unsloth_studio/bin/unsloth"
[ -x "$BIN" ] || BIN="$HOME/.unsloth/studio/bin/unsloth"
python3 .github/scripts/interrupted_install_probe.py "$BIN" --out probe-after || true
v="$(python3 -c "import json;print(json.load(open('probe-after/verdict.json'))['verdict'])")"
if [ "$v" != "HEALTHY" ]; then
@ -157,6 +170,10 @@ jobs:
# ── Windows: no process groups, so the kill path differs ──────────────────
interrupt-windows:
name: windows kill@${{ matrix.label }}
env:
# install.ps1 has no equivalent of install.sh's --tauri guard, so the
# workspace-scoped root still works here.
UNSLOTH_STUDIO_HOME: ${{ github.workspace }}/.studio-home
runs-on: windows-latest
timeout-minutes: 60
continue-on-error: true