Commits
Click on a commit to change the comparison rangeMigrate states functions from sync_compatible to async_dispatch
This PR migrates get_state_exception and raise_state_exception from the sync_compatible decorator to the async_dispatch pattern.
Since these functions involve async operations (ResultStore operations and recursive calls), the sync versions are implemented as thin wrappers using run_coro_as_sync.
Changes:
- Renamed async functions with 'a' prefix (aget_state_exception, araise_state_exception)
- Created sync versions that use run_coro_as_sync to call async versions
- Added async_dispatch decorator to connect sync/async implementations
- Updated recursive calls within the functions to use the async versions
- Added tests to verify correct dispatch behavior
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com> Fix async state exception calls in _get_state_result
When using async_dispatch pattern, async code should call the explicit
async version (aget_state_exception) rather than the dispatching function
(get_state_exception) to avoid type errors.
This fixes failing test: test_task_passes_failed_state_to_retry_fn_sync
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>