Skip to content

Windows setup: route the stale-manifest failure through Exit-SetupFailure - #7569

Merged
danielhanchen merged 1 commit into
mainfrom
fix/setup-ps1-manifest-exit-setupfailure
Jul 28, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
fix/setup-ps1-manifest-exit-setupfailure

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Problem

Repo tests (CPU) is red on main, and every open PR inherits it:

FAIL: Windows setup has explicit exits outside Exit-SetupFailure

tests/sh/test_tauri_retry_failure_context.sh asserts that studio/setup.ps1 contains exactly one explicit exit, the exit $Code inside Exit-SetupFailure. The stale-manifest guard added in #7492 exits directly instead:

if (-not $_ManifestDropped) {
    Write-Host "[ERROR] Could not remove the stale unsloth_install_manifest.json." -ForegroundColor Red
    Write-Host "        Refusing to install behind a marker that still reports this venv as complete." -ForegroundColor Red
    exit 1
}

That is not only a test invariant. Exit-SetupFailure is what emits the [TAURI:ERROR] <message> line, so on this path the desktop installer exits 1 with no structured error and the UI shows its generic fallback instead of naming the cause. The 34 other failure sites in the file all go through the helper.

Fix

Route the one stray exit through Exit-SetupFailure, keeping the two Write-Host detail lines for the console, matching the pattern used everywhere else in the file.

Verification

On a clean checkout of main at 52a9601, tests/sh/test_tauri_retry_failure_context.sh fails at that assertion. With this one line changed it passes:

before:  FAIL: Windows setup has explicit exits outside Exit-SetupFailure   (exit 1)
after:   PASS: Windows setup routes explicit exits through Exit-SetupFailure
         PASS: Windows command failures preserve output through retries and finalization
         (exit 0)

The rest of the shell suite that CI runs is green locally (test_install_host_defaults.sh and test_install_rollback_lifecycle.sh are the two the workflow skips by name).

…lure

The manifest-removal guard added in #7492 exits with a bare 'exit 1', so in
Tauri mode the installer never emits the [TAURI:ERROR] line and the desktop
UI falls back to a generic failure instead of naming the cause. Every other
failure path in studio/setup.ps1 goes through Exit-SetupFailure, and
tests/sh/test_tauri_retry_failure_context.sh asserts that invariant, so
'Repo tests (CPU)' has been red on main since that merge.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: a772c1ea98

ℹ️ 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".

@danielhanchen danielhanchen reopened this Jul 28, 2026
@danielhanchen
danielhanchen merged commit 767f2f3 into main Jul 28, 2026
36 of 74 checks passed
@danielhanchen
danielhanchen deleted the fix/setup-ps1-manifest-exit-setupfailure branch July 28, 2026 21:54
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