@@ -925,6 +925,16 @@ describe('EdgeConstructor', () => {
925925 expect ( edgesToRegular . length ) . toBe ( 1 )
926926 expect ( edgesToRegular [ 0 ] . sourceHandle ) . toBe ( 'parallel_exit' )
927927
928+ const edgesToParallelStart = Array . from ( parallelEndNode . outgoingEdges . values ( ) ) . filter (
929+ ( e ) => e . target === parallelSentinelStart
930+ )
931+ expect ( edgesToParallelStart . length ) . toBe ( 1 )
932+ expect ( edgesToParallelStart [ 0 ] . sourceHandle ) . toBe ( 'parallel_continue' )
933+ expect ( edgesToParallelStart [ 0 ] . isActive ) . toBe ( false )
934+
935+ const parallelStartNode = dag . nodes . get ( parallelSentinelStart ) !
936+ expect ( parallelStartNode . incomingEdges . has ( parallelSentinelEnd ) ) . toBe ( false )
937+
928938 const regularBlockNode = dag . nodes . get ( regularBlockId ) !
929939 expect ( regularBlockNode . incomingEdges . has ( parallelSentinelEnd ) ) . toBe ( true )
930940 } )
@@ -1356,31 +1366,37 @@ describe('EdgeConstructor', () => {
13561366 // Set up sentinel metadata
13571367 dag . nodes . get ( outerSentinelStart ) ! . metadata = {
13581368 isSentinel : true ,
1359- isParallelSentinel : true ,
13601369 sentinelType : 'start' ,
13611370 parallelId : outerParallelId ,
1371+ subflowId : outerParallelId ,
1372+ subflowType : 'parallel' ,
13621373 }
13631374 dag . nodes . get ( outerSentinelEnd ) ! . metadata = {
13641375 isSentinel : true ,
1365- isParallelSentinel : true ,
13661376 sentinelType : 'end' ,
13671377 parallelId : outerParallelId ,
1378+ subflowId : outerParallelId ,
1379+ subflowType : 'parallel' ,
13681380 }
13691381 dag . nodes . get ( innerSentinelStart ) ! . metadata = {
13701382 isSentinel : true ,
1371- isParallelSentinel : true ,
13721383 sentinelType : 'start' ,
13731384 parallelId : innerParallelId ,
1385+ subflowId : innerParallelId ,
1386+ subflowType : 'parallel' ,
13741387 }
13751388 dag . nodes . get ( innerSentinelEnd ) ! . metadata = {
13761389 isSentinel : true ,
1377- isParallelSentinel : true ,
13781390 sentinelType : 'end' ,
13791391 parallelId : innerParallelId ,
1392+ subflowId : innerParallelId ,
1393+ subflowType : 'parallel' ,
13801394 }
13811395 dag . nodes . get ( funcTemplate ) ! . metadata = {
13821396 isParallelBranch : true ,
13831397 parallelId : innerParallelId ,
1398+ subflowId : innerParallelId ,
1399+ subflowType : 'parallel' ,
13841400 branchIndex : 0 ,
13851401 branchTotal : 1 ,
13861402 originalBlockId : functionId ,
@@ -1479,27 +1495,35 @@ describe('EdgeConstructor', () => {
14791495 isSentinel : true ,
14801496 sentinelType : 'start' ,
14811497 loopId,
1498+ subflowId : loopId ,
1499+ subflowType : 'loop' ,
14821500 }
14831501 dag . nodes . get ( loopSentinelEnd ) ! . metadata = {
14841502 isSentinel : true ,
14851503 sentinelType : 'end' ,
14861504 loopId,
1505+ subflowId : loopId ,
1506+ subflowType : 'loop' ,
14871507 }
14881508 dag . nodes . get ( parallelSentinelStart ) ! . metadata = {
14891509 isSentinel : true ,
1490- isParallelSentinel : true ,
14911510 sentinelType : 'start' ,
14921511 parallelId : innerParallelId ,
1512+ subflowId : innerParallelId ,
1513+ subflowType : 'parallel' ,
14931514 }
14941515 dag . nodes . get ( parallelSentinelEnd ) ! . metadata = {
14951516 isSentinel : true ,
1496- isParallelSentinel : true ,
14971517 sentinelType : 'end' ,
14981518 parallelId : innerParallelId ,
1519+ subflowId : innerParallelId ,
1520+ subflowType : 'parallel' ,
14991521 }
15001522 dag . nodes . get ( funcTemplate ) ! . metadata = {
15011523 isParallelBranch : true ,
15021524 parallelId : innerParallelId ,
1525+ subflowId : innerParallelId ,
1526+ subflowType : 'parallel' ,
15031527 branchIndex : 0 ,
15041528 branchTotal : 1 ,
15051529 originalBlockId : functionId ,
@@ -1592,25 +1616,31 @@ describe('EdgeConstructor', () => {
15921616
15931617 dag . nodes . get ( outerSentinelStart ) ! . metadata = {
15941618 isSentinel : true ,
1595- isParallelSentinel : true ,
15961619 sentinelType : 'start' ,
15971620 parallelId : outerParallelId ,
1621+ subflowId : outerParallelId ,
1622+ subflowType : 'parallel' ,
15981623 }
15991624 dag . nodes . get ( outerSentinelEnd ) ! . metadata = {
16001625 isSentinel : true ,
1601- isParallelSentinel : true ,
16021626 sentinelType : 'end' ,
16031627 parallelId : outerParallelId ,
1628+ subflowId : outerParallelId ,
1629+ subflowType : 'parallel' ,
16041630 }
16051631 dag . nodes . get ( innerSentinelStart ) ! . metadata = {
16061632 isSentinel : true ,
16071633 sentinelType : 'start' ,
16081634 loopId : innerLoopId ,
1635+ subflowId : innerLoopId ,
1636+ subflowType : 'loop' ,
16091637 }
16101638 dag . nodes . get ( innerSentinelEnd ) ! . metadata = {
16111639 isSentinel : true ,
16121640 sentinelType : 'end' ,
16131641 loopId : innerLoopId ,
1642+ subflowId : innerLoopId ,
1643+ subflowType : 'loop' ,
16141644 }
16151645
16161646 const innerLoop : SerializedLoop = {
0 commit comments