autoUpdate: false in settings.json is ignored — CLI re-execs a cached prerelease build over the stable version installed via npm
まだ誰も着手していません。
- 主要言語
- Shell
- スター
- 11.2k
- フォーク
- 1.9k
- 平均マージ
- 14時間 16分
- マージ済み PR(30日)
- 6
説明
Summary
Once a prerelease build has been cached under ~/.copilot/pkg/<platform>/, the
CLI keeps re-execing it on every launch, even when:
- a stable version is installed via npm, and
"autoUpdate": falseis set in~/.copilot/settings.json.
The documented setting has no effect, because the re-exec into the newer cached
build happens before settings are read. Only the COPILOT_AUTO_UPDATE=false
environment variable changes the behaviour.
The practical result: a user who tries the prerelease channel once cannot get
back to stable through any documented mechanism, and cannot tell they are still
on a prerelease unless they check --version.
Environment
- Cached prerelease build:
1.0.81-5 - Stable installed via npm:
1.0.80 - Node.js v22.21.1, Linux x64
Steps to reproduce
- Be on a prerelease build (so it is cached under
~/.copilot/pkg/<platform>/). npm install -g @github/copilot— installs the current stable release.
Confirmnode_modules/@github/copilot-<platform>/package.jsonreports the
stable version.- Set
"autoUpdate": falsein~/.copilot/settings.json. - Run
copilot --version.
Expected: the stable version, since that is what is installed and
auto-update is disabled.
Actual: the cached prerelease version.
$ copilot --version
GitHub Copilot CLI 1.0.81-5.
The env var behaves differently from the setting
Running the npm-installed platform binary directly:
$ ./copilot --version
GitHub Copilot CLI 1.0.81-5. # re-execs the cached prerelease
$ COPILOT_AUTO_UPDATE=false ./copilot --version
Package extraction took 7995ms
GitHub Copilot CLI 1.0.80. # runs the installed stable build
Same binary, same settings file, opposite results — so autoUpdate in
settings.json and COPILOT_AUTO_UPDATE are not equivalent, though
copilot update --help presents them as alternatives:
Use
--no-auto-updateor setCOPILOT_AUTO_UPDATE=falseto disable it manually.
and copilot help config documents:
autoUpdate: whether to automatically download updated CLI versions; defaults totrue.
There is no documented way back to stable
copilot update stable refuses, because it only compares version ordering and
will not move backwards:
$ copilot update stable
Checking for updates...
Checking GitHub for the latest release...
No update needed, current version is 1.0.81-5, fetched latest release is v1.0.80
Since prerelease versions sort above the current stable release, anyone on
a prerelease is pinned there until a higher stable ships. Combined with the
ignored autoUpdate setting, the only working escape routes are undocumented:
set COPILOT_AUTO_UPDATE=false, or manually delete the cached build
directories.
Also, COPILOT_PKG_CACHE_HOME pointed at an empty directory did not change
resolution — the cached prerelease was still selected.
Suggested fixes
- Make
"autoUpdate": falseinsettings.jsonhonoured by the re-exec path,
or document that it does not cover it. - Give
copilot update <channel>a way to switch channels downward
(e.g.--allow-downgrade, or treat an explicit channel argument as
authoritative over version ordering). - Surface the channel in
--versionoutput, so it is obvious when a
prerelease is being used.
Found while trying to move off the prerelease channel after hitting #4533 (a
separate defect). This report is only about being unable to leave the
prerelease channel.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、settings.json が読み込まれる前に ~/.copilot/pkg// を選択する CLI の起動および再実行パスを追跡し、次に copilot update の処理とバージョン比較を調査します。キャッシュされた prerelease、安定版の npm パッケージ、autoUpdate false を使って再現します。意図しない再実行を防ぐ設定が文書化されるか、明示的なチャンネル切り替えが機能すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- node.js
- 領域
- cli, release
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100