feat: standalone index for a linked worktree
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 38/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- go
調査の方向性
Start by reading the worktree-index-fallback proposal and the implementation of codegraph sync, codegraph init, and codegraph githooks install; the issue does not name source files or tests. Reproduce the linked-worktree setup described in the issue, including a main checkout with its MCP server holding the store open. Done means a worktree can get a safe standalone index without a full build, and hook behavior when it has no index is documented or defined.
索引モデルが issue の本文から書いたものです。
説明
Problem
A linked worktree borrows the main checkout's index through the worktree-index fallback (v0.19). Queries in the worktree then describe the main checkout's tree, not the worktree's edits. The notice says so, but the answers are still stale. Agents now do most of their work in linked worktrees, for example worktrunk wt worktrees under a shared root. So most agent sessions query a tree that is not theirs.
#119 ("worktree support beyond detect-and-warn") closed as completed. But the worktree-index-fallback proposal still lists "a per-worktree index, automatic init in a worktree, or an index keyed by worktree HEAD" as out of scope.
Request
Give a linked worktree its own index without a full build. Two possible shapes:
- A command such as
codegraph init --from-mainthat copies the main checkout's index into the worktree and syncs it to the worktree's tree. - The same step done on its own, the first time codegraph runs in a linked worktree that has no index.
The copy must be safe while the main checkout's MCP server holds the store open and writes to it.
What works today, and its limit
In a linked worktree of a 466-file repository:
cp -R <main>/.codegraph .codegraph
codegraph sync # reparsed=64 pruned=396, 1.2 s
codegraph status --json | jq .worktreeMismatch # null
The worktree then has a standalone index. The limit is the copy: cp -R of an open store can capture a write in progress. If the sync fails, the workaround falls back to codegraph index --force.
Related
codegraph githooks installkeeps an index current between sessions. The hooks live in the common.git/hooks, so they run in every worktree. The docs can state whatsyncdoes from a hook in a worktree that has no index of its own: skip in silence, or fail.
🤖 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
-
難易度 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 日以内に返信