Repository navigation
Commit 4864da5
* Start fix for #1368
Assisted-by: Claude Code:claude-opus-5-5
* Vendor uv's exported requirements.txt too
A uv project often keeps a requirements.txt made by `uv export` for
Docker or plain pip installs. Vendored mode wired only uv.lock and
named the export as an unpatched install source, so `vendor --check`
and `vex` reported contested wiring, and re-running vendor changed
nothing, so the suggested remedy looped.
Vendoring a uv project now also rewrites an exact registry pin of the
package in requirements.txt (or an in-root -r include) to the same
committed wheel, as already done beside Pipfile.lock (#612). The
ledger entry records both, revert restores both, a superseding patch
re-wires both, and a re-run over an already wired uv.lock wires an
export made since. Pins the requirements wiring cannot rewrite (a
range, a UTF-16 file) stay named by pypi_multiple_lockfiles.
The Pipenv and uv paths now share one helper for the sibling wiring
and one for its revert.
Refs #1368
Assisted-by: Claude Code:claude-opus-5-5
* Document uv export co-wiring in the contract
The pypi_multiple_lockfiles row now says an exact pin in a uv export
requirements.txt is wired with uv.lock, as one beside Pipfile.lock is,
and the #1120 CLI test keeps covering the UTF-16 exports that the
requirements wiring still refuses.
Refs #1368
Assisted-by: Claude Code:claude-opus-5-5
* Reuse uv's own wiring-pair constant
Assisted-by: Claude Code:claude-opus-5-5
* Harden uv and Pipenv export wiring from review
- A symlinked requirements.txt or -r include can't be rewritten in
place, so it is no longer treated as wirable. Those projects vendor
the lock and name the export as before, instead of failing the run.
- A hosted takeover of a uv or Pipenv entry whose export pin sits in a
-r include is refused before the revert, as it already is for a
requirements-flavor entry, since hosted mode re-pins only the root
requirements.txt.
- A fresh --dry-run now previews the export wiring.
- Rollback after a refused export reuses restore_snapshot, so a file
that can't be put back is named in the error.
- The flavor matches for the sibling lock and its revert are
exhaustive, and the doc comments no longer say Pipenv only.
Refs #1368
Assisted-by: Claude Code:claude-opus-5-5
* Keep the export wired when the lock revert drift-keeps
- revert_with_sibling reverted the export, then let a drift-kept lock
revert (uv's pair gate writes neither file) leave uv.lock wired. The
export is now put back on the wheel too, matching the kept entry, so a
re-run reverts both once the drift is undone.
- snapshot_files recorded an unreadable file as absent, so a rollback
could delete it. Only NotFound is recorded as absent now; anything
else unreadable is left out and left alone.
Refs #1368
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01645q8Fr6CEo5KdPqh3Ne7t
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 34e0c64 commit 4864da5
6 files changed
Lines changed: 721 additions & 176 deletions
File tree
- crates
- socket-patch-cli
- tests
- socket-patch-core/src
- patch/redirect
- vendor
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1422 | 1422 | | |
1423 | 1423 | | |
1424 | 1424 | | |
1425 | | - | |
| 1425 | + | |
1426 | 1426 | | |
1427 | 1427 | | |
1428 | 1428 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1667 | 1667 | | |
1668 | 1668 | | |
1669 | 1669 | | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
1670 | 1725 | | |
1671 | | - | |
1672 | | - | |
1673 | | - | |
1674 | | - | |
1675 | | - | |
1676 | | - | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
1677 | 1733 | | |
1678 | | - | |
| 1734 | + | |
1679 | 1735 | | |
1680 | 1736 | | |
1681 | 1737 | | |
| |||
1685 | 1741 | | |
1686 | 1742 | | |
1687 | 1743 | | |
1688 | | - | |
1689 | | - | |
1690 | | - | |
1691 | | - | |
1692 | | - | |
| 1744 | + | |
1693 | 1745 | | |
1694 | 1746 | | |
1695 | 1747 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
39 | 65 | | |
40 | 66 | | |
41 | 67 | | |
| |||
178 | 204 | | |
179 | 205 | | |
180 | 206 | | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
181 | 247 | | |
182 | 248 | | |
183 | 249 | | |
| |||
0 commit comments