Skip to content

feat(task): include global inputs in affected projects - #11587

Merged
jdx merged 2 commits into
mainfrom
agent/affected-global-inputs
Aug 1, 2026
Merged

jdx merged 2 commits into
mainfrom
agent/affected-global-inputs

Conversation

@jdx

@jdx jdx commented Aug 1, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • treat changed paths outside every workspace project as workspace-global
  • treat changed paths matching resolved task_config.global_inputs patterns as workspace-global
  • affect every project for global changes while preserving reverse-dependency scoping for ordinary owned paths
  • reuse task source include, exclude, brace, and absolute-path matching semantics

Why

Changed-file ownership alone cannot safely narrow repository-wide configuration and shared inputs. This layer connects changed paths to affected project expansion while reusing the existing global-input contract instead of introducing parallel configuration.

Validation

  • cargo fmt --check
  • cargo test task::workspace::
  • cargo clippy --workspace --all-features --all-targets -- -D warnings
  • git diff --check

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


Note

Medium Risk
Affects which monorepo projects run on file changes; incorrect global-input matching could over- or under-run tasks, but logic reuses existing task source matchers and is covered by new tests.

Overview
Adds affected_projects_for_paths on WorkspaceProjectGraph so changed-file → affected-project expansion respects workspace-global inputs, not only per-project ownership.

Changes under paths that match resolved task_config.global_inputs (via existing build_source_matcher / is_source semantics, including excludes) mark the whole workspace affected, even when the file lives inside a project root. Paths with no owning project do the same. Otherwise behavior stays the same: map paths to projects and expand through affected_projects (reverse-dependency closure).

Unit tests cover unowned paths, global patterns, ordinary scoped changes, and exclusion patterns that keep changes local to one project.

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

Summary by CodeRabbit

  • New Features
    • Improved workspace change detection to identify all projects affected by modified files.
    • Changes to project dependencies now correctly include dependent projects.
    • Updates outside known project directories or matching global inputs now trigger processing for the full workspace.
    • Excluded paths are handled correctly to prevent unnecessary project processing.

@coderabbitai

coderabbitai Bot commented Aug 1, 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: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 05116f9f-b7f3-4e86-ada0-1acc154c7f04

📥 Commits

Reviewing files that changed from the base of the PR and between 01ed83e and b3b4052.

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

📝 Walkthrough

Walkthrough

WorkspaceProjectGraph now computes affected projects from changed paths. Unowned paths and resolved global inputs affect all projects. Owned paths affect the owning projects and their reverse dependents.

Changes

Workspace impact analysis

Layer / File(s) Summary
Affected-project path resolution
src/task/workspace.rs
Adds affected_projects_for_paths, which handles unowned paths, global-input matches, and reverse dependency propagation.
Impact behavior validation
src/task/workspace.rs
Adds tests for workspace-wide changes, dependency propagation, and global-input exclusions.

Estimated code review effort: 3 (Moderate) | ~15–30 minutes

Possibly related PRs

  • jdx/mise#11400: Introduces the WorkspaceProjectGraph used by this change.
  • jdx/mise#11583: Also adds affected-project calculation on WorkspaceProjectGraph.
  • jdx/mise#11585: Adds Git changed-path resolution that complements this affected-project computation.

Poem

A rabbit hops through paths that change,
Some reach one burrow, some the range.
Global signs wake every nest,
Dependents follow each request.
Exclusions keep the scope just right.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: including global inputs when determining affected projects.
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.

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 1, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds workspace-graph logic for expanding changed paths into affected projects.

  • Treats unowned paths and configured global inputs as affecting every project.
  • Preserves reverse-dependency scoping for ordinary project-owned paths.
  • Adds unit coverage for global patterns, exclusions, and owned-path behavior.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; the previously reported parity-tracker issue is resolved because the affected-project/global-input item is currently unchecked.

Important Files Changed

Filename Overview
src/task/workspace.rs Adds path-based affected-project calculation and focused unit tests; no eligible follow-up defect remains.

Reviews (2): Last reviewed commit: "docs(task): keep affected integration pe..." | Re-trigger Greptile

Comment thread TASK_CACHE_PARITY.md Resolved
@github-actions

github-actions Bot commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Instruction counts

benchmark trend instructions Δ wall (min) Δ
env ▃▁▁▄▃▄▃▆▆▅▅██▇▇▅▇ 84,738,518 → 84,811,548 +0.09% 26.65 → 19.07ms -28.46%
hook-env ▁▃▃▅▂▆▅▆▆▅▄▇█▇▇▅█ 87,056,496 → 87,199,575 +0.16% 22.35 → 18.89ms -15.46%
ls ▁▄▂▂▁▄▅▆▅▃▃▇▆▇▇▆█ 76,700,249 → 76,784,052 +0.11% 18.05 → 16.06ms -10.99%
registry ▇▁▁▂█▅▃▃▃▆▅▄▄███▅ 50,404,865 → 50,301,700 -0.20% 12.75 → 17.55ms +37.66%
startup ▁▁▁▂▂▇▆▇▇█▇██████ 16,100,574 → 16,106,850 +0.04% 8.94 → 8.03ms -10.11%

No instruction-count regression above 1%.

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.

b3b4052a7acb vs 01ed83eb380b · measured on the runner, not pushed to the history.

Base automatically changed from agent/affected-git-revisions to main August 1, 2026 18:01
@jdx
jdx force-pushed the agent/affected-global-inputs branch from 4af14d4 to abba875 Compare August 1, 2026 18:01
@jdx
jdx force-pushed the agent/affected-global-inputs branch from abba875 to 3be0c00 Compare August 1, 2026 18:02
@jdx
jdx merged commit 4bd4185 into main Aug 1, 2026
30 checks passed
@jdx
jdx deleted the agent/affected-global-inputs branch August 1, 2026 19:40
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