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 1.3 source-pin guard (#1447) by mikolalysenko · Pull Request #1451 · SocketDev/socket-patch Conversation
|
| Test | Old guard | New guard |
|---|---|---|
utils::poetry_lock::tests::source_constraint_breaks_only_poetry_1_3_to_2_2_writers (1.3.2 fixture, stamped 1.3.0, versionless and unstamped 2.0, CRLF, 1.1/2.1 controls) |
FAILED | ok |
vendor::pypi_poetry::tests::source_constrained_dependency_is_refused_for_poetry_1_3_to_2_2 (vendored, 1.3.2 fixture) |
FAILED | ok |
patch::redirect::poetry::equivalence_tests::source_constrained_dependency_is_refused_for_poetry_1_3_to_2_2 (hosted, 6 pyproject shapes, fresh and already-redirected) |
FAILED | ok |
patch::redirect::pypi_takeover::tests::poetry_source_pinned_package_follows_the_writer (takeover, 1.3 lock) |
FAILED | ok |
e2e poetry::poetry_source_pypi_constraint_never_breaks_install on real Poetry 1.3.2 |
FAILED (hosted rewrote the lock) | ok |
The whole poetry:: e2e suite (4 tests) passes on real Poetry 1.3.2 locally:
SOCKET_PATCH_POETRY_BIN=… SOCKET_PATCH_POETRY_E2E_REQUIRED=1 SOCKET_PATCH_POETRY_E2E_VERSION=1.3.2 cargo test -p socket-patch-cli --all-features --test e2e_vex_build -- poetry:: --ignored
Local gate: cargo fmt --all -- --check and cargo clippy --workspace --all-features -- -D warnings are clean. cargo test --workspace --all-features --no-fail-fast passes except 13 tests that fail only because this sandbox runs as root (chmod-0555 / unremovable-file write-failure tests, which root bypasses) or has no network to patches-api (binary_shared_bundled_record_hosted_pin_is_managed). None of them touch the Poetry source-pin path. CI runs them as non-root.
source = "pypi" dependency and poetry install 1.3 fails with a solver error #1447: hosted refusal (redirect_poetry_lock_unsupported), vendored refusal (pypi_poetry_source_constraint), takeover keeps the package vendored, and the advisory/docs no longer claim 1.3 installs it. Covered by the four unit tests above and by the real-Poetry 1.3.2 e2e./code-review high also suggested merging the two pre_1_4_writer copies (redirect/poetry.rs, vendor/pypi_poetry.rs) into lock_writer_version, and not re-parsing the lock to read its format. I left both out of this PR. They are pre-existing duplication, they now agree with the new helper, and the extra parse happens once per lock per run. The wrappers (npm/, pypi/, gem/) only dispatch to the binary, so they need no change.
🤖 Generated with Claude Code
https://claude.ai/code/session_01G22ffRqhurh7MjZ7GZA2HM
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
Poetry 1.3 writes its lock header without a version, so the guard from #1413 never recognized a 1.3 lock. Hosted and vendored scans then rewired a `source = "pypi"` dependency into a lock that `poetry install` 1.3 can't solve, exited 0, and the advisory said 1.3 installs it. A 1.3 lock is recognized by the versionless header over `lock-version = "2.0"`, which no other Poetry writes. The refusal now covers 1.3 - 2.2 in hosted, vendored and the vendored-to-hosted takeover, and the advisory, docs and CLI contract name the right range. Fixes #1447 Assisted-by: Claude Code:claude-opus-5-5
Only Poetry 1.3 - 1.8 write lock-version 2.0, and every one of them refuses a source-pinned package once the lock sources it from a URL or file. Key the 1.3 case on the lock format alone, so a 1.3 lock whose header was edited away is still refused, and the writer reads the same way the stale-install advisory already reads it. Tighten the tests: a stamped 1.3.0 case, explicit headers in the takeover test, and a sibling-lock filter that drops only its stale warning. Refs #1447 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 e161737. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ready for review (burn-down agent)
Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Final review briefWhat it does. The guard refuses Risk: low. The change only widens a refusal guard by one Poetry minor version. When unsure it refuses: an unstamped 2.0 lock that Poetry 2.3+ would install, or one some other tool wrote, gets refused with remedy text and is never left in a broken install. Look here
Verified
Changes I made: none. Non-blocking nits (fine as follow-ups)
Auto-merge is armed, so approving sends this straight to the merge queue. 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.
The #1282 source-pin guard misses Poetry 1.3 locks (no version in the @generated stamp), so hosted and vendored still rewrite asource = "pypi" dependency and poetry install 1.3 fails with a solver error
There was an error while loading. Please reload this page.