Skip to content

fix(tasks): don't chain tasks expanded from one glob dependency - #379

Merged
arcanis merged 1 commit into
mainfrom
mael/tasks-glob-chain
Oct 13, 2026
Merged

arcanis merged 1 commit into
mainfrom
mael/tasks-glob-chain

Conversation

@arcanis

@arcanis arcanis commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Issue: with top → mid → base, top → base and build: ^build everywhere, yarn tasks run hung forever. A dependency expanding to several workspaces became one sequential phase per workspace in alphabetical order, and that chain applied to every task: mid:build ended up depending on itself.

Fix: all tasks expanded from one dependency go in a single phase. Ordering between distinct dependencies is unchanged. Covered by acceptance tests.

Stacked on #378.


Note

Medium Risk
Changes core task-graph ordering for glob-expanded dependencies; behavior fix with targeted tests but affects how all multi-workspace *:… runs are scheduled.

Overview
Fixes infinite hangs when yarn tasks run resolves *:build (and similar globs) over workspaces whose real package dependencies form a diamond.

The task resolver used to put each workspace expanded from one glob dependency into its own sequential phase, which imposed arbitrary ordering between siblings and could make a task (e.g. mid:build) wait on itself. Dependency entries now carry a group id; build_dependency_phases keeps sequential siblings from the same source dependency in one phase so only true workspace edges order them. Ordering between distinct dependency clauses is unchanged.

Adds a diamond monorepo acceptance test, a unit test for grouped sequential siblings, and disables GPG signing on git commits in the --since test for CI stability.

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

@netlify

netlify Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for yarn-v6 ready!

Name Link
🔨 Latest commit b50e42b
🔍 Latest deploy log https://app.netlify.com/projects/yarn-v6/deploys/6ace43dcfc5a52ffa289148e
😎 Deploy Preview https://deploy-preview-379--yarn-v6.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

github-actions Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

⏱️ Benchmark Results

gatsby install-full-cold

Metric Base Head Difference
Mean 4.368s 4.347s -0.48% ✅
Median 4.367s 4.341s -0.60% ✅
Min 4.270s 4.261s
Max 4.473s 4.457s
Std Dev 0.054s 0.053s
📊 Raw benchmark data (gatsby install-full-cold)

Base times: 4.376s, 4.363s, 4.359s, 4.381s, 4.464s, 4.302s, 4.270s, 4.347s, 4.370s, 4.309s, 4.323s, 4.342s, 4.275s, 4.359s, 4.395s, 4.368s, 4.374s, 4.310s, 4.386s, 4.312s, 4.346s, 4.366s, 4.410s, 4.462s, 4.417s, 4.395s, 4.319s, 4.385s, 4.467s, 4.473s

Head times: 4.332s, 4.341s, 4.304s, 4.355s, 4.305s, 4.342s, 4.374s, 4.261s, 4.331s, 4.432s, 4.352s, 4.377s, 4.440s, 4.329s, 4.415s, 4.263s, 4.385s, 4.389s, 4.285s, 4.283s, 4.341s, 4.305s, 4.274s, 4.314s, 4.431s, 4.457s, 4.380s, 4.317s, 4.363s, 4.315s


gatsby install-cache-only

Metric Base Head Difference
Mean 1.345s 1.338s -0.52% ✅
Median 1.337s 1.323s -1.06% ✅
Min 1.317s 1.308s
Max 1.591s 1.750s
Std Dev 0.047s 0.079s
📊 Raw benchmark data (gatsby install-cache-only)

Base times: 1.323s, 1.317s, 1.333s, 1.354s, 1.340s, 1.342s, 1.342s, 1.332s, 1.352s, 1.324s, 1.351s, 1.339s, 1.337s, 1.338s, 1.335s, 1.333s, 1.328s, 1.340s, 1.591s, 1.340s, 1.332s, 1.353s, 1.335s, 1.320s, 1.325s, 1.322s, 1.339s, 1.343s, 1.334s, 1.343s

Head times: 1.318s, 1.310s, 1.324s, 1.329s, 1.313s, 1.347s, 1.348s, 1.316s, 1.319s, 1.322s, 1.334s, 1.334s, 1.329s, 1.318s, 1.327s, 1.333s, 1.324s, 1.311s, 1.750s, 1.311s, 1.313s, 1.320s, 1.321s, 1.327s, 1.312s, 1.333s, 1.308s, 1.333s, 1.321s, 1.324s


gatsby install-cache-and-lock (warm, with lockfile)

Metric Base Head Difference
Mean 0.369s 0.375s +1.62% ⚠️
Median 0.369s 0.369s -0.03% ✅
Min 0.363s 0.363s
Max 0.379s 0.553s
Std Dev 0.003s 0.034s
📊 Raw benchmark data (gatsby install-cache-and-lock (warm, with lockfile))

Base times: 0.365s, 0.371s, 0.367s, 0.367s, 0.365s, 0.366s, 0.367s, 0.370s, 0.367s, 0.368s, 0.373s, 0.369s, 0.369s, 0.369s, 0.368s, 0.367s, 0.371s, 0.370s, 0.368s, 0.370s, 0.367s, 0.367s, 0.363s, 0.370s, 0.367s, 0.370s, 0.369s, 0.379s, 0.377s, 0.372s

Head times: 0.368s, 0.369s, 0.390s, 0.364s, 0.363s, 0.365s, 0.553s, 0.363s, 0.372s, 0.369s, 0.365s, 0.373s, 0.370s, 0.372s, 0.369s, 0.366s, 0.372s, 0.365s, 0.365s, 0.366s, 0.365s, 0.368s, 0.368s, 0.368s, 0.370s, 0.369s, 0.370s, 0.371s, 0.370s, 0.369s

Base automatically changed from mael/foreach-dependents-closure to main October 13, 2026 09:32
With `top` depending on `mid` and `base`, `mid` depending on `base`,
and `build: *:build` everywhere, `yarn tasks run` hung forever. A
dependency expanding to several workspaces was pushed as one sequential
phase per workspace, in alphabetical order. That chain then applied to
every task, so `mid:build` ended up depending on itself.

All tasks expanded from the same dependency now go in a single phase.
The sequential/parallel semantics between distinct dependencies don't
change.

Also disables commit signing in the `--since` test fixture so it
doesn't depend on the user's git config.
@arcanis
arcanis force-pushed the mael/tasks-glob-chain branch from d485ee4 to b50e42b Compare October 13, 2026 14:44
@arcanis arcanis changed the title fix(tasks): don't chain tasks expanded from one ^ or glob dependency fix(tasks): don't chain tasks expanded from one glob dependency Oct 13, 2026
@cursor

cursor Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: 4db14b3e-7a3f-4752-a46c-a446ec0ef34e)

@arcanis
arcanis merged commit 14500a5 into main Oct 13, 2026
27 checks passed
@arcanis
arcanis deleted the mael/tasks-glob-chain branch October 13, 2026 15:24

This branch was successfully deployed

1 active deployment
test-reports — b50e42b1 Deployed Oct 13, 2026 by arcanis via Reporting test results #1450
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