fix(config): target nearest config dir for TOML writes#10603
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthrough
ChangesNearest TOML config selection
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit acdcf18. Configure here.
Greptile SummaryThis PR fixes
Confidence Score: 5/5Safe to merge — the change is well-scoped, tested with a targeted regression, and explicit overrides (--file, --global, -E) are unaffected. The nearest-directory walk in No files require special attention. Important Files Changed
Reviews (2): Last reviewed commit: "fix(config): use nearest TOML helper for..." | Re-trigger Greptile |
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.6.13 x -- echo |
22.7 ± 1.7 | 19.4 | 28.7 | 1.00 |
mise x -- echo |
24.2 ± 2.9 | 20.0 | 62.2 | 1.07 ± 0.15 |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.6.13 env |
22.5 ± 1.5 | 19.1 | 27.7 | 1.00 |
mise env |
24.8 ± 1.6 | 20.7 | 33.7 | 1.10 ± 0.10 |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.6.13 hook-env |
23.8 ± 1.8 | 19.7 | 31.9 | 1.00 |
mise hook-env |
25.1 ± 2.1 | 21.2 | 33.4 | 1.05 ± 0.12 |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.6.13 ls |
21.1 ± 1.6 | 17.5 | 26.8 | 1.00 |
mise ls |
21.6 ± 1.8 | 17.7 | 27.2 | 1.02 ± 0.11 |
xtasks/test/perf
| Command | mise-2026.6.13 | mise | Variance |
|---|---|---|---|
| install (cached) | 151ms | 154ms | -1% |
| ls (cached) | 68ms | 68ms | +0% |
| bin-paths (cached) | 73ms | 76ms | -3% |
| task-ls (cached) | 141ms | 138ms | +2% |

Summary
--file,--global, and environment-specific targets unchanged.Tests
PATH="$HOME/.cargo/bin:$HOME/.local/share/mise/installs/cmake/4.3.3/cmake-4.3.3-macos-universal/CMake.app/Contents/bin:$PATH" cargo fmt --checkPATH="$HOME/.cargo/bin:$HOME/.local/share/mise/installs/cmake/4.3.3/cmake-4.3.3-macos-universal/CMake.app/Contents/bin:$PATH" cargo build --all-featuresPATH="$HOME/.cargo/bin:$HOME/.local/share/mise/installs/cmake/4.3.3/cmake-4.3.3-macos-universal/CMake.app/Contents/bin:$PATH" ./e2e/run_test e2e/cli/test_setRefs #10593
Note
Medium Risk
Changes default write targets for
mise setand similar commands across nested monorepos; behavior is intentional but can surprise users who relied on the old global lowest-precedence file.Overview
mise set(and other TOML write paths viaresolve_target_config_pathwithprefer_toml) now pick the nearest directory that already has local TOML configs, then write to the lowest-precedence file in that directory (e.g.mise.tomlovermise.local.toml). Previously, resolution could target the lowest-precedence TOML anywhere up the tree, so nested work could update a parentmise.tomlinstead of the project’s.Ignored config directories (
MISE_IGNORED_CONFIG_PATHS) are skipped when choosing that write target, consistent with config loading. Shared ignore logic is centralized inconfig_dir_is_ignored/config_path_is_ignoredand reused inload_config_pathsand related paths.E2e coverage adds nested
parent/myproject/innerprecedence and ignored-child fallback to the parent config file.Reviewed by Cursor Bugbot for commit 0bea14d. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
mise setnow targets the nearest applicable TOML config when run from nested project directories, avoiding writes to higher-level parent configs.