Commit Graph
12 Commits
Author SHA1 Message Date
JensD-git ab8d63bf4c fix(csharp): salt colliding ids before the partial merge, so a half keeps its members (#4411)
Two files can mint the same stem (`Spec.cs` / `_Spec.cs`, `Cfg/Helpers.cs` /
`Cfg_Helpers.cs`), so the type ids in them collide. The C# partial merge ran
before _disambiguate_colliding_node_ids: it rewired the edges of every half
onto the canonical half's still-colliding id, and the disambiguation, which
remaps by (id, source_file of the edge), then missed every edge that came from
another half and left it on a dead id. The members of that half had no owning
type. When both colliding files declared a half of the same partial type, the
second node kept the canonical id, was not removed by the merge, and was split
off again, so the type stayed two nodes. And since the merge removes
merged-away halves by id, an unrelated node in another file that shared such
an id was removed with them.

Run the disambiguation first. Every edge is still on its own half when ids are
salted, and the merge joins the halves by type path, whatever their ids.

Fixes #4411.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 78575576a8)
2026-10-13 22:21:43 +01:00
JensD-git 371cb47e83 fix(csharp): merge nested and generic partial types by their full type path (#4363)
The partial merge grouped halves by (namespace, label) and skipped nested
types, because nested ids omit the enclosing type. A nested partial type split
across files stayed split, and `Box` / `Box<T>` partials were folded into one
node although they are distinct types (#4249).

- The C# extractor records each partial type's path inside its namespace,
  enclosing types first, each with its arity (`Outer`1.Inner`), as
  metadata.type_path; the merge keys on (assembly, namespace, type_path).
- The cross-file call pass binds a C# unqualified call to the one candidate
  that is a member of the caller's own type, so a call into another half of a
  partial type is not lost to a same-named method elsewhere (#4252 does this
  in-file only). Ties fall through unchanged.
- After C# type resolution, a merged partial type drops a placeholder base
  that sits next to a real base of the same name; one half resolving a sibling
  nested base and the other not left two bases, and base-chain lookups failed.
- _AST_CACHE_SCHEMA 8 -> 9, so cached C# results without type_path are
  re-extracted.

Fixes #4363.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 92d9197787)
2026-10-12 14:50:32 +01:00
xiehuanyi b50e1b3590 fix(python): preserve nested class identities by enclosing class
Co-authored-by: Codex <noreply@openai.com>
(cherry picked from commit e85a748445)
2026-10-08 14:29:19 +01:00
Huanyi Xie fb8b98fb52 fix(r): preserve symbol-only binding identity
Keep operator scopes separate from their containing file and ordinary normalized identifiers, including nested bindings.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
(cherry picked from commit dc43c7c646)
2026-10-06 20:54:15 +01:00
raditha dissanayake 5eeb037929 fix(export): preserve stored edge direction when reloading graph.json (#4066)
graph.json is written "directed": false and carries direction in arc order
(#563), or in _src/_tgt markers on legacy files (#2309). A plain undirected
node_link_graph load re-orders endpoints by node-list position, so every
link whose target precedes its source in the node list came back reversed
(79% of links on graphify's own graph).

query, path/explain, affected, merge-graphs and the MCP server already
restore direction. The remaining reloaders did not:

- export html / neo4j / falkordb (cypher.txt and --push) / obsidian canvas
- graph.html re-rendered by update, watch and the git hooks
- the git merge driver, which wrote the reversal into the committed
  graph.json, even when merging three identical copies

Add paths.restore_arc_direction, the inline idiom query and merge-graphs
already use, and apply it in load_node_link_graph and the export loader.
to_cypher, to_canvas and push_to_neo4j/falkordb now read _src/_tgt as
to_html already does. The merge driver writes direction back into arc
order before saving, as to_json does, so the committed file keeps the
post-#563 convention.

global add has the same bug and is fixed separately.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 5a461c99d7)
2026-10-05 19:40:13 +01:00
azizur100389 bb20ef7234 fix(analyze): diversify suggested questions across signal types
Round-robin the existing question categories before truncating the result. Preserve within-category order, existing small-limit priority, candidate schema, and no-signal behavior. Fixes #3849.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
(cherry picked from commit 560b88d86f)
2026-10-04 20:40:34 +01:00
nikhil2004 d5916e6a20 docs: correct factual drift in architecture and security policies
(cherry picked from commit a61eeebb29)
2026-09-26 13:55:08 +01:00
rajashidattapy c1e41ea90e docs: refresh ARCHITECTURE.md module table + add a doc-parity test (keeps the #2558 'an' fix) 2026-08-12 20:57:39 +01:00
nelsondeleonc-source 39beeb9b4b docs: fix article typo (an extract_<lang>) in ARCHITECTURE.md 2026-08-12 20:56:28 +01:00
Porun db66b8727b feat: add callflow HTML export with Mermaid architecture diagrams 2026-05-09 23:26:01 +01:00
Safi 5db8f7ce39 docs: update surprising connections description, test count
style: replace all em dashes with hyphens

fix: explain hidden .graphify/ folder in skill output and README

fix: rename .graphify/ to graphify-out/ so output is visible by default
2026-04-06 16:06:31 +01:00
Safi 64e07abd98 docs: CI, architecture guide, worked examples, README fixes
- Add GitHub Actions CI workflow (Python 3.10 and 3.12)
- Add CI badge to README
- Add ARCHITECTURE.md: pipeline overview, module table, schema, how to
  add a language extractor, security summary
- Move eval reports from tests/ to worked/httpx/ and worked/mixed-corpus/
- Fix README: test count 163→212, language table (13 languages via
  tree-sitter), extract.py description, worked examples links

benchmark: 8.8x token reduction on nanoGPT + minGPT + micrograd

- Run AST extraction on 29 Python files across 3 Karpathy repos
- 177 nodes, 246 edges, 17 communities (Leiden)
- 8.8x avg token reduction vs naive full-corpus context stuffing
- Notable: micrograd cleanly splits into engine/nn communities;
  nanoGPT model vs training loop correctly separated
- Honest: stdlib import noise flagged, config isolates documented

benchmark: 71.5x token reduction on mixed corpus (code+papers+images)

Full run: nanoGPT+minGPT+micrograd + 5 research papers + 4 images
285 nodes, 340 edges, 53 communities
Average BFS query: 1,726 tokens vs 123,488 naive (71.5x)
Code-only (AST) sub-benchmark: 8.8x on 13k-word corpus
2026-04-06 16:06:31 +01:00