unsloth/studio/src-tauri
Daniel Han 8f343038ef Stop the runtime probe stranding older CLIs and rejected settings
Every released CLI predates desktop-runtime-check: PyPI's latest unsloth is
2026.7.5 and MIN_DESKTOP_BACKEND_VERSION stays 2026.5.3, so a field install is
version-compatible and simply lacks the subcommand. It then exits 2 with no
stdout, which read as a failed probe, and probe_managed_bin returned Stale
before consulting the capability cache, so a healthy install was force-repaired
and an offline user could not start at all. Fall back to the previous launch
probe, gated on 'desktop-runtime-check --help' (0 when the command exists, 2
when it does not), so a new CLI that crashes or times out still reports Stale.

Metadata outlives the package it describes. Hatchling wheels store
.dist-info/METADATA as the first archive entry (verified: index 0 for both
fastapi and typer), so an unpack killed midway leaves a readable version for
modules that never landed and the probe called the venv ready. RECORD is
written last, so a missing file list marks that unpack; checked against all 298
distributions in a real venv with no false positives. This supersedes my
earlier reasoning that the metadata is written last, which was wrong.

run.py raises SystemExit at import for a rejected setting such as
UNSLOTH_CPU_THREADS, and SystemExit is not an Exception, so it escaped the
handler and emitted no payload at all. Report it as backend_startup_failed and
keep it out of the repair path: no reinstall can change an inherited
environment value, so repairing would replace a healthy install and fail again.

Also clear the install marker when the installer fails to spawn, the one
terminal outcome that still left it behind.
2026-07-27 16:25:07 +00:00
..
capabilities Studio: persist Tauri window size and maximized state across launches (#5799) 2026-06-02 09:26:15 -07:00
icons Polish Studio desktop chrome (#6332) 2026-06-24 17:56:25 -07:00
linux Windows installer: fix DiskPart UAC mid-install, drive-root cache, and spurious unsloth.exe rename warning (#6296) 2026-06-22 03:09:08 -07:00
src Stop the runtime probe stranding older CLIs and rejected settings 2026-07-27 16:25:07 +00:00
windows Windows installer: fix DiskPart UAC mid-install, drive-root cache, and spurious unsloth.exe rename warning (#6296) 2026-06-22 03:09:08 -07:00
build.rs Add tauri (#5144) 2026-04-23 04:50:10 -07:00
Cargo.lock Fix Studio desktop reliability (#7255) 2026-07-21 09:51:18 +02:00
Cargo.toml Fix Studio desktop reliability (#7255) 2026-07-21 09:51:18 +02:00
Entitlements.plist Fix Studio desktop reliability (#7255) 2026-07-21 09:51:18 +02:00
Info.plist Fix Studio desktop reliability (#7255) 2026-07-21 09:51:18 +02:00
tauri.conf.json Unsloth Studio (desktop): fix canvas preview, download file button, toast placement, and model-load typing lag (#7391) 2026-07-24 22:23:41 -05:00
tauri.macos.conf.json Fix Studio desktop reliability (#7255) 2026-07-21 09:51:18 +02:00
tauri.windows.conf.json Fix Windows workflow issues(#5694) 2026-05-22 05:32:30 -07:00