@@ -766,7 +766,10 @@ function relocate(served: any, secret?: string) {
766766 config : { triggerType : 'api' , hookId : 'intake' , ...( secret !== undefined ? { secret } : { } ) } ,
767767 } ,
768768 ] ,
769- edges : [ { id : 'e1' , source : 'begin_v2' , target : 'finish' } ] ,
769+ // `e2` keeps the old start node reached: the save door's flow lint
770+ // refuses a node no edge reaches (`flow-node-unreachable`), which is
771+ // not the refusal these tests are about.
772+ edges : [ { id : 'e1' , source : 'begin_v2' , target : 'finish' } , { id : 'e2' , source : 'begin_v2' , target : 'begin' } ] ,
770773 } ;
771774}
772775
@@ -906,7 +909,8 @@ function storedCalloutFlow() {
906909 } ,
907910 } ,
908911 ] ,
909- edges : [ ] ,
912+ // Wired: the save door's flow lint refuses a top-level node no edge reaches.
913+ edges : [ { id : 's1' , source : 'begin' , target : 'each' } , { id : 's2' , source : 'each' , target : 'fan' } ] ,
910914 } ;
911915}
912916
@@ -1042,6 +1046,7 @@ function storedMovesFlow() {
10421046 const flow : any = storedCalloutFlow ( ) ;
10431047 flow . name = 'moves' ;
10441048 flow . nodes . push ( { id : 'call' , type : 'http' , label : 'Call' , config : { url : 'https://c' , durable : true , signingSecret : SIGNING } } ) ;
1049+ flow . edges . push ( { id : 's3' , source : 'fan' , target : 'call' } ) ;
10451050 return flow ;
10461051}
10471052
@@ -1054,6 +1059,7 @@ function movedOutOfLoop(served: any) {
10541059 return {
10551060 ...served ,
10561061 nodes : [ begin , { ...each , config : { ...each . config , body : { nodes : [ NOOP ( 'body_noop' ) ] , edges : [ ] } } } , fan , call , perRow ] ,
1062+ edges : [ ...served . edges , { id : 's4' , source : 'call' , target : perRow . id } ] ,
10571063 } ;
10581064}
10591065
@@ -1178,7 +1184,7 @@ describe('#20590 round 2 — the relocation counts nodes, not every object carry
11781184 const stored = storedMovesFlow ( ) ;
11791185 const incoming = movedWithEdgeTwin ( redactMetadataItem ( 'flow' , stored ) ) ;
11801186 const out : any = carryForwardRedactedValues ( 'flow' , incoming , stored ) ;
1181- expect ( out . edges . map ( ( e : any ) => e . id ) ) . toEqual ( [ 'per_row' ] ) ;
1187+ expect ( out . edges . map ( ( e : any ) => e . id ) ) . toEqual ( [ 's1' , 's2' , 's3' , 's4' , ' per_row'] ) ;
11821188 expect ( out . nodes [ 4 ] . id ) . toBe ( 'per_row' ) ;
11831189 expect ( out . nodes [ 4 ] . config . signingSecret ) . toBe ( SIGNING ) ;
11841190 expect ( allStrings ( redactMetadataItem ( 'flow' , out ) ) ) . not . toContain ( SIGNING ) ;
@@ -1197,7 +1203,7 @@ describe('#20590 round 2 — the relocation counts nodes, not every object carry
11971203 await protocol . saveMetaItem ( { type : 'flow' , name : 'moves' , item : movedWithEdgeTwin ( editable ) } ) ;
11981204
11991205 const at = JSON . parse ( Array . from ( rows . values ( ) ) . find ( ( r ) => r . name === 'moves' && r . state === 'active' ) ! . metadata ) ;
1200- expect ( at . edges . map ( ( e : any ) => e . id ) ) . toEqual ( [ 'per_row' ] ) ;
1206+ expect ( at . edges . map ( ( e : any ) => e . id ) ) . toEqual ( [ 's1' , 's2' , 's3' , 's4' , ' per_row'] ) ;
12011207 expect ( at . nodes [ 4 ] . config . signingSecret ) . toBe ( SIGNING ) ;
12021208 expect ( allStrings ( await protocol . getMetaItem ( { type : 'flow' , name : 'moves' } ) ) ) . not . toContain ( SIGNING ) ;
12031209 } ) ;
0 commit comments