Skip to content

uv-manager 0.5.0

Choose a tag to compare

@glentner glentner released this 15 Aug 14:23
· 79 commits to main since this release
0.5.0
d4b84f3

uv-manager doctor detects the damage a purge actually causes

Doctor's file-level walk was driven by the glob *.dist-info/RECORD. RECORD is read only on
uninstall — the coldest file in a distribution, and so an early casualty of an atime-ordered scratch
purge — which meant a distribution whose manifest was taken first did not match the glob and was
invisible rather than suspicious. Gutting an environment and removing RECORD with it produced
OK no damage detected and exit 0.

The walk now runs from the dist-info directory. A missing manifest is a finding in its own right,
and a tool directory that has lost pyvenv.cfg is too — reported with the reason no automated repair
is safe for that class, since uv falls back to the base interpreter and writes outside the tree the
wrapper owns.

Behavior change for automation

A tool directory missing uv-receipt.toml now exits 0. It prints an advisory instead of a WARN
that set the exit status. Such a tool works perfectly well when invoked, so the old behavior held
doctor at exit 1 permanently over a working tool, and the only route back to 0 was to delete it.
Failures set the status; advice does not. A job prologue keyed on uv-manager doctor can rely on that
distinction now.

If you have automation that treats any non-zero doctor status as "rebuild this tree", it will fire
less often. If you have automation that depends on a receipt-less tool failing the check, it will stop
firing.

Remedies that repair

The printed remediation block named three commands, two of which did not repair a damaged tree and one
of which was destructive: uv-manager install with no argument re-resolves latest from the network
and repoints current, silently overriding a site's UVM_PIN. It is gone. The block now names
uv tool upgrade --all --reinstall --no-cache and uv python install --reinstall, and explains why
--no-cache carries the repair — uv runs no integrity check on its unpacked archive-v0 store, so a
rebuild that reuses the cache reinstalls the same damage.

The block is emitted through a heredoc, so uv-manager doctor | head no longer prints
printf: write error: Broken pipe.

Faster

The walk no longer forks per file. On a 42-tool tree: 198 subprocesses down to 42, and roughly 2.7×
faster wall-clock. README.md proposes doctor for job prologues, where that is real.

Documented detection floor

README.md § Scratch purge now states what doctor cannot see, rather than reading as a complete
list. A distribution deleted entirely leaves no ground truth, because uv-receipt.toml records the
top-level request — jupyterlab — not the 91 distributions it resolves to. Managed interpreters carry
no manifest at all, so the check there is whether import json, os, ssl still succeeds, which it does
with email/, xml/ and unittest/ gone. A clean report means nothing detectable is wrong, not that
the tree is whole.

Deployment

No configuration change and no modulefile change: the Lmod example derives its prefix from
myModuleVersion(), so it is version-agnostic. A site that deploys per-version module files still
needs to add one for 0.5.0.

Deploy by cloning the tag — git clone and rsync -a preserve the bin/ symlinks that make uv,
uvx and uvm one script. See README.md § For administrators: deployment for the cp caveat.

Sites tracking a moving main pick this up on their next pull; sites pinned to a tag need to be told
to re-clone 0.5.0.

Verification

Three adversarial review cycles with executed evidence; no criterion was taken on trust. Every repair
idiom in the new remediation text was measured against real uv 0.12.4 rather than assumed. The
rewritten RECORD walk was proven to reach a byte-identical verdict to 0.4.1 on a 42-tool fixture,
including pathological manifests (no trailing newline, CRLF, quoted embedded commas, and paths
containing $, *, spaces and backslashes). Detection was confirmed read-only: a 331-path manifest of
the state tree is byte-identical across a run, and no lock is taken.

Full record: spec/doctor-detection-gaps/.

Also in this release

Twelve [harness] commits to .agents/, the spec-driven factory this repository develops itself with.
Nothing a site deploys or runs.