chore(graphstore): collapse the four full-scan edge index builders into one
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start with the four edge index builders: BuildReverseAdjacency and BuildImplementsIndex in internal/query/traverse.go, buildReverseAdjacency in internal/indexer/sync.go, and buildContainsIndex in internal/query/traverse.go. Add one graphstore function that takes the edge kinds to keep, keep the Source sort for implements, and point the call sites at it, including the eight listed in the issue. Done means task test passes and the golden files are unchanged.
索引モデルが issue の本文から書いたものです。
説明
What kind of chore?
Repository housekeeping
What needs doing?
Four functions build an in-memory edge map from one full IterateEdges("") scan, keyed by edge.Target:
query.BuildReverseAdjacencyininternal/query/traverse.go:31keeps onlycallsedges.query.BuildImplementsIndexininternal/query/traverse.go:369keeps onlyimplementsedges and sorts each list bySource.buildReverseAdjacencyininternal/indexer/sync.go:614copies the first function. Its comment says the copy exists because aninternal/querytest import ofinternal/indexerforms an import cycle.query.buildContainsIndexininternal/query/traverse.go:401is a fourth full scan. It keeps onlycontainsedges, keys them byedge.Sourceand folds overload sets into a method-owner map, so it needs a parameter for the key as well as for the kinds.
Add one graphstore function that takes the set of edge kinds to keep. Keep the Source sort for implements, so list order does not change. Point the seam at internal/query/traverse.go:61 and the call sites at the new function. BuildReverseAdjacency has five callers outside the seam (internal/query/seeding.go:186, internal/query/expand.go:486, internal/query/traverse.go:757, 853 and 981). BuildImplementsIndex has three (internal/query/traverse.go:761, 857 and 985).
Run task test before the pull request. Each golden file stays the same.
Why now?
Decision D11 of the bounded-index-memory change (#271) gives the sync copy a set of edge kinds and leaves query unchanged. Task 6.1 then carries a second copy of the same algorithm. Collapsing the functions first means task 6.1 adds the edge-kind parameter to one function. The change's workflow follow-up asks for this issue.
Does this touch anything load-bearing?
- The release pipeline (
release.yml,.goreleaser.yaml, signing) - The upgrade identity (
internal/upgrade/verify.go) - The perf baseline (
tools/bench/baseline.json) - The graph schema / meta-key layout
- None of these
Before submitting
- I searched existing issues and this is not a duplicate
🤖 Generated with Claude Code
- 主要言語
- Go
- スター
- 0
- フォーク
- 0
- 平均マージ
- 7時間 42分
- マージ済み PR(30日)
- 111
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
seanb4t/codegraph-go のほかの issue
-
chore needs-triage
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
seanb4t/codegraph-go#380 ·
メンテナーはふだん 1 日以内に返信
-
chore needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
seanb4t/codegraph-go#379 ·
メンテナーはふだん 1 日以内に返信
-
area:query chore needs-triage spec-needed
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
seanb4t/codegraph-go#377 ·
メンテナーはふだん 1 日以内に返信
-
chore needs-triage
難易度 1/5 1〜3時間 初心者へのやさしさ 84/100
seanb4t/codegraph-go#362 ·
メンテナーはふだん 1 日以内に返信
-
area:query bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
seanb4t/codegraph-go#355 ·
メンテナーはふだん 1 日以内に返信
seanb4t/codegraph-go の issue をすべて見る
似ている issue
-
Add iterate GmbH domains to a dedicated list and include it in company and developer categoriesオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
v2fly/domain-list-community#4307 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
notify: voice_queue rows are deleted only at startup, so a hub that stays up grows it without boundオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
mattabate/life-distributable#232 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信