Skip to content

Surface actionable installer failures in Studio desktop - #7529

Merged
wasimysaid merged 5 commits into
unslothai:mainfrom
oobabooga:fix/studio-installer-network-errors
Jul 28, 2026
Merged

wasimysaid merged 5 commits into
unslothai:mainfrom
oobabooga:fix/studio-installer-network-errors

Conversation

@oobabooga

@oobabooga oobabooga commented Jul 28, 2026 •

Copy link
Copy Markdown
Member

When first-run setup failed, the desktop app replaced the installer diagnosis with a message such as:

Installer exited with code 1

The useful error remained buried in the scrolling install output and diagnostics, so the setup screen gave the user no indication whether the cause was a failed Python environment, PyTorch download, package install, or Studio setup step.

Root cause

The Windows installer already emits a structured [TAURI:ERROR] message for controlled failures, but the Rust stream parser ignored it. The Unix installer emitted the field for only one failure path. After the child exited, the Rust wrapper retained only its numeric status.

Fix

  • retain the latest structured installer error and prefer it over generic process output
  • emit structured errors from the Unix package-install and Studio-setup failure paths
  • keep a bounded stderr tail as a fallback for unhandled shell and PowerShell failures
  • select an error or failure line from that tail instead of cleanup noise
  • clear transient errors after a retry or fallback command recovers on Unix
  • avoid repeating an exit code already present in the concrete installer reason
  • strip terminal formatting and redact credentials, tokens, private paths, and email addresses before displaying the reason
  • keep the complete existing output in diagnostics for support

Elevation and intentional cancellation keep their existing control flow. Repair installs use the same failure context but continue to emit repair events instead of first-run terminal events.

Verification

  • All 73 Tauri unit tests passed.
  • Regression coverage confirms structured errors beat later cleanup output, fallback stderr selects the useful failure, secrets are redacted before UTF-8-safe bounding, and exit codes are not duplicated.
  • Live shell coverage confirms same-loop retries and cross-command fallbacks clear stale failure state on both output streams while permanent failures retain their original exit code.
  • All 21 Linux shell installer test files selected by backend CI passed.
  • The production frontend typecheck and Vite build passed.
  • Cargo formatting and whitespace checks passed.

@oobabooga
oobabooga requested a review from danielhanchen as a code owner July 28, 2026 02:01

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a5ff9a7c9e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread studio/src-tauri/src/install.rs Resolved
Comment thread install.sh Resolved
Comment thread install.sh Resolved
@oobabooga oobabooga changed the title Studio: surface actionable installer failures Surface actionable installer failures in Studio desktop Jul 28, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cc14652a0d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread studio/src-tauri/src/install.rs Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cc669569e2

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread install.sh Resolved
@wasimysaid
wasimysaid merged commit 01c856c into unslothai:main Jul 28, 2026
53 of 55 checks passed
danielhanchen added a commit that referenced this pull request Jul 30, 2026
…lpers (#7645)

#7188 added three bare exits to studio/setup.sh and three to studio/setup.ps1
for the explicit-Vulkan paths. Bare exits skip setup_fail / Exit-SetupFailure,
so the [TAURI:ERROR] line that #7529 added never reaches Studio desktop and a
Vulkan install failure shows up there with no actionable context.

tests/sh/test_tauri_retry_failure_context.sh already asserts that each setup
script has exactly one explicit exit and that it lives inside the helper. That
assertion was failing, but the failure was invisible: Backend CI skips the
Shell installer tests step whenever the auto-discovered pytest step fails
first, and it had been failing on an unrelated encoding assertion until #7642.

Exit codes are unchanged: setup_fail 1 and Exit-SetupFailure both exit 1, and
the Tauri line is still emitted only when UNSLOTH_TAURI_MODE is set.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants