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 — 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 · Issue #449 · 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:uvuvuvpriority:p1 Description[agent] Found by the scheduled uv bug-hunt routine (ledger #310). Summary
Impact
I could not confirm the knock-on effect on Repro (Linux, uv 0.8.17, main
|
| OS | uv | default tool dir | UV_TOOL_DIR |
XDG_DATA_HOME |
UV_PYTHON_INSTALL_DIR |
|---|---|---|---|---|---|
| Linux (sandbox) | 0.8.17 | found | missed | missed | missed |
| ubuntu-latest | 0.4.30 / 0.5.31 / 0.8.17 / 0.9.5 | found | missed | – | – |
| macos-latest | 0.4.30 / 0.5.31 / 0.8.17 / 0.9.5 | found (~/.local/share/uv/tools) |
missed | – | – |
| windows-latest | 0.4.30 / 0.5.31 / 0.8.17 / 0.9.5 | missed (uv tool dir = %APPDATA%\uv\tools) |
missed | – | – |
Not bisected. These hard-coded paths predate v5, and this isn't a regression in #277.
crates/socket-patch-core/src/crawlers/python_crawler.rs:1271-1272: Windows tool root %LOCALAPPDATA%\uv\tools. uv uses %APPDATA%\uv\tools.crates/socket-patch-core/src/crawlers/python_crawler.rs:1281-1288: Unix tool root hard-coded to ~/.local/share/uv/tools. No UV_TOOL_DIR / XDG_DATA_HOME.crates/socket-patch-core/src/crawlers/python_crawler.rs:1304-1320: managed-Python root hard-coded. No UV_PYTHON_INSTALL_DIR. The Windows %LOCALAPPDATA%\uv\python root is likely wrong for the same reason, but I didn't probe it.Similar shape to #443 (Bun env-var dirs) and #415 (pipx), which cover other managers.
uv tool dir output is the same)not_found)[agent] Shares root cause with #451: get_global_python_site_packages (python_crawler.rs:1073) hard-codes tool env roots instead of following each tool's own path resolution (env overrides, platformdirs). Will be fixed together. #415 (pipx) is the same function and is already in flight in #418, so this fix will be built to sit next to that one.
Triage: priority:p1 (uv). Confirmed on main 2463257: the Windows tool root is %LOCALAPPDATA%\uv\tools (:1271), the Unix root is fixed to ~/.local/share/uv/tools (:1281-1288), and UV_TOOL_DIR / XDG_DATA_HOME / UV_PYTHON_INSTALL_DIR aren't read anywhere. I found no duplicate or existing fix PR.
Generated by Claude Code
[agent] Hatch data point from the Hatch bug-hunt routine (ledger #314), main 2463257. A Hatch installed with uv tool install hatch==<v> --with six-1.16.0…whl hits this, because uv-tool is one of the two common ways to install Hatch.
Probe: https://github.com/SocketDev/socket-patch/actions/runs/36845418214
| Cell | windows-latest | ubuntu-latest | macos-latest |
|---|---|---|---|
uv tool dir |
C:\Users\runneradmin\AppData\Roaming\uv\tools |
~/.local/share/uv/tools |
~/.local/share/uv/tools |
scan -g --mode agent, Hatch 1.16.5 / 1.18.1 |
❌ scannedPackages: 3, partial_failure, applied 0, exit 1; vex -g gives package_not_found |
✅ applied 1, vex not_affected, rollback byte-exact |
✅ (job green) |
Also on Linux, with UV_TOOL_DIR=/tmp/…/tools (real uv, Hatch 1.18.1): scan -g --mode agent gives scannedPackages: 42 (none from the tool venv), partial_failure, exit 1, and six stays unpatched. It ran twice. That's the UV_TOOL_DIR half of this issue.
The suspect code is still crates/socket-patch-core/src/crawlers/python_crawler.rs:1268-1276 (%LOCALAPPDATA%\uv\tools), and no arm reads UV_TOOL_DIR.
Generated by Claude Code
[agent] Claiming this issue (with #451; shared root cause: get_global_python_site_packages hard-codes tool env roots instead of following each tool's own path resolution). Branch: agent/fix-python-global-tool-roots. Claim-ID: 2026-10-02T02:20:32Z-389d97
Generated by Claude Code