Skip to content

feat: preserve parallel relations with MultiDiGraph#2177

Open
hsneves wants to merge 3 commits into
Graphify-Labs:v8from
hsneves:feat/multidigraph
Open

feat: preserve parallel relations with MultiDiGraph#2177
hsneves wants to merge 3 commits into
Graphify-Labs:v8from
hsneves:feat/multidigraph

Conversation

@hsneves

@hsneves hsneves commented Jul 25, 2026

Copy link
Copy Markdown

Summary

Adds an opt-in --multigraph build mode backed by a directed MultiDiGraph. Canonically distinct relations retain stable keys, exact duplicates aggregate through occurrence_count, and incremental/query/export paths preserve parallel edges without changing the default Graph mode.

Depends on #2174 (8c2af43); this branch is intentionally stacked on that endpoint-materialization fix.

Highlights

  • stable keyed parallel edges and exact-duplicate counters
  • automatic mode preservation in update/watch/hook/cluster-only/no-cluster
  • simple unweighted topology projection for clustering and centrality
  • parallel-aware query, path, explain, HTML, wiki, Obsidian, GraphML, graph DB and MCP readers
  • explicit failure instead of silent simplification in merge/global flows
  • expanded diagnostics for canonical, duplicate, parallel, reciprocal and post-build loss counts
  • generated skills document and propagate IS_MULTIGRAPH

Validation

  • uv run ruff check .
  • uv run python -m tools.skillgen --check (134 artifacts)
  • uv run pytest -q: 3598 passed, 33 skipped
  • real 698-code/95-semantic-file monorepo: 9,220 nodes, 24,206 canonical edges, 975 distinct parallel instances, 44 reciprocal endpoint pairs, 457 exact duplicate occurrences, 0 unresolved/malformed/unclassified internal endpoints, 0 post-build distinct loss
  • StageTrackPaths.__init__ -> Path preserves both references at L982 (occurrence_count=6) and calls at L1002

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant