fix(process): dep-gated conditions + barriers wait for spawned children (#569) - #573
Merged
carlospedreira merged 1 commit intoJul 6, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes two workflow-task scheduling defects in the Dotbot.Process runtime that caused (1) manifest conditions to be evaluated too early (leading to permanent, cascading condition-not-met skips), and (2) barrier tasks to ignore dynamically spawned child tasks created by their generator dependencies.
Changes:
- Reorders scheduling checks so dependency satisfaction gates manifest condition evaluation (preventing premature
condition-not-metskips). - Adds barrier readiness logic to block
type=barriertasks while any non-terminal tasks generated/expanded by its dependencies remain outstanding. - Adds Layer 2 fixture-based tests covering both scheduling behaviors via
Get-NextWorkflowTask.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/runtime/Modules/Dotbot.Process/Dotbot.Process.psm1 |
Fixes task selection ordering (deps-before-condition) and adds generated-child awareness for barrier eligibility. |
tests/Test-TaskActions.ps1 |
Adds regression tests using on-disk task fixtures to validate the new scheduling behavior for bugs #569 (bugs 4 & 5). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
carlospedreira
approved these changes
Jul 6, 2026
carlospedreira
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed locally and via connector. Focused regression suite passed: tests/Test-TaskActions.ps1 reported 186 passed, 0 failed. No blocking issues found.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked issue
Closes #569
Refs #557
Summary of changes
src/runtime/Modules/Dotbot.Process/Dotbot.Process.psm1— both fixes in theGet-NextWorkflowTaskcandidate loop:Bug 4 — premature, cascading condition-skip. The loop evaluated
_IsManifestConditionMetbefore_AreDepsMet, so a task whose manifestconditionpoints at a file its own upstream dependency produces was markedskipped/condition-not-metat launch (the file doesn't exist yet), added to the done-set, and — sincecondition-not-metsatisfies dependents — cascaded the skip down the chain (observed live: 6 implementation-chain tasks skipped instart-from-jira). Now_AreDepsMetis checked first: a task with unmet deps staystodo(blocked, never marked), and becauseGet-NextWorkflowTaskreloads from disk each call, its condition re-evaluates once the producer completes. A genuinely-false condition on a dep-met task is still a realcondition-not-metskip.Bug 5 — barriers ignored dynamically-spawned children.
_AreDepsMetonly inspects the explicitdependenciesarray, so abarrierfired the instant its generator dependency wentdone— while the children the generator spawned intotasks/todo(stampedextensions.runner.generated_by/provenance.expanded_by) were still running. New_HasOutstandingGeneratedChildrenblocks atype=barriercandidate while any non-complete task was generated by one of its dependencies. "Complete" reuses the same rule as the dependency done-set (done/cancelled/split, orskippedonly with an intentional reason), so a framework-error skip (max-retries, whichReset-SkippedTasksretries) or aneeds-input/needs-reviewchild keeps the barrier waiting rather than firing over unfinished work. Barrier-scoped, direct children only — verified complete for all shipped workflows; widening is a one-line scope-predicate change.Testing notes
tests/Test-TaskActions.ps1(Layer 2) adds behavioral coverage calling the exportedGet-NextWorkflowTaskagainst on-disk task fixtures:todo(notcondition-not-met). Mark producer done + create the file → pass 2 selects the conditioned task.donegenerator + atodochild stampedgenerated_by, plus a higher-prioritybarrierdepending on the generator. Assert the barrier is not selected while the child is non-terminal (child selected); mark childdone→ barrier is then selected.Run:
pwsh ./tests/Test-TaskActions.ps1(or./tests/Run-Tests.ps1 -Layer 2).PARSE OK; PSScriptAnalyzer clean on the changed region; reviewed with/pwsh-review(diff-bug + idioms + history) — one major (child-complete semantics) applied, no blockers.Checklist