Ashfaqbs commented on code in PR #1111:
URL: https://github.com/apache/flink-agents/pull/1111#discussion_r4013995999


##########
runtime/src/main/java/org/apache/flink/agents/runtime/context/JavaRunnerContextImpl.java:
##########
@@ -192,6 +192,15 @@ private <T> void finalizeExecutedOutcomes(
                 plan.outcomes.set(callIndex, outcome);
                 continue;
             }
+            if (outcome.isFailure() && outcome.getError() instanceof 
InterruptedException) {

Review Comment:
   Good catch, fixed in b0b672d1. `executeAllWithoutDurableState()` now checks 
each returned `Outcome` for a wrapped `InterruptedException` and rethrows it 
(restoring the interrupt flag) instead of letting it flow back to 
`ToolCallAction` as a normal failed outcome. Since there's no durable store on 
this path, there's nothing to leave pending -- the fix is purely about not 
misclassifying the cancellation as a tool failure. Added 
`testDurableExecuteAllAsyncWithoutDurableStateInterruptionPropagates`, which 
builds a `JavaRunnerContextImpl` without calling `setDurableExecutionContext` 
(so `durableExecuteAllAsync` takes the no-durable-store branch) and asserts the 
interruption propagates with the flag restored.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to