Update: cross-review worktree を非永続領域 + リポジトリ別パスに変更 (v4.15.0)#31
Open
takemi-ohama wants to merge 2 commits into
Open
Update: cross-review worktree を非永続領域 + リポジトリ別パスに変更 (v4.15.0)#31takemi-ohama wants to merge 2 commits into
takemi-ohama wants to merge 2 commits into
Conversation
/work/worktrees は共有の永続 volume のため、(1) 別リポジトリの同一 PR 番号と 衝突 (2) 明示削除が必要 (3) volume を消費する問題があった。 - デフォルト生成先を <システム tmpdir>/ndf-worktrees に変更 (NDF_WORKTREE_BASE env でオーバーライド可。旧 fallback は廃止) - パスを <base>/<owner>--<repo>/pr<N> 形式にしてリポジトリ間衝突を防止 - 未登録パスの残骸は .stale-<timestamp> に退避して作り直すガードを追加 - テストを新解決順 + repo slug + 残骸ガードに刷新 (102 passed) - version 4.14.0 → 4.15.0、関連ドキュメント整合 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
takemi-ohama
commented
Jun 12, 2026
takemi-ohama
left a comment
Contributor
Author
There was a problem hiding this comment.
🤖 cross-review | round 1 | codex | APPROVE
修正必須の指摘はありません。
takemi-ohama
commented
Jun 12, 2026
takemi-ohama
left a comment
Contributor
Author
There was a problem hiding this comment.
🤖 cross-review | round 1 | gemini | REQUEST_CHANGES
state.py の worktree 生成・解決ロジックにエッジケースの不備があります。
NDF_WORKTREE_BASEに相対パスが指定された場合、state.jsonのworktree_pathに相対パスが書き込まれ、後続エージェントの「絶対パスを使う」制約が壊れる可能性があります。- フォーク PR フォールバック時の
gh pr checkoutが失敗した場合、誤ったコミット (HEAD) を指したままの worktree が残存し、次回実行時に不正に流用される危険があります。
インラインコメントの指摘内容に沿って修正をお願いします。
…ee ロールバック) - _default_worktree_base(): 環境変数が相対パスの場合も .resolve() で常に絶対パスを返す - _create_worktree(): gh pr checkout 失敗時に git worktree remove --force でロールバックし、HEAD 指向 worktree の不正流用を防止 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
何のために(背景)
cross-review の worktree 生成先
/work/worktrees/pr<N>は共有の永続 volume 上にあり、以下の問題があった:pr30を誤って流用しかけ、git 操作が壊れる事故が発生)何を(変更内容)
worktree 生成先の変更(
state.py)<システム tmpdir>/ndf-worktreesに変更:tempfile.gettempdir()ベースの非永続領域。コンテナ再作成で自動消滅し、明示削除も不要NDF_WORKTREE_BASEenv ><tmpdir>/ndf-worktrees。旧/work/worktrees/$HOME/work/worktreesフォールバックは廃止<base>/<owner>--<repo>/pr<N>形式(例:/tmp/ndf-worktrees/devbasex--ai-plugins/pr30)とし、他リポジトリの同一 PR 番号と衝突しないgit worktree listに登録されていなければ.stale-<timestamp>に退避して作り直す(_is_registered_worktree()/_create_worktree()に分離)その他
test_default_worktree_base.pyを新解決順 + repo slug + 残骸ガードのテストに刷新テスト
.stale-20260612061751に退避され、/tmp/ndf-worktrees/devbasex--ai-plugins/pr30に detached worktree が正常作成されることを確認(テスト後に掃除済み)claude plugin validateパス(warning は既存の marketplace description 欠如のみ)🤖 Generated with Claude Code