Skip to content

feat: extract GraphIndexMixin for shared merge/search/index - #145

Merged
yifanfeng97 merged 1 commit into
yifanfeng97:mainfrom
Frankie-Xu:cursor/graph-index-mixin-bd8a
Sep 14, 2026
Merged

feat: extract GraphIndexMixin for shared merge/search/index#145
yifanfeng97 merged 1 commit into
yifanfeng97:mainfrom
Frankie-Xu:cursor/graph-index-mixin-bd8a

Conversation

@Frankie-Xu

@Frankie-Xu Frankie-Xu commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Extract merge_batch_data, build_index / build_node_index / build_edge_index, and search / search_nodes / search_edges into GraphIndexMixin beside GraphEditMixin.
  • AutoGraph and AutoHypergraph both mix it in and drop their copies.
  • Public search() still returns (nodes, edges). SearchHits stays in the CLI/MCP layer.
  • Contract test: AutoGraph.search is AutoHypergraph.search so fix: forward source_ids/tags scope in AutoHypergraph.search #90-style source_ids copy-drift cannot recur.
  • Rebased onto main @ 7a4db40. Commit author/committer is Frankie-Xu.

Maintainer accepted the local mixin direction on #115 (keep _node_memory / _edge_memory; do not push this into ontomem; GraphEditMixin stays the provenance/delete surface).

Closes #115

Out of scope

Test plan

  • uv run pytest tests/types tests/utils tests/cli tests/test_mcp_server.py (493 passed, 7 skipped)
  • AutoGraph.search is AutoHypergraph.search
  • Existing graph / hypergraph search-scope tests still pass

Co-authored-by: Frankie-Xu <Frankie-Xu@users.noreply.github.com>
@cursor
cursor Bot force-pushed the cursor/graph-index-mixin-bd8a branch from 9e1a1ef to 282f90e Compare September 13, 2026 20:41
@Frankie-Xu Frankie-Xu changed the title Draft: extract GraphIndexMixin for shared merge/search/index feat: extract GraphIndexMixin for shared merge/search/index Sep 13, 2026
@Frankie-Xu
Frankie-Xu marked this pull request as ready for review September 13, 2026 20:44
@yifanfeng97

Copy link
Copy Markdown
Owner

Merged — exactly what #115 called for: GraphIndexMixin beside GraphEditMixin, _node_memory/_edge_memory stable, net −168 lines, and a dedicated test file. Verified the full suite locally (611 passed). Nice follow-through from RFC to implementation.

@yifanfeng97
yifanfeng97 merged commit 286453c into yifanfeng97:main Sep 14, 2026
5 checks 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.

RFC: extract GraphIndexMixin for shared merge/search/index

2 participants