Repository navigation
Description
Affected version
graphifyy0.9.25 (uv tool install, installed from Windows)- Windows 11, Git for Windows (
/bin/sh)
Summary
graphify hook install on a Windows uv tool install emits a post-commit hook with an empty _PINNED:
_PINNED=''With _PINNED empty, all four interpreter probes fail on this setup, so every commit prints the "could not locate a Python" warning and exits 0. The graph silently never rebuilds.
This is not #2126. That issue covers the runtime allowlist rejecting backslashes in probes 2 and 3, and explicitly assumes "a Windows-only repo re-installed from Windows would pin a C:\... path into _PINNED, so probe 1 would succeed". On my Windows-only install, hook install run from Windows recorded nothing at all — probe 1 never gets the chance to succeed. Fixing #2126 alone would not fix this.
Why all four probes fail (uv tool layout)
| # | Probe | Result |
|---|---|---|
| 1 | _PINNED |
empty — never recorded |
| 2 | graphify-out/.graphify_python |
file not created by hook install |
| 3a | $(dirname $(command -v graphify))/../python.exe |
~/.local/python.exe — does not exist |
| 3b | $(dirname $(command -v graphify))/python.exe |
~/.local/bin/python.exe — does not exist |
| 3c | shebang parse | skipped, launcher is .exe |
| 4 | python / python3 on PATH |
present, but cannot import graphify |
uv puts the launcher shim in ~/.local/bin/ and the actual environment in %APPDATA%\uv\tools\graphifyy\. Nothing in probes 3a/3b resolves across that gap, and the system python is unrelated (Anaconda here).
Verified:
$ python -c "import importlib.util,sys; sys.exit(0 if importlib.util.find_spec('graphify') else 1)"; echo $?
1
$ python3 -c "import importlib.util,sys; sys.exit(0 if importlib.util.find_spec('graphify') else 1)"; echo $?
1
$ ls ~/.local/bin/python.exe ~/.local/python.exe
ls: cannot access ...: No such file or directory
$ ls "$APPDATA/uv/tools/graphifyy/Scripts/python.exe"
...Scripts/python.exe # the one that worksReproduce
- Windows,
uv tool install graphifyy - In any repo:
graphify hook install grep '^_PINNED=' .git/hooks/post-commit->_PINNED=''- Commit twice (the first exits early on the
HEAD~1check). Second commit prints:
[graphify hook] could not locate a Python with graphify installed. Add the graphify bin dir to PATH or re-run 'graphify hook install' from the env where graphify lives.
The advice in that message does not help: re-running hook install from the env where graphify lives is exactly what produced the empty _PINNED.
Impact
Silent and total — the post-commit rebuild never runs, so graphs go stale with no signal. I installed hooks across 91 repos before noticing that not one of them could execute.
Suggested fix
At install time, pin sys.executable of the interpreter running the installer — it is by definition an interpreter that can import graphify:
_PINNED = shlex.quote(sys.executable.replace("\\", "/"))Forward slashes keep it compatible with the probe-2/3 allowlist discussed in #2126. Writing graphify-out/.graphify_python at hook install time (rather than only from the skill/CLI) would also give probe 2 something to find.
Workaround
Write the interpreter path into graphify-out/.graphify_python manually:
%APPDATA%\uv\tools\graphifyy\Scripts\python.exe
Related
#2126 (same subsystem, different root cause — runtime allowlist vs. install-time recording).
Activity
fix: pin interpreters whose path contains a space (#2166)
safishamsi commentedon Jul 26, 2026
Fixed in v0.9.27 (#2186, thanks @Souptik96). The interpreter pin now handles a Python path containing a space (quoted merge-driver command; allowlist admits a space while rejecting metacharacters). One residual remains: if the pin later goes stale (uv tool reinstall) on a spaced profile, the shebang/file fallback probes can't yet recover it until you re-run 'graphify hook install' — tracked as a follow-up. https://github.com/Graphify-Labs/graphify/releases/tag/v0.9.27
Squashed commit of the following:
fix: pin interpreters whose path contains a space (Graphify-Labs#2166)