Backport #2986: Implement max_events per run limit#3042
Open
github-actions[bot] wants to merge 1 commit into
Open
Backport #2986: Implement max_events per run limit#3042github-actions[bot] wants to merge 1 commit into
max_events per run limit#3042github-actions[bot] wants to merge 1 commit into
Conversation
Enforces the published per-run events limit, which was previously not enforced. The server supplies the limit on the run_started response (separate change); once a run's event log reaches it, the runtime throws MaxEventsExceededError at the top of the replay loop, and the existing terminal-error path records it as run_failed with a new MAX_EVENTS_EXCEEDED code — instead of letting a runaway workflow (e.g. an unbounded step loop) grow the event log without bound. Adds a new client side WORKFLOW_MAX_EVENTS_OVERRIDE env var which can override the server side provided value (lower only). Signed-off-by: Shalabh Chaturvedi <shalabh.chaturvedi@vercel.com>
Contributor
Contributor
Author
🧪 E2E Test Results❌ Some tests failed Summary
❌ Failed Tests▲ Vercel Production (2 failed)express (1 failed):
fastify (1 failed):
🌍 Community Worlds (102 failed)redis (19 failed):
turso (83 failed):
Details by Category❌ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
✅ 🪟 Windows
❌ 🌍 Community Worlds
✅ 📋 Other
❌ Some E2E test jobs failed:
Check the workflow run for details. |
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.
Automated backport of #2986 to
stable(backport job run).AI recommendation: This is a self-contained, backwards-compatible enforcement of an already-published per-run event limit, touching packages (
@workflow/errors,@workflow/core,@workflow/world,@workflow/world-local,@workflow/world-vercel,world-testing) that all exist and are maintained onstable(verified viagit ls-tree origin/stable). The change is additive — older servers omittingmaxEventsmean no enforcement — so it doesn't depend onmain-only behavior. Note:packages/core/src/describe-error.tsdoes not exist onstable, so that portion may need adaptation or dropping during the cherry-pick.Merge conflicts were resolved by AI (opencode with
anthropic/claude-fable-5). Please review the conflict resolution carefully before merging.