Skip to content

feat(config): support project conf.d fragments - #12061

Merged
jdx merged 1 commit into
jdx:mainfrom
Marukome0743:pr12061
Aug 16, 2026
Merged

jdx merged 1 commit into
jdx:mainfrom
Marukome0743:pr12061

Conversation

@Marukome0743

@Marukome0743 Marukome0743 commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • load non-hidden .mise/conf.d/*.toml files as project configuration fragments
  • preserve alphabetical fragment precedence while keeping .mise/config.toml authoritative
  • reuse the existing project trust root, tracking, write-target exclusion, and .mise/mise.lock routing
  • make deprecated automatic monorepo discovery glob-aware so fragment-only roots are detected consistently with explicit roots

Details

The project config discovery list already supported .config/mise/conf.d/*.toml, while the config-root and lockfile helpers already understood .mise/conf.d. The missing piece was the discovery pattern itself. This adds that pattern immediately below .mise/config.toml in precedence, filters hidden files consistently with global/system conf.d, and routes every downstream feature through the existing config pipeline.

Verification

  • mise exec -- cargo test --all-features test_project_mise_conf_d_precedence
  • mise exec -- cargo test --all-features test_has_mise_config_with_glob_filenames
  • mise run test:e2e e2e/config/test_project_config_confd_slow
  • mise run test:e2e e2e/cli/test_global_config_confd e2e/tasks/test_task_config_precedence
  • mise exec -- cargo test --all-features config_root::tests
  • mise exec -- cargo test --all-features test_lockfile_path_for_config
  • mise exec -- cargo check --all-features
  • mise exec -- cargo fmt --all -- --check
  • mise exec -- shellcheck e2e/config/test_project_config_confd_slow
  • mise exec -- shfmt -d e2e/config/test_project_config_confd_slow
  • mise exec -- prettier --check docs/configuration.md
  • mise run docs:build

cargo clippy --workspace --all-features --all-targets -- -D warnings currently stops on the unchanged latest-main needless_return at src/system/packages/brew/cask.rs:1959. mise run lint also cannot run in this dotgitless Sapling checkout because hk reports failed to find git repository.

Addresses #9909

AI-assisted — Tool: Codex; model: OpenAI/GPT-5; version: unavailable.

@coderabbitai

coderabbitai Bot commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: a18c8fa3-ed76-490a-b900-bdd04ed3e5ae

📥 Commits

Reviewing files that changed from the base of the PR and between badd22b and 422bcf2.

📒 Files selected for processing (3)
  • docs/configuration.md
  • e2e/config/test_project_config_confd_slow
  • src/config/mod.rs

Included review availability: Your plan includes up to 10 reviews per rolling hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The configuration loader now discovers non-hidden TOML fragments in .mise/conf.d and .config/mise/conf.d, loads them alphabetically, and includes them in project detection. Tests and documentation cover precedence, lockfiles, write targets, and monorepo discovery.

Changes

Configuration discovery and validation

Layer / File(s) Summary
Filtered conf.d loading
src/config/mod.rs
Configuration globbing excludes hidden files and includes .mise/conf.d/*.toml in local configuration discovery.
Project configuration detection
src/config/mod.rs
Configuration presence checks and monorepo discovery use filtered wildcard matching.
Fragment behavior and documentation
e2e/config/test_project_config_confd_slow, src/config/mod.rs, docs/configuration.md
Tests verify precedence, hidden-file exclusion, lockfile handling, write targets, and monorepo discovery. Documentation describes fragment loading and project configuration paths.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 422bc

This change adds support for project configuration fragments with documentation and an end-to-end test; no actionable merge-blocking risk remains beyond normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant Project
  participant Mise
  participant ConfigDirectory
  participant TaskDiscovery
  Project->>Mise: run configuration or task command
  Mise->>ConfigDirectory: discover conf.d TOML files
  ConfigDirectory-->>Mise: return non-hidden files alphabetically
  Mise->>TaskDiscovery: provide loaded project configuration
  TaskDiscovery-->>Project: expose configured tasks
Loading

Possibly related PRs

  • jdx/mise#11103: Both changes cover conf.d loading, precedence, and end-to-end behavior.
  • jdx/mise#11917: Both changes address conf.d discovery and write-target selection.
  • jdx/mise#11206: Both changes modify configuration glob handling and monorepo discovery.

Suggested reviewers: jdx, risu729, jambalaya56562

Poem

I’m a rabbit who sorts TOML with care,
Hidden fragments stay out of the lair.
Alphabetical leaves fall into place,
Tasks and locks keep a tidy pace.
Config paths now clearly show,
Hop, hop—watch the projects grow!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding support for project-level conf.d configuration fragments.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds project-local .mise/conf.d/*.toml fragment support and aligns project discovery with existing conf.d behavior.

  • Loads non-hidden project fragments in deterministic precedence order.
  • Recognizes fragment-only projects during explicit and automatic monorepo discovery.
  • Keeps fragments from becoming implicit write targets and routes their lockfiles to .mise/mise.lock.
  • Adds unit, end-to-end, and documentation coverage for discovery, precedence, tasks, tools, environment values, and lockfiles.

Confidence Score: 5/5

The PR appears safe to merge, with no actionable correctness or security defects identified.

The new project fragment path is applied consistently across loading and monorepo discovery, while precedence, hidden-file exclusion, lockfile placement, and write-target behavior are explicitly covered.

Important Files Changed

Filename Overview
src/config/mod.rs Adds filtered project conf.d discovery consistently across configuration loading and monorepo root detection, with explicit precedence tests.
e2e/config/test_project_config_confd_slow Exercises fragment merging, hidden-file exclusion, lockfile placement, write-target behavior, and monorepo discovery.
docs/configuration.md Documents project-local conf.d fragments and clarifies that only non-hidden TOML files are loaded.

Reviews (1): Last reviewed commit: "feat(config): support project conf.d fra..." | Re-trigger Greptile

@Marukome0743
Marukome0743 marked this pull request as ready for review August 16, 2026 20:21
@jdx
jdx merged commit 17e26a3 into jdx:main Aug 16, 2026
31 checks passed
@Marukome0743
Marukome0743 deleted the pr12061 branch August 16, 2026 20:33
jdx pushed a commit to jdx/mise-action that referenced this pull request Oct 19, 2026
mise loads single-file fragments from `conf.d/` dirs (added in
jdx/mise#12061 and
jdx/mise#12395), but they're currently missing
from the cache key

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Mise configuration matching now includes `conf.d/*.toml` files located
under `.config/mise`, `.mise`, and `mise`. Updates to these files are
now included when determining whether mise configuration has changed.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants