github / github/copilot-cli

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

Aperta
#4,513 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

area:plugins
Lingua principale
Shell
Stelle
11.2k
Fork
1.9k
Merge medio
14h 16m
PR unite (30g)
6

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Riprodurre il caso con due progetti usando .github/copilot/settings.json, con la sorgente git condivisa fissata su branch1 e branch2, quindi ispezionare il checkout in %LOCALAPPDATA%\copilot\marketplaces<hash-of-source>. Il lavoro è completato quando ogni progetto carica i plugin dalla ref richiesta, indipendentemente da quale progetto abbia usato precedentemente la cache, con copertura di regressione per lo scenario di cache condivisa.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
git, shell
Ambito
cli, tooling
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Attiva
Chiarezza
Abbastanza chiara
Idoneità per principianti
55/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.