A code graph makes claims grep can't, including wrong ones
Описание и применение
Кодовый граф, созданный Graphify, объединял функции с одинаковыми именами из разных файлов, создавая ложные связи вызовов. Проверка каждой связи по строке кода выявила 184 ошибки, большинство из которых были отмечены как EXTRACTED. После обновления Graphify до версии 0.9.0 узлы больше не объединяются по имени, что устраняет большинство ложных связей.
Задача
Code graphs can merge nodes with the same name across files, producing incorrect call edges that agents may act on as if they were true.
Результат
Out of 1,142 call edges, 958 passed all checks, 184 failed at least one. 136 of the failures were tagged EXTRACTED, indicating that the graph had read them directly from source but still produced incorrect edges due to node merging.
Рабочий процесс
- Clone the repo at commit 6085fd6.
- Run the provided 36‑line Node script to iterate over all 'calls' edges.
- For each edge, read the source line and check: (1) caller and callee are in the same language, (2) caller is defined in the file where the call occurs, (3) the line actually contains a call to the callee’s name.
- Collect faults such as 'wrongLanguage', 'callerFromOtherFile', and 'nameNotOnLine'.
- Summarize how many edges pass or fail the checks.
- Compare the results with the graph’s EXTRACTED and INFERRED tags to identify false positives.
Доказательства
The most connected function in a code graph I opened this week has 124 edges. It doesn't exist.
I wrote a 36-line Node script. Every calls edge carries the file and line of the call, so for each one it reads that line and asks three questions:
The merges came from the dedup pass, which matched labels by fuzzy similarity, a sensible thing for doc concepts and a wrong one for code.
Issue #1205, opened June 9, reported a single --update dropping about 1,300 nodes from a 6,000-node graph. It was fixed the next day: code nodes are now keyed by ID only and never label-merged.
- Дата записи: 2026-10-23T19:11:30.346Z