mirror of
https://github.com/colbymchenry/codegraph.git
synced 2026-10-29 07:44:09 +08:00
Node insertion used plain INSERT which crashes on duplicate IDs. In large C/C++ projects, tree-sitter can produce duplicate nodes for the same symbol (e.g. typedef struct where both struct_specifier and type_definition resolve to the same name/kind/line, or multiple anonymous constructs on the same line). - Change nodes INSERT to INSERT OR REPLACE (idempotent, same data) - Change edges INSERT to INSERT OR IGNORE (skip duplicate edges) The node ID is sha256(filePath:kind:name:line) which already uses full relative paths, so cross-directory collisions are not the issue. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>