You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
save_semantic_cache crashes on directory-path source_file (IsADirectoryError) #655
Where:graphify/cache.py:31 — file_hash calls Path.read_bytes() on p, but save_semantic_cache (around line 166) only checks p.exists() before calling save_cached. When a node's source_file resolves to a directory (e.g. a folder inside a vault corpus), p.exists() returns True, and read_bytes raises IsADirectoryError.
Reproduction:
```python
from graphify.cache import save_semantic_cache
import tempfile
from pathlib import Path
with tempfile.TemporaryDirectory() as root:
root = Path(root)
(root / "subdir").mkdir()
nodes = [{"id": "n", "label": "L", "source_file": str(root / "subdir")}]
save_semantic_cache(nodes, [], root=root) # IsADirectoryError on 0.4.23
```
Fix shape: in save_semantic_cache, replace p.exists() with p.is_file() so directory-path nodes are skipped silently. Single-line change. Surfaced during a 232-node / 389-edge run on a multi-folder corpus where a few nodes had directory-shaped source paths.
Activity
fix Graphify-Labs#655 Graphify-Labs#656 Graphify-Labs#657 Graphify-La…