You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6f0ea2c
Browse filesBrowse the repository at this point in the historyBrowse files
Fix uv script-lock revert per pair (#1285, #890) (#1391)
* Start fix for #1285, #890
Assisted-by: Claude Code:claude-opus-5-5
* Revert each vendored uv script pair on its own
A vendored PyPI entry can wire several PEP 723 scripts (a.py and
b.py, each with its .py.lock) or several PEP 751 locks at once. The
revert judged the whole entry together, so a change to one script
stranded all of them:
- After `uv remove --script b.py six`, a.py still named the vendored
wheel, so b.py's removal counted as drift. vendor --revert left
a.py wired, and remove and rollback exited 1 (#1285).
- Deleting b.py, b.py.lock or pylock.dev.toml failed every unwind
with "cannot read ./b.py.lock", and the hosted takeover pointed at
the same failing command (#890).
The revert now decides per pair: a pair that no longer names the
wheel is removed, not drift, and a wired file that no longer exists
warns vendor_lockfile_missing and is skipped while the remaining
files are restored. Other read errors still fail closed, and a hand
edit inside a still-wired pair is still drift.
Fixes#1285Fixes#890
Assisted-by: Claude Code:claude-opus-5-5
* Read each wired Python file once on revert
Review follow-ups to the per-pair revert:
- Read every wired file once and judge every record against that
text, so a file deleted mid-revert cannot fail it with
"cannot read".
- Warn vendor_lockfile_missing once per file, in wording that holds
on a dry run or a drift-kept revert.
- Pair a .py.lock with its script through script_of_lock.
- The hosted takeover now passes the missing-file advisory through,
so scan --mode hosted names a deleted script too.
Assisted-by: Claude Code:claude-opus-5-5
* Judge a missing script lock through the overlay
The hosted takeover reverts inside a group commit, whose in-memory
overlay can hold a removal the disk does not show yet. The missing
check looked at the disk while the read went through the overlay, so
a file the run had removed still failed the revert with "cannot
read". The check now uses the overlay-aware read and treats its
NotFound as missing.
Assisted-by: Claude Code:claude-opus-5-5
* Keep the wheel a renamed vendored script uses
The revert now skips a wired script that no longer exists. When the
user renamed it (`git mv job.py tool.py`) rather than deleting it,
tool.py still installs from the vendored wheel through its own
[tool.uv.sources] path. But the residual-reference guard never read
root *.py files, so the revert deleted that wheel and broke
`uv run tool.py`.
The guard now also reads root *.py files. uv resolves a script's
source paths from the script's own directory, so only a root script
can still reach .socket/vendor/. A renamed script now keeps the wheel
with vendor_revert_residual_reference, naming the file.
Assisted-by: Claude Code:claude-opus-5-5
---------
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments