Repository navigation
Conversation
…opy にする
ADR-0016 §2 は POSIX で `~/.config/mise/config.toml` と `mise.lock` を配備用
チェックアウト内の tracked file への symlink にしていた。しかし symlink だと
machine 側の mise 書き込みが配備用チェックアウトに落ちる。
- `mise use -g <tool>` は global config を書き換える → 配備用チェックアウトの
`mise.global.toml` が変更される (実測: `yq = "4.54.3"` の追加)。
- `MISE_LOCKED` を効かせない install は global lock を書き換える →
`mise.global.lock` が変更される (実測: 約 700 行の差分)。
- 配備用チェックアウトが dirty になると ADR-0016 §3 の規則で converge が
skipped になり、以降 main を取り込まない。macOS / Ubuntu-WSL の両方で
実際にこの状態になっていた。
Windows と同じ copy 方式に統一する。
- config と lock を copy する (一時ファイルへ書いてから置換)。
- lock が参照する sidecar (`aube = { path = ".mise/locks/mise.global/..." }`)
を lock と同じ directory へ copy する。
- 既存の symlink は managed marker を持つ場合だけ copy へ移行する。
- user content を持つ config は従来どおり拒否、0 bytes の config は採用。
- backup は直近 5 件に制限し、無制限増加を止める。
- `scripts/converge.sh` の dsh-declaration 判定は readlink ではなく copy の
内容を比較する (symlink 方式では同じファイル同士を比較するため常に false)。
- ADR-0016 に §2a (copy 方式の理由) と §2b (移行手順) を追加。
`scripts/test-apply-global-mise.sh` で実ファイルを検証し、CI に追加。
Co-Authored-By: Claude Code <noreply@anthropic.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #282
問題
ADR-0016 §2 は POSIX で
~/.config/mise/config.tomlとmise.lockを配備用チェックアウト内の tracked file への symlink にしていた。symlink だと machine 側の mise 書き込みがそのまま配備用チェックアウトに落ちる。mise use -g <tool>は global config を書き換える →mise.global.tomlが変更される (macOS 実測:yq = "4.54.3"の追加)。MISE_LOCKEDを効かせないmise installは global lock を書き換える →mise.global.lockが変更される (macOS 実測: 約 700 行の差分)。mainを取り込まない。実測 (2026-11-30): macOS / Ubuntu-WSL の両方で
~/.local/share/pc-setup/deployが dirty、status.jsonのlast_converge.exit = 3/deploy-sync: skippedが継続。macOS のmise.config_targetは deploy checkout ではなく/Users/rebui/src/pc-setup-agy230/mise.global.toml(detached worktree) を指していた。Windows は
apply-global-mise.ps1で copy 已经在しており、この問題が出ていない。変更
scripts/apply-global-mise.sh:aube = { path = ".mise/locks/mise.global/<tool>/<version>" }) を lock と同じ directory へ copy する (lock からの相対 path 解決のため)。scripts/converge.sh: dsh-declaration 判定を readlink ではなく copy の内容で比較する (symlink 方式では同じファイル同士を比較するため常に false になっていた)。メッセージも「config applied from deploy checkout」に更新。docs/adr/ADR-0016.md: §2a (copy 方式の理由と symlink が起こした連鎖) と §2b (移行手順) を追加、§3 と Consequences の symlink 前提表述を更新。components/hoxay/install.sh: global config が copy であることを反映 (ignore list の realpath 処理は残す)。scripts/test-apply-global-mise.sh: 実ファイルで検証し、CI に追加。検証
scripts/test-apply-global-mise.sh(fake mise):mise.global.toml/mise.global.lockが apply で変更されないCo-Authored-By: Claude Code noreply@anthropic.com