mirror of
https://github.com/safishamsi/graphify.git
synced 2026-07-15 11:57:12 +00:00
94d3099540
Completes #1774. The prior fix redirected the AST cache dir to CWD but file_hash still called _ensure_stat_index(root) without the cache location, so the hash fastpath's stat-index.json kept anchoring on the key-root (the analyzed corpus) — leaving a stray graphify-out/cache/ stat-index.json inside a writable foreign corpus even though the AST cache itself had moved to CWD. Thread cache_root through file_hash -> _ensure_stat_index (which already accepts it, #1747). Surfaced by an out-of-CWD parallel-extract edge case: the leak was masked in the in-process test suite because _stat_index_root is a set-once module global that an earlier test had already pinned. The regression test resets that global to simulate a fresh process and asserts the corpus stays clean while the stat index lands under CWD. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>