diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ea408f..8e94efa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1380,6 +1380,7 @@ jobs: - name: Build NixOS persistent CLI wrapper baseline run: | nix build --no-write-lock-file --out-link result-user-baseline ./platforms/nixos#user-baseline + # gcloud remains a compatibility launcher; optional CLI installation is not required. for command in git git-lfs mise claude opencode devin node cargo gdu gcloud wget gcc clang lldb cmake ninja make pkg-config; do test -x "result-user-baseline/bin/$command" done diff --git a/.mise/locks/mise.global/npm-playwright/1.65.1/aube-lock.yaml b/.mise/locks/mise.global/npm-playwright/1.65.1/aube-lock.yaml deleted file mode 100644 index 5c3333a..0000000 --- a/.mise/locks/mise.global/npm-playwright/1.65.1/aube-lock.yaml +++ /dev/null @@ -1,33 +0,0 @@ -lockfileVersion: '9.0' - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - -importers: - - .: - dependencies: - playwright: - specifier: 1.65.1 - version: 1.65.1 - -packages: - - playwright-core@1.65.1: - resolution: {integrity: sha512-hqPpz7blSMPxWVdoeE1yiBSzXsKiVOd2k+kjCvmUywD2GPO2Dd9HfcWnq9NN0GHbNZDFgZ9JfBFr+X5/BLo0qw==} - engines: {node: '>=20'} - hasBin: true - - playwright@1.65.1: - resolution: {integrity: sha512-vJ1FuoOrNwOKHUIVEvSt3jT1L+wjjDpwhwIstKtfvTh8XIG4FG4bIFuvNdMxi81LGfAhUgUZleVFaOLY4RIUUw==} - engines: {node: '>=20'} - hasBin: true - -snapshots: - - playwright-core@1.65.1: {} - - playwright@1.65.1: - dependencies: - playwright-core: 1.65.1 diff --git a/.mise/locks/mise.global/npm-playwright/1.65.1/package.json b/.mise/locks/mise.global/npm-playwright/1.65.1/package.json deleted file mode 100644 index 7517bf1..0000000 --- a/.mise/locks/mise.global/npm-playwright/1.65.1/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "mise-npm-install", - "private": true, - "dependencies": { - "playwright": "1.65.1" - } -} diff --git a/README.md b/README.md index 04d7f0c..2e0259a 100644 --- a/README.md +++ b/README.md @@ -84,11 +84,11 @@ OSに依存しにくい開発CLI/runtimeは一度だけ宣言する。 - Claude Code / Codex / OpenCode / Devin - Worktrunk / Herdr - Open Code Review / npkill / cargo-clean-all -- Google Cloud CLI / AWS CLI -- Supabase CLI - ripgrep / fd / fzf / jq / bat / gdu - ShellCheck / Neovim +AWS CLI / Google Cloud CLI は必要なホストだけに導入する任意機能です。Supabase CLI は各プロジェクトの `mise.toml`、Playwright は各プロジェクトの依存管理で版を指定します。CLIの導入範囲と認証アカウントの範囲は別の判断です。詳細は [ADR-0025](./docs/adr/ADR-0025.md)。 + Open Code Review は npm trust policy を迂回せず、公式 `alibaba/open-code-review` GitHub Release のplatform binaryをmiseから導入する。詳細は [ADR-0007](./docs/adr/ADR-0007.md) を参照。 Vercel CLI は npm の trust policy を通らないため baseline に含めない。必要なマシンは project 側で導入する。詳細は [ADR-0023](./docs/adr/ADR-0023.md) を参照。 diff --git a/docs/adr/ADR-0006.md b/docs/adr/ADR-0006.md index 5234b7e..e3f3dfc 100644 --- a/docs/adr/ADR-0006.md +++ b/docs/adr/ADR-0006.md @@ -55,7 +55,7 @@ The user does not manually reproduce the full APT/Homebrew/WinGet package list. ### 3. Portable development tools use `[tools]` -Tools whose primary identity is a developer CLI/runtime and which mise can install portably belong in `mise.global.toml` `[tools]`. This file is applied as the user's global mise config, while root `mise.toml` owns machine bootstrap orchestration. +Frequently used, cross-project developer CLI/runtime defaults belong in `mise.global.toml` `[tools]`. A CLI being installable by mise is not sufficient grounds to make it mandatory on all hosts; project-scoped and optional-host tools are governed by ADR-0025. This file is applied as the user's global mise config, while root `mise.toml` owns machine bootstrap orchestration. Current baseline includes: @@ -65,12 +65,10 @@ Current baseline includes: - Claude Code / Codex / OpenCode / Devin - Worktrunk / Herdr - Open Code Review / npkill / cargo-clean-all -- Google Cloud CLI / AWS CLI -- Supabase CLI - ripgrep / fd / fzf / jq / bat - ShellCheck / Neovim -Project-specific pinned versions still belong to each project. The pc-setup declarations are machine-wide defaults, not a replacement for project-local toolchain definitions. +Project-specific pinned versions still belong to each project. See [ADR-0025](./ADR-0025.md) for the global / optional-host / project boundary, including identity separation. The pc-setup declarations are machine-wide defaults, not a replacement for project-local toolchain definitions. ### 4. Host packages and applications use `[bootstrap.packages]` diff --git a/docs/adr/ADR-0009.md b/docs/adr/ADR-0009.md index 07e8047..27b5c19 100644 --- a/docs/adr/ADR-0009.md +++ b/docs/adr/ADR-0009.md @@ -30,10 +30,8 @@ Current Windows foundation includes: - .NET SDK - Visual Studio - Android Studio -- Google Cloud SDK -- AWS CLI -Git and mise themselves remain bootstrap dependencies. +Git and mise themselves remain bootstrap dependencies. AWS CLI and Google Cloud SDK were removed from the mandatory Windows foundation under [ADR-0025](./ADR-0025.md). Their installation is an optional, use-driven host capability, not a prerequisite for all development machines. ### 2. Desktop applications use a shared best-effort inventory diff --git a/docs/adr/ADR-0023.md b/docs/adr/ADR-0023.md index 07e9852..1066258 100644 --- a/docs/adr/ADR-0023.md +++ b/docs/adr/ADR-0023.md @@ -68,7 +68,7 @@ Vercel CLI を `mise.global.toml` の machine-global baseline から外す。 - Vercel の npm 公開が trusted-publisher / provenance を一貫して持ち、`trustPolicy=no-downgrade` を通るようになった場合 - Vercel CLI が standalone binary を公式 GitHub Release で配布するようになった場合 -- 日常的に使う machine-global CLI としての需要が戻った場合 +- ADR-0025 の machine-global 採用条件を満たす横断的な需要が確認された場合 ## References diff --git a/docs/adr/ADR-0025.md b/docs/adr/ADR-0025.md new file mode 100644 index 0000000..22c5ebb --- /dev/null +++ b/docs/adr/ADR-0025.md @@ -0,0 +1,69 @@ +# ADR-0025: machine-global / optional-host / project-local CLI の所有境界 + +- Status: Accepted +- Date: 2026-11-18 +- Extends: ADR-0006, ADR-0009, ADR-0010 +- Related: ADR-0023 + +## Context + +pc-setupのmachine-global baselineには、すべての開発機で使う共通CLIに加えて、 +特定クラウドや個別プロジェクトでだけ使うAWS CLI、Google Cloud CLI、 +Supabase CLI、Playwrightまで含まれていた。 +その結果、使用しない環境へのmandatory install、更新対象の肥大化、 +project tool versionとglobal versionの責任の重複が起きる。 + +CLIのインストール位置、バージョン所有者、認証/権限の境界は独立した概念。 +グローバルCLIが必ずグローバル認証を必要とするわけではなく、 +project-localインストールが資格情報を自動的に隔離するわけでもない。 + +## Decision + +CLIを用途と所有する正本で分類する。 + +1. **Machine-global core:** 複数プロジェクトの共通入口として頻用するCLIとruntime + (mise、gh、Infisical、各種agent、汎用shellツール等)。 + そのバージョンの既定値は `mise.global.toml` と adopted lock が所有する。 + Project側のtoolchain定義はglobal既定値より優先する。 +2. **Optional host capabilities:** AWS CLIとGoogle Cloud CLIのように、 + 実行環境・SDK・利用するクラウドが限定されるツール。 + 必要なホストだけに公式のインストール経路で導入する。 + 単に認証があるから、という理由でプロジェクトへの実行ファイルの複製は要求しない。 +3. **Project-local dependencies:** Supabase CLIやPlaywrightのように、 + プロジェクトのスキーマ、ビルド、テスト、マイグレーションと + バージョン互換性が結びつくCLI。 + Consumerの `mise.toml` / `package.json` / toolchain lock等で版を管理する。 + CLIが必要なリポジトリ自身が宣言し、pc-setupは代わりに配備しない。 + +採用判断はツールごとに利用頻度、バージョン結合度、認証境界、 +再現可能性、全ホストへの配備コストで行う。用途に合わない独自profile frameworkは作らない。 + +## Authentication and rollout boundary + +- Cloudのアカウント/プロジェクトはAWSのnamed profile、gcloudのnamed configuration、 + Supabaseのproject linkなど公式の手段で明示的に選択する。 + 実行時には現在の対象を確認し、本番操作を意図せず実行しない。 +- Credential、token、service key、auth fileはGit/lock/mise configに保存しない。 + Providerのsupported user store、Infisical、workload identity/OIDCなど適切な管理を使う。 +- 宣言除去は「今後bootstrapで必須にしない」という意味。 + 既存のインストール済みCLIや資格情報を自動消去しない。 + 移行後の未使用コピーの掃除は利用確認と別の安全な手順で行う。 +- WindowsのWinGet `Google.CloudSDK` / `Amazon.AWSCLI` もmandatory package setから外す。 + 既存のWindows利用者に削除を要求しない。 +- NixOSのFHS `aws` / `gcloud` / `supabase` command wrapperは残す。 + これはproject-local/tool-on-demandの実行互換のためのlaunch surfaceであり、 + バイナリ導入・認証済み・共通必須を意味しない。 + +## Verification + +- `mise.global.toml` と `mise.global.lock` の対象CLIは不在で、Playwrightの未参照sidecarも不在。 +- Platform bootstrap / verifyの共通必須一覧から対象CLIを除外する。 +- NixOSのcompatibility wrapperとmandatory command checksを混同しない。 +- CLIが必要な個別projectの構成、利用案内、ローカル検証を各projectが所有する。 +- lock採用/配備の仕組み自体(ADR-0010)を変更しない。 + +## Re-evaluation + +- 任意ホストのツールが日常的な複数プロジェクトの必須基盤になったとき +- Global既定値を使うよりproject-localに固定しない方が安全・再現可能だと示されたとき +- CLI公式配布・認証・mise backendに破壊的な仕様変更があったとき diff --git a/docs/adr/README.md b/docs/adr/README.md index 145dc2e..b27b1e0 100644 --- a/docs/adr/README.md +++ b/docs/adr/README.md @@ -26,5 +26,6 @@ | [ADR-0022](./ADR-0022.md) | Accepted | macOS のWizTreeMacを公式Tap経由でmise管理する | | [ADR-0023](./ADR-0023.md) | Accepted | Vercel CLI は machine-global baseline に含めない | | [ADR-0024](./ADR-0024.md) | Accepted | converge の verify 用に launchctl print 1件だけを NOPASSWD で許可する | +| [ADR-0025](./ADR-0025.md) | Accepted | machine-global / optional-host / project-local CLI の所有境界を分離する | 新しい ADR は `ADR-NNNN.md` の連番で追加します。既存 decision を置換する場合は旧 ADR の status と `Superseded by` も更新します。 diff --git a/mise.global.lock b/mise.global.lock index 34295af..e7db2a3 100644 --- a/mise.global.lock +++ b/mise.global.lock @@ -2,23 +2,6 @@ lockfile_version = 3 -[[tools.aws-cli]] -version = "2.40.3" -backend = "aqua:aws/aws-cli" -specifiers = ["latest"] - -[tools.aws-cli."platforms.linux-x64"] -checksum = "sha256:4770c06c4ecfc8ba94b60d89e6c7018ab7ea2cf5341b1ef05f6f93c5d6e8b705" -url = "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.40.3.zip" - -[tools.aws-cli."platforms.macos-arm64"] -checksum = "sha256:be032742ff205f7f2d7c189010bbb1f3891d0a67be0b1df0fe9d3e7f5fc5ad30" -url = "https://awscli.amazonaws.com/AWSCLIV2-2.40.3.pkg" - -[tools.aws-cli."platforms.macos-x64"] -checksum = "sha256:be032742ff205f7f2d7c189010bbb1f3891d0a67be0b1df0fe9d3e7f5fc5ad30" -url = "https://awscli.amazonaws.com/AWSCLIV2-2.40.3.pkg" - [[tools.bat]] version = "0.26.1" backend = "aqua:sharkdp/bat" @@ -264,23 +247,6 @@ checksum_source = "mise-versions" url = "https://github.com/junegunn/fzf/releases/download/v0.75.0/fzf-0.75.0-windows_amd64.zip" url_api = "https://api.github.com/repos/junegunn/fzf/releases/assets/720590885" -[[tools.gcloud]] -version = "593.0.0" -backend = "vfox:jdx/vfox-gcloud" -specifiers = ["latest"] - -[tools.gcloud."platforms.linux-x64"] -checksum = "sha256:e36f240c5d6ddeaec2d0fb348c2d3b0f98a849dd74be59ff6e0f2f534c506a58" -url = "https://storage.googleapis.com/cloud-sdk-release/google-cloud-sdk-593.0.0-linux-x86_64.tar.gz" - -[tools.gcloud."platforms.macos-arm64"] -checksum = "sha256:71d6aa2b2b21494ad5538d0e5104ff3bb123d55f5a2ff0da6c58f87459a6b6af" -url = "https://storage.googleapis.com/cloud-sdk-release/google-cloud-sdk-593.0.0-darwin-arm.tar.gz" - -[tools.gcloud."platforms.macos-x64"] -checksum = "sha256:49d3325ac25bc71209104d382cdfaa2904cf52822f63a3f283825d4e988f30a8" -url = "https://storage.googleapis.com/cloud-sdk-release/google-cloud-sdk-593.0.0-darwin-x86_64.tar.gz" - [[tools.gdu]] version = "5.39.0" backend = "aqua:dundee/gdu" @@ -565,12 +531,6 @@ aube = { path = ".mise/locks/mise.global/npm-npkill/1.0.0", digest = "sha256:ebd backend = "npm:npkill" specifiers = ["latest"] -[[tools."npm:playwright"]] -version = "1.65.1" -aube = { path = ".mise/locks/mise.global/npm-playwright/1.65.1", digest = "sha256:f87d3323cec54802bd1cae015bbcbb00af6f4192ffe35c191a6ccdad4cd955e0" } -backend = "npm:playwright" -specifiers = ["latest"] - [[tools.oh-my-pi]] version = "18.20.2" backend = "github:can1357/oh-my-pi" @@ -763,35 +723,6 @@ checksum = "sha256:8a4e35ab0b331c85d73567b12f2a444df187f483e5079ceffa6bda1faa2e7 url = "https://github.com/koalaman/shellcheck/releases/download/v0.11.0/shellcheck-v0.11.0.zip" url_api = "https://api.github.com/repos/koalaman/shellcheck/releases/assets/279056944" -[[tools.supabase]] -version = "3.1.0" -backend = "aqua:supabase/cli" -specifiers = ["latest"] - -[tools.supabase."platforms.linux-x64"] -checksum = "sha256:dbe9fd66771337fc198727da86b9d3551302f87a7091cd8781be2a4cd0c8ac4d" -url = "https://github.com/supabase/cli/releases/download/v3.1.0/supabase_linux_amd64.tar.gz" -url_api = "https://api.github.com/repos/supabase/cli/releases/assets/727546061" -provenance = "github-attestations" - -[tools.supabase."platforms.macos-arm64"] -checksum = "sha256:2bd2a45fd5cd9e45b6393cfd534651ac1dbfb78c8a311b7f48e14143594e7a26" -url = "https://github.com/supabase/cli/releases/download/v3.1.0/supabase_darwin_arm64.tar.gz" -url_api = "https://api.github.com/repos/supabase/cli/releases/assets/727545576" -provenance = "github-attestations" - -[tools.supabase."platforms.macos-x64"] -checksum = "sha256:7ddf0f4ba6e976bb08ce3141cc47cfbd00d7d37346e0a9b53ab1e95c6d0134e4" -url = "https://github.com/supabase/cli/releases/download/v3.1.0/supabase_darwin_amd64.tar.gz" -url_api = "https://api.github.com/repos/supabase/cli/releases/assets/727545756" -provenance = "github-attestations" - -[tools.supabase."platforms.windows-x64"] -checksum = "sha256:1245ec38cb16dc6f14de279a5c292d68474869ec2fe443edbf094913e84e439d" -url = "https://github.com/supabase/cli/releases/download/v3.1.0/supabase_windows_amd64.tar.gz" -url_api = "https://api.github.com/repos/supabase/cli/releases/assets/727546423" -provenance = "github-attestations" - [[tools.worktrunk]] version = "0.82.0" backend = "packslip:github.com/max-sixty/worktrunk" diff --git a/mise.global.toml b/mise.global.toml index b08ec76..49a0177 100644 --- a/mise.global.toml +++ b/mise.global.toml @@ -35,9 +35,6 @@ worktrunk = "latest" # keep the registry entry unchanged. herdr = { version = "latest", os = ["linux", "macos"] } -gcloud = { version = "latest", os = ["linux", "macos"] } -aws-cli = { version = "latest", os = ["linux", "macos"] } -supabase = "latest" # Vercel CLI is deliberately not in the machine-global baseline. Its npm # dependency graph fails mise's default npm supply-chain policy # (trustPolicy=no-downgrade), and exempting it would mean listing dozens of @@ -93,7 +90,6 @@ oh-my-pi = "latest" # Node launcher plus a per-platform native binary as an optional dependency, so # it follows the same npm channel as OpenCode. "npm:devin" = { version = "latest", depends = ["node"] } -"npm:playwright" = "latest" ruby = "4" [tools."github:herdrdev/herdr"] diff --git a/mise.toml b/mise.toml index f89977d..647268c 100644 --- a/mise.toml +++ b/mise.toml @@ -49,8 +49,6 @@ bun = "1.4.2" # Visual Studio is intentionally not installed here: any edition/year is accepted # and platforms/windows-11/verify.ps1 checks the MSVC / Windows SDK capabilities. "winget:Google.AndroidStudio" = { os = "windows" } -"winget:Google.CloudSDK" = { os = "windows" } -"winget:Amazon.AWSCLI" = { os = "windows" } "winget:Tailscale.Tailscale" = { os = "windows" } [bootstrap.repos] diff --git a/plans/macos/README.md b/plans/macos/README.md index 6ec2d2d..dee5462 100644 --- a/plans/macos/README.md +++ b/plans/macos/README.md @@ -40,10 +40,10 @@ Cross-machine developer CLI/runtime requirements are inherited from root `mise.t - Node.js / Python / pnpm / Bun / Rust - Claude Code / Codex / OpenCode / Devin / Worktrunk / Herdr - Open Code Review / npkill / cargo-clean-all -- Google Cloud CLI / AWS CLI -- Supabase CLI - ripgrep / fd / fzf / jq / bat / gdu / ShellCheck / Neovim +AWS / Google Cloud はホスト任意機能、Supabase / Playwright はプロジェクト依存として管理します([ADR-0025](../../docs/adr/ADR-0025.md))。 + macOS-specific application candidates are recorded separately in `mise.candidate.toml`. These remain candidate application choices until actual continued use justifies promotion into the active macOS package graph. diff --git a/platforms/nixos/README.md b/platforms/nixos/README.md index b6f5000..a5141ef 100644 --- a/platforms/nixos/README.md +++ b/platforms/nixos/README.md @@ -82,8 +82,8 @@ Portable user CLI baseline (`mise.global.toml`): - Claude Code / Codex / OpenCode / Devin - Worktrunk / Herdr - Open Code Review / npkill / cargo-clean-all / gdu -- Google Cloud CLI / AWS CLI -- Supabase CLI + +AWS / Google Cloud / Supabase は共通インストール対象外です。`flake.nix` には project-local / optional CLI を実行するための FHS wrapper 名だけ残します。wrapper があることと CLI のインストール済み・認証済みであることは別です([ADR-0025](../../docs/adr/ADR-0025.md))。 Worktrunk の Bash integration も Home Manager で宣言します。 diff --git a/platforms/nixos/flake.nix b/platforms/nixos/flake.nix index 89c3d05..8ceb0e6 100644 --- a/platforms/nixos/flake.nix +++ b/platforms/nixos/flake.nix @@ -132,6 +132,8 @@ "devin" "wt" "herdr" + # Compatibility launchers for optional host and project-local tools. + # These wrappers do not install CLI binaries or imply credentials. "gcloud" "aws" "supabase" diff --git a/platforms/nixos/verify.sh b/platforms/nixos/verify.sh index c1686a0..a5c1dd1 100755 --- a/platforms/nixos/verify.sh +++ b/platforms/nixos/verify.sh @@ -84,9 +84,6 @@ commands=( devin wt herdr - gcloud - aws - supabase npkill ocr cargo-clean-all diff --git a/platforms/ubuntu-wsl/README.md b/platforms/ubuntu-wsl/README.md index 8e0bc85..62e8dd6 100644 --- a/platforms/ubuntu-wsl/README.md +++ b/platforms/ubuntu-wsl/README.md @@ -61,11 +61,11 @@ Portable developer tools are declared once in `mise.global.toml`, which is linke - Claude Code / Codex / OpenCode / Devin - Worktrunk / Herdr - Open Code Review / npkill / cargo-clean-all -- Google Cloud CLI / AWS CLI -- Supabase CLI - ripgrep / fd / fzf / jq / bat / gdu - ShellCheck / Neovim +AWS / Google Cloud は使うホストの任意機能、Supabase / Playwright は各プロジェクト側のバージョン管理対象です。CLIの有無は共通bootstrapの成否に含めません([ADR-0025](../../docs/adr/ADR-0025.md))。 + The Ubuntu bootstrap does not duplicate installation logic for those tools. ## Authentication and dotfiles diff --git a/platforms/ubuntu-wsl/verify.sh b/platforms/ubuntu-wsl/verify.sh index 37a75be..68436f4 100755 --- a/platforms/ubuntu-wsl/verify.sh +++ b/platforms/ubuntu-wsl/verify.sh @@ -149,9 +149,6 @@ commands=( wt herdr pnpm - gcloud - aws - supabase npkill ocr cargo-clean-all diff --git a/platforms/windows-11/README.md b/platforms/windows-11/README.md index e90bf95..63d69cf 100644 --- a/platforms/windows-11/README.md +++ b/platforms/windows-11/README.md @@ -47,12 +47,12 @@ root `mise.toml` の mandatory Windows package phase には、bootstrap / develo - PowerShell 7 - .NET SDK 10 - Android Studio -- Google Cloud SDK -- AWS CLI - Tailscale これらは fail-fast。Git と mise 自体も bootstrap dependency。 +AWS CLI と Google Cloud SDK は machine-wide mandatory ではありません。利用するホストで任意に導入し、認証先はコマンドごとに明示します(ADR-0025)。既存の認証設定やインストール済みバイナリを bootstrap は削除しません。 + ### Best-effort desktop apps GUI / desktop application は `platforms/windows-11/apps.psd1` が canonical inventory。 @@ -95,8 +95,6 @@ OSごとにWinGet packageを重複宣言せず、`mise.global.toml [tools]` を - Claude Code / Codex / OpenCode / Devin - Worktrunk / Herdr - Open Code Review / npkill / cargo-clean-all -- Google Cloud CLI / AWS CLI -- Supabase CLI - ripgrep / fd / fzf / jq / bat / gdu - ShellCheck / Neovim diff --git a/platforms/windows-11/verify.ps1 b/platforms/windows-11/verify.ps1 index 5d37240..8711106 100644 --- a/platforms/windows-11/verify.ps1 +++ b/platforms/windows-11/verify.ps1 @@ -221,7 +221,7 @@ foreach ($commandName in @( 'git','gh','infisical','pwsh','code','node','python','pnpm','bun','rustc','cargo', 'rg','fd','fzf','jq','bat','gdu','shellcheck','nvim', 'claude','codex','opencode','devin','wt','herdr', - 'gcloud','aws','supabase','npkill','ocr','cargo-clean-all','dotnet' + 'npkill','ocr','cargo-clean-all','dotnet' )) { Test-CommandPresent -Name $commandName } Write-Host "`nmise-managed commands resolve to mise (no shadowing copy earlier in PATH)" diff --git a/scripts/ci.sh b/scripts/ci.sh index e196f8c..a09a94a 100755 --- a/scripts/ci.sh +++ b/scripts/ci.sh @@ -45,6 +45,36 @@ for path in (Path("mise.toml"), Path("mise.global.toml")): tomllib.load(fh) PY +printf 'Checking CLI ownership scope contract...\n' +python3 - <<'PY' +import tomllib +from pathlib import Path + +with Path("mise.global.toml").open("rb") as fh: + global_config = tomllib.load(fh) +with Path("mise.global.lock").open("rb") as fh: + global_lock = tomllib.load(fh) +with Path("mise.toml").open("rb") as fh: + bootstrap = tomllib.load(fh) + +project_or_optional = {"aws-cli", "gcloud", "supabase", "npm:playwright"} +for label, tools in ( + ("mise.global.toml", global_config.get("tools", {})), + ("mise.global.lock", global_lock.get("tools", {})), +): + unwanted = project_or_optional.intersection(tools) + if unwanted: + raise SystemExit(f"{label} contains project/optional CLI: {sorted(unwanted)}") + +packages = bootstrap.get("bootstrap", {}).get("packages", {}) +for package in ("winget:Google.CloudSDK", "winget:Amazon.AWSCLI"): + if package in packages: + raise SystemExit(f"optional cloud CLI is a mandatory host package: {package}") + +if Path(".mise/locks/mise.global/npm-playwright").exists(): + raise SystemExit("orphaned global Playwright dependency sidecar") +PY + printf 'Checking machine-wide mise package scope...\n' python3 - <<'PY' import tomllib