feat(openworkflow): enforce a hard cap of 1000 step attempts per workflow run#343
Merged
Conversation
commit: |
There was a problem hiding this comment.
Pull request overview
This PR implements a hard cap of 1000 step attempts per workflow run to prevent runaway executions from accumulating unbounded step history. When a workflow reaches this limit, it fails immediately with a terminal error and does not retry.
Changes:
- Added step limit enforcement with a configurable cap (default 1000) that tracks total step attempts per workflow run
- Introduced
StepLimitExceededErrorwith custom error code for programmatic error handling - Updated documentation to explain the step limit and its terminal failure behavior
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/openworkflow/worker/execution.ts | Adds step limit tracking in StepExecutor, checks before each step creation, and handles limit errors terminally with no retries |
| packages/openworkflow/worker/execution.test.ts | Adds comprehensive tests for both replay-time and runtime step limit enforcement scenarios |
| packages/docs/docs/workflows.mdx | Updates workflow status documentation to mention step cap as a failure condition |
| packages/docs/docs/steps.mdx | Documents the 1000 step attempt hard cap and its terminal failure behavior |
| packages/docs/docs/retries.mdx | Explains that step limit failures are terminal and don't trigger workflow retries |
| ARCHITECTURE.md | Adds architectural documentation explaining the rationale for the step limit |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.