@@ -331,9 +331,10 @@ describe('validateRunFromBlock', () => {
331331 expect ( result . error ) . toContain ( 'Upstream dependency not executed' )
332332 } )
333333
334- it ( 'rejects blocks with unexecuted transitive upstream dependencies ' , ( ) => {
334+ it ( 'allows running from block when immediate predecessor was executed (ignores transitive) ' , ( ) => {
335335 // A → X → B → C, where X is new (not executed)
336- // Running from C should fail because X in upstream chain wasn't executed
336+ // Running from C is allowed because B (immediate predecessor) was executed
337+ // C will use B's cached output - doesn't matter that X is new
337338 const dag = createDAG ( [
338339 createNode ( 'A' , [ { target : 'X' } ] ) ,
339340 createNode ( 'X' , [ { target : 'B' } ] ) ,
@@ -344,9 +345,8 @@ describe('validateRunFromBlock', () => {
344345
345346 const result = validateRunFromBlock ( 'C' , dag , executedBlocks )
346347
347- expect ( result . valid ) . toBe ( false )
348- expect ( result . error ) . toContain ( 'Upstream dependency not executed' )
349- expect ( result . error ) . toContain ( 'X' )
348+ // Valid because C's immediate predecessor B was executed
349+ expect ( result . valid ) . toBe ( true )
350350 } )
351351
352352 it ( 'allows blocks with no dependencies even if not previously executed' , ( ) => {
0 commit comments