Skip to content

feat(openworkflow): enforce a hard cap of 1000 step attempts per workflow run#343

Merged
jamescmartinez merged 1 commit into
mainfrom
step-limit
Feb 25, 2026
Merged

feat(openworkflow): enforce a hard cap of 1000 step attempts per workflow run#343
jamescmartinez merged 1 commit into
mainfrom
step-limit

Conversation

@jamescmartinez
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings February 25, 2026 22:27
@jamescmartinez jamescmartinez changed the title feat(openworkflow): enforce a hard cap of 1000 step attempts per work… feat(openworkflow): enforce a hard cap of 1000 step attempts per workflow run Feb 25, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Feb 25, 2026

Open in StackBlitz

npm i https://pkg.pr.new/openworkflowdev/openworkflow/@openworkflow/cli@343
npm i https://pkg.pr.new/openworkflowdev/openworkflow/@openworkflow/dashboard@343
npm i https://pkg.pr.new/openworkflowdev/openworkflow@343

commit: 38d216f

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 StepLimitExceededError with 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.

@jamescmartinez jamescmartinez merged commit 7260998 into main Feb 25, 2026
14 checks passed
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants