chore(test): remove test helpers that repeat existing ones from PR #282
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 72/100
調査の方向性
internal/indexer/sync_shared_test.go と internal/indexer/pipeline_test.go から始めて、setSyncBeforeCommitHook と汎用の setHook を比較してください。次に internal/graphstore/shared_test.go で 3 つの setShared*Hook ヘルパーと blockFirstOpen を確認します。さらに internal/daemon/catchup_test.go(runHeld、startFakeRun)と testbudget_test.go も確認してください。重複したヘルパーが削除され、影響を受けるテストが共通ヘルパーを呼び出し、go test ./... が引き続き成功すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
What kind of chore?
Test infrastructure
What needs doing?
PR #282 added four test helpers that repeat helpers their packages already have. Each fix keeps behavior the same and changes only test files.
internal/indexer/sync_shared_test.go:16:setSyncBeforeCommitHookrepeats the genericsetHookininternal/indexer/pipeline_test.go. Widen thetparameter ofsetHookto an interface withHelperandCleanup, so*rapid.Tfits. CallsetHook(t, &syncBeforeCommitHook, ...)instead.internal/graphstore/shared_test.go:setSharedOpenHook,setSharedCloseHookandsetSharedWaitHookdiffer only in the variable they set. Add one genericsetHook[T any](t, hook *T, value T)to the graphstore tests. Call it for all three.internal/daemon/catchup_test.go:145:runHeldinTestRunCatchUpSyncOnHeldStorerepeats theawaitEpisodeloop ofTestDaemonFlushLockRequeueGivesUpPerEpisode. Hoist one helper besidestartFakeRun, built on the receive helper intestbudget_test.go. Call it from both tests.internal/graphstore/shared_test.go:349:TestOpenOfSecondPathDoesNotWaitcopies the body of theblockFirstOpenclosure. That closure is local toTestSharedHandleWaitersShareOpen. MoveblockFirstOpento file level.
The line numbers come from the review at ecc22e07. Current lines can differ.
Why now?
The OpenSpec review of the shared-store-handle change flagged these copies under its fit lens. The copies came in with #282 (commit c6788f5d). A later edit to one copy will not reach the others, so the duplicates can drift apart and hide a test bug. Tidiness is the trigger here, so this is lower priority.
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
- 主要言語
- 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
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
automated documentation maintenance
難易度 1/5 1〜3時間 初心者へのやさしさ 75/100
github/gh-aw-mcpg#16717 ·
メンテナーはふだん 1 日以内に返信
-
Docs: Recording rules pages don't say what happens to a recorded metric when its rule is deletedオープンinternal
難易度 1/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
jesseduffield/lazygit#6229 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
prometheus/prometheus#20482 ·
メンテナーはふだん 2 日以内に返信