Repository navigation
Windows: do not abort setup on an unreadable llama.cpp install - #7735
Conversation
Test-Path raises UnauthorizedAccessException instead of returning $false when an ACL denies the probe. setup.ps1 runs under $ErrorActionPreference = "Stop", so the bare probe of UNSLOTH_PREBUILT_INFO.json in the llama.cpp prebuilt phase killed setup with a raw "Test-Path : Access is denied" and exit code 1. The desktop app had nothing but [TAURI:ERROR_DEFAULT] to fall back on, so it showed "unsloth studio setup failed (exit code 1)". ~/.unsloth/llama.cpp sits beside the app, not inside it, so reinstalling reused the unreadable folder and hit the same line again, including a reinstall to a different drive. Add Get-PathState (Present / Absent / Denied) plus Test-PathQuiet, route the probes that read inside install trees we do not own through them, and report a denied llama.cpp install through Exit-SetupFailure so the reason and the recovery steps reach the desktop UI. Reported in unsloth-test/unsloth-test#9
Review follow-ups: - Assert-StudioOwnedOrAbsent treated a denied root as absent and returned, so the caller could go on to replace a tree it cannot read. Probe the root three-state and stop on Denied, still gated on $StudioHomeIsCustom so default-home behaviour is unchanged. - The source-build .git probe treated a denied checkout as "no checkout" and cloned a replacement. The swap that follows recursively removes the original and moves the temp tree over it under "Continue" and unchecked, so a denied child could leave a half-deleted install. Stop instead. This path already treated denied as absent before the previous commit (that probe runs under "Continue", so it printed an error and took the false branch), so the hazard is older than this branch, but it is in scope for the same reason. - Probe $LlamaCppDir itself three-state, so an unreadable parent is reported rather than dying on the bare probe under "Stop". - takeown and icacls were printed joined by "then", which is not a PowerShell separator: takeown would swallow the rest as arguments and icacls would never run. Print them on separate lines. Fold the repeated guidance into Exit-PathAccessDenied so all five denial routes report the same thing.
|
Went through all three. Two are correct as written, one identifies a real hazard but misattributes where it came from. Fixed in 4c136b8. 1. Denied root treated as absent in
2. Denied The hazard is right. The fresh-clone branch ends in a swap that does What is not right is that this branch caused it. That probe also sits under So the clone-over-a-denied-checkout behaviour predates this branch; the previous commit only stopped printing the error. Fixed anyway, since it is the same class of bug and cheap to close: the probe is three-state and 3.
Also folded in while I was there
Verification 36 checks in Both fail on the old code and pass on the new. Surrounding suites: 1627 passed, with the same 26 pre-existing failures in |
Ran the real decision blocks against simulated filesystems (denied file, denied parent, traverse-only and list-only dirs, symlinks, dangling links, wildcard and unicode paths, 3000 random paths) plus PSScriptAnalyzer's 5.1/6.2/7.0 syntax check. Two things came out of it: - Get-PathDenialDetail threw a parameter-binding exception on an empty path. It runs while a failure is being reported, so it would have replaced the actionable message with a raw binding error at exactly the wrong moment. Null and empty are now accepted and return no detail. - The link-target lookup used an empty catch, which PSScriptAnalyzer flags and which hid the intent. It assigns $null explicitly now. Both are covered by new checks. Also promoted the strongest invariant from the simulation into the suite: Get-PathState must agree with a bare Test-Path on every probe that did not throw, and Denied may only appear where the old probe threw, so no path that worked before can take a different branch now. Verified: PSUseCompatibleSyntax reports nothing for 5.1, 6.2 and 7.0; the Python contract tests pass on 3.10 through 3.13 in separate uv venvs; the tauri install:: unit tests pass (17), which is the code that prefers the [TAURI:ERROR] line over the generic exit-code message.
|
Ran a simulation pass over this branch rather than trusting the unit tests alone. Seven suites, 158 assertions, in throwaway sandboxes under a gitignored What it actually provesThe reported failure, reproduced and then fixed on the same fixture. The pre-PR block is pulled straight out of The real decision blocks, not a re-implementation. Slices of setup.ps1 are extracted and validated with Exit code is 1 in every stop path. Asserted explicitly, because No behaviour change outside denials. The load-bearing invariant, now in the suite: Copy-paste correctness of the recovery commands, checked by parsing each emitted line with the PowerShell parser across four awkward paths (spaces, parentheses, brackets, unicode): one Two defects found and fixed
Both have checks that fail if the fix is reverted, verified by reverting them. Coverage and gaps
Gaps worth stating: this ran on macOS, so Windows ACL denials via |
studio-windows-inference-smoke.yml runs six PowerShell unit tests out of tests/studio, but its pull_request paths filter matched none of them, and no other workflow runs them. A PR touching only one of those tests never ran it. Five predate this branch; the sixth is the ACL test added here. Scope the filter to tests/studio/*.ps1 rather than tests/studio/**, so a python-only change under that directory does not pull in the GGUF smoke jobs. This matches what the other two workflows already do: parity-ci lists its .ps1 test outright and update-smoke uses a scoped glob. Guard it in test_ci_shell_suite_coverage.py, which exists for this exact failure (tests/sh had the same hole): every tests/*.ps1 a workflow invokes must be matched by that workflow's paths filter, and must exist. The GitHub glob matcher it needs has its own table-driven test, since a wrong matcher would make the guard pass on everything. Verified by reverting the one-line filter change: the guard then names all six unrun tests.
|
Checked this one against the YAML rather than taking it on faith. It is correct, and the repo's own convention backs it up. Mapping every workflow that invokes a
So the gap is real, and it is not only mine: five of those six predate this branch ( Fixed in c6eff68 with Guarded it in Verified by reverting the one-line filter change, which makes the guard fail and name all six: Restoring the filter turns it green. Full local pass afterwards: 1641 passed, with the same 26 pre-existing failures in |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Verifying the path-filter fix turned up a second hole in the same step. A
`shell: pwsh` step inherits only the LAST command's exit code, and this
step ran five tests as five bare commands, so only the last one could fail
the build. test_resolve_cuda_toolkit.ps1 has been printing
FAIL exits non-zero (scenario 2, forced source build)
FAIL exits non-zero (scenario 6, no toolkit, forced)
2 check(s) FAILED
on every Windows run, exiting 1, and the job reported success. Confirmed
on main (run 30723608191, sha c67410a), so it predates this branch, and
it reproduces locally.
The cause is in the test, not the installer. Resolve-CudaToolkit
-RequireOrExit leaves through Exit-SetupFailure, which the child harness
never stubbed, so under ErrorActionPreference=Continue the call was an
ignored command-not-found, the child fell through and exited 0. The
harness already injects the real Resolve-CudaToolkit and
Write-CudaDriverToolkitMismatch by AST, so inject the real
Exit-SetupFailure the same way. That test now passes 25/25.
With it green, add the exit-code checks after each invocation, matching
what studio-windows-update-smoke.yml already does, and guard the pattern
in test_ci_shell_suite_coverage.py: any step running more than one
PowerShell test must check $LASTEXITCODE after each.
Verified by reverting each piece: dropping one check makes the guard name
that test, and dropping the Exit-SetupFailure injection brings both
scenario failures straight back.
|
The latest Codex pass came back clean, so I re-checked the four earlier points against HEAD rather than take that as the last word. All nine sub-assertions are closed: the guard probes its root three-state and stops on While verifying that last one I found a second hole in the same step, and it is a bigger one. The Windows step was reporting green over a failing testA and exiting 1, while the job reported success. Same two failures on main (run The cause is the test, not the installer. With it green, the exit-code checks are in, matching what VerificationBoth fixes were checked by reverting them: All five tests in that step pass locally with exit 0. Repo suites: 1642 passed, with the same 26 pre-existing failures in Worth saying plainly: the CUDA harness fix is outside this PR's subject. I took it because the exit-code fix could not go in without it, and leaving a test that fails on every run while CI shows green seemed worse than the extra diff. Happy to split it into its own PR if you would rather keep this one narrow. |
When UNSLOTH_LOCAL_LLAMA_CPP_DIR points at the canonical $LlamaCppDir and the llama-server.exe there is ACL-denied, Test-PathQuiet collapsed Denied to $false, $LocalLlamaServerFound stayed false, and the canonical branch reported "nothing built there yet; running the normal install". The prebuilt installer then moves that tree aside and replaces it, which is exactly what the branch's own comment says it exists to prevent. The old bare probe stopped first, by throwing under "Stop". Probe the candidates three-state and stop on Denied. Same for the directory probe itself, which reported an unreadable dir as "does not exist" and sent the user after the wrong problem. The generic message could not be reused as-is here: it tells the user to delete the folder because Unsloth reinstalls it, which is true of the managed cache and wrong for a build they pointed us at. Exit-PathAccessDenied takes -UserSupplied, which swaps that advice for restoring access or repointing UNSLOTH_LOCAL_LLAMA_CPP_DIR, and keeps the takeown/icacls lines. Verified by driving the real block through every state: a readable build is still reused, a genuinely empty canonical dir still falls through to the normal install, a missing dir still reports "does not exist", and a denied build now stops with exit 1 instead of being replaced. Reverting the probe puts the fall-through back, and the user-supplied path never prints "delete or rename" or "managed cache".
|
Correct, and it is the sharpest one so far. Fixed in 2a61343, along with something it did not mention that would have made my own message actively harmful here. The report checks outThe canonical branch says what it is for in its own comment:
A denied Both candidate probes are three-state now. So is the directory probe above them, which reported an unreadable directory as What the report missedMy shared failure message says:
True of VerificationFourteen assertions driving the real block through every state, with the Windows-only
Denied is also no longer misdiagnosed as "no llama-server.exe was found". One place I deliberately left Repo suites: 1644 passed, same 26 pre-existing failures. All seven simulation suites still green (35, 58, 21, 26, 11, 14 assertions plus the 5.1/6.2/7.0 syntax check), the 41-check PowerShell regression test passes, and the contract tests pass on Python 3.10 through 3.13. |
Three review points, all reproduced before fixing:
- The canonical --with-llama-cpp-dir override still got the managed
advice ("delete it, Unsloth reinstalls it"). The override means the
user asked to reuse whatever is in that tree, so deleting it is wrong
wherever it sits. Both candidate denials now pass -UserSupplied, which
collapses the branch to one call.
- Phase 1b's git prerequisite scan probes the same candidate binaries
with a bare Test-Path under "Stop", thousands of lines before the
Phase 4 guards, so a denied override terminated the run with the raw
error this change exists to replace. Reproduced, then guarded.
- Test-StudioOwnedAdoptable collapsed a denied prebuilt marker to $false,
so Assert-StudioOwnedOrAbsent called an Unsloth tree an unrelated
directory and told the user to move it aside. Get-StudioAdoptableState
returns Yes/No/Denied and the guard reports the denial first;
Test-StudioOwnedAdoptable stays as the boolean view for the cosmetic
cleanup gate.
A denied file under a readable directory is a Windows-ACL-only state:
POSIX keeps a mode-000 file stat-able, and a symlink into a denied
directory still answers Test-Path. The local run injects that one state
at the lowest seam and lets the real functions run; the Windows leg of
test_path_probe_access_denied.ps1 builds it for real with icacls and
skips elsewhere with the reason.
test_setup_ps1_adopts_existing_whisper_prebuilt_marker sliced between two
function names and the marker scan moved, so its anchor now points at
Get-StudioAdoptableState. Its assertion is unchanged.
Reverting each fix individually puts the original behaviour back: the
ownership misdiagnosis, the raw "Access to the path ... is denied" from
Phase 1b, and the delete-your-own-build advice.
|
All three check out. Fixed in de486ff, each reproduced first and each re-checked by reverting it. 1. The canonical override is still the user's buildYou are right and my reasoning was wrong. I gated on "is this path the managed cache" when the question is "did the user tell us to reuse this tree". 2. Phase 1b runs first, and it was still bareConfirmed at line 1863, inside the Guarded, with the user-supplied wording since it is the same override. 3. A denied adoption marker was reported as an unrelated directoryAlso correct. which is the misdiagnosis you described. One thing worth recording about that last caseA denied file under a readable directory cannot be built on POSIX. A mode-000 file is still So the local run injects that single state at the lowest seam, one exact path, and lets the real VerificationNine denial routes now, all reported rather than collapsed. Simulations: 35, 58, 21, 28, 11, 20 assertions plus the 5.1/6.2/7.0 syntax check, all green. Reverting each of the three fixes individually fails its own contract test and its own simulation assertion.
Repo suites: 1646 passed, same 26 pre-existing failures in |
- tests/sh/test_with_llama_cpp_dir_flag.sh anchored the literal 'if ($ResolvedLocal -eq $LlamaCppDir) {', which 2a61343 hoisted into $LocalIsCanonical. Re-pin it to the comparison, not the branch. - The junction path deleted and replaced $LlamaCppDir behind a bare Test-Path, so a denied destination still threw raw under a default home. Probe it three-state, and treat Denied as surviving removal. - Get-Content on the prebuilt metadata still globbed while the probes gating it went literal, so a path holding [ or ] passed the probe and threw into the catch. Make both reads literal, with a test. - Get-PathDenialDetail could throw on a non-filesystem provider item whose .Attributes has no -band overload, replacing the failure being reported. - Win32Exception keeps E_FAIL in HResult and the code in NativeErrorCode, so the HRESULT check never matched it. Fix the comment and the check. - test_windows_git_gate.py ran the layout scan in a child that never defined Get-PathState, so de486ff had it silently report nothing built. Inject the real helpers, as test_resolve_cuda_toolkit.ps1 does. - Relax the exact Exit-PathAccessDenied count to a floor and key the -UserSupplied rule on the path reported rather than on position.
|
Pushed 44e14f7 on top of The CI failure
Confirmed it is this branch and not something pre-existing: the file is 24/24 on A regression in
|
The ownership guard stops precisely because it could not read the marker, so it cannot claim the folder is ours either. It was still emitting the managed-cache text, telling the user to delete it. Eleven lines below, the readable-but-unowned branch says 'move it aside' instead, so we were being gentler when we could prove the tree was not ours than when we could not read it at all. New -OwnershipUnverified wording for those three stops. Also from re-reading the previous commit: - The reparse-point unlink above the junction path ran before the new three-state probe, and a link reports Present, so the probe could not cover it. A denied unlink still terminated on the raw .Delete() throw. - That junction destination probe had no test at all; reverting it left the suite green, since the count floor cannot see a swap. Pinned by name like every other route. - The re-pinned shell anchor accepted an assignment that nothing consumed. Pin the branch that uses it too. - Get-PathDenialDetail now checks the item type rather than the attribute type, which also covers a provider item with no Attributes at all.
The guard above the clone path probes only .git, but its own comment names any unreadable child as the risk. A forced source build over a non-git install with a denied child elsewhere reads Absent, clones into a temp dir, and reaches the swap. Both steps there are non-terminating under Continue and neither was checked. Reproduced: Remove-Item partially fails, the original survives, and Move-Item then moves the temp dir INSIDE it, so the new binary lands at llama.cpp/llama.cpp.build.<pid>/llama-server.exe while $LlamaServerBin points at llama.cpp/build/bin/Release. Setup carries on reporting success with no usable server and a half-deleted install. Check the removal before moving, so the stop happens while the temp build is still whole, and check the move afterwards. Denied routes through Exit-PathAccessDenied; anything else surviving exits 3 like the other blocked-replacement paths.
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
…le install tree (#7757) * Windows: guard the source-build and whisper.cpp probes on an unreadable install tree Follow-up to #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. * Harden the denial contract tests against surviving mutations 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. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix the -NonFatal negative control for Windows ACL semantics 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. * Detect a denied tree that has no ownership marker on Windows Staging CI on windows-latest caught this. Get-StudioAdoptableState decided "denied" only from probes of two marker files inside the tree, but Windows reports a MISSING child of an unreadable directory as absent rather than throwing. A denied tree holding neither marker therefore returned "No", and Assert-StudioOwnedOrAbsent fell through to "path is not an Unsloth-owned install" and exited: the wrong cause, and fatal, on the only platform any of this runs on. It also defeated the whisper -NonFatal path, since an unowned tree is still fatal by design. Listing the directory itself distinguishes "no markers here" from "cannot look", so that is the fallback when neither probe reported a denial. A readable tree with no markers still returns "No" as before, and the catch swallows anything that is not a denial because this helper must not throw. This also corrects the message a denied custom-home llama.cpp tree produced on Windows, which reported the same wrong cause. chmod 000 blocks the child probes outright, so it never reached the new code. chmod 111 allows stat of a named child while forbidding a listing, which is exactly the Windows shape, so the test now covers both and the negative control fires only on the 111 case. * Tighten comments in the denied-tree and whisper install changes --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…else's (#7771) * Linux/macOS: tell an unreadable llama.cpp install apart from someone else's setup.ps1 learned this in #7735 and #7757; setup.sh never did. A tree that is ours, carrying our own marker, reads as somebody else's the moment it stops being searchable, because every probe inside it reports the marker absent. The ownership guard then said the folder is not an Unsloth-owned install and told the user to move it aside or pick an empty UNSLOTH_STUDIO_HOME, when the actual fix is a permission change. Search (+x) is what those probes need, not read (+r): a directory can be readable and unsearchable (mode 444) or searchable and unreadable (mode 111), so the new probe tests search. The two destructive replaces also ran blind. Under errexit a failing rm -rf aborts on a raw permission error with no [TAURI:ERROR], so the desktop app shows a bare exit code and the freshly built llama.cpp is left in the temp directory with nothing saying where. Both sites now tolerate the failed remove, check that the directory is actually gone, and report either the permission problem or where the new build was left, exiting 3 as the Windows side does for a build that succeeded but could not be installed. Neither message tells the user to delete a folder Unsloth cannot prove is its own, matching the rule the Windows guard follows. * Keep the rm error when a replace fails The redirect this PR added swallowed the one line that names which subtree refused to go. rm reports the deepest failing path, llama.cpp/build say, while the message below it can only name the install root, so a user whose build directory alone is locked lost the part that told them where to look. || true is what keeps errexit from aborting; the redirect was never doing that job, so stderr stays. * Tighten the comments on the denied-install-tree guards
Problem
A Windows install fails at the llama.cpp prebuilt step with a raw PowerShell error:
Three things combine here:
Test-Pathdoes not return$falsewhen an ACL denies the probe, it raisesUnauthorizedAccessException.setup.ps1runs under$ErrorActionPreference = "Stop", so that probe was a terminating error with no handler and setup died with exit code 1.[TAURI:ERROR_DEFAULT], so the UI showedInstallation failed: unsloth studio setup failed (exit code 1)and the real cause stayed buried in the log.$LlamaCppDiris%USERPROFILE%\.unsloth\llama.cppfor a default studio home, which lives beside the app rather than inside it. Reinstalling reused the same unreadable folder, so a second install toD:\died on the identical line and there was no way forward.The installer does not create this state itself: it never sets ACLs and never elevates on Windows (elevation is Linux/apt only). The denial comes from the machine, for example antivirus or Controlled folder access, a tree created by another or elevated account, or a junction pointing at a locked target. Rare, but a permanent hard stop when it happens.
Fix
studio/setup.ps1:New
Test-AccessDeniedError,Get-PathState(Present/Absent/Denied),Test-PathQuietandGet-PathDenialDetail.Get-PathStatekeepsDenieddistinct fromAbsentso a denial gets reported rather than silently retried.The crash site now branches on
Deniedand stops throughExit-SetupFailure, which emits[TAURI:ERROR].install.rsprefers that over its generic exit-code message, so the desktop app now shows:The console adds the steps: close Unsloth, delete or rename the folder,
takeown/icaclsif deleting is also denied, and check antivirus or Controlled folder access. If the folder is a junction, the message names the link target.The other probes that read inside an install tree we do not own now use
Test-PathQuiet: the studio-owned marker checks, thellama-server.execandidate scans, the.gitsource-build probe, and the whisper.cpp read of the llama.cpp marker. That last one matters on its own, since whisper failures are non-fatal by contract but this probe could still abort setup.Assert-StudioOwnedOrAbsentreports "cannot be read: access is denied" instead of the misleading "not marked as an Unsloth-owned install". Ownership is unknowable while the tree is unreadable. Both branches stay gated on$StudioHomeIsCustom, so default-home behaviour is unchanged.Nothing outside the denied path changes: a readable install still takes the exact same route it did before.
Tests
tests/studio/test_path_probe_access_denied.ps1(new, 30 checks, wired into the PowerShell installer unit test step):icacls /denyon Windows andchmodelsewhere.Test-Pathstill terminates on the same path, which also gates the suite so it cannot pass vacuously on a host where the denial does not take.Deniedbranch with the realExit-SetupFailureunderUNSLOTH_TAURI_MODE=1and asserts the[TAURI:ERROR]line the UI consumes, the exit code, and that the branch does not fall through into the install.tests/studio/install/test_setup_denied_install_tree.py(new, 7 tests, runs in Backend CI) covers the source contract, including a scan that fails if a bareTest-Pathreappears inside the llama.cpp tree.Two anchors in
tests/test_studio_install_workspace_guard.pywere updated to the new call text. Their assertions are unchanged and all 45 tests in that file pass.Local run of
tests/studio/install,tests/test_studio_install_workspace_guard.py,tests/python/test_cross_platform_parity.py,tests/studio/test_ci_shell_suite_coverage.pyandtests/test_profile_startup_gate.py: 1625 passed. The 26 failures left intest_rocm_support.pyandtest_managed_node_runtime.pyfail identically on an unmodified tree, they are pre-existing on macOS and unrelated.Note
This fixes the handling, not the cause of the denial, which I could not determine from the report alone. Anyone hitting it still has to clear the folder, but they now get told which folder and why a reinstall will not help. The
[TAURI:ERROR]text also makes further reports easy to identify in the diagnostics if a systemic cause turns out to be behind it.Workaround for anyone on the current build: delete or rename
%USERPROFILE%\.unsloth\llama.cppand retry. It is a managed cache and gets reinstalled.Reported in unsloth-test/unsloth-test#9