Skip to content

Add discovered serializable classes in all context modes#874

Merged
TooTallNate merged 3 commits intomainfrom
01-27-add_discovered_serializable_classes_in_all_context_modes
Feb 3, 2026
Merged

Add discovered serializable classes in all context modes#874
TooTallNate merged 3 commits intomainfrom
01-27-add_discovered_serializable_classes_in_all_context_modes

Conversation

@TooTallNate
Copy link
Copy Markdown
Member

@TooTallNate TooTallNate commented Jan 27, 2026

This PR ensures that all classes with custom serialization are automatically included in all bundle contexts (step, workflow, client) to ensure proper serialization/deserialization when crossing execution boundaries:

  • Classes defined in any context can now be properly serialized when passing data between:

    • Client → Workflow (when starting workflows)
    • Workflow → Step (when calling steps)
    • Step → Workflow (when returning step results)
    • Workflow → Client (when returning workflow results)
  • The build system now automatically discovers all files containing serializable classes and includes them in each bundle, regardless of where the class is originally defined.

  • No manual configuration is required - cross-registration happens automatically during the build process.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jan 27, 2026

🦋 Changeset detected

Latest commit: 5894707

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

This PR includes changesets to release 16 packages
Name Type
@workflow/swc-plugin Patch
@workflow/builders Patch
@workflow/astro Patch
@workflow/cli Patch
@workflow/nest Patch
@workflow/next Patch
@workflow/nitro Patch
@workflow/rollup Patch
@workflow/sveltekit Patch
@workflow/vite Patch
workflow Patch
@workflow/world-testing Patch
@workflow/docs-typecheck Patch
@workflow/nuxt Patch
@workflow/core Patch
@workflow/web-shared 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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 27, 2026

🧪 E2E Test Results

Some tests failed

Summary

Passed Failed Skipped Total
✅ ▲ Vercel Production 468 0 38 506
✅ 💻 Local Development 428 0 32 460
✅ 📦 Local Production 428 0 32 460
✅ 🐘 Local Postgres 428 0 32 460
✅ 🪟 Windows 46 0 0 46
❌ 🌍 Community Worlds 31 165 0 196
✅ 📋 Other 126 0 12 138
Total 1955 165 146 2266

❌ Failed Tests

🌍 Community Worlds (165 failed)

mongodb (41 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

redis (41 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

starter (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

turso (41 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 42 0 4
✅ example 42 0 4
✅ express 42 0 4
✅ fastify 42 0 4
✅ hono 42 0 4
✅ nextjs-turbopack 45 0 1
✅ nextjs-webpack 45 0 1
✅ nitro 42 0 4
✅ nuxt 42 0 4
✅ sveltekit 42 0 4
✅ vite 42 0 4
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 42 0 4
✅ express-stable 42 0 4
✅ fastify-stable 42 0 4
✅ hono-stable 42 0 4
✅ nextjs-turbopack-stable 46 0 0
✅ nextjs-webpack-stable 46 0 0
✅ nitro-stable 42 0 4
✅ nuxt-stable 42 0 4
✅ sveltekit-stable 42 0 4
✅ vite-stable 42 0 4
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 42 0 4
✅ express-stable 42 0 4
✅ fastify-stable 42 0 4
✅ hono-stable 42 0 4
✅ nextjs-turbopack-stable 46 0 0
✅ nextjs-webpack-stable 46 0 0
✅ nitro-stable 42 0 4
✅ nuxt-stable 42 0 4
✅ sveltekit-stable 42 0 4
✅ vite-stable 42 0 4
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 42 0 4
✅ express-stable 42 0 4
✅ fastify-stable 42 0 4
✅ hono-stable 42 0 4
✅ nextjs-turbopack-stable 46 0 0
✅ nextjs-webpack-stable 46 0 0
✅ nitro-stable 42 0 4
✅ nuxt-stable 42 0 4
✅ sveltekit-stable 42 0 4
✅ vite-stable 42 0 4
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 46 0 0
❌ 🌍 Community Worlds
App Passed Failed Skipped
✅ mongodb-dev 3 0 0
❌ mongodb 5 41 0
✅ redis-dev 3 0 0
❌ redis 5 41 0
✅ starter-dev 3 0 0
❌ starter 4 42 0
✅ turso-dev 3 0 0
❌ turso 5 41 0
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 42 0 4
✅ e2e-local-postgres-nest-stable 42 0 4
✅ e2e-local-prod-nest-stable 42 0 4

📋 View full workflow run

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Jan 27, 2026

Copy link
Copy Markdown
Contributor

@vercel vercel Bot left a comment

Choose a reason for hiding this comment

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

Additional Suggestion:

Step bundle does not include discoveredSerdeFiles, breaking cross-context class deserialization for Workflow → Step boundaries

Fix on Vercel

@TooTallNate TooTallNate marked this pull request as ready for review January 30, 2026 09:08
@TooTallNate TooTallNate force-pushed the 01-27-ensure_class_serialization___deserialization_only_happens_in_the_proper_global_context branch from 80a9195 to b0a69ea Compare January 30, 2026 09:13
@TooTallNate TooTallNate force-pushed the 01-27-add_discovered_serializable_classes_in_all_context_modes branch from 2ad5621 to ccc981c Compare January 30, 2026 09:13
Copy link
Copy Markdown
Contributor

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 adds automatic cross-context class registration for serializable classes, enabling seamless serialization/deserialization across client, workflow, and step execution boundaries. The build system now automatically discovers files containing custom serialization patterns and includes them in all bundle contexts without manual configuration.

Changes:

  • Added discovery and tracking of serializable files in the esbuild plugin
  • Modified base-builder.ts to include serde files in step, workflow, and client bundles for cross-context registration
  • Added comprehensive test workflow and model classes (Vector) demonstrating cross-context serialization
  • Updated documentation to explain the cross-context class registration feature

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
packages/builders/src/discover-entries-esbuild-plugin.ts Tracks discovered serde files separately instead of treating them as step files
packages/builders/src/base-builder.ts Includes serde files in all three bundle contexts (step, workflow, client) with appropriate filtering
workbench/example/workflows/serde-models.ts Defines Vector class with custom serialization for testing
workbench/example/workflows/serde-steps.ts Implements step functions that use Vector for cross-context testing
workbench/example/workflows/99_e2e.ts Adds crossContextSerdeWorkflow to test the feature
workbench/sveltekit/src/workflows/serde-*.ts Reference files for serde models and steps (needs fixing)
workbench/nitro-v3/workflows/serde-*.ts Reference files for serde models and steps (needs fixing)
workbench/nextjs-webpack/workflows/serde-*.ts Reference files for serde models and steps (needs fixing)
workbench/nextjs-turbopack/workflows/serde-*.ts Reference files for serde models and steps (needs fixing)
packages/core/e2e/e2e.test.ts Adds comprehensive e2e test for cross-context serialization
packages/swc-plugin-workflow/spec.md Documents the cross-context class registration feature
.changeset/khaki-breads-wave.md Changelog entry for the feature

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -0,0 +1 @@
../../example/workflows/serde-models.ts No newline at end of file
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

This file appears to contain only a path string rather than valid TypeScript code. Based on the codebase convention (e.g., helpers.ts is duplicated across workbench directories), this should either be a proper TypeScript re-export statement like export * from '../../example/workflows/serde-models.js'; or a full copy of the serde-models.ts file from the example directory. A file containing just a path string will cause build/import errors.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1 @@
../../example/workflows/serde-models.ts No newline at end of file
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

This file appears to contain only a path string rather than valid TypeScript code. Based on the codebase convention (e.g., helpers.ts is duplicated across workbench directories), this should either be a proper TypeScript re-export statement like export * from '../../example/workflows/serde-models.js'; or a full copy of the serde-models.ts file from the example directory. A file containing just a path string will cause build/import errors.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1 @@
../../example/workflows/serde-steps.ts No newline at end of file
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

This file appears to contain only a path string rather than valid TypeScript code. Based on the codebase convention (e.g., helpers.ts is duplicated across workbench directories), this should either be a proper TypeScript re-export statement like export * from '../../example/workflows/serde-steps.js'; or a full copy of the serde-steps.ts file from the example directory. A file containing just a path string will cause build/import errors.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1 @@
../../example/workflows/serde-models.ts No newline at end of file
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

This file appears to contain only a path string rather than valid TypeScript code. Based on the codebase convention (e.g., helpers.ts is duplicated across workbench directories), this should either be a proper TypeScript re-export statement like export * from '../../example/workflows/serde-models.js'; or a full copy of the serde-models.ts file from the example directory. A file containing just a path string will cause build/import errors.

Copilot uses AI. Check for mistakes.
Comment on lines +320 to +335
const createImport = (file: string) => {
// Normalize both paths to forward slashes before calling relative()
// This is critical on Windows where relative() can produce unexpected results with mixed path formats
const normalizedWorkingDir = this.config.workingDir.replace(/\\/g, '/');
const normalizedFile = file.replace(/\\/g, '/');
// Calculate relative path from working directory to the file
let relativePath = relative(normalizedWorkingDir, normalizedFile).replace(
/\\/g,
'/'
);
// Ensure relative paths start with ./ so esbuild resolves them correctly
if (!relativePath.startsWith('.')) {
relativePath = `./${relativePath}`;
}
return `import '${relativePath}';`;
};
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

The createImport helper function is duplicated three times in this file (here at lines 320-335, at lines 503-518 for workflow bundle, and at lines 746-756 for client bundle). Consider extracting this into a private class method to improve maintainability and ensure consistency across all three bundle contexts. This would make the code DRY and easier to maintain if the path normalization logic needs to be updated in the future.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1 @@
../../../example/workflows/serde-steps.ts No newline at end of file
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

This file appears to contain only a path string rather than valid TypeScript code. Based on the codebase convention (e.g., helpers.ts is duplicated across workbench directories), this should either be a proper TypeScript re-export statement like export * from '../../../example/workflows/serde-steps.js'; or a full copy of the serde-steps.ts file from the example directory. A file containing just a path string will cause build/import errors.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1 @@
../../example/workflows/serde-steps.ts No newline at end of file
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

This file appears to contain only a path string rather than valid TypeScript code. Based on the codebase convention (e.g., helpers.ts is duplicated across workbench directories), this should either be a proper TypeScript re-export statement like export * from '../../example/workflows/serde-steps.js'; or a full copy of the serde-steps.ts file from the example directory. A file containing just a path string will cause build/import errors.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1 @@
../../example/workflows/serde-steps.ts No newline at end of file
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

This file appears to contain only a path string rather than valid TypeScript code. Based on the codebase convention (e.g., helpers.ts is duplicated across workbench directories), this should either be a proper TypeScript re-export statement like export * from '../../example/workflows/serde-steps.js'; or a full copy of the serde-steps.ts file from the example directory. A file containing just a path string will cause build/import errors.

Copilot uses AI. Check for mistakes.
Comment on lines 323 to +350
const entryContent = `
// Built in steps
import '${builtInSteps}';
// User steps
${imports}
${stepImports}
// Serde files for cross-context class registration
${serdeImports}
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

The entry content generation here always includes the "Serde files for cross-context class registration" comment even when serdeImports is empty (when serdeOnlyFiles is empty). For consistency with the workflow bundle implementation (lines 528-530), consider using a conditional approach to only include the comment when there are actual serde imports.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1 @@
../../../example/workflows/serde-models.ts No newline at end of file
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

This file appears to contain only a path string rather than valid TypeScript code. Based on the codebase convention (e.g., helpers.ts is duplicated across workbench directories), this should either be a proper TypeScript re-export statement like export * from '../../../example/workflows/serde-models.js'; or a full copy of the serde-models.ts file from the example directory. A file containing just a path string will cause build/import errors.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member Author

TooTallNate commented Feb 3, 2026

Merge activity

All classes that are Workflow serializable need to be registered and available in all context modes (client, workflow, step).
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 3, 2026

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 0.043s (+0.9%) 1.008s (~) 0.965s 10 1.00x
🐘 Postgres Express 0.300s (+31.0% 🔺) 1.015s (~) 0.714s 10 6.92x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 0.688s (+17.6% 🔺) 1.552s (~) 0.864s 10 1.00x

🔍 Observability: Express

workflow with 1 step

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 1.117s (~) 2.009s (~) 0.892s 10 1.00x
🐘 Postgres Express 2.143s (-5.2% 🟢) 3.015s (~) 0.872s 10 1.92x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.719s (-7.3% 🟢) 3.647s (-4.6%) 0.928s 10 1.00x

🔍 Observability: Express

workflow with 10 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 10.851s (~) 11.017s (~) 0.166s 5 1.00x
🐘 Postgres Express 20.483s (+0.5%) 21.029s (~) 0.546s 5 1.89x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 22.691s (-2.5%) 23.271s (-2.4%) 0.580s 5 1.00x

🔍 Observability: Express

Promise.all with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 5.084s (-1.4%) 6.096s (-1.1%) 1.012s 5 1.00x
🐘 Postgres Express 28.372s (-0.6%) 29.149s (~) 0.777s 2 5.58x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 3.232s (-12.3% 🟢) 4.077s (-9.7% 🟢) 0.845s 8 1.00x

🔍 Observability: Express

Promise.all with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 5.231s (-1.2%) 6.232s (-0.9%) 1.001s 5 1.00x
🐘 Postgres Express 33.923s (+2.4%) 34.335s (+3.5%) 0.412s 1 6.48x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 3.122s (~) 3.685s (-1.0%) 0.563s 9 1.00x

🔍 Observability: Express

Promise.race with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 5.366s (~) 6.341s (~) 0.976s 5 1.00x
🐘 Postgres Express 28.939s (-17.1% 🟢) 29.654s (-15.8% 🟢) 0.714s 2 5.39x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 3.045s (-5.7% 🟢) 3.636s (-11.1% 🟢) 0.591s 9 1.00x

🔍 Observability: Express

Promise.race with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 5.575s (+1.9%) 6.546s (+1.6%) 0.971s 5 1.00x
🐘 Postgres Express 31.468s (-3.9%) 32.083s (-3.0%) 0.615s 1 5.64x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 3.397s (-25.3% 🟢) 4.011s (-25.3% 🟢) 0.614s 8 1.00x

🔍 Observability: Express

Stream Benchmarks (includes TTFB metrics)
workflow with stream

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 0.189s (+0.8%) 0.994s (~) 0.016s (+9.4% 🔺) 1.025s (~) 0.837s 10 1.00x
🐘 Postgres Express 2.298s (+7.2% 🔺) 2.744s (-5.4% 🟢) 0.000s (+100.0% 🔺) 3.014s (~) 0.716s 10 12.19x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.930s (-4.0%) 3.191s (-1.0%) 0.730s (-15.5% 🟢) 4.430s (-4.9%) 1.501s 10 1.00x

🔍 Observability: Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World 🥇 Fastest Framework Wins
💻 Local Express 8/8
🐘 Postgres Express 8/8
▲ Vercel Express 8/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework 🥇 Fastest World Wins
Express 💻 Local 4/8
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

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