Plugin marketplace cache ignores ref when shared across projects with different branches
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 11.2k
- Forks
- 1.9k
- Avg merge
- 14h 16m
- Merged PRs (30d)
- 6
Description
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
- Create marketplace repo with branch1 and branch2 , differing plugin content.
- Project A's .github/copilot/settings.json sets extraKnownMarketplaces..source.ref = "branch2" . Open Copilot CLI there — cache clones/checks out branch2 .
- Project B (different repo) sets ref = "branch1" for the same marketplace source URL. Open Copilot CLI there.
- Expected: cache checks out branch1 before loading plugins for Project B.
- 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the two-project case using .github/copilot/settings.json with the shared git source pinned to branch1 and branch2, then inspect the checkout under %LOCALAPPDATA%\copilot\marketplaces<hash-of-source>. Done when each project loads plugins from its requested ref regardless of which project used the cache previously, with regression coverage for the shared-cache scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, shell
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100