Skip to content

feat(mapper): add streaming split, graph chunk mappers, and graphstore adapter#211

Draft
yushan8 wants to merge 1 commit into
yushan/entity-target-graphfrom
yushan/streaming-and-mappers
Draft

feat(mapper): add streaming split, graph chunk mappers, and graphstore adapter#211
yushan8 wants to merge 1 commit into
yushan/entity-target-graphfrom
yushan/streaming-and-mappers

Conversation

@yushan8

@yushan8 yushan8 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add internal/streaming/ with SplitBySize (generic wire-size splitter) and SplitMetadata (returns []*entity.GraphMetadata). Proto-free package.
  • Add ResultToGraphChunks: one-step targethasher.Result[]entity.GraphChunk (ID mapping + splitting).
  • Add GraphChunkToProto / ProtoToGraphChunk: bidirectional entity ↔ proto converters.
  • Add WriteGraphChunks + GraphChunkReader: graphstore adapter that hides proto serialization — callers work with entity types only.
  • Both old (core/common) and new implementations coexist — callsite migration follows in the next PR.

Test plan

  • make build && make test — 19/19 pass
  • internal/streaming/streaming_test.go — SplitBySize, SplitMetadata, wire size equivalence
  • internal/mapper/target_graph_test.go — ResultToGraphChunks (empty, chunking), GraphChunkToProto round-trip
  • make gazelle && gofmt -w . && goimports -w .

Stack

  1. feat(entity): add compact ID-mapped target graph types #210
  2. @ #NEW
  3. callsite migration (next)

@yushan8
yushan8 requested review from a team as code owners July 17, 2026 03:36
@yushan8
yushan8 marked this pull request as draft July 17, 2026 04:11
@yushan8
yushan8 force-pushed the yushan/streaming-and-mappers branch from 9bd4bdf to d05117c Compare July 17, 2026 05:13
@yushan8
yushan8 force-pushed the yushan/entity-target-graph branch from 4cb3028 to fba8c52 Compare July 17, 2026 05:13
@yushan8
yushan8 force-pushed the yushan/streaming-and-mappers branch 3 times, most recently from ecb2996 to 36f3f33 Compare July 17, 2026 22:57
@yushan8
yushan8 force-pushed the yushan/entity-target-graph branch from fba8c52 to 34e6a59 Compare July 17, 2026 22:57
@yushan8
yushan8 force-pushed the yushan/streaming-and-mappers branch 2 times, most recently from 91d9a76 to 9e0abdd Compare July 17, 2026 23:32
…e adapter

Add internal/streaming with SplitBySize (generic wire-size splitter)
and SplitMetadata (entity-based metadata splitter).

Add mapper functions for the one-step targethasher.Result → entity
GraphChunk conversion (ResultToGraphChunks), and bidirectional
entity ↔ proto converters (GraphChunkToProto, ProtoToGraphChunk).

Add graphstore adapter (WriteGraphChunks, GraphChunkReader) that hides
proto serialization from callers — the orchestrator and controller work
with entity types only.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@yushan8
yushan8 force-pushed the yushan/streaming-and-mappers branch from 9e0abdd to b621c93 Compare July 18, 2026 00:23
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