File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
apps/sim/executor/execution Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ export class EdgeManager {
1717 skipBackwardsEdge = false
1818 ): string[] {
1919 const readyNodes: string[] = []
20+ const activatedTargets: string[] = []
2021
2122 for (const [edgeId, edge] of node.outgoingEdges) {
2223 if (skipBackwardsEdge && this.isBackwardsEdge(edge.sourceHandle)) {
@@ -44,9 +45,14 @@ export class EdgeManager {
4445 }
4546
4647 targetNode.incomingEdges.delete(node.id)
48+ activatedTargets.push(edge.target)
49+ }
4750
48- if (this.isNodeReady(targetNode)) {
49- readyNodes.push(targetNode.id)
51+ // Check readiness after all edges processed to ensure cascade deactivations are complete
52+ for (const targetId of activatedTargets) {
53+ const targetNode = this.dag.nodes.get(targetId)
54+ if (targetNode && this.isNodeReady(targetNode)) {
55+ readyNodes.push(targetId)
5056 }
5157 }
5258
You can’t perform that action at this time.
0 commit comments