Skip to content

fix(merge): preserve repository-local identities#1691

Open
oleksii-tumanov wants to merge 1 commit into
Graphify-Labs:v8from
oleksii-tumanov:fix/lossless-multi-repo-merge
Open

fix(merge): preserve repository-local identities#1691
oleksii-tumanov wants to merge 1 commit into
Graphify-Labs:v8from
oleksii-tumanov:fix/lossless-multi-repo-merge

Conversation

@oleksii-tumanov

Copy link
Copy Markdown
Contributor

Summary

  • keep node IDs, hyperedges and existing community partitions distinct for each repository in merge-graphs
  • derive stable repository tags from input paths, reject collisions, and allow one explicit --repo-tag per input
  • leave persistent global add updates for a follow-up after this merge behavior is reviewed

Related to #585

Result

Relevant excerpt from the same orders and payments inputs (community and hyperedge fields condensed):

Before (v8)

Merged 2 graphs -> 4 nodes, 2 edges
orders communities: 0, 1
payments communities: 0, 1
hyperedges: []

Community IDs overlap, and both hyperedges are dropped.

After

Merged 2 graphs [orders, payments] -> 4 nodes, 2 edges, 2 hyperedges
orders communities: 0, 1
payments communities: 2, 3
orders::request_flow -> [orders::entry, orders::worker]
payments::request_flow -> [payments::entry, payments::worker]

Communities are disjoint and both repository-local hyperedges survive.

Testing

  • uv run --frozen pytest tests/test_merge_graphs_cli.py tests/test_global_graph.py tests/test_hypergraph.py tests/test_build_merge_hyperedges_and_prune.py tests/test_export.py -q (90 passed)
  • uv run --frozen pytest tests/ -q --tb=short (2940 passed, 3 skipped)
  • uv run --frozen ruff check graphify/build.py graphify/__main__.py tests/test_merge_graphs_cli.py (passed)

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