Repository navigation
Description
Summary
In graphifyy 0.4.21, the Codex skill flow for /graphify . can still create a nested cache directory when all code files live under src/:
<project>/src/graphify-out/cache/
The final graph outputs are still written correctly to:
<project>/graphify-out/
So this appears to affect AST/per-file cache placement only, not the main exported graph files.
Environment
- Package:
graphifyy - Version:
0.4.21 - Platform: Windows / PowerShell
- Invocation path: project root
- Project shape: Java/Spring-style repository with source files under
src/and docs at the repo root
Reproduction
Use the installed Codex skill flow for /graphify . on a repository where all code files share src as their common path prefix.
The relevant AST step in the installed Codex skill currently calls:
result = extract(code_files)With code files shaped like:
src/main/java/...
src/main/resources/...
src/test/java/...
Actual behavior
After the graph run, both directories exist:
<project>/graphify-out/
<project>/src/graphify-out/cache/
The nested directory only contains AST cache files. In the observed run, the cache files under <project>/src/graphify-out/cache/ corresponded to the code files under src/.
Expected behavior
All graphify-generated outputs and caches should stay under:
<project>/graphify-out/
The run should not create:
<project>/src/graphify-out/
Likely cause
graphify.extract.extract() infers a common root from the input paths when cache_root is not provided. If all code files are under src/, that inferred common root becomes src, so save_cached() writes AST cache files under:
src/graphify-out/cache/
The extract() docstring already notes that callers should pass cache_root=Path(".") when running on a subdirectory so the cache stays at ./graphify-out/cache/.
However, at least these call sites still appear to call extract(code_files) without an explicit cache_root:
- installed Codex skill AST extraction step
graphify.watch._rebuild_code(), used bygraphify update ./ watch-style rebuilds
Suggested fix
Either:
- Pass an explicit project/output root at call sites:
result = extract(code_files, cache_root=Path("."))or:
- Change
extract()so its default cache output root is the invocation/output root, not the inferred common prefix of the input files.
This would avoid nested graphify-out directories in common repository layouts where all code is under src/.
Activity
v0.4.22: fix Graphify-Labs#429 AST cache root, fix Graphify-Labs#428 …
v0.4.22: fix #429 AST cache root, fix #428 add .mdx to DOC_EXTENSIONS
v0.4.22: fix Graphify-Labs#429 AST cache root, fix Graphify-Labs#428 …