Repository navigation
feat(config): add config.override.toml so global config can override project config - #14610
Conversation
β¦m global config Global config normally loses to project config. `config.override.toml` and `config.<env>.override.toml` in the global config directory form a tier that outranks all project config, including mise.<env>.toml and mise.local.toml, for every section ([env], [tools], [tasks], [settings], hooks, ...). - The override files are global config (trusted by path) but sit outside the base global set, so default write targets are unchanged. - `--override` writes to them from `use`, `unuse`, `set`, `unset`, `settings set|add|unset` and `config get|set`; it conflicts with `--global` and `--path`. - Tools declared there resolve from the global lockfile and are exempt from `--locked`; other tools are still enforced. - `MISE_GLOBAL_CONFIG_FILE` disables the tier. - `mise config ls` and `mise doctor` label the tier. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Entire-Checkpoint: 01M55GZWRK273EFFQ993Q07CK8
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 1 minute. View limit details
β¨ Finishing Touches: π‘ 1
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 |
It duplicates package.documentation, and newer cargo warns about it, which failed the cargo-check pre-commit step. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Entire-Checkpoint: 01M55H74A4STB3XF269Y120HBN
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
β Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ac15693. Configure here.
β¦e it before it exists Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Entire-Checkpoint: 01M55HFBNEG37T8GW12SX143AF
[Medium impact] The PR appears safe to merge; all three previous findings are fixed, with no new actionable issues found. SummaryAdds global override files that take priority over project config, with explicit read and write flags.
Reviews (2) Β· Last reviewed commit: "fix(config): keep global task scripts ou..." Β· Reviewed by Greptile |
β¦mplete --override keys Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Entire-Checkpoint: 01M55HZ72XBVZJKXW0TDVX0FB7
Instruction countsNothing was compared, and so nothing was gated. No series appears on both sides: either the base has no measurements recorded, or the two were measured on different runner classes, which are deliberately not comparable β counts shift between machine types by more than a real regression does. New, nothing to compare against: Only instruction counts gate. Wall clock is shown for context β on identical hardware it moves 4-20% run to run. Measured by tak β instruction-counted CLI benchmarks, stored in this repository's git notes.
|
<!-- entire-trail-link-start --> https://entire.io/gh/jdx/mise/trails/826 <!-- entire-trail-link-end --> ### π Features - **(backend)** reject tool options a backend does not read by @jdx in [#14629](#14629) - **(config)** let env_file take several filenames by @jdx in [#14606](#14606) - **(config)** add config.override.toml so global config can override project config by @jdx in [#14610](#14610) - **(config)** let paranoid take a list of categories by @jdx in [#14609](#14609) - **(env)** let a find_up env._.file entry search several names together by @jdx in [#14620](#14620) - **(task)** read #MISE headers through TaskDecl by @jdx in [#14637](#14637) ### π Bug Fixes - **(activate)** stop fish not-found recursion after mise implode by @jdx in [#14594](#14594) - **(bootstrap)** find nix installed by a pre-packages hook by @jdx in [#14596](#14596) - **(bootstrap)** parse [bootstrap.linux.firewall] on every OS by @jdx in [#14615](#14615) - **(cargo)** honor rename_exe for cargo-installed tools by @jdx in [#14626](#14626) - **(config)** require content-bound trust for env files in paranoid mode by @jdx in [#14604](#14604) - **(hooks)** don't report git rewrites when HEAD stayed on the same commit by @JamBalaya56562 in [#14585](#14585) - **(npm)** report an unusable TLS root store instead of aborting by @jdx in [#14595](#14595) - **(pipx)** bind the real python for locked uv installs by @jdx in [#14593](#14593) - **(rust)** don't put an external rustup's directory ahead of mise's tools by @jdx in [#14597](#14597) - **(schema)** generate [bootstrap] from its parser types by @jdx in [#14616](#14616) ### π Refactor - **(config)** move doctor, tool_config, watch_files and wrappers into mise-config by @jdx in [#14617](#14617) - **(config)** move the oci and daemons declarations into mise-config by @jdx in [#14618](#14618) - **(config)** move alias, min_version and monorepo into mise-config by @jdx in [#14627](#14627) - **(config)** declare [tools] in mise-config, keyed by string by @jdx in [#14631](#14631) - **(config)** parse mise.toml through MiseTomlDecl by @jdx in [#14638](#14638) - **(env)** move env directives and the [env] parser into mise-config by @jdx in [#14621](#14621) - **(task)** move the task declaration field types into mise-config by @jdx in [#14622](#14622) - **(task)** split TaskDecl from Task by @jdx in [#14624](#14624) - rename mise-system-config to mise-config by @jdx in [#14608](#14608) ### π Documentation - **(env)** explain env_file and _.file find_up are different features by @jdx in [#14602](#14602) ### β‘ Performance - **(dotfiles)** build snapshot trees without a git process per tracked file by @waynehoover in [#14607](#14607) ### π§ͺ Testing - **(npm)** install a popular package in the dependency check by @jdx in [#14633](#14633) - **(schema)** check schema/mise.json against the config parser by @jdx in [#14613](#14613) ### π¦οΈ Dependency Updates - bump mbx to 1.24.1 by @jdx in [#14635](#14635) ### Chore - **(schema)** generate the [history] schema from mise-config by @jdx in [#14611](#14611) - **(schema)** generate the task schema from TaskDecl and TaskTemplate by @jdx in [#14625](#14625) - **(schema)** generate the whole schema from a top-level MiseTomlDecl by @jdx in [#14632](#14632) ### Ci - restore the nextest timeout for the mise-oci blob test by @jdx in [#14619](#14619)

https://entire.io/gh/jdx/mise/trails/833
A project's
mise.tomlormise.local.tomlalways beats your global config, so a repo can replace thenodeversion, an env var likeAWS_PROFILE, or a setting you chose for yourself. The only escape hatch today is the special-casesettings.env_file. This adds a global-only override file that outranks all project config for any section.In any project,
AWS_PROFILE, thenoderequest,jobsand thelinttask now come from this file, even when the project'smise.tomlormise.local.tomlsets them. Anything the override file does not mention still comes from the project and your other global config.Behavior
config.override.tomlandconfig.<env>.override.tomlin the global config dir (MISE_ENVvariants follow the usual order, later envs win). The env-specific file beats the base override file, and the whole tier ranks above every project file, includingmise.<env>.tomlandmise.local.toml. It is notMISE_OVERRIDE_CONFIG_FILENAMES, which only renames the files mise reads.[env],[tools],[tasks],[settings](applied during settings load, not afterwards), hooks, etc. fall out of the same ordered merge._.file/_.sourceoperator-owned check also covers them.mise use,mise set,mise settings set,mise trust/untrust,mise unuse(first declaring config),mise config get|setdefault and the--globalexisting-declaration lookups skip it. Writing needs an explicit long-only--overrideflag (with--envselectingconfig.<env>.override.toml) onuse,unuse,set,unset,settings set|add|unsetandconfig get|set. It conflicts with--globaland--path(--localforsettings).mise.lock, never from the project'smise.lock, and--lockeddoes not require the project lock to pin it. Other tools are still enforced.MISE_GLOBAL_CONFIG_FILEmeans "this is the only global config", so no override files load and--overrideerrors.mise config lsadds aTiercolumn (override) when an override file is loaded,mise config ls --jsongains"override": true|false, andmise doctorlabels the files.settings.env_fileis unchanged.Testing
New e2e tests cover env/tools/tasks/settings precedence over project config (including
mise.<env>.tomlandmise.local.toml), theMISE_ENVvariant order,--overridewrites and conflicts, that default writes andtrust/unusenever touch the file, the lockfile rule (checked by mutation: it fails without the--lockedexemption), andMISE_GLOBAL_CONFIG_FILE. Docs: a new "Global override files" section in the configuration page.cargo clippy --workspace --all-features --all-targets -- -D warningsis clean.cli/test_doctorandcli/test_unusefail in this sandbox on unmodified main too (empty-PATH doctor, a systemjq).AI-assisted β Tool: Claude Code; model: anthropic/claude-sonnet-5-5; version: 2.1.299.
π€ Generated with Claude Code
Note
Medium Risk
Changes config merge order, default write targets, and lockfile/
--lockedsemantics across many commands; mistakes could surprise users who rely on project pins or implicit file selection.Overview
Adds global override files (
config.override.tomlandconfig.<env>.override.tomlunder~/.config/mise) that load above all project config, includingmise.local.toml, for env, tools, settings, tasks, and other merged sections.Override files are never chosen by default for writes or implicit targets (
mise use,mise set,mise unuse,trust, defaultconfig get|set, etc.). A new--overrideflag (conflicts with--global/--path/--localwhere applicable) targets those files; with--envit writesconfig.<ENV>.override.toml.MISE_GLOBAL_CONFIG_FILEdisables the whole override tier and makes--overrideerror.Lockfile behavior: tools declared in an override file shadow the project pin, resolve against the global
mise.lock, and are exempt from project--lockedenforcement; other tools stay locked as before.Visibility:
mise config lsadds aTiercolumn when overrides are loaded; JSON output includes"override": true;mise doctorannotates override paths. Docs, usage specs, and e2e tests cover precedence, writes, conflicts, and lockfile rules. Minor Cargo.toml metadata tweak (removedhomepage).Reviewed by Cursor Bugbot for commit e648a76. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
config.override.tomlfiles, which take precedence over project configuration. Environment-specific overrides useconfig.<ENV>.override.toml.--overrideoptions to select override files when reading or changing configuration, tools, settings, and tasks.mise config lsandmise doctornow identify override files.