Repository navigation
Fix transitive duplicate task rerun requests - #283
Open
P1naCol4da wants to merge 5 commits into
Open
P1naCol4da wants to merge 5 commits into
P1naCol4da wants to merge 5 commits into
Conversation
P1naCol4da
marked this pull request as ready for review
November 6, 2026 07:02
P1naCol4da
added a commit
to P1naCol4da/orquesta
that referenced
this pull request
Nov 7, 2026
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.
Summary
This PR fixes a remaining issue in Orquesta's task rerun request deduplication logic, where transitive descendant tasks may be scheduled redundantly.
For a previously completed workflow:
task1 -> task2 -> task3Requesting a rerun of both
task1andtask3can incorrectly schedule both tasks, even though rerunningtask1will naturally lead totask3.This extends the duplicate-rerun handling introduced in #188 to deeper task chains and overlapping rerun requests.
Root Cause
Two issues were identified in
orquesta/conducting.py:Incomplete descendant traversal:
WorkflowState.get_task_sequence()appends a descendant to the sequence before checking whether it has already been included. Consequently, the traversal does not continue beyond immediate successors.Incorrect request collapsing:
WorkflowConductor._collapse_task_rerun_requests()retains a candidate when its task sequence differs from any other candidate, rather than checking whether another requested task subsumes it.Together, these conditions allow redundant descendant rerun requests to remain scheduled.
Changes
This PR introduces the following changes:
The changes are limited to the workflow conductor implementation and a new regression test file.
Validation
Previously tested against upstream commit
2d523c6aebacb189c3d6aa3b6973e306ad118b24.Existing upstream test suite:
New regression tests:
Combined test suite:
The four failing regression cases reproduce the targeted behavior on the original implementation. All six new tests pass after applying the proposed fix.
The test results were obtained in a CPU-only environment and independently checked against recorded JUnit XML results and source/patch hashes.
GitHub CI results for this PR have not yet been verified.
Scope and Limitations
The regression tests exercise Orquesta's actual workflow conductor using simulated action completion events.
The following limitations apply:
with-itemsscenarios has not been formally established.This PR addresses a reproducible workflow execution correctness issue and does not introduce a new workflow scheduling algorithm.
Related Work
PR #188, merged in 2020, introduced handling for duplicate task rerun requests.
However, the current implementation still fails to correctly collapse certain transitive descendant requests in deeper task chains and overlapping request combinations.
This PR builds upon the existing implementation by addressing those remaining cases and introducing additional regression coverage.
Review Notes
Feedback on the expected rerun semantics, edge cases, and the proposed implementation is welcome.
Additional regression tests or adjustments can be incorporated based on maintainer feedback.