Skip to content

[staging CI] unslothai/unsloth#7757 - #671

Closed
danielhanchen wants to merge 5 commits into
mainfrom
pr-7757-final-head-ci
Closed

[staging CI] unslothai/unsloth#7757#671
danielhanchen wants to merge 5 commits into
mainfrom
pr-7757-final-head-ci

Conversation

@danielhanchen

Copy link
Copy Markdown
Owner

Disposable CI run for unslothai#7757. Do not merge; closed after CI.

danielhanchen and others added 5 commits August 2, 2026 15:53
…le install tree

Follow-up to unslothai#7735, which routed the prebuilt llama.cpp probes through
three-state path probing but left two gaps.

Phase 4 read $LlamaServerBin with a bare Test-Path under "Stop". A forced
compile, a pinned PR or a custom llama source skips Phase 3.4 entirely, so on
those routes this was the first probe inside the tree and a denied build\
aborted with the raw "Test-Path : Access is denied" the merged PR set out to
remove. It now probes three-state, and the CMakeCache.txt read below it is
guarded too: a listed file can still deny the read, which the probe cannot see.
The probe is skipped for a linked UNSLOTH_LOCAL_LLAMA_CPP_DIR, where it would
read through the junction into the user's own checkout, and the denial reports
-OwnershipUnverified under a custom home, where nothing on this route has
proven the tree is ours.

The whisper.cpp phase promises failure is never fatal, but under a custom
UNSLOTH_STUDIO_HOME an unreadable tree exited the whole run, taking llama.cpp
inference down with it. Assert-StudioOwnedOrAbsent gains a -NonFatal mode that
hands the denial back instead; an unowned tree still stops. The check stays
behind the installer-exists gate it used to sit inside, so a tree without
install_whisper_prebuilt.py remains the no-op it was.

Backend: _is_runnable let Path.is_file() propagate EACCES. Now that setup
leaves a denied whisper.cpp in place, that turned into a 500 out of
/api/inference/audio/stt/status, the one endpoint reporting both dictation
engines, so the setup message promising Transformers dictation still works was
not true. It reads as engine-unavailable instead.
Mutation testing found six ways to reintroduce the bugs this branch fixes
while the tests stayed green.

Assert-StudioOwnedOrAbsent: the -NonFatal returns were counted, not ordered.
Moving one below its Exit-PathAccessDenied makes it dead code and the whisper
phase fatal again; hoisting one above the custom-home gate reports a fresh
install as unreadable. Each return is now pinned immediately above the exit it
pre-empts, with no unpaired return allowed.

The whisper denial branch had no assertion scoped to its own body. Both
phrases it was checked for already occur elsewhere in the phase, so the branch
could be turned back into an Exit-SetupFailure and stay green. The branch is
now sliced out and checked for step/Yellow, both phrases, and the absence of
any exit.

The installer gate was checked for presence, not for being a conjunct, so
-or-joining or negating it reopened the installer-less tree the test is named
for. The denial subject was unpinned, so it could name llama-server.exe and
tell the user to move aside one file instead of the tree.

Slice terminators are now asserted through one helper: an unasserted
terminator does not fail, it silently widens the window to end-of-file and
makes everything inside it near-vacuous.

The whisper binary probe test gated its only behavioural case on geteuid() == 0,
which silently drops it in any root container. It probes for a real denial
instead. Two pre-existing exact counts in the ownership guard tests become
floors: this branch consumed the last of their headroom, so the next
legitimate route added there would break two tests that say nothing about it.
The control probed a marker file that did not exist. Windows reports a
missing child of a denied directory as absent rather than throwing, so the
control read as "this host cannot deny" and failed the suite on
windows-latest while passing under chmod on Linux. It now probes a file that
exists inside the locked tree, matching the control the suite already uses.

That difference also splits the routes by platform for a tree with no
ownership marker, which is the fresh custom-home case: Linux catches it on the
marker probe, Windows has to catch it on the adoptable-state read. Added a
case that accepts either route and rejects anything but Denied, so the Windows
one is exercised for the first time.
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@danielhanchen
danielhanchen deleted the pr-7757-final-head-ci branch August 2, 2026 17:02
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.

1 participant