GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix global scan missing pipx venvs (#415) by mikolalysenko · Pull Request #418 · SocketDev/socket-patch

Conversation

@mikolalysenko

@mikolalysenko Mikola Lysenko (mikolalysenko) commented Oct 1, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

LLM Description written by Claude Code:claude-opus-5-5

Fixes #415

Summary

scan -g, apply -g, rollback -g and vex -g now find packages inside pipx's per-app venvs, so the dependencies of a pipx-installed tool such as Hatch (pipx install hatch, one of Hatch's documented install methods) are reported, patched and rolled back like uv-tool installs already are.

Root cause

get_global_python_site_packages (crates/socket-patch-core/src/crawlers/python_crawler.rs) probes uv tool venvs, conda, pyenv, Homebrew, the python.org framework and pip --user, but never probed pipx's venvs.

Change

  • New pipx_home_candidates() returns every directory pipx may use as its home: $PIPX_HOME, legacy ~/.local/pipx, and platformdirs' data dir ($XDG_DATA_HOME/pipx, default ~/.local/share/pipx, on Linux; ~/Library/Application Support/pipx on macOS; %USERPROFILE%\pipx and %LOCALAPPDATA%\pipx\pipx on Windows).
  • Global discovery scans <home>/venvs/*/{lib,lib64}/python3.*/site-packages (Unix) or <home>\venvs\*\Lib\site-packages (Windows) for each candidate that exists. It scans all of them, not just the one pipx would pick today: an app installed under an older default is still a real install, and the existing seen set removes overlaps.
  • No wrapper changes are needed (npm/, pypi/, gem/ only dispatch to the binary).
  • The diff is 2 files. The first fix commit accidentally ran cargo fmt --all over the workspace; d391f14 restores the 126 unrelated files to main.

Test evidence

New tests in crates/socket-patch-core/tests/crawler_python_e2e.rs (each stages a venv under a stubbed HOME / PIPX_HOME / XDG_DATA_HOME):

Test Layout Platforms
..._discovers_pipx_venvs_linux ~/.local/share/pipx/venvs/{hatch,black} Linux
..._discovers_pipx_venvs_under_xdg_data_home $XDG_DATA_HOME/pipx/venvs/hatch Linux
..._discovers_pipx_venv_lib64 venvs/hatch/lib64/python3.11/site-packages Unix
..._discovers_pipx_venvs_legacy_home ~/.local/pipx/venvs/hatch Unix
..._discovers_pipx_venvs_macos_app_support ~/Library/Application Support/pipx macOS
..._discovers_pipx_venvs_windows %USERPROFILE%\pipx\venvs\hatch\Lib\site-packages Windows
..._discovers_pipx_venvs_under_pipx_home $PIPX_HOME/venvs/hatch (path with a space) all
  • Red before the fix (Linux): cargo test -p socket-patch-core --all-features --test crawler_python_e2e pipx gave 5 failed, 0 passed.
  • Green after: crawler_python_e2e gave 47 passed, 0 failed.
  • Real pipx check: pipx==1.7.1 install pycowsay under a scratch HOME, then scan -g --json --ecosystems pypi. scannedPackages was 42 on main and is 43 with this branch (the pipx venv's package).
  • cargo clippy --workspace --all-features -- -D warnings is clean. The added code is rustfmt-clean. cargo fmt --all -- --check isn't clean on main itself, and CI doesn't run it, so this PR leaves the rest of the workspace alone.
  • cargo test --workspace --all-features --no-fail-fast: everything passes except 16 write-failure tests in covgap_commands_vendor, in_process_redirect, repair and core --lib. They simulate write failures with chmod 0o555, which the root-run sandbox bypasses, and none of them touch the code changed here. They pass in CI, which runs as non-root.
  • CI on d391f14: all 6 workflows that ran are green (CI, Audit GHA Workflows, npm, pnpm, Pipenv, vlt). Bugbot reviewed d391f14 and found no issues.

Per-issue checklist

  • Global scan (-g) never crawls pipx venvs, so the dependencies of a pipx-installed Hatch are never reported, patched or rolled back on any OS #415: pipx venvs are crawled by global discovery on Linux, macOS and Windows, honouring PIPX_HOME (all of the tests above).

Generated by Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@claude
Start fix for #415
a858c78
Assisted-by: Claude Code:claude-opus-5-5
@mikolalysenko Mikola Lysenko (mikolalysenko) mentioned this pull request Oct 1, 2026
Global scan (-g) never crawls pipx venvs, so the dependencies of a pipx-installed Hatch are never reported, patched or rolled back on any OS #415
Closed
@claude
Find pipx-installed tools in global scans
7376eb5
scan -g, apply -g, rollback -g and vex -g never looked inside pipx's
per-app venvs, so the dependencies of a pipx-installed tool such as
Hatch were never reported or patched on any OS. Global discovery now
scans <pipx home>/venvs/* under PIPX_HOME and every pipx default home.

Fixes #415

Assisted-by: Claude Code:claude-opus-5-5
@mikolalysenko Mikola Lysenko (mikolalysenko) mentioned this pull request Oct 1, 2026
Fix pnpm-workspace.yaml key detection and appends (#400, #402) #414
Merged
@mikolalysenko
Mikola Lysenko (mikolalysenko) marked this pull request as ready for review October 1, 2026 05:01
@mikolalysenko

Mikola Lysenko (mikolalysenko) commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator Author

BugBot review


Generated by Claude Code

cursor[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Oct 1, 2026
View reviewed changes

@cursor cursor Bot left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for 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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@claude
Drop unrelated formatting from the pipx fix
d391f14
The previous commit ran rustfmt over the whole workspace, which
reformatted 126 files the fix doesn't touch. Restore them to main so
the PR only carries the pipx discovery change and its tests.

Assisted-by: Claude Code:claude-opus-5-5
@mikolalysenko

Mikola Lysenko (mikolalysenko) commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator Author

BugBot review


Generated by Claude Code

cursor[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Oct 1, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for 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 d391f14. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mikolalysenko Mikola Lysenko (mikolalysenko) added the Ready for review Agent-verified: mergeable, CI green, Bugbot clean — awaiting human review label Oct 1, 2026
@mikolalysenko

Mikola Lysenko (mikolalysenko) commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator Author

[burn-down agent] Ready for review on d391f14: mergeable, 0 commits behind main.

  • CI: 97/97 completed checks green on d391f14 (3 skipped by workflow conditions).
  • Bugbot: reviewed d391f14, no new issues; 0 unresolved review threads.
  • Reviewer note: New pipx home probing in python_crawler.rs (pipx_home_candidates); reviewer may want to check the Windows/macOS home paths.

Generated by Claude Code

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Oct 1, 2026
Global scan (-g) misses uv tool environments on Windows (looks in %LOCALAPPDATA%\uv\tools, uv uses %APPDATA%\uv\tools) and on every OS when UV_TOOL_DIR, XDG_DATA_HOME or UV_PYTHON_INSTALL_DIR is set #449
Closed
Global scan (-g) never crawls PDM's global project venv or PDM-managed interpreters, so pdm add -g packages are silently left out with exit 0 #451
Closed
Wenxin-Jiang
Wenxin Jiang (Wenxin-Jiang) approved these changes Oct 1, 2026
View reviewed changes
@mikolalysenko
Mikola Lysenko (mikolalysenko) merged commit 6b8b355 into main Oct 1, 2026
338 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@mikolalysenko
Mikola Lysenko (mikolalysenko) deleted the agent/fix-global-pipx-venv-discovery branch October 1, 2026 16:48
@mikolalysenko Mikola Lysenko (mikolalysenko) mentioned this pull request Oct 3, 2026
Global scan (-g) never crawls the venv that Poetry's official installer creates ($POETRY_HOME/venv), so patches for Poetry's own dependencies are never found, applied or rolled back #640
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cursor cursor[bot] cursor[bot] left review comments
@Wenxin-Jiang Wenxin Jiang (Wenxin-Jiang) Wenxin-Jiang approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

Ready for review Agent-verified: mergeable, CI green, Bugbot clean — awaiting human review

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Global scan (-g) never crawls pipx venvs, so the dependencies of a pipx-installed Hatch are never reported, patched or rolled back on any OS

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@mikolalysenko @Wenxin-Jiang @claude
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.