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
load_cached() silently swallows corrupt cache entries (55% of a real-world cache was dead, no diagnostics) #2405
While auditing a knowledge graph built from a personal Markdown vault (~230 files, Windows 11), I found that 138 of 249 entries in graphify-out/cache/ were invalid JSON. Every incremental run had been re-extracting more than half the corpus, paying that LLM work again each time, and nothing in the output suggested it.
load_cached() treats a corrupt entry exactly like a missing one, so the corruption never surfaces and the file stays in place, failing again on every future run. I checked the current v8 HEAD and the behavior is still there.
How my entries got corrupted is a separate story: they came from an old install (graphifyy 0.3.4) that wrote Windows paths with unescaped backslashes into source_file ("C:\Users\..."). That producer side looks covered by #2380 and #2197. This issue is only about the consumer side: whatever the origin, corrupt entries deserve a signal.
Repro on HEAD: drop any invalid-JSON file into graphify-out/cache/ and run an incremental update. The entry is re-extracted, nothing is logged, and the file remains for the next run.
Two small changes would cover it:
Count decode failures in load_cached() / check_semantic_cache() and print one warning per run, e.g. warning: 138 corrupt cache entries ignored (will re-extract).
Optionally rename bad entries to .corrupt so they stop being re-parsed every run.
Happy to send a PR for either if that helps.
Environment: Windows 11, Python 3.14; corruption produced under graphifyy 0.3.4; silent behavior verified in v8 HEAD graphify/cache.py.
This looks fixed on the v8 branch by 5d8d6113 (fix(cache): surface corrupt semantic cache entries instead of silently missing (#2683)). Could a maintainer confirm and close?
Activity
omsenjalia commentedon Oct 18, 2026
This looks fixed on the
v8branch by 5d8d6113 (fix(cache): surface corrupt semantic cache entries instead of silently missing (#2683)). Could a maintainer confirm and close?