Skip to content

fix(task): let project overrides take over from a failing workspace provider - #14508

Merged
jdx merged 2 commits into
mainfrom
claude/mise-discussion-14503-38fc6d
Oct 15, 2026
Merged

jdx merged 2 commits into
mainfrom
claude/mise-discussion-14503-38fc6d

Conversation

@jdx

@jdx jdx commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

https://entire.io/gh/jdx/mise/trails/773

When a workspace provider can't read its metadata (for example a malformed go.work), mise tasks graph and mise run --affected fail for the whole repo. Declaring the projects by hand under [monorepo.projects] didn't help: the provider's error was kept and the graph still bailed, so there was no way out short of deleting the file.

Now declaring a project in a provider's namespace takes over from that provider and its discovery error is dropped:

[monorepo.projects."go:example.com/acme/api"]
root = "services/api"

With this, mise tasks graph works again, using the declared projects. Providers whose namespace has no declared project still fail loudly, so --affected never silently ignores projects it couldn't see. Task loading is unchanged.

This is groundwork for providers whose input can't always be parsed statically, such as a Gradle settings.gradle with a computed include (discussion #14503).

Tested with a unit test (override_in_provider_namespace_clears_its_discovery_error), the task::workspace unit tests, and clippy with -D warnings.

🤖 Generated with Claude Code

AI-assisted — Tool: Claude Code; model: anthropic/claude-sonnet-5-5; version: unavailable.


Note

Medium Risk
Changes workspace graph discovery and when --affected / task graph commands fail vs succeed; behavior is scoped to explicit monorepo project overrides but affects monorepo task workflows.

Overview
Declaring a project under [monorepo.projects] in a provider’s namespace (e.g. go:example.com/acme/api) now replaces that provider’s contribution and drops its discovery error, so mise tasks graph and mise run --affected can proceed with your declared projects when metadata like go.work is unreadable.

After overrides are applied in discover_all_with_overrides_inner, any non-remove override whose ID has a provider: prefix clears that provider’s entry in provider_errors. Overrides in other namespaces (e.g. custom:…), or remove overrides, do not suppress errors—providers with no declared project in their namespace still fail loudly.

Docs in workspace-graph.md describe this behavior. Unit tests cover full clearance, multi-provider partial clearance, and remove not clearing errors.

Reviewed by Cursor Bugbot for commit 2d7942e. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • Bug Fixes
    • Declaring a project in a workspace provider’s namespace now suppresses that provider’s discovery error, allowing task graph and affected-task commands to proceed with the declared projects. Removal overrides and declarations in other namespaces do not suppress the error.
  • Documentation
    • Clarified how provider discovery errors affect task graph and affected-task commands, and that declared projects become the provider’s full contribution when discovery fails.

…rovider

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Entire-Checkpoint: 01M5044BZ9SXSHQQTW47X0DNG3
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Review in 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: Advanced
  • Run ID: 3bb4813d-f653-44f2-8521-3344c0eda9d7
📥 Commits

Reviewing files that changed from the base of the PR and between 74f5e5f and 2d7942e.

📒 Files selected for processing: 1
  • src/task/workspace.rs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

📝 Walkthrough

When a non-removal override declares a project in a provider’s namespace, workspace graph discovery clears that provider’s retained error. Removal overrides and declarations in other namespaces do not clear the error.

Changes: Workspace provider overrides

Layer / File(s) Summary
Override handling for failed provider discovery
src/task/workspace.rs, docs/tasks/workspace-graph.md
Non-removal project overrides clear retained discovery errors for their provider namespace. Tests cover matching and non-matching namespaces, removal overrides, and project creation after discovery fails. The documentation describes the behavior.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 2d794

No merge-blocking risk is identified; proceed with normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: project overrides can replace errors from failing workspace providers.
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.
  • Fix all pre-merge checks with AI
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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 Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the previous test coverage gap is addressed.

Summary

Project declarations can now clear a failing workspace provider's error for their namespace. The docs explain this escape hatch.

  • Declared projects can replace a failing workspace provider.

Reviews (2) · Last reviewed commit: "test(task): cover provider errors that o..." · Reviewed by Greptile

Comment thread src/task/workspace.rs Resolved
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Entire-Checkpoint: 01M504HS4HVE4D3CQTFSKK29B8
@jdx
jdx merged commit 8be7e38 into main Oct 15, 2026
54 checks passed
@jdx
jdx deleted the claude/mise-discussion-14503-38fc6d branch October 15, 2026 16:29
@github-actions

Copy link
Copy Markdown
Contributor

Instruction counts

Nothing 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: env on jdx-perf-v1-ubuntu24.04-x64-mise-rust1.97.1-img5263c143, hook-env on jdx-perf-v1-ubuntu24.04-x64-mise-rust1.97.1-img5263c143, ls on jdx-perf-v1-ubuntu24.04-x64-mise-rust1.97.1-img5263c143, registry on jdx-perf-v1-ubuntu24.04-x64-mise-rust1.97.1-img5263c143, startup on jdx-perf-v1-ubuntu24.04-x64-mise-rust1.97.1-img5263c143

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.

2d7942e12cd4 vs f510aea03e32 · measured on the runner, not pushed to the history.

jdx added a commit that referenced this pull request Oct 15, 2026
<!-- entire-trail-link-start -->
https://entire.io/gh/jdx/mise/trails/775
<!-- entire-trail-link-end -->

`mise tasks graph` and `mise run --affected` now infer projects from a
Gradle multi-module build. With this `settings.gradle.kts` at the
monorepo root:

```kotlin
include(":app", ":services:person-service")
```

mise discovers `gradle::app` and `gradle::services:person-service`, and
adds an edge for each literal `project(":lib")` reference inside a
project's top-level `dependencies {}` block. Gradle is never run;
everything is read from the script text, in Groovy or Kotlin syntax.

- **IDs:** Gradle's own project path, so `:app` is `gradle::app` and the
root project is `gradle::`. The root project, and a parent like
`:services` implied by `include(":services:api")`, are projects only
when they have a build script of their own.
- **Edges:** `project(":lib")`, `project(path: ":lib")` and
`project(path = ":lib")`. Blocks nested in `project(":x") {}`,
`subprojects {}` or `buildscript {}` are skipped; use `depends_add` for
those.
- **Settings changes:** editing `settings.gradle(.kts)` affects every
project in `--affected` runs.

Gradle settings are executable, so mise doesn't guess. These are errors
that point at the fix: a computed `include` (variable, interpolation,
concatenation, loop), an `include` that is conditional or inside a
block, a `projectDir` that isn't a plain `file("...")` literal, and
having both `settings.gradle` and `settings.gradle.kts`. Declaring the
projects under `[monorepo.projects."gradle:..."]` takes over from the
provider (#14508), for example:

```toml
[monorepo.projects."gradle::app"]
root = "app"
```

Out of scope: `includeBuild`, type-safe project accessors, version
catalogs, and dependencies added by `subprojects {}`, `allprojects {}`
or convention plugins. Maven can follow separately.

Based on the prototype from @Jarvvski in discussion #14503, who is
credited as co-author.

Tested with unit tests for both DSLs (comments, non-ASCII names,
multi-line includes, remaps, nested projects, edges, every error path)
and the affected-path rule, plus clippy with `-D warnings`. There is no
e2e coverage yet.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

*AI-assisted — Tool: Claude Code; model: anthropic/claude-sonnet-5-5;
version: 2.1.295.*

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> New graph/affected behavior for Gradle repos could mis-infer projects
when settings use dynamic includes (errors) or omit edges from nested
Gradle blocks; otherwise read-only static parsing with no Gradle
execution.
> 
> **Overview**
> Adds **Gradle** as a workspace project-graph provider so `mise tasks
graph` and `mise run --affected` can infer multi-module builds from
`settings.gradle` / `settings.gradle.kts` without running Gradle.
> 
> The new `GradleWorkspaceProvider` statically tokenizes Groovy/Kotlin
scripts to collect literal `include` members, optional `projectDir =
file("...")` remaps, and `project(":…")` edges from top-level
`dependencies {}` blocks. Project IDs use Gradle paths (`gradle::app`,
`gradle::`). Non-literal or conditional `include`, ambiguous dual
settings files, or unreadable `projectDir` assignments fail with errors
that point users at `[monorepo.projects."gradle:…"]` overrides.
> 
> Graph discovery and `--affected` now register Gradle alongside Cargo,
Go, Node, and uv. Changes to root settings files are treated as
affecting every Gradle project in the graph. Docs, CLI help, and usage
specs mention Gradle in the provider list and document parsing limits.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
297d0e9. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

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

* **New Features**
* Added Gradle workspace discovery from `settings.gradle` and
`settings.gradle.kts`, including project directories and dependencies
between discovered projects.
* Gradle projects are included when identifying projects affected by
lockfile changes.
* Changes to root Gradle settings files now affect all discovered
projects.
* Unsupported Gradle settings or unreadable build scripts produce errors
with guidance on configuring project overrides. Gradle settings are read
without being executed.
* **Documentation**
* Documented Gradle workspace discovery, dependency inference, and
parsing limitations. Clarified that Gradle and uv do not need to be
installed to build the workspace graph.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Adam Jarvis <adam@ameba.ai>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
mise-en-dev added a commit that referenced this pull request Oct 16, 2026
<!-- entire-trail-link-start -->
https://entire.io/gh/jdx/mise/trails/766
<!-- entire-trail-link-end -->

### 🚀 Features

- **(config)** add find_up option to env._.file by @jdx in
[#14497](#14497)
- **(dotfiles)** infer .tera sources for group template entries by @jdx
in [#14502](#14502)
- **(hooks)** tell watch_files commands when git moved HEAD by @jdx in
[#14511](#14511)
- **(lock)** warn when a tool is unavailable for a requested platform by
@jdx in [#14500](#14500)
- **(pypi)** select Python runtime per tool by @jdx in
[#14479](#14479)
- **(task)** discover Gradle workspaces by @jdx in
[#14512](#14512)

### 🐛 Bug Fixes

- **(backend)** resolve remote versions with each request's own options
by @JamBalaya56562 in [#14476](#14476)
- **(ci)** replace the ctor crate so macOS test binaries link by @jdx in
[#14495](#14495)
- **(env)** stop _.source from loading ~/.bashrc when mise's stdin is a
socket by @pikeas in [#14487](#14487)
- **(github)** retry api.github.com when mise-versions errors by @jdx in
[#14501](#14501)
- **(pypi)** preserve environments when Python changes by @jdx in
[#14504](#14504)
- **(task)** let project overrides take over from a failing workspace
provider by @jdx in [#14508](#14508)

### 📚 Documentation

- **(activate)** explain why mise activate keeps shims on PATH by @jdx
in [#14493](#14493)
- **(ci)** clarify platform-specific mise cache paths by @zeitlinger in
[#14506](#14506)

### 📦️ Dependency Updates

- update jdx crates to v7.0.1 by @renovate[bot] in
[#14454](#14454)
- update aube to v2.7.1 by @renovate[bot] in
[#14507](#14507)

### 📦 Registry

- add martin
([github:maplibre/martin](https://github.com/maplibre/martin)) by
@ivan-ivkovic in [#14488](#14488)

### Chore

- regenerate llms.txt in the hk pre-commit hook by @jdx in
[#14515](#14515)
- format with oxfmt instead of prettier by @jdx in
[#14516](#14516)

## 📦 Aqua Registry Updates

### Updated Packages (3)

- [`max-sixty/worktrunk`](https://github.com/max-sixty/worktrunk)
- [`oxc-project/oxc/oxfmt`](https://github.com/oxc-project/oxc)
- [`oxc-project/oxc/oxlint`](https://github.com/oxc-project/oxc)
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.

1 participant