Skip to content

Studio: say when the audio runtime is not the release Studio installs - #12809

Merged
danielhanchen merged 8 commits into
unslothai:mainfrom
Etherll:feat/studio-audio-runtime-notice
Oct 6, 2026
Merged

danielhanchen merged 8 commits into
unslothai:mainfrom
Etherll:feat/studio-audio-runtime-notice

Conversation

@Etherll

@Etherll Etherll commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Setup keeps an existing audio.cpp runtime when the release lookup fails ("update unavailable, existing prebuilt kept") or the install is busy. After a pin bump, users can stay on an older runtime with no hint, and Edit, Convert, or Separate then fail with the runtime's own error.

_audio_cpp_runtime_status() in routes/inference.py now adds expected_tag and outdated to the audio_cpp_runtime block of /audio/stt/status. It checks the install record's (published_repo, release_tag) against the installer's own release ladder (install_audio_cpp_prebuilt._release_ladder()), so the pinned fork tag and its upstream fallback both count as current. Only binaries under Studio's managed audio.cpp directory are checked. A binary the user configured through AUDIOCPP_SERVER_PATH, UNSLOTH_AUDIO_CPP_PATH, or PATH is never flagged, and neither is a latest-tracking install (UNSLOTH_AUDIO_CPP_TAG=''), a record without a tag, or a failed release lookup.

When outdated is true, the Audio rail shows one status line under the capability text on every workflow. It names the installed and expected releases and tells the user to run unsloth studio update, then restart Studio. Both new fields are optional in AudioCppRuntimeStatus, so the frontend shows nothing against an older server.

Testing

Backend, from studio/backend:

python -m pytest tests/test_audio_cpp_runtime_status.py -q
python -m pytest tests/test_audio_cpp_runtime_status.py tests/test_audio_cpp_models.py tests/test_audio_runtime_errors.py -q

test_audio_cpp_runtime_status.py passed 15 tests. The three files together passed 143. The new cases cover the pinned release, the upstream fallback, an old release, the same tag from another repo, a latest-tracking ladder, a missing tag, a user-configured binary, and a release lookup error.

Frontend, from studio/frontend: the audio tests passed (492), including new audioCppRuntimeUpdate cases in tests/audio-cpp-catalog.test.ts. The full npm test run passed 10577 of 10579. The 2 failures (theme and find-in-page) also fail on base 7ccf3fcb2. Typecheck and build pass.

Live Studio from this branch: /audio/stt/status returned outdated=false for v0.9.0-unsloth.1 and for the 0xShug0 v0.9.0 fallback, and outdated=true after the install record was edited to v0.8.0-unsloth.1. The notice rendered on Speak and Transcribe in light and dark themes, in both wide and stacked layouts.

Before / after

Audio page (Text to speech), same Studio-managed audio.cpp runtime whose install record names v0.8.0-unsloth.1, merge base vs this branch. The status endpoint reports expected_tag: v0.9.0-unsloth.1, outdated: true only on the branch, and the rail shows the update line under the capability text.

Audio rail before and after: the branch adds the runtime update notice

@Etherll
Etherll requested a review from danielhanchen as a code owner October 6, 2026 02:47
@Etherll

Etherll commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

1 similar comment
@Etherll

Etherll commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@Etherll

Etherll commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

1 similar comment
@Etherll

Etherll commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@Etherll

Etherll commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator Author

The Audio pages now say when Studio's managed audio runtime is not the release this Studio installs. The notice names both versions and says to run unsloth studio update, then restart Studio.

What changed

  • When setup cannot reach the release (or the install is busy), it keeps the old runtime, and Edit, Convert and Separate fail with the runtime's own error and no hint of the cause. /audio/stt/status now reports expected_tag and outdated, checked against the installer's release list, so the pinned release and its upstream fallback both count as current. The Audio rail shows a notice line when outdated is true.
  • The first version could show the notice even when setup skips the managed install (AUDIOCPP_SERVER_PATH or UNSLOTH_AUDIO_CPP_PATH set, or UNSLOTH_SKIP_AUDIO_CPP_INSTALL=1), so the suggested update could never clear it. Status now uses the same skip rule as setup.sh and setup.ps1, and a user-configured binary is never flagged.

Tested on b86bcb281: the runtime status tests (18), related audio backend suites (146) and account media isolation suite (26) pass, as do the frontend audio tests (492). A Studio built from this branch reported outdated=false for the pinned and fallback releases and outdated=true for an install record edited to an older release. With that record, the base build shows no notice and this branch does, in light and dark themes. Windows and macOS were checked by reading the code, not run, and the screenshots are Chromium only.

Codex review requested on b86bcb281, no response from the Codex connector yet.

Audio rail with an older managed runtime, before (7ccf3fcb2) and after (b86bcb281)

Before 7ccf3fcb2, after b86bcb281: the same install record naming v0.8.0-unsloth.1, Speak page, 1440x900.

@mahiatlinux

Copy link
Copy Markdown
Contributor

Reviewer fix and verification evidence

The review found and repaired two remaining update-remedy bugs after the author's path-override fix: the notice now gives a Windows-safe stop/update/start order, and managed-runtime classification requires the same .unsloth-studio-owned marker as the installer. The separate comment cleanup is syntax/AST-neutral and limited to PR-touched files.

Final source head: 00c8f35e0d7ccb5beea71202d3f94cb7d2a1a7ad. Its tree is identical to the fully tested review tree. Codex reviewed the exact final mirror head and returned no findings.

Executed on Ubuntu 26.04.1 x86_64, Python 3.13.14 / uv 0.12.1, Node 26.8.2 / npm 11.19.1:

  • affected backend suite: 147 passed (test_audio_cpp_runtime_status.py, test_audio_cpp_models.py, test_audio_runtime_errors.py)
  • focused frontend suite: 23 passed (audio-cpp-catalog.test.ts)
  • frontend typecheck and production build: passed
  • Python formatter and Ruff: passed
  • negative control: final backend test file against base code produced 17 expected failures / 2 passes; the base's original file produced 6 passes
  • comment-only gate on all 7 cleanup files: passed (Python AST and TypeScript printer equivalence)
  • targeted ESLint/Biome retained the merge base's pre-existing error set with no new failing error

Isolated Playwright Chromium/Chrome-for-Testing evidence covers all seven Audio workflows at desktop and stacked sizes. With an ownership-marked old managed runtime, BEFORE has no notice; AFTER names the installed and expected releases, uses the stop/update/start sequence, appears once per workflow, and has no stacked overflow.

Desktop:

Audio runtime notice, desktop before and after

Stacked:

Audio runtime notice, stacked before and after

The source PR is mergeable after landing. New source CI is queued; no failing check was observed. Per the final review gate, no approval was submitted.

danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 6, 2026
@shimmyshimmer

Copy link
Copy Markdown
Member

Review record for #12809, carried over from the mirror it was reviewed on: danielhanchen/unsloth-staging-review#484.

Findings are quoted as posted and attributed to the account that posted them. The reactions shown are the triage recorded on the mirror; none were re-applied here. Commits are named as the mirror's, with this PR's equivalent where one was found.

Round 1: reviewed mirror 0cf234f468 (this PR's 00c8f35e0)

chatgpt-codex-connector[bot] (on the mirror)

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

Reviewed commit: 0cf234f468

No triage reaction was recorded on the mirror

Verdict

The round converged at mirror 0cf234f468 (this PR's 00c8f35e0).

This is the review as it stood at that commit. Anything pushed to this PR afterwards was not part of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants