mirror of
https://github.com/safishamsi/graphify.git
synced 2026-07-14 11:27:10 +00:00
de7d362537
Rigorous smoke testing surfaced an edge case the canonical-tmp unit tests couldn't reach: when the scan root is under a symlink (macOS /var -> /private/var, a symlinked home or git worktree), the absolute prune path and the resolved root differ by prefix, so _norm_source_file's lexical relative_to fails and the prune/replace match silently misses — deleted files' ghost nodes survive. Latent in the pre-existing #1007 path too, now that build_merge resolves the root. Fix: when lexical relative_to fails, retry with both sides fully resolved. Only the failure path resolves, so the common lexical match stays filesystem-free (no per-node stat on the hot replace-per-source loop). Adds a symlinked-root prune regression test (POSIX-only). Full suite 2768, and the full end-to-end smoke battery (indirect_call all contexts, JS, Ruby/Groovy inherits, hyperedge preservation, symlinked-root ghost prune, corrupt-json errors, dedup collision warning) is green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>