• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

run-llama / workflows-py / 20882252022

10 Jan 2026 06:03PM UTC coverage: 88.023% (+0.07%) from 87.949%
20882252022

push

github

web-flow
feat: add dedicated StopEvent subclasses for workflow termination scenarios (#264)

* feat: add dedicated StopEvent subclasses for workflow termination scenarios

Add WorkflowTerminationEvent base class and specific subclasses to provide
detailed information when workflows end abnormally:

- WorkflowTimedOutEvent: Published when workflow exceeds timeout, includes
  timeout duration and list of active steps
- WorkflowCancelledEvent: Published when workflow is cancelled by user
- WorkflowFailedEvent: Published when a step fails permanently, includes
  step name, exception type, and exception message

These events replace the empty StopEvent() instances that were previously
published, allowing consumers to understand why a workflow ended and take
appropriate action.

Closes: issue about providing exception information in StopEvent

* refactor: simplify termination events to inherit directly from StopEvent

* chore: add changeset

* feat: add traceback and fully qualified exception type to WorkflowFailedEvent

* feat: add retry info (attempts, elapsed_seconds) to WorkflowFailedEvent

Also fixes a bug where step_function.py used time.monotonic() instead of
time.time(), causing incompatible timestamps with first_attempt_at.

* fix lints/locks

* docs: add workflow termination events to streaming docs

---------

Co-authored-by: Claude <noreply@anthropic.com>

12 of 20 new or added lines in 2 files covered. (60.0%)

32 existing lines in 3 files now uncovered.

9797 of 11130 relevant lines covered (88.02%)

0.88 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

92.54
/src/workflows/runtime/control_loop.py


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc