extract --out <dir>: semantic cache never saved, docs missing from manifest (relative source_file resolved against --out)
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
Research direction
Start in __main__.py at extract, then inspect cache.save_semantic_cache and check_semantic_cache to trace how source_file paths are resolved. Compare the paths used for _sem_extracted and files_by_type when --out differs from the scanned directory. Done means semantic cache entries are saved and the manifest records their semantic_hash, so a second run reuses the files.
Written by the indexing model from the issue text.
Description
Version: graphify 0.9.7 (uv tool install graphifyy), macOS, --backend claude-cli
Problem
graphify extract <dir> --out <other> never reuses the semantic cache. Every run re-extracts every doc and reports 0 files cached/unchanged. <other>/graphify-out/cache/semantic/ stays empty.
Cause
The LLM returns source_file relative to the scanned dir (e.g. n1.md). In __main__.py (extract), two places treat it as a path under the output root (out_root) instead:
cache.save_semantic_cache(..., root=out_root)buildsPath(root) / "n1.md",is_file()is false, so the entry is skipped. Nothing is saved._sem_extracted(used to build_manifest_files) is compared against the absolute paths infiles_by_type. A relativesource_filenever matches, so no doc gets asemantic_hashinmanifest.jsonanddetect_incrementalre-queues all of them.
When --out is omitted (out_root == target), (1) resolves correctly.
Repro
mkdir vault out cwd
for i in 1 2 3; do echo "# Note $i. Alice uses Redis." > vault/n$i.md; done
cd cwd
graphify extract ../vault --out ../out --backend claude-cli --max-concurrency 1 # run twice
Run 2: incremental summary: 0 files cached/unchanged, 3 re-extracted, tokens spent again, out/graphify-out/cache/semantic/ empty, manifest.json is {}.
Workaround
Omit --out and set GRAPHIFY_OUT=/abs/path/graphify-out. Run 2 then reports 3 files cached/unchanged, 0 re-extracted and spends no tokens. On a ~106-doc vault this took a nightly run from ~340k in / ~66k out tokens to ~17k / ~7k.
Suggested fix
Resolve relative source_file against target (the scanned dir) in save_semantic_cache and when building _sem_extracted, while keeping the cache key relative to out_root as check_semantic_cache already does.
- Dominant language
- Python
- Stars
- 124k
- Forks
- 11.9k
- Avg merge
- 2h 35m
- Merged PRs (30d)
- 6
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Graphify-Labs/graphify
-
[Bug]: Generated git hooks break when CDPATH is exported (dash's cd prints the resolved dir), silently skipping every rebuildPossibly taken @HhH666-ux claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Graphify-Labs/graphify#4977 · 1 comment ·
Maintainers usually reply within 1 day
-
hooks: last-resort `python3` probe launches the Microsoft Store redirector on Windows (visible console flash, exit 9009)Possibly taken @Deepjyoti-Sarmah claimed this 17 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Graphify-Labs/graphify#4563 · 2 comments ·
Maintainers usually reply within 1 day
-
GRAPHIFY_DISABLE_THINKING is ignored by the claude backend, so thinking eats max_tokens and extraction truncatesPossibly taken @bercedev claimed this 17 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
Graphify-Labs/graphify#4546 · 1 comment ·
Maintainers usually reply within 1 day
-
--update runbook: graph.json backup instruction comes after the diff that needs it, so the graph diff never runsPossibly taken @sunildivakar96-cpu claimed this 18 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Graphify-Labs/graphify#4539 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug] Pi skill uses unsupported general-purpose subagent instead of delegateMay be free again @bercedev claimed this 20 days ago, and no pull request is open. Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Graphify-Labs/graphify#4494 · 7 comments ·
Maintainers usually reply within 1 day
All issues in Graphify-Labs/graphify
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
FinanceFlash/unvibecode#509 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
FAIRmat-NFDI/nomad-distro-dev#161 ·
-
bug v2
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
modelcontextprotocol/python-sdk#3821 · 1 comment ·
Maintainers usually reply within 1 day
-
bug severity:low
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 2 days
-
Log-odds calibration uses upper middle score instead of median for even candidate setsPossibly taken @flysheep-ai claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day