generated from cloudwego/.github
-
Notifications
You must be signed in to change notification settings - Fork 724
feat(compose): persist rerun node inputs in checkpoint #634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #634 +/- ##
==========================================
+ Coverage 80.41% 81.30% +0.88%
==========================================
Files 124 124
Lines 11906 11921 +15
==========================================
+ Hits 9574 9692 +118
+ Misses 1601 1505 -96
+ Partials 731 724 -7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
0087cde to
60f6442
Compare
meguminnnnnnnnn
approved these changes
Jan 6, 2026
meguminnnnnnnnn
approved these changes
Jan 6, 2026
74c2ada to
3332064
Compare
hi-pender
reviewed
Jan 8, 2026
Change-Id: Ifaeb43829a970fb3c0d372fed566861aaae17acc
Change-Id: I0b0e8a5d4a2970289eb6f48021f6ed047f6ebec4
- Modified initTaskManager to automatically enable PersistRerunInput when WithGraphInterrupt is used and no explicit CheckpointConfig is set - This makes external interrupts work correctly by preserving node inputs - User's explicit CheckpointConfig settings are still respected - Added TestToolsNodeWithExternalGraphInterrupt test - Added TestExternalInterruptRespectsExplicitPersistRerunInputFalse test - Updated TestCancelInterrupt expectations to reflect new behavior Change-Id: I63d0c1812a5b20934eb6b7c62f53f55299a0c9d5
3332064 to
ef1ae4e
Compare
…nput with WithGraphInterrupt - Remove CheckpointConfig struct and WithCheckpointConfig option - Replace checkpointConfig field with persistRerunInput bool in taskManager - Auto-enable persistRerunInput when WithGraphInterrupt is used - Subgraphs inherit behavior through context propagation - Update tests to use WithGraphInterrupt pattern Change-Id: I15c3e10d815b5aa39768e6fdee1407025e5ea542
ef1ae4e to
90fc876
Compare
meguminnnnnnnnn
approved these changes
Jan 13, 2026
mrh997
pushed a commit
that referenced
this pull request
Jan 15, 2026
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.
Summary
This PR enables automatic persistence of node inputs when a graph is interrupted using
WithGraphInterrupt, allowing nodes to be correctly re-run with their original inputs when resuming from a checkpoint.Problem
When a graph is interrupted externally via
WithGraphInterrupt, the interrupted nodes need to be re-run on resume. However, without persisting the original inputs, the re-run nodes would receive empty or incorrect inputs, leading to incorrect behavior.Solution
persistRerunInput: WhenWithGraphInterruptis used, thetaskManagerautomatically enables input persistence for nodes that may need to be re-runKey Changes
compose/graph_manager.gopersistRerunInputfield totaskManager, persistoriginalInputbefore node executioncompose/graph_run.gopersistRerunInput = truewhenWithGraphInterruptcontext is detectedcompose/checkpoint_test.goBehavior
WithGraphInterruptusedWithGraphInterruptNOT usedWithGraphInterrupt