github / github/copilot-cli

Plugin marketplace cache ignores  ref  when shared across projects with different branches

オープン
#4,513 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

area:plugins
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

Describe the bug

When two projects reference the same git-based marketplace source but pin different  ref  values (branches) in  .github/copilot/settings.json 's  extraKnownMarketplaces , Copilot CLI reuses a single on-disk cache checkout keyed only by the source URL/path — not by  ref . Opening a project that expects  branch1  does not re-checkout the cache to  branch1  if it was last left on  branch2  by another project.

Affected version

Copilot CLI 1.0.80

Steps to reproduce the behavior
  1. Create marketplace repo with  branch1  and  branch2 , differing plugin content.
  2. Project A's  .github/copilot/settings.json  sets  extraKnownMarketplaces..source.ref = "branch2" . Open Copilot CLI there — cache clones/checks out  branch2 .
  3. Project B (different repo) sets  ref = "branch1"  for the same marketplace source URL. Open Copilot CLI there.
  4. Expected: cache checks out  branch1  before loading plugins for Project B.
  5. Actual: cache in  %LOCALAPPDATA%\copilot\marketplaces<hash-of-source>  remains on  branch2 ; Project B silently loads branch2's plugins instead of branch1's.
Expected behavior

When a project's  .github/copilot/settings.json  specifies a  ref  (branch/tag/commit) for an  extraKnownMarketplaces  entry, Copilot CLI should ensure the local cache reflects that exact  ref  before loading plugins for that session — regardless of what  ref  was last checked out there by a different project sharing the same source URL.

Additional context

Suggested fix (from copilot lol): Include  ref  in the cache key/path, or verify+checkout the requested  ref  on every load regardless of cache state.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

.github/copilot/settings.json を使用し、共有 git ソースを branch1 と branch2 に固定した 2 プロジェクトのケースを再現してから、%LOCALAPPDATA%\copilot\marketplaces<hash-of-source> 配下の checkout を調査します。どのプロジェクトが以前にキャッシュを使用したかに関係なく、各プロジェクトが要求した ref からプラグインを読み込み、共有キャッシュのシナリオに対するリグレッションカバレッジがあれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
git, shell
領域
cli, tooling
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
55/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。