Skip to content

fix: auto-start workers in context manager; warn on RUNNING+failed tasks#391

Open
nthmost-orkes wants to merge 1 commit intomainfrom
fix/critical-sdk-behaviors
Open

fix: auto-start workers in context manager; warn on RUNNING+failed tasks#391
nthmost-orkes wants to merge 1 commit intomainfrom
fix/critical-sdk-behaviors

Conversation

@nthmost-orkes
Copy link
Contributor

Summary

Test plan

  • TestTaskHandlerContextManager::test_context_manager_enter — verifies with handler as h: h is handler
  • TestTaskHandlerContextManager::test_context_manager_exit — verifies stop_processes() is called on exit (updated to patch Process since __enter__ now starts workers)
  • Full unit suite: python3 -m pytest tests/unit/ — 440 passed

🤖 Generated with Claude Code

… tasks

- TaskHandler.__enter__ now calls start_processes() so `with TaskHandler(...)
  as h:` works out of the box without a separate h.start_processes() call.
  start_processes() is idempotent via _processes_started guard, so existing
  code that calls it explicitly inside the with-block is unaffected.
  Fixes conductor-oss/getting-started#42.

- WorkflowExecutor.execute() and execute_workflow() now log a WARNING when
  the workflow returns RUNNING after the wait timeout but a task is already
  in FAILED/FAILED_WITH_TERMINAL_ERROR state, surfacing the failure reason
  that would otherwise be invisible to the caller.
  Fixes conductor-oss/getting-started#41.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant