Skip to content

revert: remove task inheritance from parent configs in monorepos#7851

Merged
jdx merged 1 commit intomainfrom
revert/task-inheritance
Jan 27, 2026
Merged

revert: remove task inheritance from parent configs in monorepos#7851
jdx merged 1 commit intomainfrom
revert/task-inheritance

Conversation

@jdx
Copy link
Copy Markdown
Owner

@jdx jdx commented Jan 27, 2026

Summary

Reverts commit 84fb5f3 which added task inheritance in monorepos.

What was inheritance? Tasks defined in parent directories would automatically be visible/runnable as if they were defined in child subdirectories. For example, if root defined lint, then mise run //packages/app:lint would work even if packages/app didn't define lint.

Why revert? This behavior is confusing and causes issues:

  • Running //packages/app:lint when app doesn't define lint is surprising
  • Wildcards like //...:test would match inherited tasks, causing circular dependencies when root defines test = { depends = ['//...:test'] }
  • Users expect monorepo paths to reference tasks explicitly defined at that location

See discussion: #6564 (comment)

Additional fixes

While reverting, also fixed pre-existing issues in the monorepo subdirectory task loading code:

  • Glob pattern expansion: Now properly expands patterns like .config/mise/conf.d/*.toml using glob()
  • Config precedence: Uses .rev() iteration so mise.local.toml correctly overrides mise.toml
  • Glob result ordering: Reverses glob results so later files (like 02-override.toml) override earlier ones (like 01-base.toml)
  • Task deduplication: Uses IndexMap so file tasks (from .mise/tasks/) correctly override config tasks with the same name

Also adds revert to allowed PR title types in the semantic PR lint workflow.

Test plan

  • Removed test_task_monorepo_task_inheritance test (tested inheritance)
  • Kept test_task_monorepo_syntax and test_task_monorepo_nested_config (test other features)
  • All existing monorepo tests pass

🤖 Generated with Claude Code


Note

Reverts monorepo task inheritance so subdirectories no longer auto-expose tasks from parent configs. Subdir tasks are now loaded only from their own config files and task include dirs, with names prefixed to the subdir when applicable.

  • Monorepo subdir loading rewritten to parse only each subdir’s configs (DEFAULT_CONFIG_FILENAMES, with proper glob expansion) and default includes when no config is found; tasks deduped by name with later files winning (e.g., mise.local.toml overrides mise.toml)
  • Removed inheritance-specific helpers and logic; deleted e2e/tasks/test_task_monorepo_task_inheritance
  • Keeps subdir discovery via [monorepo].config_roots/auto-discovery and loads subdirs only for --all or path-hinted contexts
  • CI: semantic PR lint now accepts revert type

Written by Cursor Bugbot for commit f702f8c. This will update automatically on new commits. Configure here.

Copilot AI review requested due to automatic review settings January 27, 2026 13:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reverts task inheritance functionality from monorepos, where tasks defined in parent directories were automatically visible and runnable from child subdirectories using their monorepo paths.

Changes:

  • Removed task inheritance logic that loaded parent configs up to monorepo root
  • Simplified subdirectory task loading to only load tasks explicitly defined in each subdirectory
  • Deleted the test file test_task_monorepo_task_inheritance that validated inheritance behavior

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/config/mod.rs Removed helper functions for loading parent configs and simplified subdirectory task loading to only load tasks from the subdirectory itself
e2e/tasks/test_task_monorepo_task_inheritance Deleted test file that verified task inheritance from parent to child directories

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/config/mod.rs Outdated
Comment thread src/config/mod.rs Outdated
@jdx jdx force-pushed the revert/task-inheritance branch from 8d0f969 to 26b2004 Compare January 27, 2026 13:38
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 27, 2026

Hyperfine Performance

mise x -- echo

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.1.8 x -- echo 19.8 ± 0.5 19.0 21.8 1.00
mise x -- echo 21.0 ± 1.0 19.6 37.5 1.06 ± 0.06

mise env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.1.8 env 19.6 ± 0.4 18.7 22.7 1.00
mise env 19.9 ± 0.7 18.7 25.2 1.01 ± 0.04

mise hook-env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.1.8 hook-env 19.0 ± 0.3 18.5 21.9 1.00
mise hook-env 19.5 ± 0.5 18.7 24.6 1.02 ± 0.03

mise ls

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2026.1.8 ls 16.8 ± 0.3 16.4 21.4 1.00
mise ls 17.8 ± 0.9 16.8 30.4 1.06 ± 0.06

xtasks/test/perf

Command mise-2026.1.8 mise Variance
install (cached) 111ms 111ms +0%
ls (cached) 68ms 68ms +0%
bin-paths (cached) 72ms 71ms +1%
task-ls (cached) 284ms 302ms -5%

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/config/mod.rs Outdated
Comment thread src/config/mod.rs Outdated
Reverts commit 84fb5f3 which added task inheritance in monorepos.

Task inheritance allowed tasks defined in parent directories to be
automatically visible/runnable from child subdirectories. This caused
confusion and issues:
- Running `//packages/app:lint` when `app` doesn't define `lint` is surprising
- Wildcards like `//...:test` matched inherited tasks, causing circular deps

Also fixes pre-existing issues in monorepo subdirectory task loading:
- Glob pattern expansion: properly expands patterns like `.config/mise/conf.d/*.toml`
- Config precedence: uses `.rev()` so `mise.local.toml` overrides `mise.toml`
- Glob result ordering: reverses glob results so later files override earlier
- Task deduplication: uses IndexMap so file tasks override config tasks

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@jdx jdx force-pushed the revert/task-inheritance branch from 02d0193 to f702f8c Compare January 27, 2026 13:57
@jdx jdx merged commit ea3594a into main Jan 27, 2026
34 of 36 checks passed
@jdx jdx deleted the revert/task-inheritance branch January 27, 2026 14:15
mise-en-dev added a commit that referenced this pull request Jan 28, 2026
### 🚀 Features

- **(doctor)** add backend mismatch warnings by @jdx in
[#7847](#7847)
- **(http)** add rename_exe support for archive extraction by @jdx in
[#7874](#7874)
- **(http)** send x-mise-ci header for CI environment tracking by @jdx
in [#7875](#7875)
- **(install)** auto-install plugins from [plugins] config section by
@jdx in [#7856](#7856)
- **(registry)** add vercel by @mikecurtis in
[#7844](#7844)
- **(task)** support glob patterns in task_config.includes by @jdx in
[#7870](#7870)
- **(task)** add task templates for reusable task definitions by @jdx in
[#7873](#7873)

### 🐛 Bug Fixes

- **(backend)** change registry mismatch log from info to debug by @jdx
in [#7858](#7858)
- **(ci)** use squash merge for auto-merge-release workflow by @jdx in
[7e5e71e](7e5e71e)
- **(ci)** remove --auto flag to merge immediately when CI passes by
@jdx in
[23ed2ed](23ed2ed)
- **(github)** select platform-matching provenance file for SLSA
verification by @jdx in [#7853](#7853)
- **(go)** filter out version "1" from available versions by @jdx in
[#7871](#7871)
- **(install)** skip CurDir components when detecting archive structure
by @jdx in [#7868](#7868)
- **(pipx)** ensure Python minor version symlink exists for postinstall
hooks by @jdx in [#7869](#7869)
- **(registry)** prevent duplicate -stable suffix in Flutter download
URLs by @jdx in [#7872](#7872)
- **(task)** pass env to usage parser for env-backed arguments by @jdx
in [#7848](#7848)
- **(task)** propagate MISE_ENV to child tasks when using -E flag by
@jdx in
[06ee776](06ee776)
- **(vfox-dotnet)** use os.execute() to fix Windows installation by
@prodrigues1912 in [#7843](#7843)

### 📚 Documentation

- update cache-behavior with env_cache information by @jdx in
[#7849](#7849)

### ◀️ Revert

- remove task inheritance from parent configs in monorepos by @jdx in
[#7851](#7851)
- Revert "fix(ci): remove --auto flag to merge immediately when CI
passes" by @jdx in
[0606187](0606187)

### 📦 Registry

- add mago
([aqua:carthage-software/mago](https://github.com/carthage-software/mago))
by @scop in [#7845](#7845)

### Chore

- **(ci)** auto-merge release branch into main daily at 4am CST by @jdx
in [#7852](#7852)

### New Contributors

- @mikecurtis made their first contribution in
[#7844](#7844)
- @prodrigues1912 made their first contribution in
[#7843](#7843)
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