fix(cache): scope semantic cache writes to extracted files (#1757)

This commit is contained in:
tpateeq
2026-07-13 00:35:32 +01:00
committed by safishamsi
parent a46eee49ef
commit 579ba1da3c
41 changed files with 196 additions and 41 deletions
@@ -374,7 +374,8 @@ from graphify.cache import save_semantic_cache
from pathlib import Path
new = json.loads(Path('graphify-out/.graphify_semantic_new.json').read_text()) if Path('graphify-out/.graphify_semantic_new.json').exists() else {'nodes':[],'edges':[],'hyperedges':[]}
saved = save_semantic_cache(new.get('nodes', []), new.get('edges', []), new.get('hyperedges', []))
uncached = [line for line in Path('graphify-out/.graphify_uncached.txt').read_text().splitlines() if line]
saved = save_semantic_cache(new.get('nodes', []), new.get('edges', []), new.get('hyperedges', []), allowed_source_files=uncached)
print(f'Cached {saved} files')
"
```