v0.5.9
BugFix
Fixed State Access in Graph Callbacks
In v0.5.4, while introducing the Graph Cancel Interrupt feature, we inadvertently moved the execution point of Graph Callbacks. This caused ProcessState to fail when retrieving state content inside a callback, resulting in the following error during ProcessState execution:
err := ProcessState[*State](ctx, func(_ context.Context, state *testStruct) error {
// your code here
return nil
})
if err != nil {
// error: "get state from context fail: have not set state"
}This release fixes the state access issue and includes comprehensive unit tests to prevent future regressions. Graph callbacks now correctly access state via ProcessState as intended.
What's Changed
- fix(compose): support get state in graph on start by @meguminnnnnnnnn in #497
Full Changelog: v0.5.8...v0.5.9