mirror of
https://github.com/safishamsi/graphify.git
synced 2026-08-29 17:56:41 +00:00
Node/edge ownership was keyed on source_file alone, but each file has an AST tier and a semantic tier. A semantic-only re-extract deleted a doc's AST headings, and a full _rebuild_code deleted document AST nodes. Add an _is_ast_tier() predicate (with a source_location legacy fallback for the unreliable _origin marker, #2334), backfill _origin on load so graphs self-heal, make build_merge / merge_raw_extraction replace by (source_file, tier) instead of source_file (coexist policy: an AST re-extract replaces only AST nodes and keeps the semantic layer, and vice versa), and scope the full-rebuild AST drop to sources actually regenerated (#2336) so a semantic-backed doc keeps its AST layer. Deletion prune stays tier-blind. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>