Open
Conversation
* fix: ensure persisted state overrides class defaults - Remove early return in Flow.__init__ to allow proper state initialization - Add test_flow_default_override.py to verify state override behavior - Fix issue where default values weren't being overridden by persisted state Fixes the issue where persisted state values weren't properly overriding class defaults when restarting a flow with a previously saved state ID. Co-Authored-By: Joe Moura <joao@crewai.com> * test: improve state restoration verification with has_set_count flag Co-Authored-By: Joe Moura <joao@crewai.com> * test: add has_set_count field to PoemState Co-Authored-By: Joe Moura <joao@crewai.com> * refactoring test * fix: ensure persisted state overrides class defaults - Remove early return in Flow.__init__ to allow proper state initialization - Add test_flow_default_override.py to verify state override behavior - Fix issue where default values weren't being overridden by persisted state Fixes the issue where persisted state values weren't properly overriding class defaults when restarting a flow with a previously saved state ID. Co-Authored-By: Joe Moura <joao@crewai.com> * test: improve state restoration verification with has_set_count flag Co-Authored-By: Joe Moura <joao@crewai.com> * test: add has_set_count field to PoemState Co-Authored-By: Joe Moura <joao@crewai.com> * refactoring test * Fixing flow state * fixing peristed stateful flows * linter * type fix --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Joe Moura <joao@crewai.com>
| # Verify state restoration and selective field override | ||
| assert flow3.state.id == original_uuid | ||
| assert flow3.state.counter == 42 # Preserved | ||
| assert flow3.state.counter == 43 # Preserved |
There was a problem hiding this comment.
This assertion expects counter=43 but could be incorrect. When flow3 is created, it only overrides the message, not the counter. The counter should remain 42 from the original state since it wasn't modified.
💬 Reply with
/praiseto tell me that this comment was useful.
Is this comment irrelevant to your project? Reply with
/ignoreto no longer receive comments like this in the future.
|
😱 Found 1 issue. Time to roll up your sleeves! 😱 |
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.
Fixes the issue where persisted state values weren't properly overriding class defaults when restarting a flow with a previously saved state ID.
test: improve state restoration verification with has_set_count flag
test: add has_set_count field to PoemState
refactoring test
fix: ensure persisted state overrides class defaults
Fixes the issue where persisted state values weren't properly overriding class defaults when restarting a flow with a previously saved state ID.
test: improve state restoration verification with has_set_count flag
test: add has_set_count field to PoemState
refactoring test
Fixing flow state
fixing peristed stateful flows
linter
type fix