Skip to content

Conversation

@pranaygp
Copy link
Collaborator

@pranaygp pranaygp commented Dec 5, 2025

The current implementation of suspension handler processes the invocation queue sequentially which is really slow. Now we process is in parallel:

  • Process hooks first, then steps and waits in parallel to prevent race conditions
  • Refactor runtime.ts into modular files: suspension-handler.ts, step-handler.ts, helpers.ts
  • nit: Add otel attributes for hooks created (workflow.hooks.created) and waits created (workflow.waits.created)
  • nit: Update suspension status from pending_steps to workflow_suspended

@changeset-bot
Copy link

changeset-bot bot commented Dec 5, 2025

🦋 Changeset detected

Latest commit: 886548c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 12 packages
Name Type
@workflow/core Patch
@workflow/builders Patch
@workflow/cli Patch
@workflow/next Patch
@workflow/nitro Patch
@workflow/web-shared Patch
workflow Patch
@workflow/astro Patch
@workflow/sveltekit Patch
@workflow/world-testing Patch
@workflow/nuxt Patch
@workflow/ai Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Contributor

vercel bot commented Dec 5, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview, Comment Dec 18, 2025 2:28am
example-nextjs-workflow-webpack Ready Ready Preview, Comment Dec 18, 2025 2:28am
example-workflow Ready Ready Preview, Comment Dec 18, 2025 2:28am
workbench-astro-workflow Ready Ready Preview, Comment Dec 18, 2025 2:28am
workbench-express-workflow Ready Ready Preview, Comment Dec 18, 2025 2:28am
workbench-fastify-workflow Ready Ready Preview, Comment Dec 18, 2025 2:28am
workbench-hono-workflow Ready Ready Preview, Comment Dec 18, 2025 2:28am
workbench-nitro-workflow Ready Ready Preview, Comment Dec 18, 2025 2:28am
workbench-nuxt-workflow Ready Ready Preview, Comment Dec 18, 2025 2:28am
workbench-sveltekit-workflow Ready Ready Preview, Comment Dec 18, 2025 2:28am
workbench-vite-workflow Ready Ready Preview, Comment Dec 18, 2025 2:28am
workflow-docs Ready Ready Preview, Comment Dec 18, 2025 2:28am

@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

🧪 E2E Test Results

Some tests failed

Summary

Passed Failed Skipped Total
✅ ▲ Vercel Production 286 0 11 297
✅ 💻 Local Development 262 0 8 270
✅ 📦 Local Production 262 0 8 270
✅ 🐘 Local Postgres 262 0 8 270
✅ 🪟 Windows 27 0 0 27
❌ 🌍 Community Worlds 109 11 0 120
Total 1208 11 35 1254

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

  • addTenWorkflow
  • addTenWorkflow
  • retryAttemptCounterWorkflow
  • crossFileErrorWorkflow - stack traces work across imported modules
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 26 0 1
✅ example 26 0 1
✅ express 26 0 1
✅ fastify 26 0 1
✅ hono 26 0 1
✅ nextjs-turbopack 26 0 1
✅ nextjs-webpack 26 0 1
✅ nitro 26 0 1
✅ nuxt 26 0 1
✅ sveltekit 26 0 1
✅ vite 26 0 1
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 26 0 1
✅ express-stable 26 0 1
✅ fastify-stable 26 0 1
✅ hono-stable 26 0 1
✅ nextjs-turbopack-stable 27 0 0
✅ nextjs-webpack-stable 27 0 0
✅ nitro-stable 26 0 1
✅ nuxt-stable 26 0 1
✅ sveltekit-stable 26 0 1
✅ vite-stable 26 0 1
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 26 0 1
✅ express-stable 26 0 1
✅ fastify-stable 26 0 1
✅ hono-stable 26 0 1
✅ nextjs-turbopack-stable 27 0 0
✅ nextjs-webpack-stable 27 0 0
✅ nitro-stable 26 0 1
✅ nuxt-stable 26 0 1
✅ sveltekit-stable 26 0 1
✅ vite-stable 26 0 1
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 26 0 1
✅ express-stable 26 0 1
✅ fastify-stable 26 0 1
✅ hono-stable 26 0 1
✅ nextjs-turbopack-stable 27 0 0
✅ nextjs-webpack-stable 27 0 0
✅ nitro-stable 26 0 1
✅ nuxt-stable 26 0 1
✅ sveltekit-stable 26 0 1
✅ vite-stable 26 0 1
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 27 0 0
❌ 🌍 Community Worlds
App Passed Failed Skipped
✅ mongodb-dev 3 0 0
❌ mongodb 26 1 0
✅ redis-dev 3 0 0
❌ redis 26 1 0
✅ starter-dev 3 0 0
❌ starter 19 8 0
✅ turso-dev 3 0 0
❌ turso 26 1 0

📋 View full workflow run

Copy link
Collaborator Author

pranaygp commented Dec 5, 2025

@pranaygp pranaygp force-pushed the pranaygp/12-04-perf_use_map_for_invocationsqueue_o_1_lookup_delete_ branch 2 times, most recently from 61edd56 to bdefce0 Compare December 5, 2025 22:20
@pranaygp pranaygp force-pushed the pranaygp/12-04-perf_parallelize_suspension_handler_for_high-concurrency branch from c4a92e0 to 4d36770 Compare December 5, 2025 22:20
- Process hooks first, then steps and waits in parallel to prevent race conditions
- Refactor runtime.ts into modular files: suspension-handler.ts, step-handler.ts, helpers.ts
- Add otel attributes for hooks created (workflow.hooks.created) and waits created (workflow.waits.created)
- Update suspension status from pending_steps to workflow_suspended
- Add retry logic to benchmark for unexpected content type errors
- Refactor stress test benchmarks to use shared config (10, 25 steps enabled; 100+ skipped)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@pranaygp pranaygp force-pushed the pranaygp/12-04-perf_parallelize_suspension_handler_for_high-concurrency branch from 99078d0 to 886548c Compare December 18, 2025 02:26
@pranaygp pranaygp merged commit ea2a67e into main Dec 18, 2025
90 checks passed
@pranaygp pranaygp deleted the pranaygp/12-04-perf_parallelize_suspension_handler_for_high-concurrency branch December 18, 2025 02:43
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.

3 participants