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 — Agent mode patches only the WORKON_HOME venv when a Pipenv project also has an auto-detected ./.venv, so Pipenv 2018–2026.1 keep running the unpatched .venv and VEX attests not_affected (regression from #388) · Issue #529 · SocketDev/socket-patch Closed Labels agent:triagedbugSomething isn't workingSomething isn't workingbughuntFound by a scheduled package-manager bug-hunt agentFound by a scheduled package-manager bug-hunt agentpm:pipenvPipenvPipenvpriority:p1 Description[agent] Found by the scheduled Pipenv bug-hunt routine (ledger #313). SummaryTake a Pipenv project that has both a That isn't what happens.
Before #388 ( ImpactSilent false-success on the most widely deployed Pipenv versions. A Hosted mode isn't affected: the Repro (Linux, main
|
| Pipenv (Python) | pipenv --venv |
main 61cfb9b |
pre-#388 ccd43f58~1 |
|---|---|---|---|
| 2018.11.26 (py3.8) | ./.venv |
fail: .venv unpatched, WORKON patched, VEX not_affected (2/2) |
pass (.venv patched) |
| 2022.12.19 (py3.10) | ./.venv |
fail (2/2) | not run |
| 2023.12.1 (py3.11) | ./.venv |
fail (2/2) | pass (.venv patched) |
| 2026.8.0 (py3.12) | WORKON_HOME | pass (2/2) | fail (#334) |
I didn't probe macOS or Windows: probe branches are blocked in this sandbox because branch deletion through the git proxy fails (see ledger #313). The logic is OS-independent.
First bad commit: ccd43f58 (#388). The latest release, v4.0.0, predates #388. I tested the parent commit ccd43f58~1, not the v4.0.0 binary itself.
crates/socket-patch-core/src/crawlers/python_crawler.rs:486-488: returns [WORKON_HOME…, .venv…] for the "nothing explicit" case.crates/socket-patch-core/src/crawlers/python_crawler.rs:1742: the purl dedup in crawl_all keeps only the first site-packages per purl, so the "both" promise collapses to "WORKON_HOME only".Related, but a different PM and a different discovery path with the same first-wins collapse: #526 (Poetry, several -py3.x envs). Also related: #334 (the 2026.2+ half of this shape, now fixed).
Side note, same mechanism, not verified end to end: with PIPENV_PYTHON=python3.11 set, pipenv --venv (2026.8.0) reports $WORKON_HOME/proj-<hash>-python3.11. If an unsuffixed proj-<hash> venv also exists, agent mode patches the unsuffixed one, because it sorts first. I couldn't confirm what pipenv run imports in that shape, so I'm not claiming it here.
[agent] Triaged as priority:p1 (Pipenv). I checked this on main 61cfb9b. When nothing is explicitly set, pipenv_project_site_packages (crates/socket-patch-core/src/crawlers/python_crawler.rs) returns both site-packages dirs, WORKON_HOME first. Then crawl_all dedupes by purl (if !seen.insert(purl.clone()) { continue; }, ~L1742), so the in-tree .venv copy is dropped and never patched. Not a duplicate. Related to #526 (Poetry env selection, open PR #527) and #516 (vex checks only the first copy, open PR #517), but the fix is different: here the crawler has to keep both copies of the same purl when they come from different candidate envs. I haven't clustered it with either. No open fix PR covers this.
Generated by Claude Code
[agent] Claiming this issue (with #501; shared root cause: PyPI agent apply keeps a "one representative" contract and patches only pkg_paths.first() (commands/apply.rs variant loop), although the Python crawler can resolve one name@version in several candidate site-packages dirs). Branch: agent/fix-pypi-apply-every-copy. Claim-ID: 2026-10-02T06:22:12Z-a54d4b
Generated by Claude Code
[agent] Verified fixed on main d63ae5f with real Pipenv on Linux (same repro as above: .venv + WORKON_HOME venv, nothing explicit). On 2018.11.26 (py3.8), 2023.12.1 (py3.11) and 2026.8.0 (py3.12), scan --mode agent patches both copies, pipenv run imports the patched six, vex says not_affected, and rollback restores both copies. The PIPENV_PYTHON=python3.11 suffixed twin venv (2026.8.0) also gets both venvs patched.
Generated by Claude Code