GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Fix uv vendored revert half-reverting after a relock (#806, #821) by mikolalysenko · Pull Request #822 · SocketDev/socket-patch Conversation
|
| Test | Covers | Without fix | With fix |
|---|---|---|---|
pypi_uv::tests::revert_survives_uv_reserializing_the_dev_group_line |
#821 (uv add --dev) |
fail (drift warning, half-revert) | pass |
pypi_uv::tests::revert_survives_a_sibling_leaving_the_dev_group |
#821 (uv remove --dev) |
fail | pass |
pypi_uv::tests::revert_survives_uv_reserializing_manifest_overrides |
#806 | fail | pass |
pypi_uv::tests::revert_removes_our_override_from_a_sorted_multi_line_array |
#806 (two user overrides) | fail | pass |
pypi_uv::tests::revert_converges_on_the_overrides_key_not_a_lookalike_array |
#806 (review: lookalike array fakes convergence) | fail (element stranded, artifact deleted) | pass |
pypi_uv::tests::revert_treats_an_unreadable_array_key_as_drift |
Bugbot: a locator miss is not convergence | fail | pass |
pypi_uv::tests::revert_writes_neither_file_when_a_lock_record_is_drift_kept |
pair gate (#806, #821) | fail (pyproject reverted alone) | pass |
e2e_vendor_pypi_build::uv_vendor_revert_after_dev_group_relock (real uv: vendor → uv add --dev zipp → vendor --revert → uv lock --check) |
#821 | fail (uv.lock fragment … changed since vendoring; left untouched) |
pass |
e2e_vendor_pypi_build::uv_vendor_revert_after_manifest_overrides_relock (real uv: user override-dependencies + transitive six → uv add idna==3.7 → vendor --revert → uv lock --check) |
#806 | fail (same) | pass |
The e2e results were run locally against uv 0.8.17 with SOCKET_PATCH_UV_E2E_REQUIRED=1, so skips count as failures. The red runs used main's pypi_uv.rs with the new tests. CI runs this suite on its uv legs (0.2.37 through 0.12.17, Linux and macOS); releases without uv lock --check report n/a, as the existing capstones do.
cargo clippy --workspace --all-features -- -D warnings: clean.rustfmt --check on both touched Rust files: clean (both were clean on main).cargo test -p socket-patch-core --lib vendor::pypi_uv: 98/98 pass.cargo test -p socket-patch-cli --test e2e_vendor_pypi_build -- --include-ignored: 25/25 pass.cargo test --workspace --all-features --lib --bins (on c35bf96): every test passes except 4 write-permission tests in files this PR doesn't touch (copy_tree, vlt_heal, pypi_poetry, pypi_requirements). They expect a read-only path to refuse a write, which can't happen as root, and this sandbox runs as root. The integration suites are left to CI; a full local workspace build of every test binary didn't fit in the sandbox disk.uv add --dev / uv remove --dev, vendor --revert, remove, rollback and the hosted takeover revert pyproject.toml but keep uv.lock's vendored requires-dev entry, so uv sync --locked fails (exit 0, "success") #821 vendor --revert after uv add --dev / uv remove --dev → the two dev-group unit tests and the real-uv e2euv add --dev / uv remove --dev, vendor --revert, remove, rollback and the hosted takeover revert pyproject.toml but keep uv.lock's vendored requires-dev entry, so uv sync --locked fails (exit 0, "success") #821 remove / rollback / hosted takeover → the same revert_uv path; the pair gate makes the takeover's "left in place" trueoverride-dependencies: after any relock (uv add, uv lock --upgrade-package), vendor --revert / remove revert pyproject.toml but keep the vendored [manifest] overrides entry in uv.lock, so uv sync --locked fails (vendor --revert exits 0) #806 vendor --revert / remove after a relock re-serializes [manifest] overrides → the overrides unit tests (including the lookalike-array case) and the real-uv e2erevert_writes_neither_file_when_a_lock_record_is_drift_kept, revert_treats_an_unreadable_array_key_as_drift, plus the five updated drift testsadd_manifest_override still appends our element in socket-patch's own spelling rather than uv's sorted multi-line form. With key-anchored revert this no longer causes drift, so the wiring format is left as is.🤖 Generated with Claude Code
https://claude.ai/code/session_016MCKtjJk6MF8zQWSFYWg7N
Generated by Claude Code
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Assisted-by: Claude Code:claude-opus-5-5
After vendoring, an ordinary uv relock (`uv add --dev x`, `uv add y`) re-serializes the lock arrays that hold our element: the dev group's requires-dev line and `[manifest] overrides`. Revert matched those arrays by their exact recorded text, so it saw drift and kept uv.lock wired, but still reverted pyproject.toml. The pair then failed `uv sync --locked` while `vendor --revert` reported success. Revert now finds our unchanged element inside the live array under the same key and restores or removes just that element, rendering the array the way uv writes it. A pair gate also writes neither file when any record is genuinely drift-kept, so pyproject.toml and uv.lock always stay consistent. Fixes #806, #821. Assisted-by: Claude Code:claude-opus-5-5
Vendor six, run the uv command that re-serializes the lock array around our element (`uv add --dev zipp` for a dev group, `uv add idna` beside user overrides), then revert. Both files must be unwired with no drift warning, and `uv lock --check` must pass. Refs #806, #821. Assisted-by: Claude Code:claude-opus-5-5
|
BugBot review Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Stale Bugbot comment from a previous run.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
A [manifest] overrides record holds the bare array, and the old convergence shortcut searched the whole lock for it. When the root requires-dist happened to match the user's overrides array, revert treated our element as already gone, left it in uv.lock and deleted the artifact it points at. Every whole-array record now reverts through its own key: an untouched array is restored verbatim, otherwise just our element is. Refs #806. Assisted-by: Claude Code:claude-opus-5-5
Revert treated any miss locating a whole-array record as convergence, including a key spelled differently or an unbalanced array. A lock that still routed through the vendored wheel could then lose the wheel. Only a key or section that is provably absent now counts as converged. Anything unreadable is drift, which keeps both files and the artifact. Refs #806, #821. Assisted-by: Claude Code:claude-opus-5-5
|
BugBot review Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 77686c4. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
[agent] One check is red on head 77686c4: PDM patch compatibility → I don't think this PR caused it:
No fix exists to port. Once this run finishes I'll re-run the failed job once. If it fails again, I'll treat it as real and dig into the case artifacts. Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
[agent] Labeled Ready for review.
Slack announcement not sent this run (no Slack send tool available), so the next run will retry. Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
[agent] Stacked follow-up: #841 fixes #840. That's a different cause in the same Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Vendored uv package in a dependency group: afteruv add --dev / uv remove --dev, vendor --revert, remove, rollback and the hosted takeover revert pyproject.toml but keep uv.lock's vendored requires-dev entry, so uv sync --locked fails (exit 0, "success")
Vendored uv with a user-authored override-dependencies: after any relock (uv add, uv lock --upgrade-package), vendor --revert / remove revert pyproject.toml but keep the vendored [manifest] overrides entry in uv.lock, so uv sync --locked fails (vendor --revert exits 0)
There was an error while loading. Please reload this page.