Conversation
da-daken
force-pushed
the
align_action_recovery
branch
2 times, most recently
from
September 24, 2026 17:27
8602f40 to
dbcd745
Compare
Contributor
Author
|
@wenjin272 @pltbkd Would you mind taking a look at this PR at your convenience? The reason CI is red seems to be an environment issue. |
2 tasks
2 tasks
da-daken
force-pushed
the
align_action_recovery
branch
from
September 29, 2026 14:59
dbcd745 to
e504d87
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked issue: #1016
Purpose of change
Simplify the recovery matching model for durable execution from the two-field
(functionId, argsDigest)to a singlefunctionIdfield, making the Java and Python APIs consistent. On the Python side, by embedding the args digest inside the functionId string (in the formatmodule.qualname::digest), the automatic deduplication capability based on function + args is preserved, maintaining the language's own characteristics. At the same time, assign a unique durable ID(tool-call:{llm_id}) to each tool call ofToolCallAction, avoiding recovery matching confusion between multiple tool calls.Behavioral Semantics
Recovery Matching Model Change: Previously,
CallResultused two independent fields,functionIdandargsDigest, to match call sites during replay. Now,functionIditself carries the complete matching semantics—provided byDurableCallable.getId()on the Java side, and returned as a single string bydurable_identity_for_call()on the Python side. This eliminates the complexity for callers of having to manage two identity fields separately.Python's args digest preservation strategy: When there is no explicit
durable_id,durable_identity_for_call()returns a single string in the format{function_id}::{args_digest}. This means the behavioral semantics on the Python side are completely equivalent to before (the same function + different args will still generate different identities), but the interface is simplified to a singlestrreturn type.ToolCallAction Uniqueness: On the Java side,
TOOL_CALL_DURABLE_IDis changed from the constant"tool-call"to"tool-call:" + id. On the Python side, all threedurable_executecalls passdurable_id=f"tool-call:{execution.id}". The durable log entries for each tool call are now independent of each other, and the recovery of different tools in parallel tool calls (parallel batch) will not interfere with each other.Forward Compatibility: Add
@JsonIgnoreProperties(ignoreUnknown = true)toCallResultto ensure that serialized data containing the oldargsDigestfield will not throw an exception during deserialization.Java-Python Bridge Layer: The arrays returned by
getCallResultFieldsAt/getCurrentCallResultFieldsare reduced from a 5-tuple[functionId, argsDigest, status, result, exception]to a 4-tuple[functionId, status, result, exception]. On the Python side,_PersistedCallResultis synchronously unpacked into 4 elements.Tests
ActionStateSerdeTest(20),ActionStateTest(17),DurableExecutionContextTest(17),JavaRunnerContextImplDurableExecuteAsyncTest(19),RunnerContextImplDurableExecuteTest(17), andActionExecutionOperatorTest(56).test_flink_runner_context_reconcilable.py(~50+) andtest_tool_call_action.py(41) all passed. The Mock_Context'sdurable_execute/durable_execute_asyncperformskwargs.pop("durable_id", None)filtering to ensure the newly addeddurable_idkeyword argument is not passed through to the tool function under test.API
no API
Documentation
doc-neededdoc-not-neededdoc-includedWas this patch authored or co-authored using generative AI tooling?
Generated-by: cursor (deepseek-v4-pro)