Repository navigation
Conversation
This comment has been minimized.
This comment has been minimized.
lonexreb
force-pushed
the
fix/installer-uv-in-use
branch
from
September 16, 2026 08:51
03204e7 to
a6b68bc
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
lonexreb
force-pushed
the
fix/installer-uv-in-use
branch
2 times, most recently
from
September 16, 2026 14:57
961cf5a to
12ff66b
Compare
Member
|
Confirmed the copy failure in install.ps1 still borrows the verdict probe's "could not run on this machine" wording, and the extracted Copy-UvSet skip-if-identical plus named lock path looks right. Will get this reviewed. |
…replace Install-UvFromRelease downloads the pinned uv, proves it runs, and then copies the set over the existing one. With a uv still running (unslothai#9804) Windows refuses that overwrite; the copy loop set $ok = $false and the installer reported "the downloaded uv could not run on this machine", the one thing it had just proven false, then exited. The copy moves into Copy-UvSet: - a destination already holding the verified bytes is left alone, since the running uv this installer is "replacing" may be that very build; - a copy that fails is retried three times over ~750 ms, for a scanner that opens a fresh download; - every copy is verified against the staged file (Copy-Item is non-terminating under some callers' preference), not only uv.exe; - a real lock names the file in $script:UvCopyBlockedAt, and the caller says it is probably in use and to close it and re-run. The verdict probe keeps its own "could not run" message; the copy no longer borrows it. Test-UvCandidateVersion is unchanged. tests/test_installer_uv_in_use.py: text pins for the skip-before-copy order, the retry and the named lock; pwsh cases run Copy-UvSet verbatim with a destination held open exclusively, asserting an identical locked file is left alone and a differing locked file is reported and not half-written. Existing installer suites: 441 passed; the uv pinned release pins: 71 passed. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_012DRiTpjxAymRtv9p8Xr2kd
tests/python/test_cross_platform_parity.py pins that the extracted uv.exe is probed before anything at the destination is touched by requiring the probe call to precede the first Copy-Item in the file. Copy-UvSet sat above Install-UvFromRelease, so its Copy-Item came first in the text although it runs after the probe. Defined below the installer now, still ahead of the call site; no behaviour change. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_012DRiTpjxAymRtv9p8Xr2kd
…unning uv really holds The first behaviour case copied into a destination directory it never created, which Install-UvFromRelease always does before Copy-UvSet. The identical-locked case opened the destination with share None, which refuses even the hash read; a running executable's image on Windows admits readers and refuses writers, so the case now shares Read, and Copy-UvSet's hash sees the file is already ours without writing. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_012DRiTpjxAymRtv9p8Xr2kd
main unpacks the uv archive under $srcRoot (a subfolder when the release carries one) before probing the staged binary, so Copy-UvSet reads from there; the pin names that variable. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_012DRiTpjxAymRtv9p8Xr2kd
This comment has been minimized.
This comment has been minimized.
lonexreb
force-pushed
the
fix/installer-uv-in-use
branch
from
September 27, 2026 01:12
07c003e to
587ff82
Compare
…ow reaches test_mirror_fallback.ps1 runs Install-UvFromRelease from install.ps1's AST with the helpers it calls stubbed or loaded by name. This branch moved the copy into Copy-UvSet and Test-UvFileMatches, which the list did not name, so the suite died at the call with "Copy-UvSet is not recognized". Load the real ones: they skip files the fixture lacks and copy the rest, which is exactly what the assertions on the destination expect. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_012DRiTpjxAymRtv9p8Xr2kd
This comment has been minimized.
This comment has been minimized.
Member
|
Does not actually fix the linked issue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #9804 (the uv half; #9924 covers the launcher verdict).
What
Install-UvFromReleasedownloads the pinned uv, proves it runs (Get-UvExecutableVerdict), and only then copiesuv.exe/uvx.exe/uvw.exeover the existing set. With a uv still running, as in the report, Windows refuses that overwrite: the copy loop set$ok = $falseand the installer printedwhich is the one thing it had just proven false, and exited. The reporter got past it only by finding and closing the process holding uv.
How
The copy moves into
Copy-UvSet(with aTest-UvFileMatcheshash helper):Remove-StudioVenvTreeWithRetry).uv.exeas before (Copy-Itemis non-terminating under some callers' preference, and a stale binary must not pass for ours).$script:UvCopyBlockedAt, and the caller says so:The verdict probe keeps its own "could not run" message; the copy no longer borrows it. Deliberately NOT changed:
Test-UvCandidateVersion's no-"unknown"-verdict gate that @Sletch raised on the issue. The report's own steps pin the replacement, not the gate, and treating a throwing probe as not-broken decides which uv every later install command runs through, which deserves its own evidence.Verification
tests/test_installer_uv_in_use.py: text pins for the skip-before-copy order, the retry, and the named lock (pass locally). Three pwsh cases runCopy-UvSetverbatim, holding the destination open exclusively the way a running executable's image is: an identical lockeduv.exeis left alone and the call succeeds; a differing lockeduv.exeis reported by path and not half-written. These needpwsh, so they run on the CI legs that have it (skipped here, no pwsh on this host).tests/test_installer_*.py,test_studio_install_workspace_guard.py): 441 passed, 53 skipped.tests/sh/test_uv_pinned_release.sh: all 71 install.ps1 pins pass; its one local failure is theinstall.shhang probe timing out on a host withouttimeout, same before this change.🤖 Generated with Claude Code
https://claude.ai/code/session_012DRiTpjxAymRtv9p8Xr2kd