@@ -367,13 +367,15 @@ function makeLocalCommandHarness(input: {
367367 // A steering restart superseded this attempt but could not stop its provider turn.
368368 const interruptedAttemptId = RunAttemptId . make ( "attempt-native-account-command-interrupted" ) ;
369369 const interruptedProviderTurnId = ProviderTurnId . make ( "provider-turn-native-account-command" ) ;
370+ const interruptedRootNodeId = NodeId . make ( "root-native-account-command-interrupted" ) ;
370371 const addInterruptedProviderTurn = ( ) => {
371372 projection = {
372373 ...projection ,
373374 attempts : [
374375 {
375376 ...projection . attempts [ 0 ] ! ,
376377 id : interruptedAttemptId ,
378+ rootNodeId : interruptedRootNodeId ,
377379 reason : "initial" ,
378380 status : "superseded" ,
379381 startedAt : now ,
@@ -389,7 +391,7 @@ function makeLocalCommandHarness(input: {
389391 {
390392 id : interruptedProviderTurnId ,
391393 providerThreadId,
392- nodeId : rootNodeId ,
394+ nodeId : interruptedRootNodeId ,
393395 runAttemptId : interruptedAttemptId ,
394396 nativeTurnRef : null ,
395397 ordinal : 1 ,
@@ -596,6 +598,7 @@ function makeLocalCommandHarness(input: {
596598 dropAttempts,
597599 addInterruptedProviderTurn,
598600 interruptedProviderTurnId,
601+ interruptedRootNodeId,
599602 failStartingRun : ( failedRunId : RunId = runId ) =>
600603 Effect . gen ( function * ( ) {
601604 yield * ( yield * ProviderTurnStart . ProviderTurnStartServiceV2 ) . failStartingRun ( {
@@ -862,6 +865,9 @@ effectIt.effect("stops the provider turn a failed restart could not interrupt",
862865 { id : harness . interruptedProviderTurnId , status : "interrupted" } ,
863866 ] ) ;
864867 expect ( projection . providerTurns [ 0 ] ?. completedAt ) . not . toBeNull ( ) ;
868+ expect ( harness . events . find ( ( event ) => event . type === "provider-turn.updated" ) ?. nodeId ) . toBe (
869+ harness . interruptedRootNodeId ,
870+ ) ;
865871 } ) ,
866872) ;
867873
0 commit comments