Version: 0.9.16 (uv tool install of graphifyy, macOS)
While setting graphify up for a team repo I noticed our graph was mixing extraction vintages: nodes shaped by an older release's extraction prompt sitting next to nodes from the current one, in the same graph.json, with nothing flagging it.
The mechanism: the semantic cache keys entries on sha256(file content + "\x00" + relative path) and nothing else (file_hash, cache.py ~lines 162-210 in 0.9.16). There is no component for the version of the extraction prompt that produced the entry. After an upgrade, every unchanged file is a cache hit and replays whatever the older prompt extracted. The run exits 0, cost.json looks cheap, and the graph quietly carries two prompt generations.
What we saw concretely: graphify-out/cache/semantic/ held 880 entries, 356 written by an older install and 524 by 0.9.16. A rebuild we expected to be cold re-extracted only 6 of 512 doc files; the other 506 replayed the old vintage. The only way we found to get a single-vintage graph was deleting the cache.
I know the unversioned semantic cache is deliberate: #1252 versioned the AST cache and explicitly left semantic alone so a patch release doesn't re-bill LLM extraction, and that reasoning is sound. The gap is that the extraction prompt itself changes across releases (we hit this through the bundled Claude skill's prompt), and when it does, the cache has no way to notice. #1894 added mode namespacing for 0.9.17, but there is still no prompt/version dimension in the key.
A fingerprint of the extraction prompt in the key, or a prompt-hash-namespaced directory like the AST cache's v{version} layout, seems like it would keep both properties: entries survive releases that don't touch the prompt, and invalidate only when it actually changed. Even a warning that N cache entries predate the installed version would help a lot, since today there is no signal at all.
Our workaround is wiping graphify-out/ entirely before rebuilding after an upgrade. It works, but it forfeits the whole cache (AST included) and is easy to forget.
Thanks for the tool, and for how quickly #1894 moved.
Version: 0.9.16 (uv tool install of
graphifyy, macOS)While setting graphify up for a team repo I noticed our graph was mixing extraction vintages: nodes shaped by an older release's extraction prompt sitting next to nodes from the current one, in the same graph.json, with nothing flagging it.
The mechanism: the semantic cache keys entries on
sha256(file content + "\x00" + relative path)and nothing else (file_hash,cache.py~lines 162-210 in 0.9.16). There is no component for the version of the extraction prompt that produced the entry. After an upgrade, every unchanged file is a cache hit and replays whatever the older prompt extracted. The run exits 0, cost.json looks cheap, and the graph quietly carries two prompt generations.What we saw concretely:
graphify-out/cache/semantic/held 880 entries, 356 written by an older install and 524 by 0.9.16. A rebuild we expected to be cold re-extracted only 6 of 512 doc files; the other 506 replayed the old vintage. The only way we found to get a single-vintage graph was deleting the cache.I know the unversioned semantic cache is deliberate: #1252 versioned the AST cache and explicitly left semantic alone so a patch release doesn't re-bill LLM extraction, and that reasoning is sound. The gap is that the extraction prompt itself changes across releases (we hit this through the bundled Claude skill's prompt), and when it does, the cache has no way to notice. #1894 added mode namespacing for 0.9.17, but there is still no prompt/version dimension in the key.
A fingerprint of the extraction prompt in the key, or a prompt-hash-namespaced directory like the AST cache's
v{version}layout, seems like it would keep both properties: entries survive releases that don't touch the prompt, and invalidate only when it actually changed. Even a warning that N cache entries predate the installed version would help a lot, since today there is no signal at all.Our workaround is wiping
graphify-out/entirely before rebuilding after an upgrade. It works, but it forfeits the whole cache (AST included) and is easy to forget.Thanks for the tool, and for how quickly #1894 moved.