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 PyPI direct refs not contesting wiring (#1549) by mikolalysenko · Pull Request #1562 · SocketDev/socket-patch Conversation
|
| Issue case | Test | Without fix | With fix |
|---|---|---|---|
Pipfile.lock file url / path wheel / file:// url / exact version beside a path / wildcard pin beside a wheel, contesting a vendored requirements.txt |
vex::discover::pypi_other::tests::issue_1549_non_socket_direct_references_contest_wiring |
FAIL (ref attested) | pass |
Mirror: requirements six @ url, bare url, bare wheel path, contesting a vendored Pipfile.lock |
same test | FAIL | pass |
Unversioned: path dir, versionless url, VCS entry, six @ git+…, six @ file:///dir, bare git+…#egg=six, -e / --editable lines; another package or another release contests nothing |
issue_1549_unversioned_direct_references_contest_every_version |
FAIL | pass |
CLI, real scan wiring then vex (hosted + vendored, --no-verify too): requirements direct ref beside a wired Pipfile.lock |
e2e_vex_lockfile pipenv::requirements_direct_reference_contests_the_lock_wiring |
FAIL | pass |
CLI: Pipfile.lock file url / path wheel beside wired requirements.txt |
e2e_vex_lockfile pip::pipfile_lock_direct_reference_contests_the_requirements_wiring |
FAIL | pass |
Commands run locally:
cargo fmt --all -- --check: cleancargo clippy --workspace --all-features -- -D warnings: cleancargo test -p socket-patch-core --lib: all pass except 4 tests thatmain in this sandbox because it runs as root (chmod-basedrelax_loop_must_not_traverse_symlinked_root,an_unremovable_hidden_lock_keeps_every_store_entry,wire_write_failure_maps_error_and_leaves_lock_untouched,wire_failure_rolls_back_already_written_files)cargo test -p socket-patch-cli --test e2e_vex_lockfile -- direct_reference_contests: 2 pass (2 fail with the core fix reverted)SOCKET_PATCH_PIPENV_E2E_VERSIONS=2026.8.0 cargo test -p socket-patch-cli --test e2e_vex_build -- pipenv:: --ignored (real Pipenv): 2 passcargo test --workspace --all-features --no-fail-fast: everything passes except tests that fail identically on main in this sandbox (checked by running them against main's sources): the 4 root-permission core tests above, in_process_redirect write-failure tests (3), repair unremovable-lock tests (2), and e2e_bun_lockb::binary_shared_bundled_record_hosted_pin_is_managed (needs patches-api.socket.dev, unreachable here)cargo test -p socket-patch-cli --test in_process_redirect_pipenv: 11 pass. The full run caught abandoned_pipfile_lock_conflict_does_not_veto_the_requirements_redirect (Hosted scan never sees the Pipfile, so a live Pipfile.lock conflict is treated as abandoned and a sibling requirements.txt is redirected anyway #333): a user file entry in a leftover Pipfile.lock with no Pipfile started vetoing the hosted requirements redirect. Pipenv installs from the lock only with its Pipfile, so the new evidence is now recorded only when a Pipfile is present (e97bceb, with a unit case for it).Fixed: editable lines and #egg=-named VCS lines now count; the
artifact filename wins over a beside-pin and wildcard pins are ignored;
resolves_package keeps its old meaning; pypi_name_purl validates
directly; the CLI cell asserts the contest phrase, not just the file name.
Not fixed here, deliberately:
withhold_rewirable), like every cross-lock contest today, including🤖 Generated with Claude Code
https://claude.ai/code/session_01R2uDxa7vv5ajQTMGpCK2ug
Note
Medium Risk
Changes VEX discovery and attestation for contested PyPI wirings; incorrect matching could wrongly attest or block patches, but behavior is heavily regression-tested.
Overview
Fixes #1549: when one Python install file wires a package to a Socket patch but another (requirements.txt vs Pipfile.lock) installs the same release from a non-Socket URL, wheel path, or direct reference, discovery now treats that like an existing registry == pin—withholds attestation and emits patched_ref_unattributable naming both files.
Discovery changes: pypi_other records user direct refs via foreign_reference (version from wheel filename or exact pin; versionless/VCS/editables via new resolved_elsewhere_any_version). Pipfile.lock evidence only applies when a live Pipfile is present (#333). Cross-lock matching uses ResolvedElsewhere::covers for versionless contests.
Tests: unit regressions plus shared E2E helper contested_by_a_non_socket_direct_reference for pip/pipenv flows.
Reviewed by Cursor Bugbot for commit 07503e7. 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
A Pipfile.lock `file` url or `path` wheel, or a requirements line like `six @ https://...whl`, installs the upstream release. Discovery took such a reference for no evidence at all, so when another lock wired the same release to a Socket patch, `vendor --check` stayed green and `vex` attested not_affected while `pipenv sync` / `pip install -r` shipped the unpatched package. These references now count as resolving the package elsewhere, exactly like a registry `==` pin: the other lock's wiring is withheld with patched_ref_unattributable naming both files. The release comes from an exact `version` pin or the wheel / sdist filename. A reference with no readable version (a source directory, a VCS checkout) may install any version, so it contests every version of that package. Fixes #1549 Assisted-by: Claude Code:claude-opus-5-5
End-to-end cells for #1549: the real CLI wires a Pipfile.lock or a requirements.txt, then a second install source pins the same release to a non-Socket url or wheel path. `vex` must withhold the statement and explain the contest, as it already does for a registry pin. Assisted-by: Claude Code:claude-opus-5-5
Review follow-ups for #1549. pip installs `-e git+...#egg=six` and a bare `git+...#egg=six` line from source, so both now count as resolving six elsewhere at any version. A Pipfile.lock wheel's own filename now decides its release ahead of a `version` pin beside it, and a wildcard pin like `==1.16.*` is never taken for a release. The "which packages does any lock resolve" query keeps its old meaning. Assisted-by: Claude Code:claude-opus-5-5
Pipenv installs from Pipfile.lock only when its Pipfile sits beside it. A user's own file/path/VCS entry in a leftover lock with no Pipfile installs nothing, so it no longer contests a requirements.txt wiring, and a hosted scan still redirects requirements.txt there (#333). Refs #1549 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 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.
`#egg=six-1.16.0` names the package six, not "six-1.16.0". The egg name now stops at the first `-<digit>`, so a legacy editable or VCS line still contests a Socket wiring of the real package (#1549, Bugbot). 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 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.
|
Ready for review at
Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Final review brief: #1562 at
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
pip accepts `-e./src/six#egg=six`, the value attached to the short option. Discovery skipped that spelling, so such a line didn't contest a Socket wiring of six (#1549, final-review note). 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 07503e7. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Auto-merge disarmed. Generated by Claude Code |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Final review brief: #1562 at
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Still ready for review at the new head
Slack announcement not sent this run (Slack send unavailable); the next run retries. 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 PyPI wiring isn't treated as contested when Pipfile.lock (or requirements.txt) points the same release at a non-Socket file/URL/path, so vendor --check stays green and vex attests not_affected while pipenv sync installs upstream
There was an error while loading. Please reload this page.