Skip to content

fix: add missing step3 field to CrashState and correct return value#2

Open
PrinceThummar011 wants to merge 1 commit into
campusx-official:mainfrom
PrinceThummar011:fix/add-missing-step3-state-and-return
Open

fix: add missing step3 field to CrashState and correct return value#2
PrinceThummar011 wants to merge 1 commit into
campusx-official:mainfrom
PrinceThummar011:fix/add-missing-step3-state-and-return

Conversation

@PrinceThummar011

Copy link
Copy Markdown

Description

Fixed two bugs in the fault tolerance example in 10_persistence.ipynb:

  1. Missing state field: Added step3: str to CrashState TypedDict
  2. Incorrect return value: Fixed step_3() function to return {"step3": "done"} instead of {"done": True}

Problem

The original code had inconsistent state management:

  • CrashState defined step1 and step2 but was missing step3
  • step_3() returned {"done": True} which doesn't match the state schema
  • This would cause state tracking issues in the workflow

Solution

  • Added step3: str field to maintain consistency with step1 and step2
  • Changed return value to {"step3": "done"} to match the expected state structure
  • Now all three steps follow the same pattern

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant