Repository navigation
installer: the adaptive uv cache selection was unreachable on every writable install - #10626
Conversation
…ritable install
Two halves of `install.sh`, each correct to read, wrong in the order they run.
The block below `# Keep uv's cache on the same filesystem as the venv it fills` exports
`UV_CACHE_DIR="$STUDIO_HOME/cache/uv"` whenever the caller left it unset. It has to run there
and not later: uv aborts on a cache it cannot create, and several install steps come before
`_configure_uv_cache`.
`_configure_uv_cache` runs much further down, and its first `case` matched any non-blank
`${UV_CACHE_DIR-}`, set `_UV_CACHE_MODE=custom` and returned. It cannot tell a caller's choice
from the installer's own default, because from inside the variable they are the same string.
So on every writable install the two together took the `custom` branch:
* the `env -u UV_CACHE_DIR uv cache dir` probe never ran;
* `shared` was never selected, so a machine with a populated uv cache re-downloaded
multi-gigabyte Torch and CUDA wheels into a second one;
* `_prepare_studio_uv_cache_for_launch`, which opens
`[ "${_UV_CACHE_MODE:-}" = shared ] || return 0`, was dead code;
* and `--isolated-uv-cache` never reached its own branch either. The directory it produced was
right by coincidence -- `custom` and `isolated` both leave `$STUDIO_HOME/cache/uv` -- but the
mode was wrong, so the "already-cached packages may download again" warning the flag exists to
print was never printed.
Fixed by recording whether the value is ours: `_UV_CACHE_DIR_INSTALLER_DEFAULT`, set true only
where the installer assigns the default and cleared again on the unwritable-cache fallback. A
caller's `UV_CACHE_DIR` keeps its priority; the installer's own default falls through to the
selection it was always meant to reach.
`tests/sh/test_uv_cache_adaptive_selection.sh` runs the two halves in the order the installer
runs them, which is the only way this is visible -- neither half is wrong on its own. Anchored
on text that predates the fix, so it exercises the old code rather than failing to find it:
against unmodified main it reports 5 failures, and 13/13 with the fix.
Nothing else moved. `test_uv_cache_colocation.sh` 17/17, `test_install_uv_cache_root.sh` all
passed, `test_uv_pinned_release.sh` 72/72, `test_uv_cache_discipline.py` and
`test_ci_shell_suite_coverage.py` 39/39. `sh -n` and `bash -n` clean.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Confirmed against main: the top-level export at install.sh:790 makes the custom case in _configure_uv_cache always match, so shared mode and _prepare_studio_uv_cache_for_launch never run on a writable install. Will get this reviewed. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fa9d2e958d
ℹ️ 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".
| _uv_artifact=$(find -L "$_uv_bucket" -type f \ | ||
| ! -name CACHEDIR.TAG ! -name .git ! -name .gitignore \ | ||
| ! -name '*.lock' ! -name '*.msgpack' ! -name '*.http' ! -name '*.rev' \ | ||
| -print 2>/dev/null | head -n 1) || true |
There was a problem hiding this comment.
Treat inaccessible nested cache entries as unusable
When an artifact bucket itself is writable but one nested cache entry (for example archive-v0/<hash>) is inaccessible, find suppresses that traversal error and another readable artifact can still mark the cache populated while _uv_default_writable remains true. If the install needs the inaccessible entry, uv pip install then fails while reading that directory; detect traversal errors or otherwise validate nested entries before selecting the shared cache.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not taking this one. Validating nested entries means walking a warm cache of hundreds of thousands of files on every install, and it would reverse a contract this repo already pins: tests/sh/test_install_uv_cache_root.sh:241, 'unreadable leaf keeps a warm cache warm', builds a denied archive-v0/ beside a readable one and asserts the cache stays shared. find's 2>/dev/null is there for the same reason. The line is at the directories uv itself creates and renames into, which is what the probe now covers: the root and every existing bucket. A denied entry deeper than that is a cache another account partially owns, and the fallback for it is --isolated-uv-cache.
| # In place, before anything reads it: every branch records, so this is the one point | ||
| # every phase of the install and the marker are made to agree on one directory. | ||
| _absolutize_uv_cache_dir | ||
| UV_CACHE_DIR=$(_absolutize_uv_cache_dir) |
There was a problem hiding this comment.
Preserve trailing newlines in custom cache paths
When a caller's UV_CACHE_DIR names a legal POSIX path ending in a newline, this command substitution strips that newline from the helper's output, so the installer silently redirects uv to a different sibling path and records that altered value. The previous in-place absolute-path branch left such custom paths untouched; avoid command substitution for this normalization or otherwise preserve trailing newline characters.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not taking this one. A UV_CACHE_DIR ending in a newline was never carried through an install: _record_uv_cache_choice writes the marker with printf '%s\n' and install.sh:656 reads it back with $(cat ...), which strips trailing newlines, so the update would already resolve a different path than the install used. Preserving it in this one assignment would not make such a path work, only make the two disagree in a new place. Confirmed by writing and re-reading a marker for a path ending in a newline: it comes back without it.
…oute forwarding our own cache path
The custom and isolated branches both choose a directory without probing, and both returned before the UV_NO_CACHE check, so they recorded a marker naming a cache uv never touched. Checked against uv 0.10.7: with UV_NO_CACHE=1 a caller's UV_CACHE_DIR is left completely empty, CACHEDIR.TAG included. A later repair reads that marker and can prefer an unrelated cache that happens to hold bytes. Both installers were the outliers here, the same way as the earlier fixes on this branch: unsloth_cli/commands/studio.py has always asked _uv_no_cache_requested() before choosing or recording anything. The spelling test is now one helper per installer rather than a case and an inline -in, so the three copies of clap's literal set cannot drift apart. Each branch keeps its own directory: a caller's UV_CACHE_DIR is still exported exactly as written, and isolation still points at the Studio cache. Only the marker write is skipped, and the custom step line says so. Tests cover both directions on both sides, since a guard that simply stopped recording would also pass the first half. The new helper is added to every extraction list; a name missing from one of those does not fail loudly.
…10626 The installers stopped abandoning a warm Studio cache on a pre-marker or stale marker install, and stopped counting `archive-v0.backup` as warmth. The CLI is what an existing installation actually runs on `unsloth studio update`, and it had neither, so the update could undo the fix on the same machine. _uv_cache_has_packages matched bucket names by prefix, which also takes `archive-v0.backup` and `archive-backup-v0`, whose bytes uv cannot reuse. Its docstring already claimed the same rule as install.sh. It now validates the whole `<kind>-v<N>` suffix through a helper that mirrors both installers. The precedence is POSIX-only, and the asymmetry is historical rather than a shortcut. install.sh always took its `custom` branch before the marker shipped, so shared mode was unreachable and nothing else wrote to $STUDIO_HOME/cache/uv: verified by running the selector from b66d2a4~1. A warm unmarked Studio cache there is this install's own. install.ps1's selection already worked, so a pre-marker Windows install could have used the shared cache and repointed the backend at the Studio one, leaving on-demand wheels there while Torch and CUDA sit in the shared cache. Windows therefore keeps uv's default ahead of it, which is what the test being retargeted here was protecting. A marker naming a cache that still EXISTS and has gone cold stays a decision on both platforms, so the machine that really moved on still reaches uv's default.
…10626 Two sites asked _uv_cache_root_is_writable about a cache whose buckets the candidate probe had already rejected, so both could hand back the cache uv is about to abort on. A `sudo` run leaves a root-owned bucket and a dangling link is an existing path to mkdir(2), so the root can be perfectly writable while the cache is not. The fallback chose the Studio cache unconditionally when nothing was warm, since a cold cache never reaches the warn path. Reproduced: a Studio cache holding a dangling archive-v0 and a cold default selected the Studio cache, and uv fails on the first bucket it touches. It now falls through to the populated cache that only failed the probe, then to uv's default when that is usable, which at worst costs the downloads this cache was never going to save. The launch repoint had the same root-only question. Reproduced: with a warm default the selection correctly chose shared, then the repoint sent the autostarted backend into the rejected Studio cache anyway. The rule now lives in one helper per installer, _uv_cache_is_writable and Test-StudioUvCacheUsable, and the candidate probe calls it too, so the three sites cannot drift. Both new names went into every extraction list in the same commit: a missing one is `command not found`, which reads as a clean answer.
|
Codex Review: Didn't find any major issues. 🚀 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". |
I had the history backwards. The marker arrived in b66d2a4 on 2026-09-06 and the early UV_CACHE_DIR block only in e129630 the day AFTER, so an install old enough to have no marker is old enough that `shared` was reachable on POSIX, not too old. In that mode the launch repoint leaves a few on-demand backend wheels in $STUDIO_HOME/cache/uv while Torch and CUDA sit in uv's default. Ordering the unmarked Studio cache ahead of the default therefore picked the leftovers: reproduced as a real offline install that succeeds on main and fails on this branch. The earlier check that "confirmed" the opposite hardcoded the early block into its own harness, so it proved nothing about that revision. The unmarked Studio cache is now the LAST candidate in both installers, which is the order unsloth_cli/commands/studio.py already used, so the platform split I added there is gone with it. A warm Studio cache still wins whenever uv's default is cold, which is the install the rule was added for, and `unsloth studio update` is now byte-identical to main across all five marker states an install reaches. Separately, the fallback treated a Studio cache that is WARM but failed the probe as unusable and moved to a cold default, losing the bytes. A warm cache that only failed a speculative bucket probe beats a cold one we can write; a cold Studio cache with an unusable bucket still loses to uv's default, which is the case that prompted the probe.
|
Correcting something I got wrong earlier in this PR, since it changed the design. I claimed shared mode was unreachable on POSIX before the uv-cache marker shipped, and said I had verified it by running the selector from The real history is the other way round:
So an install old enough to have no marker is old enough that shared mode was reachable, not too old for it. In shared mode the launch repoint leaves a few on-demand backend wheels in Fixed in 499d364:
101 shell assertions under dash and bash with errexit both ways, 53 pwsh cases, 1463 Python tests. |
|
@codex review |
str.isdigit() is true for Arabic-Indic and superscript digits, so the helper added in c592585 counted `archive-v<Arabic-Indic one>` as a bucket where the sh `*[!0-9]*` case and the PowerShell \A[0-9]+\z both reject it. uv writes ASCII, so Python was the only one of the three that would have read such a directory as warmth. Exotic, but it is a three-way rule and the other two already agreed.
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! 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". |
install.shhas two halves that are each correct to read and wrong in the order they run. Theresult is that the adaptive uv cache selection has never executed on a writable install.
What happens
The block below
# Keep uv's cache on the same filesystem as the venv it fillsexportsUV_CACHE_DIR="$STUDIO_HOME/cache/uv"whenever the caller left it unset. It has to run where itdoes rather than later: uv aborts on a cache it cannot create, and several install steps come
before
_configure_uv_cache._configure_uv_cacheruns much further down. Its firstcasematched any non-blank${UV_CACHE_DIR-}, set_UV_CACHE_MODE=customand returned. It cannot tell a caller's choicefrom the installer's own default, because from inside the variable the two are the same string.
So on every writable install the pair took the
custombranch, and four things followed:env -u UV_CACHE_DIR uv cache dirprobe never ran;sharedwas never selected, so a machine with a populated uv cache re-downloadedmulti-gigabyte Torch and CUDA wheels into a second one -- the exact duplication the shared
path was written to avoid;
_prepare_studio_uv_cache_for_launchopens[ "${_UV_CACHE_MODE:-}" = shared ] || return 0,so it was dead code for the same reason;
--isolated-uv-cachenever reached its own branch either. The directory it produced wasright by coincidence --
customandisolatedboth leave$STUDIO_HOME/cache/uv-- but themode was wrong, so the "already-cached packages may download again" warning the flag exists
to print was never printed. That one was not in the original report; the test found it.
Why this is by execution order, not by diff
Nothing in either half is wrong to read, which is why it survived review of both. The proof is
the order:
_unsloth_mainif [ -z "${UV_CACHE_DIR:-}" ]; then UV_CACHE_DIR="$STUDIO_HOME/cache/uv"; export UV_CACHE_DIR_unsloth_main_configure_uv_cachecase "${UV_CACHE_DIR-}" in *[![:space:]]*) _UV_CACHE_MODE=custom; return 0Both live in
_unsloth_main's own body -- the installer runs inside one function so a pipedshreads the whole file before executing any of it -- and neither is nested inside anotherfunction, so the order above is the order they run. The early block only leaves
UV_CACHE_DIRunset when the directory cannot be created or written.
The fix
_UV_CACHE_DIR_INSTALLER_DEFAULT, set true only where the installer assigns its own default andcleared again on the unwritable-cache fallback.
_configure_uv_cachetakes thecustombranchonly when the flag is not set, so a caller's
UV_CACHE_DIRkeeps its priority and theinstaller's own default falls through to the selection it was always meant to reach.
What waking the selection up then exposed
The selection had never run in production, so everything downstream of it was untested by
construction. The rest of the branch is what running it turned up, in the order it turned up.
A cache we can read is not a cache we can use. uv writes
CACHEDIR.TAGinto the root andrenames distributions into the buckets, aborting on either, and an ACL answers a different
question than a real create does. So the selection creates and deletes a
mktempfile in theroot and in every bucket, and a populated cache that refuses it loses to the Studio cache with a
warning rather than failing the install two minutes later. Only where a bucket should be: uv
names those
<kind>-v<N>, and a cache-dir pointed at a mount point has a root-ownedlost+foundthat must not condemn it.archive-*is not the bucket rule. It also matchesarchive-v0.backupandarchive-backup-v0, whose bytes uv cannot reuse, so a cache that is empty in practice read aswarm and won. Warmth now requires the whole
-vsuffix to be numeric and the kind to be oneuv fills; the write probe deliberately keeps the looser shape, because under-detecting a future
bucket kind costs a fallback while under-probing one lets an unwritable cache through. The
version also cannot be empty:
##*-vstrips through the last-v, soarchive-v1-vleftnothing behind for
*[!0-9]*to match and read as a bucket, and one read-only directory a usernamed that way condemned a warm cache.
Test-StudioUvBucketNamehad rejected it from the start,so that one was an sh/ps1 split as well.
UV_NO_CACHEstands the selection down, and stands the RECORDING down too. The custom andisolated branches choose a directory without probing, and both returned before this check, so
they recorded a marker naming a cache uv never touched: checked against uv 0.10.7, a caller's
UV_CACHE_DIRis left completely empty underUV_NO_CACHE=1,CACHEDIR.TAGincluded. Eachbranch keeps its own directory; only the marker write is skipped. uv neither reads nor writes a cache under it, so
there is nothing to select: probing touches a cache the caller told uv to leave alone, and a
marker written there names one this install never filled. The literals are clap's, which is what
uv binds the variable to --
yandtwere missing from all three copies of this rule.A rerun keeps the cache it recorded. Otherwise a repair abandoned a Studio cache holding
Torch and CUDA the moment one unrelated wheel made uv's default read as warm, re-downloading
gigabytes to "avoid duplicate downloads". Content cannot decide it, because the launch repoint
leaves backend bytes in the losing cache; that is what the marker is for, and it is the
precedence
unsloth studio updatealready used.An install from before the marker has no marker, and abandoning its warm
$STUDIO_HOME/cache/uvcosts the Torch and CUDA downloads again. So it is a candidate whenthere is no marker, or when the marker names a directory that is gone, which is a stale pointer
rather than a decision. It is the LAST candidate, behind uv's default, and the history is why:
the marker arrived in
b66d2a4c8on 2026-09-06 and the earlyUV_CACHE_DIRblock only ine12963071the day after, so an install with no marker is old enough thatsharedwasreachable, and there the launch repoint leaves backend wheels in the Studio cache while the real
bytes sit in the default. Ahead of the default it picked those leftovers. Behind it, a warm
Studio cache still wins whenever the default is cold, which is the install this is for.
A delete that fails is not the same as a probe that is still there. An indexer or a
scanner holding the handle open makes one delete fail and the next succeed, and PowerShell's
Remove-Item -ErrorAction Stopthrows outright for a probe something else already removed,where
rm -fexits 0. Condemning the cache on the first failure could divert an install awayfrom the Studio cache into a shared one already known to be worse, which offline is an install
that used to succeed and then failed. Both sides retry and judge by whether the probe is gone.
A marker naming a directory that is no longer there is stale, not a decision. Treating it
as one suppressed the Studio cache, so a warm one holding Torch and CUDA lost to uv's default --
the abandonment the marker exists to prevent. A recorded cache that still exists and is merely
cold does still fall through to shared, which is the machine that really has moved on.
Creating a probe is not writing to a cache. uv renames distributions into these
directories, so a root that grants create and denies unlink fails the install later rather than
not at all, and leaks the probe into the user's cache. NTFS carries DELETE as its own ACE and an
append-only directory does the same on ext4. The bucket probes had already decided this; the
three root probes disagreed with their own sibling by way of
|| trueandSilentlyContinue,and now agree.
The root can be writable while the cache is not. A
sudorun leaves a root-owned bucketand a dangling link is an existing path to
mkdir(2), so a root-only probe passes a cache uvaborts on. That question decides three things, and two of them asked only about the root: the
fallback took the Studio cache unconditionally when nothing was warm, since a cold cache never
reaches the warn path, and the launch repoint sent the backend into a cache the candidate probe
had already rejected. One helper per installer now answers for all three.
The launch repoint could point at a dead cache.
sharedis reachable only when the earlyblock failed its own write probe on
$STUDIO_HOME/cache/uvand unsetUV_CACHE_DIR, which iswhat lets the selection run at all. Repointing there unconditionally handed the autostarted
backend a cache uv aborts on, after an install that succeeded. It probes first now and keeps the
shared cache otherwise: that is the cache this install actually filled.
Plus the smaller ones the same runs produced:
finddying onSIGPIPEunderpipefailcleareda warm verdict; a caller's
set -fmade the scan's own globs read every cache as empty; adangling bucket link is an existing path to
mkdir(2), which answersEEXIST; a trailingseparator compared unequal to the same directory written without one, so a marker carrying one
was announced as
sharedand got the repoint thestudiobranch exists to avoid; and the shmarker read was the only one of the three that tolerated neither a BOM nor a CR, which is what
install.ps1writes under PowerShell 5.1 and what a WSL install sharing$STUDIO_HOMEreads.And
unsloth studio updatehas to agree with the installer about the same machine.unsloth_cli/commands/studio.pyis what an existing installation actually runs, and it matchedbucket names by prefix, so
archive-v0.backupcounted as warmth. That is fixed. Its candidateORDER was already right, and the installers now match it rather than the other way round:
selection for an update is identical to
mainacross every marker state a released installreaches.
Windows
install.ps1setsUV_CACHE_DIRin one place, inside the selector, so it never had theordering defect and its adaptive selection has always run. What it did not have is any of the
above. Measured by running its own selector: a rerun abandoned a warm Studio cache,
UV_NO_CACHEstill probed and recorded,
archive-v0.backupcounted as warmth, and a populated-but-unwritablecache was selected -- that last one fails the install outright. Two of those are the same bugs
this branch fixes on POSIX, and
unsloth_cli/commands/studio.pyalready behaved the new way onWindows, so
install.ps1was the odd one out on its own platform. It now carries the same rules,plus two of its own: under
$ErrorActionPreference = "Stop"aTest-Pathinside an ACL-denieddirectory throws, and the throw reached the candidate loop's catch, so an unreachable marker took
uv's default down with it; and
$scanBlockedwas shared across candidates, so the warning namedthe wrong cache and suppressed the one that named the right one.
What this changes for people who already have it installed
This is not a no-op, and it is worth being exact about that rather than calling it hardening.
The whole point of the fix is that a code path which has never run on Linux or macOS now runs,
so the installer's behaviour there changes by design. Measured by executing both installers
against real fixtures under dash, bash, busybox ash and pwsh:
~/.cache/uvcold or absent~/.cache/uvwarmUV_CACHE_DIRset by the caller--isolated-uv-cacheUV_NO_CACHEsetThe first row is the ordinary case and is unchanged. The second is the fix. Nothing here moves,
renames or deletes an existing venv, cache, shortcut, desktop entry, credential file or marker,
and no other part of either installer changes: an AST-level comparison of every function body and
every top-level statement in both installers, before and after, reports exactly the uv-cache
functions plus the WSL reroute's cache-forwarding block, with no function removed. PATH, the
profile lines, the shims, the desktop entry, the uninstaller and the venv are all untouched, and
scripts/uninstall.sh/scripts/uninstall.ps1never read the marker orUV_CACHE_DIR, so ashared-mode install cannot lead an uninstall to delete a user's own uv cache.
Selection is idempotent: every mode was run three times over the same
$STUDIO_HOMEunder eachshell, and run 2 and run 3 produce the same mode, the same directory and the same marker bytes as
run 1, with nothing oscillating.
Known trade-offs
Recorded here rather than argued in a thread, so a reviewer can overrule them.
UV_NO_CACHEwith a caller'sUV_CACHE_DIRrecords nothing. The install filled no cache, sothe marker, which means "the cache this install filled", would name one uv never touched. The
cost is that a later update with both variables unset has no pointer to that cache. It is
recoverable by setting
UV_CACHE_DIRagain, which_with_studio_uv_cachehonours on its firstline, and the alternative misdirects every later repair.
The write probe covers any
<kind>-v<N>directory, not only kinds uv currently uses. Aread-only
future-v9therefore refuses a cache uv would have been happy with. Under-probing isworse: uv adds bucket kinds between versions, and letting an unwritable one through fails the
install. A cache that is warm and only failed this probe is still preferred over a cold one.
Marker parsing differs between the three readers on trailing whitespace. POSIX allows a
trailing space in a path and Win32 strips it, so sh and the CLI preserve it while PowerShell
trims. This predates the branch and no writer produces such a marker.
Cross-platform
Run on real runners, not only here: Linux x64, Linux ARM64, Apple Silicon macOS 15 and 26 (the
only hardware MLX runs on), Intel macOS 15, and Windows x64. The Windows ARM64 leg fails to
install
sqlite-vec==0.1.9, which has no ARM64 Windows wheel, before it reaches any test. ThePOSIX suites also run under every
/bin/shthis repo can meet -- dash, bash and busybox ash --with
errexiton and off, becauseinstall.shis#!/bin/shwithset -eon line 5.Nothing in the diff touches the Studio web UI, so there are no screenshots to attach: the only
user-visible output that changes is the installer's own
uv cachestep line, and every spellingof it is listed above.
Test
tests/sh/test_uv_cache_adaptive_selection.shlifts both halves out ofinstall.shand runsthem in the order the installer runs them, which is the only arrangement in which the original
defect is visible. It is anchored on text that predates the fix, so it exercises the old code
rather than failing to find it -- an earlier draft anchored on a comment the fix introduces and
"failed" by not extracting anything, which proves nothing. It also runs under every
/bin/shonthe box with
errexitboth ways:install.shis#!/bin/shwithset -eon line 5, and anearlier version of this suite ran one shell without it.
tests/python/test_windows_uv_cache_selection.pyis the Windows half, and it asserts behaviourthe same way, by running
install.ps1's real selector under pwsh rather than by matching text.It runs on Linux and macOS CI too, so the Windows path is exercised everywhere pwsh is.
And the surrounding suites, on this branch: all 64 files under
tests/sh,test_install_uv_cache_root.sh99/99,test_uv_cache_colocation.sh,test_uv_pinned_release.sh,test_strixhalo_wsl_reroute.sh,test_cross_platform_parity.py83/83,test_windows_python_venv_hardening.py51/51,test_studio_update_uv_cache.py80/80,test_uv_cache_discipline.pyandtest_ci_shell_suite_coverage.py.sh -n,bash -nand thePowerShell parser clean. The shell suite is discovered automatically by Backend CI, so no
workflow list needs updating.
The one file here that is not about uv
.github/scripts/Watch-ForCompiler.ps1. The no-compiler lane failed on this branch naming onecompiler process, and the record it named is timestamped
17:51:57.107while the step it wasscored against did not print its first line until
17:51:58.58. Nothing ininstall.ps1canhave spawned it; it belongs to the positive control one step earlier, which compiles a type on
purpose. That is the case
$priorexists to subtract, and it did not, because the Security logis written asynchronously and a record 1.5 seconds old can be absent when
$priorsamples itand present by the time the measurement reads back. The record's own
TimeCreatedis below thefloor either way, so the query now asks for a second more than the window at each end and cuts
the result back by
TimeCreated. It narrows what can be counted; nothing a compile inside thewindow does stops being counted, and the padded far end also removes the opposite risk of a
bound that rounds the wrong way dropping a real compile in the window's last fraction of a
second. Pinned by a test.
About the green test someone will point at
tests/studio/test_uv_cache_discipline.pypasses, 10/10, before and after this change, and itdoes not contradict any of the above. It covers the CI cache action under
.github/-- adifferent occurrence of the same variable name and a different concern. It says nothing about
installer-side selection.
Provenance
Found by review on #10323 and first raised there, then against #10280. Both are
wrong addresses and neither can fix it: #10323 does not touch
install.shat all, and #10280'sonly change to it is a 142-line append that touches neither hunk. The code is
main's, so thefix belongs here rather than riding in on a stacked serving PR.