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 Poetry/PDM vendored re-vendor to superseding patch (#1136) by mikolalysenko · Pull Request #1137 · SocketDev/socket-patch Conversation
|
| Issue / lane | Test | Before fix | After |
|---|---|---|---|
| #1136 Poetry LF + CRLF, PDM LF + CRLF (core orchestrator, dry and wet) | vendor::pypi::tests::pyproject_flavors_revendor_to_a_superseding_uuid |
panics: Refused { code: "pypi_poetry_source_already_exists" } |
pass |
| Poetry/PDM: drifted old wiring still refuses | pyproject_flavors_superseding_uuid_with_drifted_wiring_refuses |
n/a (new lanes) | pass |
| Poetry/PDM: no ledger entry still refuses | pyproject_flavors_superseding_uuid_without_ledger_refuses, splice_flavor_stale_uuid_vendor_refuses_through_orchestrator |
pass | pass |
#1136 CLI vendor, Poetry LF + CRLF |
mode_migration_pypi::pyproject_flavors_vendored_revendor_superseding_patch |
exit 1, pypi_poetry_source_already_exists |
pass |
| #1136 CLI, venv installed from patch A | mode_migration_pypi::poetry_revendors_to_a_superseding_patch_over_a_patched_venv |
exit 1, same code | pass |
#1136 real Poetry 2.4.3: dry run, wet run, fresh poetry install gets B, revert restores lock |
e2e_vex_build poetry::poetry_vendored_revendors_to_a_superseding_patch (--ignored, runs in the CI Poetry matrix 1.0.10 to 2.4.3) |
partial_failure, pypi_poetry_source_already_exists (the issue's exact output) |
pass |
cargo clippy --workspace --all-features -- -D warnings: clean.rustfmt --check on every touched file: clean. Note: cargo fmt --all -- --check flags files on main that this PR does not touch; CI has no fmt gate, so I left them alone.cargo test -p socket-patch-core --all-features --lib: 5772 passed, 4 failed. The same 4 also fail on main in this sandbox because it runs as root, so chmod-based write-failure tests don't trip: copy_tree::relax_loop_must_not_traverse_symlinked_root, vlt_heal::an_unremovable_hidden_lock_keeps_every_store_entry, pypi_poetry::wire_write_failure_maps_error_and_leaves_lock_untouched, pypi_requirements::wire_failure_rolls_back_already_written_files. CI runs non-root and is green on main.mode_migration_pypi: 41/42. The 1 failure, pipenv_hosted_to_vendored_names_the_unpatched_requirements, needs pypi.org, which the sandbox can't reach; it fails the same way on main.in_process_vendor_pypi_takeover, hosted_superseding_pypi, in_process_redirect_poetry: all pass.e2e_vex_build -- poetry:: --ignored with real Poetry 2.4.3: both vendored tests pass. The hosted test fails on pypi.org access in the sandbox; it doesn't touch this code path.cargo test --workspace filled the sandbox disk, so I ran the suites above instead. CI runs the full set.package_not_installed when the venv holds the old patch. That is a separate cause.🤖 Generated with Claude Code
https://claude.ai/code/session_01Q9VebYpgWmCcMxocpcReMJ
Note
Medium Risk
Touches lock-file wiring and ledger-driven revert for Poetry/PDM vendoring; behavior change is scoped to superseding socket-patch uuids with existing safety tests for ledgerless and drifted cases.
Overview
Fixes #1136: vendored Poetry and PDM projects can move from patch A to a superseding patch B without failing with pypi_poetry_source_already_exists / pypi_pdm_source_already_exists.
The PyPI vendored orchestrator now treats those guard refusals like uv, script locks, and Hatch—routing them through supersede_or_refuse when the ledger still records the older uuid. That replays the prior vendor revert, rewires the lock to B, removes A’s artifact, and succeeds instead of exiting 1 while --dry-run promised re-vendor.
Implementation adds Poetry/PDM to SUPERSEDABLE_REFUSALS, includes poetry.lock / pdm.lock in supersede revert file lists, and extends fresh_pyproject_plan for both flavors. Refusal paths without a ledger entry or with drifted wiring stay unchanged.
Tests cover core supersede (LF and CRLF locks), CLI migration (including a venv already installed from patch A), and a real-Poetry e2e for dry run, wet re-vendor, fresh install, and revert.
Reviewed by Cursor Bugbot for commit 876923a. Configure here.
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
When the patch API replaced a vendored Poetry or PDM package's patch with a newer one, `scan --mode vendored` and `vendor` failed with pypi_poetry_source_already_exists (or the PDM code) and exit 1, while the dry run promised a re-vendor. The lock stayed on the old patch, so every install kept getting it. The Poetry and PDM arms of the PyPI vendored orchestrator now route their "already wired by an older socket-patch vendor" refusal through the same supersede path uv, script locks and Hatch use: replay the old ledger entry's revert, then wire the new patch over the restored lock. A user-authored source, or old wiring with no ledger entry, still refuses as before. Fixes #1136 Assisted-by: Claude Code:claude-opus-5-5
A Poetry project whose venv was installed from the old patch's vendored wheel must still move to the superseding patch, and reverting afterwards must restore the original lock. Refs #1136 Assisted-by: Claude Code:claude-opus-5-5
Runs the #1136 report against a real Poetry: vendor patch A, install it, then let the patch service offer only patch B. The re-vendor must exit 0, rewire poetry.lock to B and sweep A, a fresh `poetry install` must get B's bytes, and reverting must restore the pristine lock. Refs #1136 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.
Poetry before 1.2 keeps an installed package whose version is unchanged, even after its lock source moves to the vendored wheel, so the e2e never got patch A into the project venv on Poetry 1.0 and 1.1. Recreate the venv first, as the #1136 report does. Refs #1136 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 876923a. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ready for review (burn-down agent).
Already approved. 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 Poetry never re-vendors to a superseding patch: re-scan exits 1 with pypi_poetry_source_already_exists, while --dry-run previews would_revendor, and the project keeps installing the old patch
There was an error while loading. Please reload this page.