Allow synchronous functions to use "use step" directive - #1633

Merged
TooTallNate merged 11 commits into
mainfrom
allow-sync-step-functions
Apr 9, 2026
Merged

Allow synchronous functions to use "use step" directive#1633
TooTallNate merged 11 commits into
mainfrom
allow-sync-step-functions

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

Summary

  • Lifts the async function restriction from "use step" in both the SWC compiler plugin and the TypeScript language service plugin
  • Synchronous functions can now use "use step" to strip their Node.js-dependent code from the workflow VM bundle
  • The async restriction is preserved for "use workflow" functions

Motivation

This enables using "use step" as a code-stripping mechanism for synchronous methods (e.g. getReadable() on the Run class) that use Node.js APIs not available in the workflow VM. Previously, "use step" required the function to be async, which was an artificial restriction for this use case.

Changed packages

  • @workflow/swc-plugin — Removed async guards from all step function code paths; updated should_transform_function; updated InvalidExport validation for module-level "use step" files; added sync-step fixture test; cleaned up error test fixtures
  • @workflow/typescript-plugin — Removed error 9002 (sync step function diagnostic); updated tests
  • Updated spec.md error documentation

Test plan

  • 196 Rust SWC plugin tests pass (22 unit + 24 error + 150 fixture, including new sync-step fixture)
  • 95 TypeScript plugin tests pass

…/private
The SWC compiler plugin no longer generates import statements. All step
function registrations and closure variable access are now self-contained
inline IIFEs with zero module dependencies:
- Step registration uses an IIFE that writes to
globalThis[Symbol.for('@workflow/core//registeredSteps')]
- Closure variable access uses an IIFE that reads from
globalThis[Symbol.for('WORKFLOW_STEP_CONTEXT_STORAGE')]
- Registrations are placed immediately after each function definition
instead of being batched at the bottom of the file
This enables 3rd-party node_modules packages to define step functions
without needing the 'workflow' package available at runtime.
Also removes the @workflow/core/private and workflow/internal/private
public subpath exports since they are no longer referenced by generated
code.
Lift the async function restriction from "use step" in both the SWC
compiler plugin and the TypeScript language service plugin. This enables
using "use step" as a mechanism to strip Node.js-dependent code from
the workflow VM bundle without requiring the function to be async.
The async restriction is preserved for "use workflow" functions.
- SWC plugin: removed async guards from all step function code paths,
updated should_transform_function, updated InvalidExport validation
- TypeScript plugin: removed error 9002 for sync step functions
- Added sync-step fixture test, cleaned up error test fixtures
- Updated spec.md error documentation
CopilotAI review requested due to automatic review settings April 7, 2026 07:45
@changeset-bot

changeset-botBot commented Apr 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e4b8d29

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

This PR includes changesets to release 18 packages
NameType
@workflow/swc-pluginMinor
@workflow/typescript-pluginMinor
@workflow/astroPatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nestPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
workflowPatch
@workflow/vitePatch
@workflow/vitestPatch
@workflow/world-testingPatch
@workflow/nuxtPatch
@workflow/aiPatch
@workflow/corePatch
@workflow/web-sharedPatch

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

@TooTallNate
TooTallNate requested a review from a team as a code ownerApril 7, 2026 07:45
@vercel

vercelBot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.043s (-1.4%)1.005s (~)0.963s101.00x
🌐 RedisNext.js (Turbopack)0.054s1.005s0.951s101.27x
🐘 PostgresNitro0.058s (-8.7% 🟢)1.010s (~)0.952s101.34x
🐘 PostgresNext.js (Turbopack)0.059s1.010s0.951s101.37x
🐘 PostgresExpress0.059s (+1.0%)1.010s (~)0.950s101.38x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.228s (+9.1% 🔺)2.214s (+1.9%)1.986s101.00x
▲ VercelNitro0.249s (+6.6% 🔺)2.227s (+6.5% 🔺)1.979s101.09x
▲ VercelNext.js (Turbopack)0.747s (+225.1% 🔺)2.542s (+12.1% 🔺)1.794s103.27x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.124s2.007s0.883s101.00x
💻 LocalNitro1.127s (~)2.006s (~)0.879s101.00x
🐘 PostgresExpress1.132s (-1.0%)2.011s (~)0.878s101.01x
🐘 PostgresNext.js (Turbopack)1.139s2.009s0.870s101.01x
🐘 PostgresNitro1.147s (~)2.010s (~)0.862s101.02x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.873s (-1.7%)4.167s (+10.3% 🔺)2.294s101.00x
▲ VercelNext.js (Turbopack)1.940s (-5.8% 🟢)3.298s (-13.7% 🟢)1.358s101.04x
▲ VercelExpress2.322s (+25.7% 🔺)4.020s (+9.9% 🔺)1.697s101.24x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)10.794s11.025s0.231s31.00x
🐘 PostgresExpress10.866s (~)11.023s (~)0.157s31.01x
🐘 PostgresNext.js (Turbopack)10.905s11.356s0.452s31.01x
🐘 PostgresNitro10.925s (~)11.024s (~)0.099s31.01x
💻 LocalNitro10.926s (~)11.022s (~)0.096s31.01x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.403s (-13.8% 🟢)18.223s (-13.1% 🟢)1.820s21.00x
▲ VercelNext.js (Turbopack)16.427s (-4.6%)17.753s (-8.6% 🟢)1.326s21.00x
▲ VercelNitro17.053s (~)18.660s (-5.5% 🟢)1.607s21.04x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)14.456s15.028s0.573s41.00x
🐘 PostgresNext.js (Turbopack)14.512s15.028s0.515s41.00x
🐘 PostgresExpress14.546s (~)15.023s (~)0.477s41.01x
🐘 PostgresNitro14.685s (+0.5%)15.027s (~)0.342s41.02x
💻 LocalNitro14.956s (~)15.029s (~)0.073s41.03x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro29.351s (-11.0% 🟢)31.401s (-10.0% 🟢)2.050s21.00x
▲ VercelNext.js (Turbopack)29.913s (-11.6% 🟢)31.199s (-13.0% 🟢)1.287s21.02x
▲ VercelExpress30.786s (-4.0%)32.534s (-2.5%)1.748s21.05x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)13.592s14.027s0.435s71.00x
🐘 PostgresNext.js (Turbopack)13.825s14.166s0.340s71.02x
🐘 PostgresExpress13.975s (-1.3%)14.448s (-3.8%)0.473s71.03x
🐘 PostgresNitro14.252s (+0.8%)15.024s (+1.9%)0.772s61.05x
💻 LocalNitro16.674s (+0.7%)17.031s (~)0.357s61.23x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express51.717s (-74.9% 🟢)53.900s (-74.1% 🟢)2.183s21.00x
▲ VercelNitro53.533s (-74.1% 🟢)55.369s (-73.5% 🟢)1.835s21.04x
▲ VercelNext.js (Turbopack)54.318s (-10.4% 🟢)55.810s (-10.8% 🟢)1.492s21.05x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)1.230s2.010s0.780s151.00x
🐘 PostgresExpress1.259s (~)2.009s (~)0.750s151.02x
🐘 PostgresNitro1.272s (-1.4%)2.010s (~)0.738s151.03x
🌐 RedisNext.js (Turbopack)1.323s2.007s0.684s151.08x
💻 LocalNitro1.513s (-1.6%)2.006s (~)0.494s151.23x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.056s (-25.2% 🟢)3.711s (-16.8% 🟢)1.655s91.00x
▲ VercelNext.js (Turbopack)2.542s (+3.4%)3.815s (-15.8% 🟢)1.273s81.24x
▲ VercelNitro2.624s (+0.6%)4.290s (-0.8%)1.666s71.28x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.312s (-2.8%)3.007s (~)0.696s101.00x
🐘 PostgresNitro2.327s (-1.1%)3.008s (~)0.681s101.01x
🐘 PostgresNext.js (Turbopack)2.466s3.010s0.544s101.07x
🌐 RedisNext.js (Turbopack)2.582s3.008s0.426s101.12x
💻 LocalNitro3.000s (+2.5%)3.565s (+14.7% 🔺)0.565s91.30x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.381s (-30.6% 🟢)4.033s (-19.9% 🟢)1.651s81.00x
▲ VercelExpress2.543s (-16.8% 🟢)3.976s (-15.0% 🟢)1.433s81.07x
▲ VercelNext.js (Turbopack)2.993s (+5.3% 🔺)4.436s (-7.3% 🟢)1.443s71.26x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.486s (~)4.011s (~)0.525s81.00x
🐘 PostgresNitro3.491s (+0.8%)4.010s (~)0.519s81.00x
🐘 PostgresNext.js (Turbopack)3.667s4.012s0.345s81.05x
🌐 RedisNext.js (Turbopack)4.133s4.869s0.736s71.19x
💻 LocalNitro8.373s (+2.3%)9.023s (~)0.650s42.40x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.838s (-13.4% 🟢)4.503s (-8.4% 🟢)1.665s71.00x
▲ VercelExpress3.249s (+6.1% 🔺)4.654s (-3.1%)1.404s71.15x
▲ VercelNext.js (Turbopack)4.099s (+0.9%)5.650s (-10.0% 🟢)1.551s61.44x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)1.219s2.010s0.791s151.00x
🐘 PostgresNitro1.268s (+0.8%)2.009s (~)0.740s151.04x
🐘 PostgresExpress1.275s (+0.8%)2.007s (~)0.732s151.05x
🌐 RedisNext.js (Turbopack)1.365s2.006s0.641s151.12x
💻 LocalNitro1.543s (+0.8%)2.006s (~)0.463s151.27x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.086s (-8.5% 🟢)3.837s (-3.2%)1.751s81.00x
▲ VercelNitro2.154s (-6.1% 🟢)3.859s (-2.5%)1.705s81.03x
▲ VercelNext.js (Turbopack)2.260s (-3.5%)3.500s (-16.1% 🟢)1.240s91.08x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.337s (-0.6%)3.009s (~)0.672s101.00x
🐘 PostgresNitro2.354s (-0.8%)3.009s (~)0.654s101.01x
🐘 PostgresNext.js (Turbopack)2.377s3.008s0.631s101.02x
🌐 RedisNext.js (Turbopack)2.555s3.008s0.453s101.09x
💻 LocalNitro3.050s (-1.6%)4.010s (+3.2%)0.959s81.31x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.435s (-99.2% 🟢)3.952s (-98.7% 🟢)1.517s81.00x
▲ VercelExpress2.492s (-96.8% 🟢)3.849s (-95.2% 🟢)1.357s81.02x
▲ VercelNext.js (Turbopack)2.658s (-6.0% 🟢)4.030s (-15.1% 🟢)1.372s81.09x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.471s (~)4.010s (~)0.539s81.00x
🐘 PostgresExpress3.475s (~)4.010s (~)0.535s81.00x
🐘 PostgresNext.js (Turbopack)3.649s4.012s0.363s81.05x
🌐 RedisNext.js (Turbopack)4.120s4.582s0.462s71.19x
💻 LocalNitro8.769s (-2.2%)9.021s (-2.7%)0.251s42.53x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.123s (-29.9% 🟢)4.760s (-20.8% 🟢)1.637s71.00x
▲ VercelNitro3.257s (+8.6% 🔺)4.834s (+3.1%)1.576s71.04x
▲ VercelNext.js (Turbopack)3.527s (-1.8%)4.910s (-8.0% 🟢)1.384s71.13x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.699s1.004s0.305s601.00x
🐘 PostgresNext.js (Turbopack)0.769s1.006s0.236s601.10x
🐘 PostgresExpress0.808s (-5.2% 🟢)1.023s (+1.7%)0.215s591.16x
🐘 PostgresNitro0.860s (+4.4%)1.023s (+1.7%)0.163s591.23x
💻 LocalNitro0.978s (-0.7%)1.057s (-10.5% 🟢)0.079s571.40x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro8.679s (-4.7%)10.740s (-4.0%)2.061s61.00x
▲ VercelNext.js (Turbopack)9.102s (-12.0% 🟢)10.751s (-13.7% 🟢)1.649s61.05x
▲ VercelExpress9.131s (-11.4% 🟢)10.745s (-10.6% 🟢)1.614s61.05x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.676s2.006s0.329s451.00x
🐘 PostgresNext.js (Turbopack)1.872s2.075s0.203s441.12x
🐘 PostgresExpress1.952s (-5.1% 🟢)2.174s (-24.6% 🟢)0.222s421.16x
🐘 PostgresNitro2.093s (+6.2% 🔺)2.945s (+32.3% 🔺)0.852s311.25x
💻 LocalNitro3.017s (~)3.586s (+1.1%)0.569s261.80x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express27.604s (-1.7%)29.418s (-2.2%)1.814s41.00x
▲ VercelNitro28.084s (-3.0%)30.146s (-1.7%)2.062s31.02x
▲ VercelNext.js (Turbopack)28.799s (-6.5% 🟢)30.803s (-6.4% 🟢)2.004s31.04x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)3.383s4.008s0.625s301.00x
🐘 PostgresNext.js (Turbopack)3.737s4.009s0.273s301.10x
🐘 PostgresExpress3.949s (-3.0%)4.147s (-13.8% 🟢)0.197s291.17x
🐘 PostgresNitro4.252s (+2.8%)4.972s (+1.7%)0.720s251.26x
💻 LocalNitro9.279s (+1.0%)9.942s (~)0.663s132.74x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express69.222s (-8.7% 🟢)70.943s (-8.6% 🟢)1.721s21.00x
▲ VercelNitro70.767s (-3.2%)73.163s (-2.3%)2.396s21.02x
▲ VercelNext.js (Turbopack)74.888s (-10.2% 🟢)76.096s (-11.0% 🟢)1.208s21.08x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.252s1.007s0.755s601.00x
🐘 PostgresExpress0.283s (+1.4%)1.007s (~)0.724s601.12x
🐘 PostgresNitro0.286s (~)1.007s (~)0.721s601.13x
🌐 RedisNext.js (Turbopack)0.294s1.004s0.710s601.16x
💻 LocalNitro0.603s (+1.6%)1.004s (~)0.401s602.39x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.456s (-23.7% 🟢)3.016s (-15.2% 🟢)1.560s211.00x
▲ VercelNitro1.477s (-17.8% 🟢)2.985s (-16.2% 🟢)1.507s211.01x
▲ VercelNext.js (Turbopack)1.621s (-2.4%)2.966s (-8.3% 🟢)1.345s211.11x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.467s1.006s0.539s901.00x
🐘 PostgresExpress0.488s (-1.3%)1.007s (~)0.519s901.04x
🐘 PostgresNitro0.501s (~)1.007s (~)0.506s901.07x
🌐 RedisNext.js (Turbopack)1.234s2.006s0.772s452.64x
💻 LocalNitro2.785s (+8.7% 🔺)3.183s (+5.8% 🔺)0.397s295.96x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.526s (-3.3%)4.332s (~)1.807s211.00x
▲ VercelNitro2.686s (+8.3% 🔺)4.386s (+5.1% 🔺)1.701s211.06x
▲ VercelNext.js (Turbopack)3.397s (-4.3%)4.947s (-3.9%)1.550s191.34x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.760s1.014s0.255s1191.00x
🐘 PostgresExpress0.771s (-2.4%)1.007s (~)0.236s1201.01x
🐘 PostgresNitro0.803s (-6.9% 🟢)1.008s (-5.2% 🟢)0.205s1201.06x
🌐 RedisNext.js (Turbopack)2.816s3.032s0.217s403.71x
💻 LocalNitro11.426s (+3.3%)12.031s (+3.1%)0.605s1015.04x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express6.156s (-13.3% 🟢)7.581s (-14.2% 🟢)1.425s161.00x
▲ VercelNitro6.524s (-5.3% 🟢)8.084s (-5.9% 🟢)1.560s151.06x
▲ VercelNext.js (Turbopack)32.897s (+425.9% 🔺)34.290s (+334.1% 🔺)1.393s125.34x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.186s1.001s0.002s1.008s0.822s101.00x
🐘 PostgresExpress0.202s (-2.1%)0.994s (-0.5%)0.002s (+23.1% 🔺)1.010s (~)0.809s101.08x
🐘 PostgresNext.js (Turbopack)0.206s1.001s0.028s1.037s0.832s101.10x
💻 LocalNitro0.206s (+1.2%)1.004s (~)0.013s (+2.5%)1.019s (~)0.812s101.11x
🐘 PostgresNitro0.209s (+3.5%)1.000s (~)0.001s (-7.7% 🟢)1.010s (~)0.801s101.12x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.415s (-40.6% 🟢)2.521s (-33.7% 🟢)0.694s (+87.6% 🔺)3.696s (-20.5% 🟢)2.281s101.00x
▲ VercelNext.js (Turbopack)1.443s (-10.1% 🟢)2.663s (-15.5% 🟢)0.571s (+82.2% 🔺)3.613s (-8.6% 🟢)2.170s101.02x
▲ VercelExpress1.509s (-13.0% 🟢)2.868s (-11.8% 🟢)0.552s (+59.6% 🔺)3.833s (-4.8%)2.324s101.07x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.481s1.001s0.003s1.011s0.530s601.00x
🐘 PostgresNext.js (Turbopack)0.589s1.009s0.005s1.023s0.434s591.22x
🐘 PostgresExpress0.596s (-4.6%)1.005s (~)0.004s (-8.6% 🟢)1.021s (~)0.425s591.24x
🐘 PostgresNitro0.647s (+4.0%)1.005s (~)0.005s (+14.5% 🔺)1.024s (~)0.377s591.35x
💻 LocalNitro0.828s (+13.5% 🔺)1.012s (~)0.010s (+1.1%)1.116s (+9.1% 🔺)0.288s541.72x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.990s (+5.4% 🔺)5.204s (-1.5%)0.315s (-18.0% 🟢)5.965s (-1.8%)1.974s111.00x
▲ VercelNext.js (Turbopack)4.125s (-2.8%)5.578s (-3.6%)0.185s (-52.3% 🟢)6.124s (-7.7% 🟢)2.000s101.03x
▲ VercelExpress5.305s6.929s0.393s7.734s2.429s81.33x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.912s1.035s0.000s1.039s0.127s581.00x
🐘 PostgresNext.js (Turbopack)0.946s1.154s0.000s1.171s0.225s521.04x
🐘 PostgresExpress0.977s (+0.6%)1.243s (+6.1% 🔺)0.000s (+59.4% 🔺)1.257s (+5.1% 🔺)0.281s481.07x
🐘 PostgresNitro0.991s (+3.6%)1.214s (+5.7% 🔺)0.000s (-65.3% 🟢)1.228s (+5.7% 🔺)0.237s501.09x
💻 LocalNitro1.244s (~)2.021s (~)0.000s (+50.0% 🔺)2.023s (~)0.779s301.36x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.787s (+7.0% 🔺)4.205s (+13.8% 🔺)0.000s (-85.6% 🟢)4.643s (+12.6% 🔺)1.855s131.00x
▲ VercelNitro2.823s (-90.9% 🟢)4.110s (-87.2% 🟢)0.001s (+Infinity% 🔺)4.619s (-85.9% 🟢)1.796s131.01x
▲ VercelNext.js (Turbopack)3.007s (-9.8% 🟢)4.399s (-5.4% 🟢)0.000s (-100.0% 🟢)4.764s (-6.5% 🟢)1.757s131.08x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.666s2.036s0.000s2.039s0.373s301.00x
🐘 PostgresExpress1.747s (-7.0% 🟢)2.140s (-6.7% 🟢)0.000s (+Infinity% 🔺)2.152s (-6.7% 🟢)0.405s281.05x
🐘 PostgresNitro1.791s (~)2.134s (~)0.000s (-3.4%)2.147s (~)0.356s291.07x
🐘 PostgresNext.js (Turbopack)1.805s2.146s0.000s2.192s0.387s281.08x
💻 LocalNitro3.632s (+2.5%)4.232s (+4.9%)0.001s (~)4.235s (+4.9%)0.604s152.18x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.867s (+2.6%)5.104s (+4.7%)0.001s (+900.0% 🔺)5.538s (+3.8%)1.671s121.00x
▲ VercelNitro5.456s (+32.2% 🔺)6.612s (+23.8% 🔺)0.000s (+144.4% 🔺)7.089s (+22.2% 🔺)1.633s91.41x
▲ VercelNext.js (Turbopack)5.462s (+36.0% 🔺)6.548s (+22.8% 🔺)0.000s (NaN%)6.966s (+19.3% 🔺)1.504s91.41x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro21/21
🐘 PostgresNext.js (Turbopack)12/21
▲ VercelExpress13/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres19/21
Next.js (Turbopack)🌐 Redis12/21
Nitro🐘 Postgres16/21
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
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@github-actions

github-actionsBot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production890067957
✅ 💻 Local Development86601781044
✅ 📦 Local Production86601781044
✅ 🐘 Local Postgres86601781044
✅ 🪟 Windows790887
❌ 🌍 Community Worlds1366524225
✅ 📋 Other219042261
Total3922656754662

❌ Failed Tests

🌍 Community Worlds (65 failed)

mongodb (4 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNQT12HK8X4N86DEASFAYTC3
  • webhookWorkflow | wrun_01KNQT1B8CE6EZ1PEED6RR64J3
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNQT90QM3AQHKNFTTC3T4RSX
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNQTFBW8QY7AK7XNWV2MJH0N

redis (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNQT12HK8X4N86DEASFAYTC3
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNQT90QM3AQHKNFTTC3T4RSX
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNQTFBW8QY7AK7XNWV2MJH0N

turso (58 failed):

  • addTenWorkflow | wrun_01KNQSZWK13GCCQH5P3FH07BKA
  • addTenWorkflow | wrun_01KNQSZWK13GCCQH5P3FH07BKA
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KNQT0FT2RNF0HGMMDGWWFG78
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KNQT04E56N7KQ56RT376TDRY
  • promiseRaceWorkflow | wrun_01KNQT08Y6VPWJ6HA9XB3ACDVM
  • promiseAnyWorkflow | wrun_01KNQT0B3AWW74S02RSY96DFDY
  • importedStepOnlyWorkflow | wrun_01KNQT0VCPFWJEJR9NRCGH1YE1
  • hookWorkflow | wrun_01KNQT0Q25ZF0230NTFW8TT8FV
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNQT12HK8X4N86DEASFAYTC3
  • webhookWorkflow | wrun_01KNQT1B8CE6EZ1PEED6RR64J3
  • sleepingWorkflow | wrun_01KNQT1H85476RXPSMD074B2X0
  • parallelSleepWorkflow | wrun_01KNQT1X4V7GJPN458S4DTNQHZ
  • nullByteWorkflow | wrun_01KNQT20D17XGS9YA969RSNBCX
  • workflowAndStepMetadataWorkflow | wrun_01KNQT22GYCEM9QQ63EYRWYNYJ
  • fetchWorkflow | wrun_01KNQT4QEY4E6RG3M8NABTD1WT
  • promiseRaceStressTestWorkflow | wrun_01KNQT4ST3XHH8WE6DE83AQQ2C
  • 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()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KNQT8C7D0W9WVRY9DB6M4R6F
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNQT90QM3AQHKNFTTC3T4RSX
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KNQT9N3Q09Z1RWEW56XMCHA3
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KNQTA95C42ANFAA89B5TYKMB
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KNQTAJX9XKZVZ5CE2TFDDGRD
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KNQTARF9TMA086QP6MMNFMPD
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KNQTATM6MNKY1EC8MNQ9Z5RQ
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KNQTBAFJVXA1W3K58JC3MHE3
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KNQTBG2A2R586XK4ANBP75KQ
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KNQTBPRJW3W53CRJ9A43SX2T
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KNQTBXD7ED0HM67PD7H4ER2X
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KNQTC2Z4MT98F21MRWEJ9DSB
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KNQTC9NDWM216M5JCAQBM90C
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KNQTCH1WM9Z1WVTTBGMPMBRN
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KNQTCXME3Y7DX14MBYE93H4D
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KNQTD5CV0BR9DZAG478KNZWX
  • cancelRun - cancelling a running workflow | wrun_01KNQTDC6Y4PD7004JSH4NQBYC
  • cancelRun via CLI - cancelling a running workflow | wrun_01KNQTDNJ0Z5XAKHDKSY4EEN56
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KNQTE1PJA6ZM5HN105P89GME
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KNQTEPC3ZQSTTXA0PZS0GAP7
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KNQTF0MXCVDK1YB1PQDYC8YY
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KNQTF7DQSQERG48JV5RK0R6S
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KNQTF9SAC38S1HRGBERBMHNE
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNQTFBW8QY7AK7XNWV2MJH0N
  • getterStepWorkflow - getter functions with "use step" directive | wrun_01KNQTFF4388KKRERJQVTNB56C

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro8007
✅ example8007
✅ express8007
✅ fastify8007
✅ hono8007
✅ nextjs-turbopack8502
✅ nextjs-webpack8502
✅ nitro8007
✅ nuxt8007
✅ sveltekit8007
✅ vite8007
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable73014
✅ express-stable73014
✅ fastify-stable73014
✅ hono-stable73014
✅ nextjs-turbopack-canary62025
✅ nextjs-turbopack-stable7908
✅ nextjs-webpack-canary62025
✅ nextjs-webpack-stable7908
✅ nitro-stable73014
✅ nuxt-stable73014
✅ sveltekit-stable73014
✅ vite-stable73014
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable73014
✅ express-stable73014
✅ fastify-stable73014
✅ hono-stable73014
✅ nextjs-turbopack-canary62025
✅ nextjs-turbopack-stable7908
✅ nextjs-webpack-canary62025
✅ nextjs-webpack-stable7908
✅ nitro-stable73014
✅ nuxt-stable73014
✅ sveltekit-stable73014
✅ vite-stable73014
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable73014
✅ express-stable73014
✅ fastify-stable73014
✅ hono-stable73014
✅ nextjs-turbopack-canary62025
✅ nextjs-turbopack-stable7908
✅ nextjs-webpack-canary62025
✅ nextjs-webpack-stable7908
✅ nitro-stable73014
✅ nuxt-stable73014
✅ sveltekit-stable73014
✅ vite-stable73014
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack7908
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev500
❌ mongodb5848
✅ redis-dev500
❌ redis5938
✅ turso-dev500
❌ turso4588
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable73014
✅ e2e-local-postgres-nest-stable73014
✅ e2e-local-prod-nest-stable73014

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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 removes the “step functions must be async” restriction across the SWC transform and the TypeScript language service plugin, allowing synchronous functions to use the "use step" directive as a code-stripping mechanism while preserving the async requirement for "use workflow".

Changes:

  • TypeScript plugin: removes diagnostic error 9002 for synchronous step functions and updates tests accordingly.
  • SWC plugin: lifts async-only checks from "use step" transformation paths and adds a new sync-step fixture to verify output across workflow/step/client modes.
  • Documentation + release: updates SWC plugin spec validation table and adds a changeset for patch releases.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.

Show a summary per file
FileDescription
packages/typescript-plugin/src/diagnostics.tsRemoves async validation for "use step" functions in custom diagnostics.
packages/typescript-plugin/src/diagnostics.test.tsUpdates tests to assert no error 9002 for sync step functions.
packages/swc-plugin-workflow/transform/tests/fixture/sync-step/input.jsAdds fixture input covering sync function/arrow/object-method step directives.
packages/swc-plugin-workflow/transform/tests/fixture/sync-step/output-workflow.jsExpected workflow-mode output for sync-step fixture (initializer exports).
packages/swc-plugin-workflow/transform/tests/fixture/sync-step/output-step.jsExpected step-mode output for sync-step fixture (registration + preserved bodies).
packages/swc-plugin-workflow/transform/tests/fixture/sync-step/output-client.jsExpected client-mode output for sync-step fixture (stepId annotations).
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/input.jsUpdates error fixture to only cover non-async "use workflow" cases.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-workflow.jsUpdates expected workflow-mode output after removing step async restriction.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-workflow.stderrUpdates expected stderr to reflect only "use workflow" async errors.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-step.jsUpdates expected step-mode output after removing step async restriction.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-step.stderrUpdates expected stderr to reflect only "use workflow" async errors.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-client.jsUpdates expected client-mode output after removing step async restriction.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-client.stderrUpdates expected stderr to reflect only "use workflow" async errors.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/input.jsUpdates invalid-export fixture to allow sync function exports in "use step" files.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-workflow.jsExpected workflow-mode output reflecting sync function export allowance.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-workflow.stderrExpected stderr after invalid-export fixture adjustments.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-step.jsExpected step-mode output registering sync exported steps.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-step.stderrExpected stderr after invalid-export fixture adjustments.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-client.jsExpected client-mode output with stepId for sync exported steps.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-client.stderrExpected stderr after invalid-export fixture adjustments.
packages/swc-plugin-workflow/transform/src/lib.rsRemoves async guards for "use step" transformations; keeps "use workflow" async enforcement in relevant paths.
packages/swc-plugin-workflow/spec.mdUpdates validation error documentation to reflect sync "use step" allowance.
.changeset/allow-sync-step-functions.mdAdds patch changeset entries for SWC + TypeScript plugins.

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

Comment threadpackages/swc-plugin-workflow/transform/src/lib.rs Outdated
Comment threadpackages/swc-plugin-workflow/transform/src/lib.rs Outdated
…row behavior
- Remove stale 'Collect registration calls' comment from StepTransform
- Fix 'everyhwere' typo in e2e test comments
- Closure vars IIFE now throws when called outside a step function
context, matching the original __private_getClosureVars behavior
…xport message
- Remove the no-op validate_async_function method and unwrap all callers
- InvalidExport message now says 'Only functions can be exported' for
'use step' files, vs 'Only async functions' for 'use workflow' files

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI review: blocking issues found

Comment threadpackages/swc-plugin-workflow/transform/src/lib.rs Outdated
Comment threadpackages/swc-plugin-workflow/transform/src/lib.rs
Comment threadpackages/typescript-plugin/src/diagnostics.ts Outdated
Comment threadpackages/swc-plugin-workflow/spec.md Outdated
Base automatically changed from inline-step-registration to mainApril 8, 2026 23:58
…ethod async check
- Remove validate_async_function() entirely and unwrap all 8 call sites
(the function was a no-op that always returned true)
- Fix static class method handler to only check async for 'use workflow'
(was still blocking sync step functions on static methods)
- Remove no-op checkStepFunction from TypeScript plugin
- Regenerate test fixture outputs
Also bump changeset from patch to minor (new feature, not bug fix)

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 22 out of 22 changed files in this pull request and generated 4 comments.


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

Comment on lines +4057 to 4058
// Previously validated that step functions must be async. The restriction

CopilotAIApr 9, 2026

Copy link

Choose a reason for hiding this comment

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

There’s a dangling/incomplete comment here (ends mid-sentence) left over from removing the async-only validation. It should either be completed to explain the new behavior or removed to avoid confusion when maintaining this transform logic.

Suggested change
// Previously validated that step functions must be async. The restriction

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed in #1664 — removed the dangling incomplete comment entirely.

Comment on lines +6054 to +6057
// Validate exports if we have a file-level workflow directive.
// Step files allow any exports (sync or async), but workflow files
// require exported functions to be async.
if self.has_file_workflow_directive {

CopilotAIApr 9, 2026

Copy link

Choose a reason for hiding this comment

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

visit_mut_module_items no longer validates exports for module-level 'use step' files, which means non-function exports (constants/classes/re-exports) are now allowed even though they won’t be code-stripped and can easily pull Node-only code into the workflow/client bundles. Consider adding a separate validation branch for has_file_step_directive that allows sync or async functions but rejects non-function exports/re-exports, with an error message that matches that rule.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed in #1664 — added export validation for has_file_step_directive that allows sync/async function exports but rejects non-function exports (constants, classes, re-exports). Error message is "Only functions can be exported from a \"use step\" file".

Comment on lines +3 to 8
// These should all error - not functions
export const value = 42;
export function syncFunc() {
return 'not allowed';
}
export class MyClass {
method() {}
}
export * from './other';

CopilotAIApr 9, 2026

Copy link

Choose a reason for hiding this comment

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

The header comment says these exports “should all error”, but the expected stderr fixtures for this test case were removed and the outputs keep these exports. Please update the comment (and potentially relocate/rename this fixture since it no longer asserts an error) so the test intent matches the actual expected behavior.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed in #1664 — the comment is now correct again since export validation for step files has been restored. The const value, class MyClass, and export * all produce errors; the sync and async function exports pass.

"@workflow/typescript-plugin": minor
---

Allow synchronous functions to use `"use step"` directive. This enables using `"use step"` as a mechanism to strip Node.js-dependent code from the workflow VM bundle without requiring the function to be async.

CopilotAIApr 9, 2026

Copy link

Choose a reason for hiding this comment

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

The PR description mentions that packages/swc-plugin-workflow/spec.md error documentation was updated, but this PR diff doesn’t include any changes to that spec file. Please ensure the spec is updated to reflect that "use step" can be used on sync functions while "use workflow" remains async-only (and adjust any validation/export rules accordingly).

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed in #1664 — updated spec.md error table (split Non-async into workflow-only, added step export validation row) and supported function forms (added sync variants for all step function forms).

@ghostghost mentioned this pull request Apr 9, 2026
Sign up for freeto 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

@TooTallNate@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Allow synchronous functions to use "use step" directive - #1633

Merged
TooTallNate merged 11 commits into
mainfrom
allow-sync-step-functions
Apr 9, 2026
Merged

Allow synchronous functions to use "use step" directive#1633
TooTallNate merged 11 commits into
mainfrom
allow-sync-step-functions

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

Summary

  • Lifts the async function restriction from "use step" in both the SWC compiler plugin and the TypeScript language service plugin
  • Synchronous functions can now use "use step" to strip their Node.js-dependent code from the workflow VM bundle
  • The async restriction is preserved for "use workflow" functions

Motivation

This enables using "use step" as a code-stripping mechanism for synchronous methods (e.g. getReadable() on the Run class) that use Node.js APIs not available in the workflow VM. Previously, "use step" required the function to be async, which was an artificial restriction for this use case.

Changed packages

  • @workflow/swc-plugin — Removed async guards from all step function code paths; updated should_transform_function; updated InvalidExport validation for module-level "use step" files; added sync-step fixture test; cleaned up error test fixtures
  • @workflow/typescript-plugin — Removed error 9002 (sync step function diagnostic); updated tests
  • Updated spec.md error documentation

Test plan

  • 196 Rust SWC plugin tests pass (22 unit + 24 error + 150 fixture, including new sync-step fixture)
  • 95 TypeScript plugin tests pass

…/private
The SWC compiler plugin no longer generates import statements. All step
function registrations and closure variable access are now self-contained
inline IIFEs with zero module dependencies:
- Step registration uses an IIFE that writes to
globalThis[Symbol.for('@workflow/core//registeredSteps')]
- Closure variable access uses an IIFE that reads from
globalThis[Symbol.for('WORKFLOW_STEP_CONTEXT_STORAGE')]
- Registrations are placed immediately after each function definition
instead of being batched at the bottom of the file
This enables 3rd-party node_modules packages to define step functions
without needing the 'workflow' package available at runtime.
Also removes the @workflow/core/private and workflow/internal/private
public subpath exports since they are no longer referenced by generated
code.
Lift the async function restriction from "use step" in both the SWC
compiler plugin and the TypeScript language service plugin. This enables
using "use step" as a mechanism to strip Node.js-dependent code from
the workflow VM bundle without requiring the function to be async.
The async restriction is preserved for "use workflow" functions.
- SWC plugin: removed async guards from all step function code paths,
updated should_transform_function, updated InvalidExport validation
- TypeScript plugin: removed error 9002 for sync step functions
- Added sync-step fixture test, cleaned up error test fixtures
- Updated spec.md error documentation
CopilotAI review requested due to automatic review settings April 7, 2026 07:45
@changeset-bot

changeset-botBot commented Apr 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e4b8d29

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

This PR includes changesets to release 18 packages
NameType
@workflow/swc-pluginMinor
@workflow/typescript-pluginMinor
@workflow/astroPatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nestPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
workflowPatch
@workflow/vitePatch
@workflow/vitestPatch
@workflow/world-testingPatch
@workflow/nuxtPatch
@workflow/aiPatch
@workflow/corePatch
@workflow/web-sharedPatch

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

@TooTallNate
TooTallNate requested a review from a team as a code ownerApril 7, 2026 07:45
@vercel

vercelBot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.043s (-1.4%)1.005s (~)0.963s101.00x
🌐 RedisNext.js (Turbopack)0.054s1.005s0.951s101.27x
🐘 PostgresNitro0.058s (-8.7% 🟢)1.010s (~)0.952s101.34x
🐘 PostgresNext.js (Turbopack)0.059s1.010s0.951s101.37x
🐘 PostgresExpress0.059s (+1.0%)1.010s (~)0.950s101.38x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.228s (+9.1% 🔺)2.214s (+1.9%)1.986s101.00x
▲ VercelNitro0.249s (+6.6% 🔺)2.227s (+6.5% 🔺)1.979s101.09x
▲ VercelNext.js (Turbopack)0.747s (+225.1% 🔺)2.542s (+12.1% 🔺)1.794s103.27x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.124s2.007s0.883s101.00x
💻 LocalNitro1.127s (~)2.006s (~)0.879s101.00x
🐘 PostgresExpress1.132s (-1.0%)2.011s (~)0.878s101.01x
🐘 PostgresNext.js (Turbopack)1.139s2.009s0.870s101.01x
🐘 PostgresNitro1.147s (~)2.010s (~)0.862s101.02x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.873s (-1.7%)4.167s (+10.3% 🔺)2.294s101.00x
▲ VercelNext.js (Turbopack)1.940s (-5.8% 🟢)3.298s (-13.7% 🟢)1.358s101.04x
▲ VercelExpress2.322s (+25.7% 🔺)4.020s (+9.9% 🔺)1.697s101.24x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)10.794s11.025s0.231s31.00x
🐘 PostgresExpress10.866s (~)11.023s (~)0.157s31.01x
🐘 PostgresNext.js (Turbopack)10.905s11.356s0.452s31.01x
🐘 PostgresNitro10.925s (~)11.024s (~)0.099s31.01x
💻 LocalNitro10.926s (~)11.022s (~)0.096s31.01x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.403s (-13.8% 🟢)18.223s (-13.1% 🟢)1.820s21.00x
▲ VercelNext.js (Turbopack)16.427s (-4.6%)17.753s (-8.6% 🟢)1.326s21.00x
▲ VercelNitro17.053s (~)18.660s (-5.5% 🟢)1.607s21.04x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)14.456s15.028s0.573s41.00x
🐘 PostgresNext.js (Turbopack)14.512s15.028s0.515s41.00x
🐘 PostgresExpress14.546s (~)15.023s (~)0.477s41.01x
🐘 PostgresNitro14.685s (+0.5%)15.027s (~)0.342s41.02x
💻 LocalNitro14.956s (~)15.029s (~)0.073s41.03x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro29.351s (-11.0% 🟢)31.401s (-10.0% 🟢)2.050s21.00x
▲ VercelNext.js (Turbopack)29.913s (-11.6% 🟢)31.199s (-13.0% 🟢)1.287s21.02x
▲ VercelExpress30.786s (-4.0%)32.534s (-2.5%)1.748s21.05x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)13.592s14.027s0.435s71.00x
🐘 PostgresNext.js (Turbopack)13.825s14.166s0.340s71.02x
🐘 PostgresExpress13.975s (-1.3%)14.448s (-3.8%)0.473s71.03x
🐘 PostgresNitro14.252s (+0.8%)15.024s (+1.9%)0.772s61.05x
💻 LocalNitro16.674s (+0.7%)17.031s (~)0.357s61.23x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express51.717s (-74.9% 🟢)53.900s (-74.1% 🟢)2.183s21.00x
▲ VercelNitro53.533s (-74.1% 🟢)55.369s (-73.5% 🟢)1.835s21.04x
▲ VercelNext.js (Turbopack)54.318s (-10.4% 🟢)55.810s (-10.8% 🟢)1.492s21.05x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)1.230s2.010s0.780s151.00x
🐘 PostgresExpress1.259s (~)2.009s (~)0.750s151.02x
🐘 PostgresNitro1.272s (-1.4%)2.010s (~)0.738s151.03x
🌐 RedisNext.js (Turbopack)1.323s2.007s0.684s151.08x
💻 LocalNitro1.513s (-1.6%)2.006s (~)0.494s151.23x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.056s (-25.2% 🟢)3.711s (-16.8% 🟢)1.655s91.00x
▲ VercelNext.js (Turbopack)2.542s (+3.4%)3.815s (-15.8% 🟢)1.273s81.24x
▲ VercelNitro2.624s (+0.6%)4.290s (-0.8%)1.666s71.28x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.312s (-2.8%)3.007s (~)0.696s101.00x
🐘 PostgresNitro2.327s (-1.1%)3.008s (~)0.681s101.01x
🐘 PostgresNext.js (Turbopack)2.466s3.010s0.544s101.07x
🌐 RedisNext.js (Turbopack)2.582s3.008s0.426s101.12x
💻 LocalNitro3.000s (+2.5%)3.565s (+14.7% 🔺)0.565s91.30x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.381s (-30.6% 🟢)4.033s (-19.9% 🟢)1.651s81.00x
▲ VercelExpress2.543s (-16.8% 🟢)3.976s (-15.0% 🟢)1.433s81.07x
▲ VercelNext.js (Turbopack)2.993s (+5.3% 🔺)4.436s (-7.3% 🟢)1.443s71.26x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.486s (~)4.011s (~)0.525s81.00x
🐘 PostgresNitro3.491s (+0.8%)4.010s (~)0.519s81.00x
🐘 PostgresNext.js (Turbopack)3.667s4.012s0.345s81.05x
🌐 RedisNext.js (Turbopack)4.133s4.869s0.736s71.19x
💻 LocalNitro8.373s (+2.3%)9.023s (~)0.650s42.40x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.838s (-13.4% 🟢)4.503s (-8.4% 🟢)1.665s71.00x
▲ VercelExpress3.249s (+6.1% 🔺)4.654s (-3.1%)1.404s71.15x
▲ VercelNext.js (Turbopack)4.099s (+0.9%)5.650s (-10.0% 🟢)1.551s61.44x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)1.219s2.010s0.791s151.00x
🐘 PostgresNitro1.268s (+0.8%)2.009s (~)0.740s151.04x
🐘 PostgresExpress1.275s (+0.8%)2.007s (~)0.732s151.05x
🌐 RedisNext.js (Turbopack)1.365s2.006s0.641s151.12x
💻 LocalNitro1.543s (+0.8%)2.006s (~)0.463s151.27x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.086s (-8.5% 🟢)3.837s (-3.2%)1.751s81.00x
▲ VercelNitro2.154s (-6.1% 🟢)3.859s (-2.5%)1.705s81.03x
▲ VercelNext.js (Turbopack)2.260s (-3.5%)3.500s (-16.1% 🟢)1.240s91.08x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.337s (-0.6%)3.009s (~)0.672s101.00x
🐘 PostgresNitro2.354s (-0.8%)3.009s (~)0.654s101.01x
🐘 PostgresNext.js (Turbopack)2.377s3.008s0.631s101.02x
🌐 RedisNext.js (Turbopack)2.555s3.008s0.453s101.09x
💻 LocalNitro3.050s (-1.6%)4.010s (+3.2%)0.959s81.31x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.435s (-99.2% 🟢)3.952s (-98.7% 🟢)1.517s81.00x
▲ VercelExpress2.492s (-96.8% 🟢)3.849s (-95.2% 🟢)1.357s81.02x
▲ VercelNext.js (Turbopack)2.658s (-6.0% 🟢)4.030s (-15.1% 🟢)1.372s81.09x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.471s (~)4.010s (~)0.539s81.00x
🐘 PostgresExpress3.475s (~)4.010s (~)0.535s81.00x
🐘 PostgresNext.js (Turbopack)3.649s4.012s0.363s81.05x
🌐 RedisNext.js (Turbopack)4.120s4.582s0.462s71.19x
💻 LocalNitro8.769s (-2.2%)9.021s (-2.7%)0.251s42.53x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.123s (-29.9% 🟢)4.760s (-20.8% 🟢)1.637s71.00x
▲ VercelNitro3.257s (+8.6% 🔺)4.834s (+3.1%)1.576s71.04x
▲ VercelNext.js (Turbopack)3.527s (-1.8%)4.910s (-8.0% 🟢)1.384s71.13x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.699s1.004s0.305s601.00x
🐘 PostgresNext.js (Turbopack)0.769s1.006s0.236s601.10x
🐘 PostgresExpress0.808s (-5.2% 🟢)1.023s (+1.7%)0.215s591.16x
🐘 PostgresNitro0.860s (+4.4%)1.023s (+1.7%)0.163s591.23x
💻 LocalNitro0.978s (-0.7%)1.057s (-10.5% 🟢)0.079s571.40x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro8.679s (-4.7%)10.740s (-4.0%)2.061s61.00x
▲ VercelNext.js (Turbopack)9.102s (-12.0% 🟢)10.751s (-13.7% 🟢)1.649s61.05x
▲ VercelExpress9.131s (-11.4% 🟢)10.745s (-10.6% 🟢)1.614s61.05x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.676s2.006s0.329s451.00x
🐘 PostgresNext.js (Turbopack)1.872s2.075s0.203s441.12x
🐘 PostgresExpress1.952s (-5.1% 🟢)2.174s (-24.6% 🟢)0.222s421.16x
🐘 PostgresNitro2.093s (+6.2% 🔺)2.945s (+32.3% 🔺)0.852s311.25x
💻 LocalNitro3.017s (~)3.586s (+1.1%)0.569s261.80x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express27.604s (-1.7%)29.418s (-2.2%)1.814s41.00x
▲ VercelNitro28.084s (-3.0%)30.146s (-1.7%)2.062s31.02x
▲ VercelNext.js (Turbopack)28.799s (-6.5% 🟢)30.803s (-6.4% 🟢)2.004s31.04x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)3.383s4.008s0.625s301.00x
🐘 PostgresNext.js (Turbopack)3.737s4.009s0.273s301.10x
🐘 PostgresExpress3.949s (-3.0%)4.147s (-13.8% 🟢)0.197s291.17x
🐘 PostgresNitro4.252s (+2.8%)4.972s (+1.7%)0.720s251.26x
💻 LocalNitro9.279s (+1.0%)9.942s (~)0.663s132.74x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express69.222s (-8.7% 🟢)70.943s (-8.6% 🟢)1.721s21.00x
▲ VercelNitro70.767s (-3.2%)73.163s (-2.3%)2.396s21.02x
▲ VercelNext.js (Turbopack)74.888s (-10.2% 🟢)76.096s (-11.0% 🟢)1.208s21.08x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.252s1.007s0.755s601.00x
🐘 PostgresExpress0.283s (+1.4%)1.007s (~)0.724s601.12x
🐘 PostgresNitro0.286s (~)1.007s (~)0.721s601.13x
🌐 RedisNext.js (Turbopack)0.294s1.004s0.710s601.16x
💻 LocalNitro0.603s (+1.6%)1.004s (~)0.401s602.39x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.456s (-23.7% 🟢)3.016s (-15.2% 🟢)1.560s211.00x
▲ VercelNitro1.477s (-17.8% 🟢)2.985s (-16.2% 🟢)1.507s211.01x
▲ VercelNext.js (Turbopack)1.621s (-2.4%)2.966s (-8.3% 🟢)1.345s211.11x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.467s1.006s0.539s901.00x
🐘 PostgresExpress0.488s (-1.3%)1.007s (~)0.519s901.04x
🐘 PostgresNitro0.501s (~)1.007s (~)0.506s901.07x
🌐 RedisNext.js (Turbopack)1.234s2.006s0.772s452.64x
💻 LocalNitro2.785s (+8.7% 🔺)3.183s (+5.8% 🔺)0.397s295.96x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.526s (-3.3%)4.332s (~)1.807s211.00x
▲ VercelNitro2.686s (+8.3% 🔺)4.386s (+5.1% 🔺)1.701s211.06x
▲ VercelNext.js (Turbopack)3.397s (-4.3%)4.947s (-3.9%)1.550s191.34x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.760s1.014s0.255s1191.00x
🐘 PostgresExpress0.771s (-2.4%)1.007s (~)0.236s1201.01x
🐘 PostgresNitro0.803s (-6.9% 🟢)1.008s (-5.2% 🟢)0.205s1201.06x
🌐 RedisNext.js (Turbopack)2.816s3.032s0.217s403.71x
💻 LocalNitro11.426s (+3.3%)12.031s (+3.1%)0.605s1015.04x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express6.156s (-13.3% 🟢)7.581s (-14.2% 🟢)1.425s161.00x
▲ VercelNitro6.524s (-5.3% 🟢)8.084s (-5.9% 🟢)1.560s151.06x
▲ VercelNext.js (Turbopack)32.897s (+425.9% 🔺)34.290s (+334.1% 🔺)1.393s125.34x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.186s1.001s0.002s1.008s0.822s101.00x
🐘 PostgresExpress0.202s (-2.1%)0.994s (-0.5%)0.002s (+23.1% 🔺)1.010s (~)0.809s101.08x
🐘 PostgresNext.js (Turbopack)0.206s1.001s0.028s1.037s0.832s101.10x
💻 LocalNitro0.206s (+1.2%)1.004s (~)0.013s (+2.5%)1.019s (~)0.812s101.11x
🐘 PostgresNitro0.209s (+3.5%)1.000s (~)0.001s (-7.7% 🟢)1.010s (~)0.801s101.12x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.415s (-40.6% 🟢)2.521s (-33.7% 🟢)0.694s (+87.6% 🔺)3.696s (-20.5% 🟢)2.281s101.00x
▲ VercelNext.js (Turbopack)1.443s (-10.1% 🟢)2.663s (-15.5% 🟢)0.571s (+82.2% 🔺)3.613s (-8.6% 🟢)2.170s101.02x
▲ VercelExpress1.509s (-13.0% 🟢)2.868s (-11.8% 🟢)0.552s (+59.6% 🔺)3.833s (-4.8%)2.324s101.07x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.481s1.001s0.003s1.011s0.530s601.00x
🐘 PostgresNext.js (Turbopack)0.589s1.009s0.005s1.023s0.434s591.22x
🐘 PostgresExpress0.596s (-4.6%)1.005s (~)0.004s (-8.6% 🟢)1.021s (~)0.425s591.24x
🐘 PostgresNitro0.647s (+4.0%)1.005s (~)0.005s (+14.5% 🔺)1.024s (~)0.377s591.35x
💻 LocalNitro0.828s (+13.5% 🔺)1.012s (~)0.010s (+1.1%)1.116s (+9.1% 🔺)0.288s541.72x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.990s (+5.4% 🔺)5.204s (-1.5%)0.315s (-18.0% 🟢)5.965s (-1.8%)1.974s111.00x
▲ VercelNext.js (Turbopack)4.125s (-2.8%)5.578s (-3.6%)0.185s (-52.3% 🟢)6.124s (-7.7% 🟢)2.000s101.03x
▲ VercelExpress5.305s6.929s0.393s7.734s2.429s81.33x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.912s1.035s0.000s1.039s0.127s581.00x
🐘 PostgresNext.js (Turbopack)0.946s1.154s0.000s1.171s0.225s521.04x
🐘 PostgresExpress0.977s (+0.6%)1.243s (+6.1% 🔺)0.000s (+59.4% 🔺)1.257s (+5.1% 🔺)0.281s481.07x
🐘 PostgresNitro0.991s (+3.6%)1.214s (+5.7% 🔺)0.000s (-65.3% 🟢)1.228s (+5.7% 🔺)0.237s501.09x
💻 LocalNitro1.244s (~)2.021s (~)0.000s (+50.0% 🔺)2.023s (~)0.779s301.36x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.787s (+7.0% 🔺)4.205s (+13.8% 🔺)0.000s (-85.6% 🟢)4.643s (+12.6% 🔺)1.855s131.00x
▲ VercelNitro2.823s (-90.9% 🟢)4.110s (-87.2% 🟢)0.001s (+Infinity% 🔺)4.619s (-85.9% 🟢)1.796s131.01x
▲ VercelNext.js (Turbopack)3.007s (-9.8% 🟢)4.399s (-5.4% 🟢)0.000s (-100.0% 🟢)4.764s (-6.5% 🟢)1.757s131.08x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.666s2.036s0.000s2.039s0.373s301.00x
🐘 PostgresExpress1.747s (-7.0% 🟢)2.140s (-6.7% 🟢)0.000s (+Infinity% 🔺)2.152s (-6.7% 🟢)0.405s281.05x
🐘 PostgresNitro1.791s (~)2.134s (~)0.000s (-3.4%)2.147s (~)0.356s291.07x
🐘 PostgresNext.js (Turbopack)1.805s2.146s0.000s2.192s0.387s281.08x
💻 LocalNitro3.632s (+2.5%)4.232s (+4.9%)0.001s (~)4.235s (+4.9%)0.604s152.18x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.867s (+2.6%)5.104s (+4.7%)0.001s (+900.0% 🔺)5.538s (+3.8%)1.671s121.00x
▲ VercelNitro5.456s (+32.2% 🔺)6.612s (+23.8% 🔺)0.000s (+144.4% 🔺)7.089s (+22.2% 🔺)1.633s91.41x
▲ VercelNext.js (Turbopack)5.462s (+36.0% 🔺)6.548s (+22.8% 🔺)0.000s (NaN%)6.966s (+19.3% 🔺)1.504s91.41x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro21/21
🐘 PostgresNext.js (Turbopack)12/21
▲ VercelExpress13/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres19/21
Next.js (Turbopack)🌐 Redis12/21
Nitro🐘 Postgres16/21
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
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@github-actions

github-actionsBot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production890067957
✅ 💻 Local Development86601781044
✅ 📦 Local Production86601781044
✅ 🐘 Local Postgres86601781044
✅ 🪟 Windows790887
❌ 🌍 Community Worlds1366524225
✅ 📋 Other219042261
Total3922656754662

❌ Failed Tests

🌍 Community Worlds (65 failed)

mongodb (4 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNQT12HK8X4N86DEASFAYTC3
  • webhookWorkflow | wrun_01KNQT1B8CE6EZ1PEED6RR64J3
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNQT90QM3AQHKNFTTC3T4RSX
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNQTFBW8QY7AK7XNWV2MJH0N

redis (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNQT12HK8X4N86DEASFAYTC3
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNQT90QM3AQHKNFTTC3T4RSX
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNQTFBW8QY7AK7XNWV2MJH0N

turso (58 failed):

  • addTenWorkflow | wrun_01KNQSZWK13GCCQH5P3FH07BKA
  • addTenWorkflow | wrun_01KNQSZWK13GCCQH5P3FH07BKA
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KNQT0FT2RNF0HGMMDGWWFG78
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KNQT04E56N7KQ56RT376TDRY
  • promiseRaceWorkflow | wrun_01KNQT08Y6VPWJ6HA9XB3ACDVM
  • promiseAnyWorkflow | wrun_01KNQT0B3AWW74S02RSY96DFDY
  • importedStepOnlyWorkflow | wrun_01KNQT0VCPFWJEJR9NRCGH1YE1
  • hookWorkflow | wrun_01KNQT0Q25ZF0230NTFW8TT8FV
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNQT12HK8X4N86DEASFAYTC3
  • webhookWorkflow | wrun_01KNQT1B8CE6EZ1PEED6RR64J3
  • sleepingWorkflow | wrun_01KNQT1H85476RXPSMD074B2X0
  • parallelSleepWorkflow | wrun_01KNQT1X4V7GJPN458S4DTNQHZ
  • nullByteWorkflow | wrun_01KNQT20D17XGS9YA969RSNBCX
  • workflowAndStepMetadataWorkflow | wrun_01KNQT22GYCEM9QQ63EYRWYNYJ
  • fetchWorkflow | wrun_01KNQT4QEY4E6RG3M8NABTD1WT
  • promiseRaceStressTestWorkflow | wrun_01KNQT4ST3XHH8WE6DE83AQQ2C
  • 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()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KNQT8C7D0W9WVRY9DB6M4R6F
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNQT90QM3AQHKNFTTC3T4RSX
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KNQT9N3Q09Z1RWEW56XMCHA3
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KNQTA95C42ANFAA89B5TYKMB
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KNQTAJX9XKZVZ5CE2TFDDGRD
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KNQTARF9TMA086QP6MMNFMPD
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KNQTATM6MNKY1EC8MNQ9Z5RQ
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KNQTBAFJVXA1W3K58JC3MHE3
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KNQTBG2A2R586XK4ANBP75KQ
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KNQTBPRJW3W53CRJ9A43SX2T
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KNQTBXD7ED0HM67PD7H4ER2X
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KNQTC2Z4MT98F21MRWEJ9DSB
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KNQTC9NDWM216M5JCAQBM90C
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KNQTCH1WM9Z1WVTTBGMPMBRN
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KNQTCXME3Y7DX14MBYE93H4D
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KNQTD5CV0BR9DZAG478KNZWX
  • cancelRun - cancelling a running workflow | wrun_01KNQTDC6Y4PD7004JSH4NQBYC
  • cancelRun via CLI - cancelling a running workflow | wrun_01KNQTDNJ0Z5XAKHDKSY4EEN56
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KNQTE1PJA6ZM5HN105P89GME
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KNQTEPC3ZQSTTXA0PZS0GAP7
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KNQTF0MXCVDK1YB1PQDYC8YY
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KNQTF7DQSQERG48JV5RK0R6S
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KNQTF9SAC38S1HRGBERBMHNE
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNQTFBW8QY7AK7XNWV2MJH0N
  • getterStepWorkflow - getter functions with "use step" directive | wrun_01KNQTFF4388KKRERJQVTNB56C

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro8007
✅ example8007
✅ express8007
✅ fastify8007
✅ hono8007
✅ nextjs-turbopack8502
✅ nextjs-webpack8502
✅ nitro8007
✅ nuxt8007
✅ sveltekit8007
✅ vite8007
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable73014
✅ express-stable73014
✅ fastify-stable73014
✅ hono-stable73014
✅ nextjs-turbopack-canary62025
✅ nextjs-turbopack-stable7908
✅ nextjs-webpack-canary62025
✅ nextjs-webpack-stable7908
✅ nitro-stable73014
✅ nuxt-stable73014
✅ sveltekit-stable73014
✅ vite-stable73014
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable73014
✅ express-stable73014
✅ fastify-stable73014
✅ hono-stable73014
✅ nextjs-turbopack-canary62025
✅ nextjs-turbopack-stable7908
✅ nextjs-webpack-canary62025
✅ nextjs-webpack-stable7908
✅ nitro-stable73014
✅ nuxt-stable73014
✅ sveltekit-stable73014
✅ vite-stable73014
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable73014
✅ express-stable73014
✅ fastify-stable73014
✅ hono-stable73014
✅ nextjs-turbopack-canary62025
✅ nextjs-turbopack-stable7908
✅ nextjs-webpack-canary62025
✅ nextjs-webpack-stable7908
✅ nitro-stable73014
✅ nuxt-stable73014
✅ sveltekit-stable73014
✅ vite-stable73014
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack7908
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev500
❌ mongodb5848
✅ redis-dev500
❌ redis5938
✅ turso-dev500
❌ turso4588
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable73014
✅ e2e-local-postgres-nest-stable73014
✅ e2e-local-prod-nest-stable73014

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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 removes the “step functions must be async” restriction across the SWC transform and the TypeScript language service plugin, allowing synchronous functions to use the "use step" directive as a code-stripping mechanism while preserving the async requirement for "use workflow".

Changes:

  • TypeScript plugin: removes diagnostic error 9002 for synchronous step functions and updates tests accordingly.
  • SWC plugin: lifts async-only checks from "use step" transformation paths and adds a new sync-step fixture to verify output across workflow/step/client modes.
  • Documentation + release: updates SWC plugin spec validation table and adds a changeset for patch releases.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.

Show a summary per file
FileDescription
packages/typescript-plugin/src/diagnostics.tsRemoves async validation for "use step" functions in custom diagnostics.
packages/typescript-plugin/src/diagnostics.test.tsUpdates tests to assert no error 9002 for sync step functions.
packages/swc-plugin-workflow/transform/tests/fixture/sync-step/input.jsAdds fixture input covering sync function/arrow/object-method step directives.
packages/swc-plugin-workflow/transform/tests/fixture/sync-step/output-workflow.jsExpected workflow-mode output for sync-step fixture (initializer exports).
packages/swc-plugin-workflow/transform/tests/fixture/sync-step/output-step.jsExpected step-mode output for sync-step fixture (registration + preserved bodies).
packages/swc-plugin-workflow/transform/tests/fixture/sync-step/output-client.jsExpected client-mode output for sync-step fixture (stepId annotations).
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/input.jsUpdates error fixture to only cover non-async "use workflow" cases.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-workflow.jsUpdates expected workflow-mode output after removing step async restriction.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-workflow.stderrUpdates expected stderr to reflect only "use workflow" async errors.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-step.jsUpdates expected step-mode output after removing step async restriction.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-step.stderrUpdates expected stderr to reflect only "use workflow" async errors.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-client.jsUpdates expected client-mode output after removing step async restriction.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-client.stderrUpdates expected stderr to reflect only "use workflow" async errors.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/input.jsUpdates invalid-export fixture to allow sync function exports in "use step" files.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-workflow.jsExpected workflow-mode output reflecting sync function export allowance.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-workflow.stderrExpected stderr after invalid-export fixture adjustments.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-step.jsExpected step-mode output registering sync exported steps.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-step.stderrExpected stderr after invalid-export fixture adjustments.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-client.jsExpected client-mode output with stepId for sync exported steps.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-client.stderrExpected stderr after invalid-export fixture adjustments.
packages/swc-plugin-workflow/transform/src/lib.rsRemoves async guards for "use step" transformations; keeps "use workflow" async enforcement in relevant paths.
packages/swc-plugin-workflow/spec.mdUpdates validation error documentation to reflect sync "use step" allowance.
.changeset/allow-sync-step-functions.mdAdds patch changeset entries for SWC + TypeScript plugins.

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

Comment threadpackages/swc-plugin-workflow/transform/src/lib.rs Outdated
Comment threadpackages/swc-plugin-workflow/transform/src/lib.rs Outdated
…row behavior
- Remove stale 'Collect registration calls' comment from StepTransform
- Fix 'everyhwere' typo in e2e test comments
- Closure vars IIFE now throws when called outside a step function
context, matching the original __private_getClosureVars behavior
…xport message
- Remove the no-op validate_async_function method and unwrap all callers
- InvalidExport message now says 'Only functions can be exported' for
'use step' files, vs 'Only async functions' for 'use workflow' files

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI review: blocking issues found

Comment threadpackages/swc-plugin-workflow/transform/src/lib.rs Outdated
Comment threadpackages/swc-plugin-workflow/transform/src/lib.rs
Comment threadpackages/typescript-plugin/src/diagnostics.ts Outdated
Comment threadpackages/swc-plugin-workflow/spec.md Outdated
Base automatically changed from inline-step-registration to mainApril 8, 2026 23:58
…ethod async check
- Remove validate_async_function() entirely and unwrap all 8 call sites
(the function was a no-op that always returned true)
- Fix static class method handler to only check async for 'use workflow'
(was still blocking sync step functions on static methods)
- Remove no-op checkStepFunction from TypeScript plugin
- Regenerate test fixture outputs
Also bump changeset from patch to minor (new feature, not bug fix)

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 22 out of 22 changed files in this pull request and generated 4 comments.


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

Comment on lines +4057 to 4058
// Previously validated that step functions must be async. The restriction

CopilotAIApr 9, 2026

Copy link

Choose a reason for hiding this comment

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

There’s a dangling/incomplete comment here (ends mid-sentence) left over from removing the async-only validation. It should either be completed to explain the new behavior or removed to avoid confusion when maintaining this transform logic.

Suggested change
// Previously validated that step functions must be async. The restriction

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed in #1664 — removed the dangling incomplete comment entirely.

Comment on lines +6054 to +6057
// Validate exports if we have a file-level workflow directive.
// Step files allow any exports (sync or async), but workflow files
// require exported functions to be async.
if self.has_file_workflow_directive {

CopilotAIApr 9, 2026

Copy link

Choose a reason for hiding this comment

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

visit_mut_module_items no longer validates exports for module-level 'use step' files, which means non-function exports (constants/classes/re-exports) are now allowed even though they won’t be code-stripped and can easily pull Node-only code into the workflow/client bundles. Consider adding a separate validation branch for has_file_step_directive that allows sync or async functions but rejects non-function exports/re-exports, with an error message that matches that rule.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed in #1664 — added export validation for has_file_step_directive that allows sync/async function exports but rejects non-function exports (constants, classes, re-exports). Error message is "Only functions can be exported from a \"use step\" file".

Comment on lines +3 to 8
// These should all error - not functions
export const value = 42;
export function syncFunc() {
return 'not allowed';
}
export class MyClass {
method() {}
}
export * from './other';

CopilotAIApr 9, 2026

Copy link

Choose a reason for hiding this comment

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

The header comment says these exports “should all error”, but the expected stderr fixtures for this test case were removed and the outputs keep these exports. Please update the comment (and potentially relocate/rename this fixture since it no longer asserts an error) so the test intent matches the actual expected behavior.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed in #1664 — the comment is now correct again since export validation for step files has been restored. The const value, class MyClass, and export * all produce errors; the sync and async function exports pass.

"@workflow/typescript-plugin": minor
---

Allow synchronous functions to use `"use step"` directive. This enables using `"use step"` as a mechanism to strip Node.js-dependent code from the workflow VM bundle without requiring the function to be async.

CopilotAIApr 9, 2026

Copy link

Choose a reason for hiding this comment

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

The PR description mentions that packages/swc-plugin-workflow/spec.md error documentation was updated, but this PR diff doesn’t include any changes to that spec file. Please ensure the spec is updated to reflect that "use step" can be used on sync functions while "use workflow" remains async-only (and adjust any validation/export rules accordingly).

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed in #1664 — updated spec.md error table (split Non-async into workflow-only, added step export validation row) and supported function forms (added sync variants for all step function forms).

@ghostghost mentioned this pull request Apr 9, 2026
Sign up for freeto 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

@TooTallNate@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Allow synchronous functions to use "use step" directive - #1633

Merged
TooTallNate merged 11 commits into
mainfrom
allow-sync-step-functions
Apr 9, 2026
Merged

Allow synchronous functions to use "use step" directive#1633
TooTallNate merged 11 commits into
mainfrom
allow-sync-step-functions

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

Summary

  • Lifts the async function restriction from "use step" in both the SWC compiler plugin and the TypeScript language service plugin
  • Synchronous functions can now use "use step" to strip their Node.js-dependent code from the workflow VM bundle
  • The async restriction is preserved for "use workflow" functions

Motivation

This enables using "use step" as a code-stripping mechanism for synchronous methods (e.g. getReadable() on the Run class) that use Node.js APIs not available in the workflow VM. Previously, "use step" required the function to be async, which was an artificial restriction for this use case.

Changed packages

  • @workflow/swc-plugin — Removed async guards from all step function code paths; updated should_transform_function; updated InvalidExport validation for module-level "use step" files; added sync-step fixture test; cleaned up error test fixtures
  • @workflow/typescript-plugin — Removed error 9002 (sync step function diagnostic); updated tests
  • Updated spec.md error documentation

Test plan

  • 196 Rust SWC plugin tests pass (22 unit + 24 error + 150 fixture, including new sync-step fixture)
  • 95 TypeScript plugin tests pass

…/private
The SWC compiler plugin no longer generates import statements. All step
function registrations and closure variable access are now self-contained
inline IIFEs with zero module dependencies:
- Step registration uses an IIFE that writes to
globalThis[Symbol.for('@workflow/core//registeredSteps')]
- Closure variable access uses an IIFE that reads from
globalThis[Symbol.for('WORKFLOW_STEP_CONTEXT_STORAGE')]
- Registrations are placed immediately after each function definition
instead of being batched at the bottom of the file
This enables 3rd-party node_modules packages to define step functions
without needing the 'workflow' package available at runtime.
Also removes the @workflow/core/private and workflow/internal/private
public subpath exports since they are no longer referenced by generated
code.
Lift the async function restriction from "use step" in both the SWC
compiler plugin and the TypeScript language service plugin. This enables
using "use step" as a mechanism to strip Node.js-dependent code from
the workflow VM bundle without requiring the function to be async.
The async restriction is preserved for "use workflow" functions.
- SWC plugin: removed async guards from all step function code paths,
updated should_transform_function, updated InvalidExport validation
- TypeScript plugin: removed error 9002 for sync step functions
- Added sync-step fixture test, cleaned up error test fixtures
- Updated spec.md error documentation
CopilotAI review requested due to automatic review settings April 7, 2026 07:45
@changeset-bot

changeset-botBot commented Apr 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e4b8d29

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

This PR includes changesets to release 18 packages
NameType
@workflow/swc-pluginMinor
@workflow/typescript-pluginMinor
@workflow/astroPatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nestPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
workflowPatch
@workflow/vitePatch
@workflow/vitestPatch
@workflow/world-testingPatch
@workflow/nuxtPatch
@workflow/aiPatch
@workflow/corePatch
@workflow/web-sharedPatch

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

@TooTallNate
TooTallNate requested a review from a team as a code ownerApril 7, 2026 07:45
@vercel

vercelBot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.043s (-1.4%)1.005s (~)0.963s101.00x
🌐 RedisNext.js (Turbopack)0.054s1.005s0.951s101.27x
🐘 PostgresNitro0.058s (-8.7% 🟢)1.010s (~)0.952s101.34x
🐘 PostgresNext.js (Turbopack)0.059s1.010s0.951s101.37x
🐘 PostgresExpress0.059s (+1.0%)1.010s (~)0.950s101.38x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.228s (+9.1% 🔺)2.214s (+1.9%)1.986s101.00x
▲ VercelNitro0.249s (+6.6% 🔺)2.227s (+6.5% 🔺)1.979s101.09x
▲ VercelNext.js (Turbopack)0.747s (+225.1% 🔺)2.542s (+12.1% 🔺)1.794s103.27x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.124s2.007s0.883s101.00x
💻 LocalNitro1.127s (~)2.006s (~)0.879s101.00x
🐘 PostgresExpress1.132s (-1.0%)2.011s (~)0.878s101.01x
🐘 PostgresNext.js (Turbopack)1.139s2.009s0.870s101.01x
🐘 PostgresNitro1.147s (~)2.010s (~)0.862s101.02x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.873s (-1.7%)4.167s (+10.3% 🔺)2.294s101.00x
▲ VercelNext.js (Turbopack)1.940s (-5.8% 🟢)3.298s (-13.7% 🟢)1.358s101.04x
▲ VercelExpress2.322s (+25.7% 🔺)4.020s (+9.9% 🔺)1.697s101.24x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)10.794s11.025s0.231s31.00x
🐘 PostgresExpress10.866s (~)11.023s (~)0.157s31.01x
🐘 PostgresNext.js (Turbopack)10.905s11.356s0.452s31.01x
🐘 PostgresNitro10.925s (~)11.024s (~)0.099s31.01x
💻 LocalNitro10.926s (~)11.022s (~)0.096s31.01x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.403s (-13.8% 🟢)18.223s (-13.1% 🟢)1.820s21.00x
▲ VercelNext.js (Turbopack)16.427s (-4.6%)17.753s (-8.6% 🟢)1.326s21.00x
▲ VercelNitro17.053s (~)18.660s (-5.5% 🟢)1.607s21.04x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)14.456s15.028s0.573s41.00x
🐘 PostgresNext.js (Turbopack)14.512s15.028s0.515s41.00x
🐘 PostgresExpress14.546s (~)15.023s (~)0.477s41.01x
🐘 PostgresNitro14.685s (+0.5%)15.027s (~)0.342s41.02x
💻 LocalNitro14.956s (~)15.029s (~)0.073s41.03x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro29.351s (-11.0% 🟢)31.401s (-10.0% 🟢)2.050s21.00x
▲ VercelNext.js (Turbopack)29.913s (-11.6% 🟢)31.199s (-13.0% 🟢)1.287s21.02x
▲ VercelExpress30.786s (-4.0%)32.534s (-2.5%)1.748s21.05x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)13.592s14.027s0.435s71.00x
🐘 PostgresNext.js (Turbopack)13.825s14.166s0.340s71.02x
🐘 PostgresExpress13.975s (-1.3%)14.448s (-3.8%)0.473s71.03x
🐘 PostgresNitro14.252s (+0.8%)15.024s (+1.9%)0.772s61.05x
💻 LocalNitro16.674s (+0.7%)17.031s (~)0.357s61.23x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express51.717s (-74.9% 🟢)53.900s (-74.1% 🟢)2.183s21.00x
▲ VercelNitro53.533s (-74.1% 🟢)55.369s (-73.5% 🟢)1.835s21.04x
▲ VercelNext.js (Turbopack)54.318s (-10.4% 🟢)55.810s (-10.8% 🟢)1.492s21.05x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)1.230s2.010s0.780s151.00x
🐘 PostgresExpress1.259s (~)2.009s (~)0.750s151.02x
🐘 PostgresNitro1.272s (-1.4%)2.010s (~)0.738s151.03x
🌐 RedisNext.js (Turbopack)1.323s2.007s0.684s151.08x
💻 LocalNitro1.513s (-1.6%)2.006s (~)0.494s151.23x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.056s (-25.2% 🟢)3.711s (-16.8% 🟢)1.655s91.00x
▲ VercelNext.js (Turbopack)2.542s (+3.4%)3.815s (-15.8% 🟢)1.273s81.24x
▲ VercelNitro2.624s (+0.6%)4.290s (-0.8%)1.666s71.28x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.312s (-2.8%)3.007s (~)0.696s101.00x
🐘 PostgresNitro2.327s (-1.1%)3.008s (~)0.681s101.01x
🐘 PostgresNext.js (Turbopack)2.466s3.010s0.544s101.07x
🌐 RedisNext.js (Turbopack)2.582s3.008s0.426s101.12x
💻 LocalNitro3.000s (+2.5%)3.565s (+14.7% 🔺)0.565s91.30x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.381s (-30.6% 🟢)4.033s (-19.9% 🟢)1.651s81.00x
▲ VercelExpress2.543s (-16.8% 🟢)3.976s (-15.0% 🟢)1.433s81.07x
▲ VercelNext.js (Turbopack)2.993s (+5.3% 🔺)4.436s (-7.3% 🟢)1.443s71.26x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.486s (~)4.011s (~)0.525s81.00x
🐘 PostgresNitro3.491s (+0.8%)4.010s (~)0.519s81.00x
🐘 PostgresNext.js (Turbopack)3.667s4.012s0.345s81.05x
🌐 RedisNext.js (Turbopack)4.133s4.869s0.736s71.19x
💻 LocalNitro8.373s (+2.3%)9.023s (~)0.650s42.40x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.838s (-13.4% 🟢)4.503s (-8.4% 🟢)1.665s71.00x
▲ VercelExpress3.249s (+6.1% 🔺)4.654s (-3.1%)1.404s71.15x
▲ VercelNext.js (Turbopack)4.099s (+0.9%)5.650s (-10.0% 🟢)1.551s61.44x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)1.219s2.010s0.791s151.00x
🐘 PostgresNitro1.268s (+0.8%)2.009s (~)0.740s151.04x
🐘 PostgresExpress1.275s (+0.8%)2.007s (~)0.732s151.05x
🌐 RedisNext.js (Turbopack)1.365s2.006s0.641s151.12x
💻 LocalNitro1.543s (+0.8%)2.006s (~)0.463s151.27x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.086s (-8.5% 🟢)3.837s (-3.2%)1.751s81.00x
▲ VercelNitro2.154s (-6.1% 🟢)3.859s (-2.5%)1.705s81.03x
▲ VercelNext.js (Turbopack)2.260s (-3.5%)3.500s (-16.1% 🟢)1.240s91.08x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.337s (-0.6%)3.009s (~)0.672s101.00x
🐘 PostgresNitro2.354s (-0.8%)3.009s (~)0.654s101.01x
🐘 PostgresNext.js (Turbopack)2.377s3.008s0.631s101.02x
🌐 RedisNext.js (Turbopack)2.555s3.008s0.453s101.09x
💻 LocalNitro3.050s (-1.6%)4.010s (+3.2%)0.959s81.31x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.435s (-99.2% 🟢)3.952s (-98.7% 🟢)1.517s81.00x
▲ VercelExpress2.492s (-96.8% 🟢)3.849s (-95.2% 🟢)1.357s81.02x
▲ VercelNext.js (Turbopack)2.658s (-6.0% 🟢)4.030s (-15.1% 🟢)1.372s81.09x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.471s (~)4.010s (~)0.539s81.00x
🐘 PostgresExpress3.475s (~)4.010s (~)0.535s81.00x
🐘 PostgresNext.js (Turbopack)3.649s4.012s0.363s81.05x
🌐 RedisNext.js (Turbopack)4.120s4.582s0.462s71.19x
💻 LocalNitro8.769s (-2.2%)9.021s (-2.7%)0.251s42.53x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.123s (-29.9% 🟢)4.760s (-20.8% 🟢)1.637s71.00x
▲ VercelNitro3.257s (+8.6% 🔺)4.834s (+3.1%)1.576s71.04x
▲ VercelNext.js (Turbopack)3.527s (-1.8%)4.910s (-8.0% 🟢)1.384s71.13x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.699s1.004s0.305s601.00x
🐘 PostgresNext.js (Turbopack)0.769s1.006s0.236s601.10x
🐘 PostgresExpress0.808s (-5.2% 🟢)1.023s (+1.7%)0.215s591.16x
🐘 PostgresNitro0.860s (+4.4%)1.023s (+1.7%)0.163s591.23x
💻 LocalNitro0.978s (-0.7%)1.057s (-10.5% 🟢)0.079s571.40x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro8.679s (-4.7%)10.740s (-4.0%)2.061s61.00x
▲ VercelNext.js (Turbopack)9.102s (-12.0% 🟢)10.751s (-13.7% 🟢)1.649s61.05x
▲ VercelExpress9.131s (-11.4% 🟢)10.745s (-10.6% 🟢)1.614s61.05x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.676s2.006s0.329s451.00x
🐘 PostgresNext.js (Turbopack)1.872s2.075s0.203s441.12x
🐘 PostgresExpress1.952s (-5.1% 🟢)2.174s (-24.6% 🟢)0.222s421.16x
🐘 PostgresNitro2.093s (+6.2% 🔺)2.945s (+32.3% 🔺)0.852s311.25x
💻 LocalNitro3.017s (~)3.586s (+1.1%)0.569s261.80x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express27.604s (-1.7%)29.418s (-2.2%)1.814s41.00x
▲ VercelNitro28.084s (-3.0%)30.146s (-1.7%)2.062s31.02x
▲ VercelNext.js (Turbopack)28.799s (-6.5% 🟢)30.803s (-6.4% 🟢)2.004s31.04x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)3.383s4.008s0.625s301.00x
🐘 PostgresNext.js (Turbopack)3.737s4.009s0.273s301.10x
🐘 PostgresExpress3.949s (-3.0%)4.147s (-13.8% 🟢)0.197s291.17x
🐘 PostgresNitro4.252s (+2.8%)4.972s (+1.7%)0.720s251.26x
💻 LocalNitro9.279s (+1.0%)9.942s (~)0.663s132.74x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express69.222s (-8.7% 🟢)70.943s (-8.6% 🟢)1.721s21.00x
▲ VercelNitro70.767s (-3.2%)73.163s (-2.3%)2.396s21.02x
▲ VercelNext.js (Turbopack)74.888s (-10.2% 🟢)76.096s (-11.0% 🟢)1.208s21.08x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.252s1.007s0.755s601.00x
🐘 PostgresExpress0.283s (+1.4%)1.007s (~)0.724s601.12x
🐘 PostgresNitro0.286s (~)1.007s (~)0.721s601.13x
🌐 RedisNext.js (Turbopack)0.294s1.004s0.710s601.16x
💻 LocalNitro0.603s (+1.6%)1.004s (~)0.401s602.39x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.456s (-23.7% 🟢)3.016s (-15.2% 🟢)1.560s211.00x
▲ VercelNitro1.477s (-17.8% 🟢)2.985s (-16.2% 🟢)1.507s211.01x
▲ VercelNext.js (Turbopack)1.621s (-2.4%)2.966s (-8.3% 🟢)1.345s211.11x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.467s1.006s0.539s901.00x
🐘 PostgresExpress0.488s (-1.3%)1.007s (~)0.519s901.04x
🐘 PostgresNitro0.501s (~)1.007s (~)0.506s901.07x
🌐 RedisNext.js (Turbopack)1.234s2.006s0.772s452.64x
💻 LocalNitro2.785s (+8.7% 🔺)3.183s (+5.8% 🔺)0.397s295.96x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.526s (-3.3%)4.332s (~)1.807s211.00x
▲ VercelNitro2.686s (+8.3% 🔺)4.386s (+5.1% 🔺)1.701s211.06x
▲ VercelNext.js (Turbopack)3.397s (-4.3%)4.947s (-3.9%)1.550s191.34x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.760s1.014s0.255s1191.00x
🐘 PostgresExpress0.771s (-2.4%)1.007s (~)0.236s1201.01x
🐘 PostgresNitro0.803s (-6.9% 🟢)1.008s (-5.2% 🟢)0.205s1201.06x
🌐 RedisNext.js (Turbopack)2.816s3.032s0.217s403.71x
💻 LocalNitro11.426s (+3.3%)12.031s (+3.1%)0.605s1015.04x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express6.156s (-13.3% 🟢)7.581s (-14.2% 🟢)1.425s161.00x
▲ VercelNitro6.524s (-5.3% 🟢)8.084s (-5.9% 🟢)1.560s151.06x
▲ VercelNext.js (Turbopack)32.897s (+425.9% 🔺)34.290s (+334.1% 🔺)1.393s125.34x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.186s1.001s0.002s1.008s0.822s101.00x
🐘 PostgresExpress0.202s (-2.1%)0.994s (-0.5%)0.002s (+23.1% 🔺)1.010s (~)0.809s101.08x
🐘 PostgresNext.js (Turbopack)0.206s1.001s0.028s1.037s0.832s101.10x
💻 LocalNitro0.206s (+1.2%)1.004s (~)0.013s (+2.5%)1.019s (~)0.812s101.11x
🐘 PostgresNitro0.209s (+3.5%)1.000s (~)0.001s (-7.7% 🟢)1.010s (~)0.801s101.12x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.415s (-40.6% 🟢)2.521s (-33.7% 🟢)0.694s (+87.6% 🔺)3.696s (-20.5% 🟢)2.281s101.00x
▲ VercelNext.js (Turbopack)1.443s (-10.1% 🟢)2.663s (-15.5% 🟢)0.571s (+82.2% 🔺)3.613s (-8.6% 🟢)2.170s101.02x
▲ VercelExpress1.509s (-13.0% 🟢)2.868s (-11.8% 🟢)0.552s (+59.6% 🔺)3.833s (-4.8%)2.324s101.07x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.481s1.001s0.003s1.011s0.530s601.00x
🐘 PostgresNext.js (Turbopack)0.589s1.009s0.005s1.023s0.434s591.22x
🐘 PostgresExpress0.596s (-4.6%)1.005s (~)0.004s (-8.6% 🟢)1.021s (~)0.425s591.24x
🐘 PostgresNitro0.647s (+4.0%)1.005s (~)0.005s (+14.5% 🔺)1.024s (~)0.377s591.35x
💻 LocalNitro0.828s (+13.5% 🔺)1.012s (~)0.010s (+1.1%)1.116s (+9.1% 🔺)0.288s541.72x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.990s (+5.4% 🔺)5.204s (-1.5%)0.315s (-18.0% 🟢)5.965s (-1.8%)1.974s111.00x
▲ VercelNext.js (Turbopack)4.125s (-2.8%)5.578s (-3.6%)0.185s (-52.3% 🟢)6.124s (-7.7% 🟢)2.000s101.03x
▲ VercelExpress5.305s6.929s0.393s7.734s2.429s81.33x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.912s1.035s0.000s1.039s0.127s581.00x
🐘 PostgresNext.js (Turbopack)0.946s1.154s0.000s1.171s0.225s521.04x
🐘 PostgresExpress0.977s (+0.6%)1.243s (+6.1% 🔺)0.000s (+59.4% 🔺)1.257s (+5.1% 🔺)0.281s481.07x
🐘 PostgresNitro0.991s (+3.6%)1.214s (+5.7% 🔺)0.000s (-65.3% 🟢)1.228s (+5.7% 🔺)0.237s501.09x
💻 LocalNitro1.244s (~)2.021s (~)0.000s (+50.0% 🔺)2.023s (~)0.779s301.36x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.787s (+7.0% 🔺)4.205s (+13.8% 🔺)0.000s (-85.6% 🟢)4.643s (+12.6% 🔺)1.855s131.00x
▲ VercelNitro2.823s (-90.9% 🟢)4.110s (-87.2% 🟢)0.001s (+Infinity% 🔺)4.619s (-85.9% 🟢)1.796s131.01x
▲ VercelNext.js (Turbopack)3.007s (-9.8% 🟢)4.399s (-5.4% 🟢)0.000s (-100.0% 🟢)4.764s (-6.5% 🟢)1.757s131.08x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.666s2.036s0.000s2.039s0.373s301.00x
🐘 PostgresExpress1.747s (-7.0% 🟢)2.140s (-6.7% 🟢)0.000s (+Infinity% 🔺)2.152s (-6.7% 🟢)0.405s281.05x
🐘 PostgresNitro1.791s (~)2.134s (~)0.000s (-3.4%)2.147s (~)0.356s291.07x
🐘 PostgresNext.js (Turbopack)1.805s2.146s0.000s2.192s0.387s281.08x
💻 LocalNitro3.632s (+2.5%)4.232s (+4.9%)0.001s (~)4.235s (+4.9%)0.604s152.18x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.867s (+2.6%)5.104s (+4.7%)0.001s (+900.0% 🔺)5.538s (+3.8%)1.671s121.00x
▲ VercelNitro5.456s (+32.2% 🔺)6.612s (+23.8% 🔺)0.000s (+144.4% 🔺)7.089s (+22.2% 🔺)1.633s91.41x
▲ VercelNext.js (Turbopack)5.462s (+36.0% 🔺)6.548s (+22.8% 🔺)0.000s (NaN%)6.966s (+19.3% 🔺)1.504s91.41x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro21/21
🐘 PostgresNext.js (Turbopack)12/21
▲ VercelExpress13/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres19/21
Next.js (Turbopack)🌐 Redis12/21
Nitro🐘 Postgres16/21
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
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@github-actions

github-actionsBot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production890067957
✅ 💻 Local Development86601781044
✅ 📦 Local Production86601781044
✅ 🐘 Local Postgres86601781044
✅ 🪟 Windows790887
❌ 🌍 Community Worlds1366524225
✅ 📋 Other219042261
Total3922656754662

❌ Failed Tests

🌍 Community Worlds (65 failed)

mongodb (4 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNQT12HK8X4N86DEASFAYTC3
  • webhookWorkflow | wrun_01KNQT1B8CE6EZ1PEED6RR64J3
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNQT90QM3AQHKNFTTC3T4RSX
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNQTFBW8QY7AK7XNWV2MJH0N

redis (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNQT12HK8X4N86DEASFAYTC3
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNQT90QM3AQHKNFTTC3T4RSX
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNQTFBW8QY7AK7XNWV2MJH0N

turso (58 failed):

  • addTenWorkflow | wrun_01KNQSZWK13GCCQH5P3FH07BKA
  • addTenWorkflow | wrun_01KNQSZWK13GCCQH5P3FH07BKA
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KNQT0FT2RNF0HGMMDGWWFG78
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KNQT04E56N7KQ56RT376TDRY
  • promiseRaceWorkflow | wrun_01KNQT08Y6VPWJ6HA9XB3ACDVM
  • promiseAnyWorkflow | wrun_01KNQT0B3AWW74S02RSY96DFDY
  • importedStepOnlyWorkflow | wrun_01KNQT0VCPFWJEJR9NRCGH1YE1
  • hookWorkflow | wrun_01KNQT0Q25ZF0230NTFW8TT8FV
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNQT12HK8X4N86DEASFAYTC3
  • webhookWorkflow | wrun_01KNQT1B8CE6EZ1PEED6RR64J3
  • sleepingWorkflow | wrun_01KNQT1H85476RXPSMD074B2X0
  • parallelSleepWorkflow | wrun_01KNQT1X4V7GJPN458S4DTNQHZ
  • nullByteWorkflow | wrun_01KNQT20D17XGS9YA969RSNBCX
  • workflowAndStepMetadataWorkflow | wrun_01KNQT22GYCEM9QQ63EYRWYNYJ
  • fetchWorkflow | wrun_01KNQT4QEY4E6RG3M8NABTD1WT
  • promiseRaceStressTestWorkflow | wrun_01KNQT4ST3XHH8WE6DE83AQQ2C
  • 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()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KNQT8C7D0W9WVRY9DB6M4R6F
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNQT90QM3AQHKNFTTC3T4RSX
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KNQT9N3Q09Z1RWEW56XMCHA3
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KNQTA95C42ANFAA89B5TYKMB
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KNQTAJX9XKZVZ5CE2TFDDGRD
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KNQTARF9TMA086QP6MMNFMPD
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KNQTATM6MNKY1EC8MNQ9Z5RQ
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KNQTBAFJVXA1W3K58JC3MHE3
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KNQTBG2A2R586XK4ANBP75KQ
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KNQTBPRJW3W53CRJ9A43SX2T
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KNQTBXD7ED0HM67PD7H4ER2X
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KNQTC2Z4MT98F21MRWEJ9DSB
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KNQTC9NDWM216M5JCAQBM90C
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KNQTCH1WM9Z1WVTTBGMPMBRN
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KNQTCXME3Y7DX14MBYE93H4D
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KNQTD5CV0BR9DZAG478KNZWX
  • cancelRun - cancelling a running workflow | wrun_01KNQTDC6Y4PD7004JSH4NQBYC
  • cancelRun via CLI - cancelling a running workflow | wrun_01KNQTDNJ0Z5XAKHDKSY4EEN56
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KNQTE1PJA6ZM5HN105P89GME
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KNQTEPC3ZQSTTXA0PZS0GAP7
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KNQTF0MXCVDK1YB1PQDYC8YY
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KNQTF7DQSQERG48JV5RK0R6S
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KNQTF9SAC38S1HRGBERBMHNE
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNQTFBW8QY7AK7XNWV2MJH0N
  • getterStepWorkflow - getter functions with "use step" directive | wrun_01KNQTFF4388KKRERJQVTNB56C

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro8007
✅ example8007
✅ express8007
✅ fastify8007
✅ hono8007
✅ nextjs-turbopack8502
✅ nextjs-webpack8502
✅ nitro8007
✅ nuxt8007
✅ sveltekit8007
✅ vite8007
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable73014
✅ express-stable73014
✅ fastify-stable73014
✅ hono-stable73014
✅ nextjs-turbopack-canary62025
✅ nextjs-turbopack-stable7908
✅ nextjs-webpack-canary62025
✅ nextjs-webpack-stable7908
✅ nitro-stable73014
✅ nuxt-stable73014
✅ sveltekit-stable73014
✅ vite-stable73014
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable73014
✅ express-stable73014
✅ fastify-stable73014
✅ hono-stable73014
✅ nextjs-turbopack-canary62025
✅ nextjs-turbopack-stable7908
✅ nextjs-webpack-canary62025
✅ nextjs-webpack-stable7908
✅ nitro-stable73014
✅ nuxt-stable73014
✅ sveltekit-stable73014
✅ vite-stable73014
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable73014
✅ express-stable73014
✅ fastify-stable73014
✅ hono-stable73014
✅ nextjs-turbopack-canary62025
✅ nextjs-turbopack-stable7908
✅ nextjs-webpack-canary62025
✅ nextjs-webpack-stable7908
✅ nitro-stable73014
✅ nuxt-stable73014
✅ sveltekit-stable73014
✅ vite-stable73014
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack7908
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev500
❌ mongodb5848
✅ redis-dev500
❌ redis5938
✅ turso-dev500
❌ turso4588
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable73014
✅ e2e-local-postgres-nest-stable73014
✅ e2e-local-prod-nest-stable73014

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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 removes the “step functions must be async” restriction across the SWC transform and the TypeScript language service plugin, allowing synchronous functions to use the "use step" directive as a code-stripping mechanism while preserving the async requirement for "use workflow".

Changes:

  • TypeScript plugin: removes diagnostic error 9002 for synchronous step functions and updates tests accordingly.
  • SWC plugin: lifts async-only checks from "use step" transformation paths and adds a new sync-step fixture to verify output across workflow/step/client modes.
  • Documentation + release: updates SWC plugin spec validation table and adds a changeset for patch releases.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.

Show a summary per file
FileDescription
packages/typescript-plugin/src/diagnostics.tsRemoves async validation for "use step" functions in custom diagnostics.
packages/typescript-plugin/src/diagnostics.test.tsUpdates tests to assert no error 9002 for sync step functions.
packages/swc-plugin-workflow/transform/tests/fixture/sync-step/input.jsAdds fixture input covering sync function/arrow/object-method step directives.
packages/swc-plugin-workflow/transform/tests/fixture/sync-step/output-workflow.jsExpected workflow-mode output for sync-step fixture (initializer exports).
packages/swc-plugin-workflow/transform/tests/fixture/sync-step/output-step.jsExpected step-mode output for sync-step fixture (registration + preserved bodies).
packages/swc-plugin-workflow/transform/tests/fixture/sync-step/output-client.jsExpected client-mode output for sync-step fixture (stepId annotations).
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/input.jsUpdates error fixture to only cover non-async "use workflow" cases.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-workflow.jsUpdates expected workflow-mode output after removing step async restriction.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-workflow.stderrUpdates expected stderr to reflect only "use workflow" async errors.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-step.jsUpdates expected step-mode output after removing step async restriction.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-step.stderrUpdates expected stderr to reflect only "use workflow" async errors.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-client.jsUpdates expected client-mode output after removing step async restriction.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-client.stderrUpdates expected stderr to reflect only "use workflow" async errors.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/input.jsUpdates invalid-export fixture to allow sync function exports in "use step" files.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-workflow.jsExpected workflow-mode output reflecting sync function export allowance.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-workflow.stderrExpected stderr after invalid-export fixture adjustments.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-step.jsExpected step-mode output registering sync exported steps.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-step.stderrExpected stderr after invalid-export fixture adjustments.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-client.jsExpected client-mode output with stepId for sync exported steps.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-client.stderrExpected stderr after invalid-export fixture adjustments.
packages/swc-plugin-workflow/transform/src/lib.rsRemoves async guards for "use step" transformations; keeps "use workflow" async enforcement in relevant paths.
packages/swc-plugin-workflow/spec.mdUpdates validation error documentation to reflect sync "use step" allowance.
.changeset/allow-sync-step-functions.mdAdds patch changeset entries for SWC + TypeScript plugins.

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

Comment threadpackages/swc-plugin-workflow/transform/src/lib.rs Outdated
Comment threadpackages/swc-plugin-workflow/transform/src/lib.rs Outdated
…row behavior
- Remove stale 'Collect registration calls' comment from StepTransform
- Fix 'everyhwere' typo in e2e test comments
- Closure vars IIFE now throws when called outside a step function
context, matching the original __private_getClosureVars behavior
…xport message
- Remove the no-op validate_async_function method and unwrap all callers
- InvalidExport message now says 'Only functions can be exported' for
'use step' files, vs 'Only async functions' for 'use workflow' files

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI review: blocking issues found

Comment threadpackages/swc-plugin-workflow/transform/src/lib.rs Outdated
Comment threadpackages/swc-plugin-workflow/transform/src/lib.rs
Comment threadpackages/typescript-plugin/src/diagnostics.ts Outdated
Comment threadpackages/swc-plugin-workflow/spec.md Outdated
Base automatically changed from inline-step-registration to mainApril 8, 2026 23:58
…ethod async check
- Remove validate_async_function() entirely and unwrap all 8 call sites
(the function was a no-op that always returned true)
- Fix static class method handler to only check async for 'use workflow'
(was still blocking sync step functions on static methods)
- Remove no-op checkStepFunction from TypeScript plugin
- Regenerate test fixture outputs
Also bump changeset from patch to minor (new feature, not bug fix)

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 22 out of 22 changed files in this pull request and generated 4 comments.


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

Comment on lines +4057 to 4058
// Previously validated that step functions must be async. The restriction

CopilotAIApr 9, 2026

Copy link

Choose a reason for hiding this comment

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

There’s a dangling/incomplete comment here (ends mid-sentence) left over from removing the async-only validation. It should either be completed to explain the new behavior or removed to avoid confusion when maintaining this transform logic.

Suggested change
// Previously validated that step functions must be async. The restriction

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed in #1664 — removed the dangling incomplete comment entirely.

Comment on lines +6054 to +6057
// Validate exports if we have a file-level workflow directive.
// Step files allow any exports (sync or async), but workflow files
// require exported functions to be async.
if self.has_file_workflow_directive {

CopilotAIApr 9, 2026

Copy link

Choose a reason for hiding this comment

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

visit_mut_module_items no longer validates exports for module-level 'use step' files, which means non-function exports (constants/classes/re-exports) are now allowed even though they won’t be code-stripped and can easily pull Node-only code into the workflow/client bundles. Consider adding a separate validation branch for has_file_step_directive that allows sync or async functions but rejects non-function exports/re-exports, with an error message that matches that rule.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed in #1664 — added export validation for has_file_step_directive that allows sync/async function exports but rejects non-function exports (constants, classes, re-exports). Error message is "Only functions can be exported from a \"use step\" file".

Comment on lines +3 to 8
// These should all error - not functions
export const value = 42;
export function syncFunc() {
return 'not allowed';
}
export class MyClass {
method() {}
}
export * from './other';

CopilotAIApr 9, 2026

Copy link

Choose a reason for hiding this comment

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

The header comment says these exports “should all error”, but the expected stderr fixtures for this test case were removed and the outputs keep these exports. Please update the comment (and potentially relocate/rename this fixture since it no longer asserts an error) so the test intent matches the actual expected behavior.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed in #1664 — the comment is now correct again since export validation for step files has been restored. The const value, class MyClass, and export * all produce errors; the sync and async function exports pass.

"@workflow/typescript-plugin": minor
---

Allow synchronous functions to use `"use step"` directive. This enables using `"use step"` as a mechanism to strip Node.js-dependent code from the workflow VM bundle without requiring the function to be async.

CopilotAIApr 9, 2026

Copy link

Choose a reason for hiding this comment

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

The PR description mentions that packages/swc-plugin-workflow/spec.md error documentation was updated, but this PR diff doesn’t include any changes to that spec file. Please ensure the spec is updated to reflect that "use step" can be used on sync functions while "use workflow" remains async-only (and adjust any validation/export rules accordingly).

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed in #1664 — updated spec.md error table (split Non-async into workflow-only, added step export validation row) and supported function forms (added sync variants for all step function forms).

@ghostghost mentioned this pull request Apr 9, 2026
Sign up for freeto 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

@TooTallNate@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Allow synchronous functions to use "use step" directive - #1633

Merged
TooTallNate merged 11 commits into
mainfrom
allow-sync-step-functions
Apr 9, 2026
Merged

Allow synchronous functions to use "use step" directive#1633
TooTallNate merged 11 commits into
mainfrom
allow-sync-step-functions

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

Summary

  • Lifts the async function restriction from "use step" in both the SWC compiler plugin and the TypeScript language service plugin
  • Synchronous functions can now use "use step" to strip their Node.js-dependent code from the workflow VM bundle
  • The async restriction is preserved for "use workflow" functions

Motivation

This enables using "use step" as a code-stripping mechanism for synchronous methods (e.g. getReadable() on the Run class) that use Node.js APIs not available in the workflow VM. Previously, "use step" required the function to be async, which was an artificial restriction for this use case.

Changed packages

  • @workflow/swc-plugin — Removed async guards from all step function code paths; updated should_transform_function; updated InvalidExport validation for module-level "use step" files; added sync-step fixture test; cleaned up error test fixtures
  • @workflow/typescript-plugin — Removed error 9002 (sync step function diagnostic); updated tests
  • Updated spec.md error documentation

Test plan

  • 196 Rust SWC plugin tests pass (22 unit + 24 error + 150 fixture, including new sync-step fixture)
  • 95 TypeScript plugin tests pass

…/private
The SWC compiler plugin no longer generates import statements. All step
function registrations and closure variable access are now self-contained
inline IIFEs with zero module dependencies:
- Step registration uses an IIFE that writes to
globalThis[Symbol.for('@workflow/core//registeredSteps')]
- Closure variable access uses an IIFE that reads from
globalThis[Symbol.for('WORKFLOW_STEP_CONTEXT_STORAGE')]
- Registrations are placed immediately after each function definition
instead of being batched at the bottom of the file
This enables 3rd-party node_modules packages to define step functions
without needing the 'workflow' package available at runtime.
Also removes the @workflow/core/private and workflow/internal/private
public subpath exports since they are no longer referenced by generated
code.
Lift the async function restriction from "use step" in both the SWC
compiler plugin and the TypeScript language service plugin. This enables
using "use step" as a mechanism to strip Node.js-dependent code from
the workflow VM bundle without requiring the function to be async.
The async restriction is preserved for "use workflow" functions.
- SWC plugin: removed async guards from all step function code paths,
updated should_transform_function, updated InvalidExport validation
- TypeScript plugin: removed error 9002 for sync step functions
- Added sync-step fixture test, cleaned up error test fixtures
- Updated spec.md error documentation
CopilotAI review requested due to automatic review settings April 7, 2026 07:45
@changeset-bot

changeset-botBot commented Apr 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e4b8d29

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

This PR includes changesets to release 18 packages
NameType
@workflow/swc-pluginMinor
@workflow/typescript-pluginMinor
@workflow/astroPatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nestPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
workflowPatch
@workflow/vitePatch
@workflow/vitestPatch
@workflow/world-testingPatch
@workflow/nuxtPatch
@workflow/aiPatch
@workflow/corePatch
@workflow/web-sharedPatch

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

@TooTallNate
TooTallNate requested a review from a team as a code ownerApril 7, 2026 07:45
@vercel

vercelBot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.043s (-1.4%)1.005s (~)0.963s101.00x
🌐 RedisNext.js (Turbopack)0.054s1.005s0.951s101.27x
🐘 PostgresNitro0.058s (-8.7% 🟢)1.010s (~)0.952s101.34x
🐘 PostgresNext.js (Turbopack)0.059s1.010s0.951s101.37x
🐘 PostgresExpress0.059s (+1.0%)1.010s (~)0.950s101.38x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.228s (+9.1% 🔺)2.214s (+1.9%)1.986s101.00x
▲ VercelNitro0.249s (+6.6% 🔺)2.227s (+6.5% 🔺)1.979s101.09x
▲ VercelNext.js (Turbopack)0.747s (+225.1% 🔺)2.542s (+12.1% 🔺)1.794s103.27x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.124s2.007s0.883s101.00x
💻 LocalNitro1.127s (~)2.006s (~)0.879s101.00x
🐘 PostgresExpress1.132s (-1.0%)2.011s (~)0.878s101.01x
🐘 PostgresNext.js (Turbopack)1.139s2.009s0.870s101.01x
🐘 PostgresNitro1.147s (~)2.010s (~)0.862s101.02x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.873s (-1.7%)4.167s (+10.3% 🔺)2.294s101.00x
▲ VercelNext.js (Turbopack)1.940s (-5.8% 🟢)3.298s (-13.7% 🟢)1.358s101.04x
▲ VercelExpress2.322s (+25.7% 🔺)4.020s (+9.9% 🔺)1.697s101.24x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)10.794s11.025s0.231s31.00x
🐘 PostgresExpress10.866s (~)11.023s (~)0.157s31.01x
🐘 PostgresNext.js (Turbopack)10.905s11.356s0.452s31.01x
🐘 PostgresNitro10.925s (~)11.024s (~)0.099s31.01x
💻 LocalNitro10.926s (~)11.022s (~)0.096s31.01x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.403s (-13.8% 🟢)18.223s (-13.1% 🟢)1.820s21.00x
▲ VercelNext.js (Turbopack)16.427s (-4.6%)17.753s (-8.6% 🟢)1.326s21.00x
▲ VercelNitro17.053s (~)18.660s (-5.5% 🟢)1.607s21.04x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)14.456s15.028s0.573s41.00x
🐘 PostgresNext.js (Turbopack)14.512s15.028s0.515s41.00x
🐘 PostgresExpress14.546s (~)15.023s (~)0.477s41.01x
🐘 PostgresNitro14.685s (+0.5%)15.027s (~)0.342s41.02x
💻 LocalNitro14.956s (~)15.029s (~)0.073s41.03x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro29.351s (-11.0% 🟢)31.401s (-10.0% 🟢)2.050s21.00x
▲ VercelNext.js (Turbopack)29.913s (-11.6% 🟢)31.199s (-13.0% 🟢)1.287s21.02x
▲ VercelExpress30.786s (-4.0%)32.534s (-2.5%)1.748s21.05x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)13.592s14.027s0.435s71.00x
🐘 PostgresNext.js (Turbopack)13.825s14.166s0.340s71.02x
🐘 PostgresExpress13.975s (-1.3%)14.448s (-3.8%)0.473s71.03x
🐘 PostgresNitro14.252s (+0.8%)15.024s (+1.9%)0.772s61.05x
💻 LocalNitro16.674s (+0.7%)17.031s (~)0.357s61.23x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express51.717s (-74.9% 🟢)53.900s (-74.1% 🟢)2.183s21.00x
▲ VercelNitro53.533s (-74.1% 🟢)55.369s (-73.5% 🟢)1.835s21.04x
▲ VercelNext.js (Turbopack)54.318s (-10.4% 🟢)55.810s (-10.8% 🟢)1.492s21.05x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)1.230s2.010s0.780s151.00x
🐘 PostgresExpress1.259s (~)2.009s (~)0.750s151.02x
🐘 PostgresNitro1.272s (-1.4%)2.010s (~)0.738s151.03x
🌐 RedisNext.js (Turbopack)1.323s2.007s0.684s151.08x
💻 LocalNitro1.513s (-1.6%)2.006s (~)0.494s151.23x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.056s (-25.2% 🟢)3.711s (-16.8% 🟢)1.655s91.00x
▲ VercelNext.js (Turbopack)2.542s (+3.4%)3.815s (-15.8% 🟢)1.273s81.24x
▲ VercelNitro2.624s (+0.6%)4.290s (-0.8%)1.666s71.28x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.312s (-2.8%)3.007s (~)0.696s101.00x
🐘 PostgresNitro2.327s (-1.1%)3.008s (~)0.681s101.01x
🐘 PostgresNext.js (Turbopack)2.466s3.010s0.544s101.07x
🌐 RedisNext.js (Turbopack)2.582s3.008s0.426s101.12x
💻 LocalNitro3.000s (+2.5%)3.565s (+14.7% 🔺)0.565s91.30x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.381s (-30.6% 🟢)4.033s (-19.9% 🟢)1.651s81.00x
▲ VercelExpress2.543s (-16.8% 🟢)3.976s (-15.0% 🟢)1.433s81.07x
▲ VercelNext.js (Turbopack)2.993s (+5.3% 🔺)4.436s (-7.3% 🟢)1.443s71.26x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.486s (~)4.011s (~)0.525s81.00x
🐘 PostgresNitro3.491s (+0.8%)4.010s (~)0.519s81.00x
🐘 PostgresNext.js (Turbopack)3.667s4.012s0.345s81.05x
🌐 RedisNext.js (Turbopack)4.133s4.869s0.736s71.19x
💻 LocalNitro8.373s (+2.3%)9.023s (~)0.650s42.40x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.838s (-13.4% 🟢)4.503s (-8.4% 🟢)1.665s71.00x
▲ VercelExpress3.249s (+6.1% 🔺)4.654s (-3.1%)1.404s71.15x
▲ VercelNext.js (Turbopack)4.099s (+0.9%)5.650s (-10.0% 🟢)1.551s61.44x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)1.219s2.010s0.791s151.00x
🐘 PostgresNitro1.268s (+0.8%)2.009s (~)0.740s151.04x
🐘 PostgresExpress1.275s (+0.8%)2.007s (~)0.732s151.05x
🌐 RedisNext.js (Turbopack)1.365s2.006s0.641s151.12x
💻 LocalNitro1.543s (+0.8%)2.006s (~)0.463s151.27x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.086s (-8.5% 🟢)3.837s (-3.2%)1.751s81.00x
▲ VercelNitro2.154s (-6.1% 🟢)3.859s (-2.5%)1.705s81.03x
▲ VercelNext.js (Turbopack)2.260s (-3.5%)3.500s (-16.1% 🟢)1.240s91.08x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.337s (-0.6%)3.009s (~)0.672s101.00x
🐘 PostgresNitro2.354s (-0.8%)3.009s (~)0.654s101.01x
🐘 PostgresNext.js (Turbopack)2.377s3.008s0.631s101.02x
🌐 RedisNext.js (Turbopack)2.555s3.008s0.453s101.09x
💻 LocalNitro3.050s (-1.6%)4.010s (+3.2%)0.959s81.31x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.435s (-99.2% 🟢)3.952s (-98.7% 🟢)1.517s81.00x
▲ VercelExpress2.492s (-96.8% 🟢)3.849s (-95.2% 🟢)1.357s81.02x
▲ VercelNext.js (Turbopack)2.658s (-6.0% 🟢)4.030s (-15.1% 🟢)1.372s81.09x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.471s (~)4.010s (~)0.539s81.00x
🐘 PostgresExpress3.475s (~)4.010s (~)0.535s81.00x
🐘 PostgresNext.js (Turbopack)3.649s4.012s0.363s81.05x
🌐 RedisNext.js (Turbopack)4.120s4.582s0.462s71.19x
💻 LocalNitro8.769s (-2.2%)9.021s (-2.7%)0.251s42.53x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.123s (-29.9% 🟢)4.760s (-20.8% 🟢)1.637s71.00x
▲ VercelNitro3.257s (+8.6% 🔺)4.834s (+3.1%)1.576s71.04x
▲ VercelNext.js (Turbopack)3.527s (-1.8%)4.910s (-8.0% 🟢)1.384s71.13x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.699s1.004s0.305s601.00x
🐘 PostgresNext.js (Turbopack)0.769s1.006s0.236s601.10x
🐘 PostgresExpress0.808s (-5.2% 🟢)1.023s (+1.7%)0.215s591.16x
🐘 PostgresNitro0.860s (+4.4%)1.023s (+1.7%)0.163s591.23x
💻 LocalNitro0.978s (-0.7%)1.057s (-10.5% 🟢)0.079s571.40x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro8.679s (-4.7%)10.740s (-4.0%)2.061s61.00x
▲ VercelNext.js (Turbopack)9.102s (-12.0% 🟢)10.751s (-13.7% 🟢)1.649s61.05x
▲ VercelExpress9.131s (-11.4% 🟢)10.745s (-10.6% 🟢)1.614s61.05x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.676s2.006s0.329s451.00x
🐘 PostgresNext.js (Turbopack)1.872s2.075s0.203s441.12x
🐘 PostgresExpress1.952s (-5.1% 🟢)2.174s (-24.6% 🟢)0.222s421.16x
🐘 PostgresNitro2.093s (+6.2% 🔺)2.945s (+32.3% 🔺)0.852s311.25x
💻 LocalNitro3.017s (~)3.586s (+1.1%)0.569s261.80x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express27.604s (-1.7%)29.418s (-2.2%)1.814s41.00x
▲ VercelNitro28.084s (-3.0%)30.146s (-1.7%)2.062s31.02x
▲ VercelNext.js (Turbopack)28.799s (-6.5% 🟢)30.803s (-6.4% 🟢)2.004s31.04x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)3.383s4.008s0.625s301.00x
🐘 PostgresNext.js (Turbopack)3.737s4.009s0.273s301.10x
🐘 PostgresExpress3.949s (-3.0%)4.147s (-13.8% 🟢)0.197s291.17x
🐘 PostgresNitro4.252s (+2.8%)4.972s (+1.7%)0.720s251.26x
💻 LocalNitro9.279s (+1.0%)9.942s (~)0.663s132.74x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express69.222s (-8.7% 🟢)70.943s (-8.6% 🟢)1.721s21.00x
▲ VercelNitro70.767s (-3.2%)73.163s (-2.3%)2.396s21.02x
▲ VercelNext.js (Turbopack)74.888s (-10.2% 🟢)76.096s (-11.0% 🟢)1.208s21.08x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.252s1.007s0.755s601.00x
🐘 PostgresExpress0.283s (+1.4%)1.007s (~)0.724s601.12x
🐘 PostgresNitro0.286s (~)1.007s (~)0.721s601.13x
🌐 RedisNext.js (Turbopack)0.294s1.004s0.710s601.16x
💻 LocalNitro0.603s (+1.6%)1.004s (~)0.401s602.39x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.456s (-23.7% 🟢)3.016s (-15.2% 🟢)1.560s211.00x
▲ VercelNitro1.477s (-17.8% 🟢)2.985s (-16.2% 🟢)1.507s211.01x
▲ VercelNext.js (Turbopack)1.621s (-2.4%)2.966s (-8.3% 🟢)1.345s211.11x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.467s1.006s0.539s901.00x
🐘 PostgresExpress0.488s (-1.3%)1.007s (~)0.519s901.04x
🐘 PostgresNitro0.501s (~)1.007s (~)0.506s901.07x
🌐 RedisNext.js (Turbopack)1.234s2.006s0.772s452.64x
💻 LocalNitro2.785s (+8.7% 🔺)3.183s (+5.8% 🔺)0.397s295.96x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.526s (-3.3%)4.332s (~)1.807s211.00x
▲ VercelNitro2.686s (+8.3% 🔺)4.386s (+5.1% 🔺)1.701s211.06x
▲ VercelNext.js (Turbopack)3.397s (-4.3%)4.947s (-3.9%)1.550s191.34x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.760s1.014s0.255s1191.00x
🐘 PostgresExpress0.771s (-2.4%)1.007s (~)0.236s1201.01x
🐘 PostgresNitro0.803s (-6.9% 🟢)1.008s (-5.2% 🟢)0.205s1201.06x
🌐 RedisNext.js (Turbopack)2.816s3.032s0.217s403.71x
💻 LocalNitro11.426s (+3.3%)12.031s (+3.1%)0.605s1015.04x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express6.156s (-13.3% 🟢)7.581s (-14.2% 🟢)1.425s161.00x
▲ VercelNitro6.524s (-5.3% 🟢)8.084s (-5.9% 🟢)1.560s151.06x
▲ VercelNext.js (Turbopack)32.897s (+425.9% 🔺)34.290s (+334.1% 🔺)1.393s125.34x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.186s1.001s0.002s1.008s0.822s101.00x
🐘 PostgresExpress0.202s (-2.1%)0.994s (-0.5%)0.002s (+23.1% 🔺)1.010s (~)0.809s101.08x
🐘 PostgresNext.js (Turbopack)0.206s1.001s0.028s1.037s0.832s101.10x
💻 LocalNitro0.206s (+1.2%)1.004s (~)0.013s (+2.5%)1.019s (~)0.812s101.11x
🐘 PostgresNitro0.209s (+3.5%)1.000s (~)0.001s (-7.7% 🟢)1.010s (~)0.801s101.12x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.415s (-40.6% 🟢)2.521s (-33.7% 🟢)0.694s (+87.6% 🔺)3.696s (-20.5% 🟢)2.281s101.00x
▲ VercelNext.js (Turbopack)1.443s (-10.1% 🟢)2.663s (-15.5% 🟢)0.571s (+82.2% 🔺)3.613s (-8.6% 🟢)2.170s101.02x
▲ VercelExpress1.509s (-13.0% 🟢)2.868s (-11.8% 🟢)0.552s (+59.6% 🔺)3.833s (-4.8%)2.324s101.07x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.481s1.001s0.003s1.011s0.530s601.00x
🐘 PostgresNext.js (Turbopack)0.589s1.009s0.005s1.023s0.434s591.22x
🐘 PostgresExpress0.596s (-4.6%)1.005s (~)0.004s (-8.6% 🟢)1.021s (~)0.425s591.24x
🐘 PostgresNitro0.647s (+4.0%)1.005s (~)0.005s (+14.5% 🔺)1.024s (~)0.377s591.35x
💻 LocalNitro0.828s (+13.5% 🔺)1.012s (~)0.010s (+1.1%)1.116s (+9.1% 🔺)0.288s541.72x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.990s (+5.4% 🔺)5.204s (-1.5%)0.315s (-18.0% 🟢)5.965s (-1.8%)1.974s111.00x
▲ VercelNext.js (Turbopack)4.125s (-2.8%)5.578s (-3.6%)0.185s (-52.3% 🟢)6.124s (-7.7% 🟢)2.000s101.03x
▲ VercelExpress5.305s6.929s0.393s7.734s2.429s81.33x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.912s1.035s0.000s1.039s0.127s581.00x
🐘 PostgresNext.js (Turbopack)0.946s1.154s0.000s1.171s0.225s521.04x
🐘 PostgresExpress0.977s (+0.6%)1.243s (+6.1% 🔺)0.000s (+59.4% 🔺)1.257s (+5.1% 🔺)0.281s481.07x
🐘 PostgresNitro0.991s (+3.6%)1.214s (+5.7% 🔺)0.000s (-65.3% 🟢)1.228s (+5.7% 🔺)0.237s501.09x
💻 LocalNitro1.244s (~)2.021s (~)0.000s (+50.0% 🔺)2.023s (~)0.779s301.36x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.787s (+7.0% 🔺)4.205s (+13.8% 🔺)0.000s (-85.6% 🟢)4.643s (+12.6% 🔺)1.855s131.00x
▲ VercelNitro2.823s (-90.9% 🟢)4.110s (-87.2% 🟢)0.001s (+Infinity% 🔺)4.619s (-85.9% 🟢)1.796s131.01x
▲ VercelNext.js (Turbopack)3.007s (-9.8% 🟢)4.399s (-5.4% 🟢)0.000s (-100.0% 🟢)4.764s (-6.5% 🟢)1.757s131.08x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.666s2.036s0.000s2.039s0.373s301.00x
🐘 PostgresExpress1.747s (-7.0% 🟢)2.140s (-6.7% 🟢)0.000s (+Infinity% 🔺)2.152s (-6.7% 🟢)0.405s281.05x
🐘 PostgresNitro1.791s (~)2.134s (~)0.000s (-3.4%)2.147s (~)0.356s291.07x
🐘 PostgresNext.js (Turbopack)1.805s2.146s0.000s2.192s0.387s281.08x
💻 LocalNitro3.632s (+2.5%)4.232s (+4.9%)0.001s (~)4.235s (+4.9%)0.604s152.18x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.867s (+2.6%)5.104s (+4.7%)0.001s (+900.0% 🔺)5.538s (+3.8%)1.671s121.00x
▲ VercelNitro5.456s (+32.2% 🔺)6.612s (+23.8% 🔺)0.000s (+144.4% 🔺)7.089s (+22.2% 🔺)1.633s91.41x
▲ VercelNext.js (Turbopack)5.462s (+36.0% 🔺)6.548s (+22.8% 🔺)0.000s (NaN%)6.966s (+19.3% 🔺)1.504s91.41x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro21/21
🐘 PostgresNext.js (Turbopack)12/21
▲ VercelExpress13/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres19/21
Next.js (Turbopack)🌐 Redis12/21
Nitro🐘 Postgres16/21
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
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@github-actions

github-actionsBot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production890067957
✅ 💻 Local Development86601781044
✅ 📦 Local Production86601781044
✅ 🐘 Local Postgres86601781044
✅ 🪟 Windows790887
❌ 🌍 Community Worlds1366524225
✅ 📋 Other219042261
Total3922656754662

❌ Failed Tests

🌍 Community Worlds (65 failed)

mongodb (4 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNQT12HK8X4N86DEASFAYTC3
  • webhookWorkflow | wrun_01KNQT1B8CE6EZ1PEED6RR64J3
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNQT90QM3AQHKNFTTC3T4RSX
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNQTFBW8QY7AK7XNWV2MJH0N

redis (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNQT12HK8X4N86DEASFAYTC3
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNQT90QM3AQHKNFTTC3T4RSX
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNQTFBW8QY7AK7XNWV2MJH0N

turso (58 failed):

  • addTenWorkflow | wrun_01KNQSZWK13GCCQH5P3FH07BKA
  • addTenWorkflow | wrun_01KNQSZWK13GCCQH5P3FH07BKA
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KNQT0FT2RNF0HGMMDGWWFG78
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KNQT04E56N7KQ56RT376TDRY
  • promiseRaceWorkflow | wrun_01KNQT08Y6VPWJ6HA9XB3ACDVM
  • promiseAnyWorkflow | wrun_01KNQT0B3AWW74S02RSY96DFDY
  • importedStepOnlyWorkflow | wrun_01KNQT0VCPFWJEJR9NRCGH1YE1
  • hookWorkflow | wrun_01KNQT0Q25ZF0230NTFW8TT8FV
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNQT12HK8X4N86DEASFAYTC3
  • webhookWorkflow | wrun_01KNQT1B8CE6EZ1PEED6RR64J3
  • sleepingWorkflow | wrun_01KNQT1H85476RXPSMD074B2X0
  • parallelSleepWorkflow | wrun_01KNQT1X4V7GJPN458S4DTNQHZ
  • nullByteWorkflow | wrun_01KNQT20D17XGS9YA969RSNBCX
  • workflowAndStepMetadataWorkflow | wrun_01KNQT22GYCEM9QQ63EYRWYNYJ
  • fetchWorkflow | wrun_01KNQT4QEY4E6RG3M8NABTD1WT
  • promiseRaceStressTestWorkflow | wrun_01KNQT4ST3XHH8WE6DE83AQQ2C
  • 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()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KNQT8C7D0W9WVRY9DB6M4R6F
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNQT90QM3AQHKNFTTC3T4RSX
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KNQT9N3Q09Z1RWEW56XMCHA3
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KNQTA95C42ANFAA89B5TYKMB
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KNQTAJX9XKZVZ5CE2TFDDGRD
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KNQTARF9TMA086QP6MMNFMPD
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KNQTATM6MNKY1EC8MNQ9Z5RQ
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KNQTBAFJVXA1W3K58JC3MHE3
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KNQTBG2A2R586XK4ANBP75KQ
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KNQTBPRJW3W53CRJ9A43SX2T
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KNQTBXD7ED0HM67PD7H4ER2X
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KNQTC2Z4MT98F21MRWEJ9DSB
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KNQTC9NDWM216M5JCAQBM90C
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KNQTCH1WM9Z1WVTTBGMPMBRN
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KNQTCXME3Y7DX14MBYE93H4D
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KNQTD5CV0BR9DZAG478KNZWX
  • cancelRun - cancelling a running workflow | wrun_01KNQTDC6Y4PD7004JSH4NQBYC
  • cancelRun via CLI - cancelling a running workflow | wrun_01KNQTDNJ0Z5XAKHDKSY4EEN56
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KNQTE1PJA6ZM5HN105P89GME
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KNQTEPC3ZQSTTXA0PZS0GAP7
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KNQTF0MXCVDK1YB1PQDYC8YY
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KNQTF7DQSQERG48JV5RK0R6S
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KNQTF9SAC38S1HRGBERBMHNE
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNQTFBW8QY7AK7XNWV2MJH0N
  • getterStepWorkflow - getter functions with "use step" directive | wrun_01KNQTFF4388KKRERJQVTNB56C

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro8007
✅ example8007
✅ express8007
✅ fastify8007
✅ hono8007
✅ nextjs-turbopack8502
✅ nextjs-webpack8502
✅ nitro8007
✅ nuxt8007
✅ sveltekit8007
✅ vite8007
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable73014
✅ express-stable73014
✅ fastify-stable73014
✅ hono-stable73014
✅ nextjs-turbopack-canary62025
✅ nextjs-turbopack-stable7908
✅ nextjs-webpack-canary62025
✅ nextjs-webpack-stable7908
✅ nitro-stable73014
✅ nuxt-stable73014
✅ sveltekit-stable73014
✅ vite-stable73014
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable73014
✅ express-stable73014
✅ fastify-stable73014
✅ hono-stable73014
✅ nextjs-turbopack-canary62025
✅ nextjs-turbopack-stable7908
✅ nextjs-webpack-canary62025
✅ nextjs-webpack-stable7908
✅ nitro-stable73014
✅ nuxt-stable73014
✅ sveltekit-stable73014
✅ vite-stable73014
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable73014
✅ express-stable73014
✅ fastify-stable73014
✅ hono-stable73014
✅ nextjs-turbopack-canary62025
✅ nextjs-turbopack-stable7908
✅ nextjs-webpack-canary62025
✅ nextjs-webpack-stable7908
✅ nitro-stable73014
✅ nuxt-stable73014
✅ sveltekit-stable73014
✅ vite-stable73014
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack7908
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev500
❌ mongodb5848
✅ redis-dev500
❌ redis5938
✅ turso-dev500
❌ turso4588
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable73014
✅ e2e-local-postgres-nest-stable73014
✅ e2e-local-prod-nest-stable73014

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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 removes the “step functions must be async” restriction across the SWC transform and the TypeScript language service plugin, allowing synchronous functions to use the "use step" directive as a code-stripping mechanism while preserving the async requirement for "use workflow".

Changes:

  • TypeScript plugin: removes diagnostic error 9002 for synchronous step functions and updates tests accordingly.
  • SWC plugin: lifts async-only checks from "use step" transformation paths and adds a new sync-step fixture to verify output across workflow/step/client modes.
  • Documentation + release: updates SWC plugin spec validation table and adds a changeset for patch releases.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.

Show a summary per file
FileDescription
packages/typescript-plugin/src/diagnostics.tsRemoves async validation for "use step" functions in custom diagnostics.
packages/typescript-plugin/src/diagnostics.test.tsUpdates tests to assert no error 9002 for sync step functions.
packages/swc-plugin-workflow/transform/tests/fixture/sync-step/input.jsAdds fixture input covering sync function/arrow/object-method step directives.
packages/swc-plugin-workflow/transform/tests/fixture/sync-step/output-workflow.jsExpected workflow-mode output for sync-step fixture (initializer exports).
packages/swc-plugin-workflow/transform/tests/fixture/sync-step/output-step.jsExpected step-mode output for sync-step fixture (registration + preserved bodies).
packages/swc-plugin-workflow/transform/tests/fixture/sync-step/output-client.jsExpected client-mode output for sync-step fixture (stepId annotations).
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/input.jsUpdates error fixture to only cover non-async "use workflow" cases.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-workflow.jsUpdates expected workflow-mode output after removing step async restriction.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-workflow.stderrUpdates expected stderr to reflect only "use workflow" async errors.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-step.jsUpdates expected step-mode output after removing step async restriction.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-step.stderrUpdates expected stderr to reflect only "use workflow" async errors.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-client.jsUpdates expected client-mode output after removing step async restriction.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-client.stderrUpdates expected stderr to reflect only "use workflow" async errors.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/input.jsUpdates invalid-export fixture to allow sync function exports in "use step" files.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-workflow.jsExpected workflow-mode output reflecting sync function export allowance.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-workflow.stderrExpected stderr after invalid-export fixture adjustments.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-step.jsExpected step-mode output registering sync exported steps.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-step.stderrExpected stderr after invalid-export fixture adjustments.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-client.jsExpected client-mode output with stepId for sync exported steps.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-client.stderrExpected stderr after invalid-export fixture adjustments.
packages/swc-plugin-workflow/transform/src/lib.rsRemoves async guards for "use step" transformations; keeps "use workflow" async enforcement in relevant paths.
packages/swc-plugin-workflow/spec.mdUpdates validation error documentation to reflect sync "use step" allowance.
.changeset/allow-sync-step-functions.mdAdds patch changeset entries for SWC + TypeScript plugins.

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

Comment threadpackages/swc-plugin-workflow/transform/src/lib.rs Outdated
Comment threadpackages/swc-plugin-workflow/transform/src/lib.rs Outdated
…row behavior
- Remove stale 'Collect registration calls' comment from StepTransform
- Fix 'everyhwere' typo in e2e test comments
- Closure vars IIFE now throws when called outside a step function
context, matching the original __private_getClosureVars behavior
…xport message
- Remove the no-op validate_async_function method and unwrap all callers
- InvalidExport message now says 'Only functions can be exported' for
'use step' files, vs 'Only async functions' for 'use workflow' files

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI review: blocking issues found

Comment threadpackages/swc-plugin-workflow/transform/src/lib.rs Outdated
Comment threadpackages/swc-plugin-workflow/transform/src/lib.rs
Comment threadpackages/typescript-plugin/src/diagnostics.ts Outdated
Comment threadpackages/swc-plugin-workflow/spec.md Outdated
Base automatically changed from inline-step-registration to mainApril 8, 2026 23:58
…ethod async check
- Remove validate_async_function() entirely and unwrap all 8 call sites
(the function was a no-op that always returned true)
- Fix static class method handler to only check async for 'use workflow'
(was still blocking sync step functions on static methods)
- Remove no-op checkStepFunction from TypeScript plugin
- Regenerate test fixture outputs
Also bump changeset from patch to minor (new feature, not bug fix)

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 22 out of 22 changed files in this pull request and generated 4 comments.


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

Comment on lines +4057 to 4058
// Previously validated that step functions must be async. The restriction

CopilotAIApr 9, 2026

Copy link

Choose a reason for hiding this comment

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

There’s a dangling/incomplete comment here (ends mid-sentence) left over from removing the async-only validation. It should either be completed to explain the new behavior or removed to avoid confusion when maintaining this transform logic.

Suggested change
// Previously validated that step functions must be async. The restriction

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed in #1664 — removed the dangling incomplete comment entirely.

Comment on lines +6054 to +6057
// Validate exports if we have a file-level workflow directive.
// Step files allow any exports (sync or async), but workflow files
// require exported functions to be async.
if self.has_file_workflow_directive {

CopilotAIApr 9, 2026

Copy link

Choose a reason for hiding this comment

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

visit_mut_module_items no longer validates exports for module-level 'use step' files, which means non-function exports (constants/classes/re-exports) are now allowed even though they won’t be code-stripped and can easily pull Node-only code into the workflow/client bundles. Consider adding a separate validation branch for has_file_step_directive that allows sync or async functions but rejects non-function exports/re-exports, with an error message that matches that rule.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed in #1664 — added export validation for has_file_step_directive that allows sync/async function exports but rejects non-function exports (constants, classes, re-exports). Error message is "Only functions can be exported from a \"use step\" file".

Comment on lines +3 to 8
// These should all error - not functions
export const value = 42;
export function syncFunc() {
return 'not allowed';
}
export class MyClass {
method() {}
}
export * from './other';

CopilotAIApr 9, 2026

Copy link

Choose a reason for hiding this comment

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

The header comment says these exports “should all error”, but the expected stderr fixtures for this test case were removed and the outputs keep these exports. Please update the comment (and potentially relocate/rename this fixture since it no longer asserts an error) so the test intent matches the actual expected behavior.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed in #1664 — the comment is now correct again since export validation for step files has been restored. The const value, class MyClass, and export * all produce errors; the sync and async function exports pass.

"@workflow/typescript-plugin": minor
---

Allow synchronous functions to use `"use step"` directive. This enables using `"use step"` as a mechanism to strip Node.js-dependent code from the workflow VM bundle without requiring the function to be async.

CopilotAIApr 9, 2026

Copy link

Choose a reason for hiding this comment

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

The PR description mentions that packages/swc-plugin-workflow/spec.md error documentation was updated, but this PR diff doesn’t include any changes to that spec file. Please ensure the spec is updated to reflect that "use step" can be used on sync functions while "use workflow" remains async-only (and adjust any validation/export rules accordingly).

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed in #1664 — updated spec.md error table (split Non-async into workflow-only, added step export validation row) and supported function forms (added sync variants for all step function forms).

@ghostghost mentioned this pull request Apr 9, 2026
Sign up for freeto 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

@TooTallNate@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Allow synchronous functions to use "use step" directive - #1633

Merged
TooTallNate merged 11 commits into
mainfrom
allow-sync-step-functions
Apr 9, 2026
Merged

Allow synchronous functions to use "use step" directive#1633
TooTallNate merged 11 commits into
mainfrom
allow-sync-step-functions

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

Summary

  • Lifts the async function restriction from "use step" in both the SWC compiler plugin and the TypeScript language service plugin
  • Synchronous functions can now use "use step" to strip their Node.js-dependent code from the workflow VM bundle
  • The async restriction is preserved for "use workflow" functions

Motivation

This enables using "use step" as a code-stripping mechanism for synchronous methods (e.g. getReadable() on the Run class) that use Node.js APIs not available in the workflow VM. Previously, "use step" required the function to be async, which was an artificial restriction for this use case.

Changed packages

  • @workflow/swc-plugin — Removed async guards from all step function code paths; updated should_transform_function; updated InvalidExport validation for module-level "use step" files; added sync-step fixture test; cleaned up error test fixtures
  • @workflow/typescript-plugin — Removed error 9002 (sync step function diagnostic); updated tests
  • Updated spec.md error documentation

Test plan

  • 196 Rust SWC plugin tests pass (22 unit + 24 error + 150 fixture, including new sync-step fixture)
  • 95 TypeScript plugin tests pass

…/private
The SWC compiler plugin no longer generates import statements. All step
function registrations and closure variable access are now self-contained
inline IIFEs with zero module dependencies:
- Step registration uses an IIFE that writes to
globalThis[Symbol.for('@workflow/core//registeredSteps')]
- Closure variable access uses an IIFE that reads from
globalThis[Symbol.for('WORKFLOW_STEP_CONTEXT_STORAGE')]
- Registrations are placed immediately after each function definition
instead of being batched at the bottom of the file
This enables 3rd-party node_modules packages to define step functions
without needing the 'workflow' package available at runtime.
Also removes the @workflow/core/private and workflow/internal/private
public subpath exports since they are no longer referenced by generated
code.
Lift the async function restriction from "use step" in both the SWC
compiler plugin and the TypeScript language service plugin. This enables
using "use step" as a mechanism to strip Node.js-dependent code from
the workflow VM bundle without requiring the function to be async.
The async restriction is preserved for "use workflow" functions.
- SWC plugin: removed async guards from all step function code paths,
updated should_transform_function, updated InvalidExport validation
- TypeScript plugin: removed error 9002 for sync step functions
- Added sync-step fixture test, cleaned up error test fixtures
- Updated spec.md error documentation
CopilotAI review requested due to automatic review settings April 7, 2026 07:45
@changeset-bot

changeset-botBot commented Apr 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e4b8d29

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

This PR includes changesets to release 18 packages
NameType
@workflow/swc-pluginMinor
@workflow/typescript-pluginMinor
@workflow/astroPatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nestPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
workflowPatch
@workflow/vitePatch
@workflow/vitestPatch
@workflow/world-testingPatch
@workflow/nuxtPatch
@workflow/aiPatch
@workflow/corePatch
@workflow/web-sharedPatch

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

@TooTallNate
TooTallNate requested a review from a team as a code ownerApril 7, 2026 07:45
@vercel

vercelBot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.043s (-1.4%)1.005s (~)0.963s101.00x
🌐 RedisNext.js (Turbopack)0.054s1.005s0.951s101.27x
🐘 PostgresNitro0.058s (-8.7% 🟢)1.010s (~)0.952s101.34x
🐘 PostgresNext.js (Turbopack)0.059s1.010s0.951s101.37x
🐘 PostgresExpress0.059s (+1.0%)1.010s (~)0.950s101.38x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.228s (+9.1% 🔺)2.214s (+1.9%)1.986s101.00x
▲ VercelNitro0.249s (+6.6% 🔺)2.227s (+6.5% 🔺)1.979s101.09x
▲ VercelNext.js (Turbopack)0.747s (+225.1% 🔺)2.542s (+12.1% 🔺)1.794s103.27x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.124s2.007s0.883s101.00x
💻 LocalNitro1.127s (~)2.006s (~)0.879s101.00x
🐘 PostgresExpress1.132s (-1.0%)2.011s (~)0.878s101.01x
🐘 PostgresNext.js (Turbopack)1.139s2.009s0.870s101.01x
🐘 PostgresNitro1.147s (~)2.010s (~)0.862s101.02x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.873s (-1.7%)4.167s (+10.3% 🔺)2.294s101.00x
▲ VercelNext.js (Turbopack)1.940s (-5.8% 🟢)3.298s (-13.7% 🟢)1.358s101.04x
▲ VercelExpress2.322s (+25.7% 🔺)4.020s (+9.9% 🔺)1.697s101.24x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)10.794s11.025s0.231s31.00x
🐘 PostgresExpress10.866s (~)11.023s (~)0.157s31.01x
🐘 PostgresNext.js (Turbopack)10.905s11.356s0.452s31.01x
🐘 PostgresNitro10.925s (~)11.024s (~)0.099s31.01x
💻 LocalNitro10.926s (~)11.022s (~)0.096s31.01x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.403s (-13.8% 🟢)18.223s (-13.1% 🟢)1.820s21.00x
▲ VercelNext.js (Turbopack)16.427s (-4.6%)17.753s (-8.6% 🟢)1.326s21.00x
▲ VercelNitro17.053s (~)18.660s (-5.5% 🟢)1.607s21.04x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)14.456s15.028s0.573s41.00x
🐘 PostgresNext.js (Turbopack)14.512s15.028s0.515s41.00x
🐘 PostgresExpress14.546s (~)15.023s (~)0.477s41.01x
🐘 PostgresNitro14.685s (+0.5%)15.027s (~)0.342s41.02x
💻 LocalNitro14.956s (~)15.029s (~)0.073s41.03x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro29.351s (-11.0% 🟢)31.401s (-10.0% 🟢)2.050s21.00x
▲ VercelNext.js (Turbopack)29.913s (-11.6% 🟢)31.199s (-13.0% 🟢)1.287s21.02x
▲ VercelExpress30.786s (-4.0%)32.534s (-2.5%)1.748s21.05x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)13.592s14.027s0.435s71.00x
🐘 PostgresNext.js (Turbopack)13.825s14.166s0.340s71.02x
🐘 PostgresExpress13.975s (-1.3%)14.448s (-3.8%)0.473s71.03x
🐘 PostgresNitro14.252s (+0.8%)15.024s (+1.9%)0.772s61.05x
💻 LocalNitro16.674s (+0.7%)17.031s (~)0.357s61.23x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express51.717s (-74.9% 🟢)53.900s (-74.1% 🟢)2.183s21.00x
▲ VercelNitro53.533s (-74.1% 🟢)55.369s (-73.5% 🟢)1.835s21.04x
▲ VercelNext.js (Turbopack)54.318s (-10.4% 🟢)55.810s (-10.8% 🟢)1.492s21.05x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)1.230s2.010s0.780s151.00x
🐘 PostgresExpress1.259s (~)2.009s (~)0.750s151.02x
🐘 PostgresNitro1.272s (-1.4%)2.010s (~)0.738s151.03x
🌐 RedisNext.js (Turbopack)1.323s2.007s0.684s151.08x
💻 LocalNitro1.513s (-1.6%)2.006s (~)0.494s151.23x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.056s (-25.2% 🟢)3.711s (-16.8% 🟢)1.655s91.00x
▲ VercelNext.js (Turbopack)2.542s (+3.4%)3.815s (-15.8% 🟢)1.273s81.24x
▲ VercelNitro2.624s (+0.6%)4.290s (-0.8%)1.666s71.28x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.312s (-2.8%)3.007s (~)0.696s101.00x
🐘 PostgresNitro2.327s (-1.1%)3.008s (~)0.681s101.01x
🐘 PostgresNext.js (Turbopack)2.466s3.010s0.544s101.07x
🌐 RedisNext.js (Turbopack)2.582s3.008s0.426s101.12x
💻 LocalNitro3.000s (+2.5%)3.565s (+14.7% 🔺)0.565s91.30x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.381s (-30.6% 🟢)4.033s (-19.9% 🟢)1.651s81.00x
▲ VercelExpress2.543s (-16.8% 🟢)3.976s (-15.0% 🟢)1.433s81.07x
▲ VercelNext.js (Turbopack)2.993s (+5.3% 🔺)4.436s (-7.3% 🟢)1.443s71.26x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.486s (~)4.011s (~)0.525s81.00x
🐘 PostgresNitro3.491s (+0.8%)4.010s (~)0.519s81.00x
🐘 PostgresNext.js (Turbopack)3.667s4.012s0.345s81.05x
🌐 RedisNext.js (Turbopack)4.133s4.869s0.736s71.19x
💻 LocalNitro8.373s (+2.3%)9.023s (~)0.650s42.40x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.838s (-13.4% 🟢)4.503s (-8.4% 🟢)1.665s71.00x
▲ VercelExpress3.249s (+6.1% 🔺)4.654s (-3.1%)1.404s71.15x
▲ VercelNext.js (Turbopack)4.099s (+0.9%)5.650s (-10.0% 🟢)1.551s61.44x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)1.219s2.010s0.791s151.00x
🐘 PostgresNitro1.268s (+0.8%)2.009s (~)0.740s151.04x
🐘 PostgresExpress1.275s (+0.8%)2.007s (~)0.732s151.05x
🌐 RedisNext.js (Turbopack)1.365s2.006s0.641s151.12x
💻 LocalNitro1.543s (+0.8%)2.006s (~)0.463s151.27x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.086s (-8.5% 🟢)3.837s (-3.2%)1.751s81.00x
▲ VercelNitro2.154s (-6.1% 🟢)3.859s (-2.5%)1.705s81.03x
▲ VercelNext.js (Turbopack)2.260s (-3.5%)3.500s (-16.1% 🟢)1.240s91.08x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.337s (-0.6%)3.009s (~)0.672s101.00x
🐘 PostgresNitro2.354s (-0.8%)3.009s (~)0.654s101.01x
🐘 PostgresNext.js (Turbopack)2.377s3.008s0.631s101.02x
🌐 RedisNext.js (Turbopack)2.555s3.008s0.453s101.09x
💻 LocalNitro3.050s (-1.6%)4.010s (+3.2%)0.959s81.31x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.435s (-99.2% 🟢)3.952s (-98.7% 🟢)1.517s81.00x
▲ VercelExpress2.492s (-96.8% 🟢)3.849s (-95.2% 🟢)1.357s81.02x
▲ VercelNext.js (Turbopack)2.658s (-6.0% 🟢)4.030s (-15.1% 🟢)1.372s81.09x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.471s (~)4.010s (~)0.539s81.00x
🐘 PostgresExpress3.475s (~)4.010s (~)0.535s81.00x
🐘 PostgresNext.js (Turbopack)3.649s4.012s0.363s81.05x
🌐 RedisNext.js (Turbopack)4.120s4.582s0.462s71.19x
💻 LocalNitro8.769s (-2.2%)9.021s (-2.7%)0.251s42.53x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.123s (-29.9% 🟢)4.760s (-20.8% 🟢)1.637s71.00x
▲ VercelNitro3.257s (+8.6% 🔺)4.834s (+3.1%)1.576s71.04x
▲ VercelNext.js (Turbopack)3.527s (-1.8%)4.910s (-8.0% 🟢)1.384s71.13x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.699s1.004s0.305s601.00x
🐘 PostgresNext.js (Turbopack)0.769s1.006s0.236s601.10x
🐘 PostgresExpress0.808s (-5.2% 🟢)1.023s (+1.7%)0.215s591.16x
🐘 PostgresNitro0.860s (+4.4%)1.023s (+1.7%)0.163s591.23x
💻 LocalNitro0.978s (-0.7%)1.057s (-10.5% 🟢)0.079s571.40x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro8.679s (-4.7%)10.740s (-4.0%)2.061s61.00x
▲ VercelNext.js (Turbopack)9.102s (-12.0% 🟢)10.751s (-13.7% 🟢)1.649s61.05x
▲ VercelExpress9.131s (-11.4% 🟢)10.745s (-10.6% 🟢)1.614s61.05x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.676s2.006s0.329s451.00x
🐘 PostgresNext.js (Turbopack)1.872s2.075s0.203s441.12x
🐘 PostgresExpress1.952s (-5.1% 🟢)2.174s (-24.6% 🟢)0.222s421.16x
🐘 PostgresNitro2.093s (+6.2% 🔺)2.945s (+32.3% 🔺)0.852s311.25x
💻 LocalNitro3.017s (~)3.586s (+1.1%)0.569s261.80x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express27.604s (-1.7%)29.418s (-2.2%)1.814s41.00x
▲ VercelNitro28.084s (-3.0%)30.146s (-1.7%)2.062s31.02x
▲ VercelNext.js (Turbopack)28.799s (-6.5% 🟢)30.803s (-6.4% 🟢)2.004s31.04x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)3.383s4.008s0.625s301.00x
🐘 PostgresNext.js (Turbopack)3.737s4.009s0.273s301.10x
🐘 PostgresExpress3.949s (-3.0%)4.147s (-13.8% 🟢)0.197s291.17x
🐘 PostgresNitro4.252s (+2.8%)4.972s (+1.7%)0.720s251.26x
💻 LocalNitro9.279s (+1.0%)9.942s (~)0.663s132.74x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express69.222s (-8.7% 🟢)70.943s (-8.6% 🟢)1.721s21.00x
▲ VercelNitro70.767s (-3.2%)73.163s (-2.3%)2.396s21.02x
▲ VercelNext.js (Turbopack)74.888s (-10.2% 🟢)76.096s (-11.0% 🟢)1.208s21.08x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.252s1.007s0.755s601.00x
🐘 PostgresExpress0.283s (+1.4%)1.007s (~)0.724s601.12x
🐘 PostgresNitro0.286s (~)1.007s (~)0.721s601.13x
🌐 RedisNext.js (Turbopack)0.294s1.004s0.710s601.16x
💻 LocalNitro0.603s (+1.6%)1.004s (~)0.401s602.39x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.456s (-23.7% 🟢)3.016s (-15.2% 🟢)1.560s211.00x
▲ VercelNitro1.477s (-17.8% 🟢)2.985s (-16.2% 🟢)1.507s211.01x
▲ VercelNext.js (Turbopack)1.621s (-2.4%)2.966s (-8.3% 🟢)1.345s211.11x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.467s1.006s0.539s901.00x
🐘 PostgresExpress0.488s (-1.3%)1.007s (~)0.519s901.04x
🐘 PostgresNitro0.501s (~)1.007s (~)0.506s901.07x
🌐 RedisNext.js (Turbopack)1.234s2.006s0.772s452.64x
💻 LocalNitro2.785s (+8.7% 🔺)3.183s (+5.8% 🔺)0.397s295.96x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.526s (-3.3%)4.332s (~)1.807s211.00x
▲ VercelNitro2.686s (+8.3% 🔺)4.386s (+5.1% 🔺)1.701s211.06x
▲ VercelNext.js (Turbopack)3.397s (-4.3%)4.947s (-3.9%)1.550s191.34x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.760s1.014s0.255s1191.00x
🐘 PostgresExpress0.771s (-2.4%)1.007s (~)0.236s1201.01x
🐘 PostgresNitro0.803s (-6.9% 🟢)1.008s (-5.2% 🟢)0.205s1201.06x
🌐 RedisNext.js (Turbopack)2.816s3.032s0.217s403.71x
💻 LocalNitro11.426s (+3.3%)12.031s (+3.1%)0.605s1015.04x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express6.156s (-13.3% 🟢)7.581s (-14.2% 🟢)1.425s161.00x
▲ VercelNitro6.524s (-5.3% 🟢)8.084s (-5.9% 🟢)1.560s151.06x
▲ VercelNext.js (Turbopack)32.897s (+425.9% 🔺)34.290s (+334.1% 🔺)1.393s125.34x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.186s1.001s0.002s1.008s0.822s101.00x
🐘 PostgresExpress0.202s (-2.1%)0.994s (-0.5%)0.002s (+23.1% 🔺)1.010s (~)0.809s101.08x
🐘 PostgresNext.js (Turbopack)0.206s1.001s0.028s1.037s0.832s101.10x
💻 LocalNitro0.206s (+1.2%)1.004s (~)0.013s (+2.5%)1.019s (~)0.812s101.11x
🐘 PostgresNitro0.209s (+3.5%)1.000s (~)0.001s (-7.7% 🟢)1.010s (~)0.801s101.12x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.415s (-40.6% 🟢)2.521s (-33.7% 🟢)0.694s (+87.6% 🔺)3.696s (-20.5% 🟢)2.281s101.00x
▲ VercelNext.js (Turbopack)1.443s (-10.1% 🟢)2.663s (-15.5% 🟢)0.571s (+82.2% 🔺)3.613s (-8.6% 🟢)2.170s101.02x
▲ VercelExpress1.509s (-13.0% 🟢)2.868s (-11.8% 🟢)0.552s (+59.6% 🔺)3.833s (-4.8%)2.324s101.07x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.481s1.001s0.003s1.011s0.530s601.00x
🐘 PostgresNext.js (Turbopack)0.589s1.009s0.005s1.023s0.434s591.22x
🐘 PostgresExpress0.596s (-4.6%)1.005s (~)0.004s (-8.6% 🟢)1.021s (~)0.425s591.24x
🐘 PostgresNitro0.647s (+4.0%)1.005s (~)0.005s (+14.5% 🔺)1.024s (~)0.377s591.35x
💻 LocalNitro0.828s (+13.5% 🔺)1.012s (~)0.010s (+1.1%)1.116s (+9.1% 🔺)0.288s541.72x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.990s (+5.4% 🔺)5.204s (-1.5%)0.315s (-18.0% 🟢)5.965s (-1.8%)1.974s111.00x
▲ VercelNext.js (Turbopack)4.125s (-2.8%)5.578s (-3.6%)0.185s (-52.3% 🟢)6.124s (-7.7% 🟢)2.000s101.03x
▲ VercelExpress5.305s6.929s0.393s7.734s2.429s81.33x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.912s1.035s0.000s1.039s0.127s581.00x
🐘 PostgresNext.js (Turbopack)0.946s1.154s0.000s1.171s0.225s521.04x
🐘 PostgresExpress0.977s (+0.6%)1.243s (+6.1% 🔺)0.000s (+59.4% 🔺)1.257s (+5.1% 🔺)0.281s481.07x
🐘 PostgresNitro0.991s (+3.6%)1.214s (+5.7% 🔺)0.000s (-65.3% 🟢)1.228s (+5.7% 🔺)0.237s501.09x
💻 LocalNitro1.244s (~)2.021s (~)0.000s (+50.0% 🔺)2.023s (~)0.779s301.36x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.787s (+7.0% 🔺)4.205s (+13.8% 🔺)0.000s (-85.6% 🟢)4.643s (+12.6% 🔺)1.855s131.00x
▲ VercelNitro2.823s (-90.9% 🟢)4.110s (-87.2% 🟢)0.001s (+Infinity% 🔺)4.619s (-85.9% 🟢)1.796s131.01x
▲ VercelNext.js (Turbopack)3.007s (-9.8% 🟢)4.399s (-5.4% 🟢)0.000s (-100.0% 🟢)4.764s (-6.5% 🟢)1.757s131.08x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.666s2.036s0.000s2.039s0.373s301.00x
🐘 PostgresExpress1.747s (-7.0% 🟢)2.140s (-6.7% 🟢)0.000s (+Infinity% 🔺)2.152s (-6.7% 🟢)0.405s281.05x
🐘 PostgresNitro1.791s (~)2.134s (~)0.000s (-3.4%)2.147s (~)0.356s291.07x
🐘 PostgresNext.js (Turbopack)1.805s2.146s0.000s2.192s0.387s281.08x
💻 LocalNitro3.632s (+2.5%)4.232s (+4.9%)0.001s (~)4.235s (+4.9%)0.604s152.18x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.867s (+2.6%)5.104s (+4.7%)0.001s (+900.0% 🔺)5.538s (+3.8%)1.671s121.00x
▲ VercelNitro5.456s (+32.2% 🔺)6.612s (+23.8% 🔺)0.000s (+144.4% 🔺)7.089s (+22.2% 🔺)1.633s91.41x
▲ VercelNext.js (Turbopack)5.462s (+36.0% 🔺)6.548s (+22.8% 🔺)0.000s (NaN%)6.966s (+19.3% 🔺)1.504s91.41x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro21/21
🐘 PostgresNext.js (Turbopack)12/21
▲ VercelExpress13/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres19/21
Next.js (Turbopack)🌐 Redis12/21
Nitro🐘 Postgres16/21
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
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@github-actions

github-actionsBot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production890067957
✅ 💻 Local Development86601781044
✅ 📦 Local Production86601781044
✅ 🐘 Local Postgres86601781044
✅ 🪟 Windows790887
❌ 🌍 Community Worlds1366524225
✅ 📋 Other219042261
Total3922656754662

❌ Failed Tests

🌍 Community Worlds (65 failed)

mongodb (4 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNQT12HK8X4N86DEASFAYTC3
  • webhookWorkflow | wrun_01KNQT1B8CE6EZ1PEED6RR64J3
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNQT90QM3AQHKNFTTC3T4RSX
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNQTFBW8QY7AK7XNWV2MJH0N

redis (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNQT12HK8X4N86DEASFAYTC3
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNQT90QM3AQHKNFTTC3T4RSX
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNQTFBW8QY7AK7XNWV2MJH0N

turso (58 failed):

  • addTenWorkflow | wrun_01KNQSZWK13GCCQH5P3FH07BKA
  • addTenWorkflow | wrun_01KNQSZWK13GCCQH5P3FH07BKA
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KNQT0FT2RNF0HGMMDGWWFG78
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KNQT04E56N7KQ56RT376TDRY
  • promiseRaceWorkflow | wrun_01KNQT08Y6VPWJ6HA9XB3ACDVM
  • promiseAnyWorkflow | wrun_01KNQT0B3AWW74S02RSY96DFDY
  • importedStepOnlyWorkflow | wrun_01KNQT0VCPFWJEJR9NRCGH1YE1
  • hookWorkflow | wrun_01KNQT0Q25ZF0230NTFW8TT8FV
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNQT12HK8X4N86DEASFAYTC3
  • webhookWorkflow | wrun_01KNQT1B8CE6EZ1PEED6RR64J3
  • sleepingWorkflow | wrun_01KNQT1H85476RXPSMD074B2X0
  • parallelSleepWorkflow | wrun_01KNQT1X4V7GJPN458S4DTNQHZ
  • nullByteWorkflow | wrun_01KNQT20D17XGS9YA969RSNBCX
  • workflowAndStepMetadataWorkflow | wrun_01KNQT22GYCEM9QQ63EYRWYNYJ
  • fetchWorkflow | wrun_01KNQT4QEY4E6RG3M8NABTD1WT
  • promiseRaceStressTestWorkflow | wrun_01KNQT4ST3XHH8WE6DE83AQQ2C
  • 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()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KNQT8C7D0W9WVRY9DB6M4R6F
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNQT90QM3AQHKNFTTC3T4RSX
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KNQT9N3Q09Z1RWEW56XMCHA3
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KNQTA95C42ANFAA89B5TYKMB
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KNQTAJX9XKZVZ5CE2TFDDGRD
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KNQTARF9TMA086QP6MMNFMPD
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KNQTATM6MNKY1EC8MNQ9Z5RQ
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KNQTBAFJVXA1W3K58JC3MHE3
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KNQTBG2A2R586XK4ANBP75KQ
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KNQTBPRJW3W53CRJ9A43SX2T
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KNQTBXD7ED0HM67PD7H4ER2X
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KNQTC2Z4MT98F21MRWEJ9DSB
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KNQTC9NDWM216M5JCAQBM90C
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KNQTCH1WM9Z1WVTTBGMPMBRN
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KNQTCXME3Y7DX14MBYE93H4D
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KNQTD5CV0BR9DZAG478KNZWX
  • cancelRun - cancelling a running workflow | wrun_01KNQTDC6Y4PD7004JSH4NQBYC
  • cancelRun via CLI - cancelling a running workflow | wrun_01KNQTDNJ0Z5XAKHDKSY4EEN56
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KNQTE1PJA6ZM5HN105P89GME
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KNQTEPC3ZQSTTXA0PZS0GAP7
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KNQTF0MXCVDK1YB1PQDYC8YY
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KNQTF7DQSQERG48JV5RK0R6S
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KNQTF9SAC38S1HRGBERBMHNE
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNQTFBW8QY7AK7XNWV2MJH0N
  • getterStepWorkflow - getter functions with "use step" directive | wrun_01KNQTFF4388KKRERJQVTNB56C

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro8007
✅ example8007
✅ express8007
✅ fastify8007
✅ hono8007
✅ nextjs-turbopack8502
✅ nextjs-webpack8502
✅ nitro8007
✅ nuxt8007
✅ sveltekit8007
✅ vite8007
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable73014
✅ express-stable73014
✅ fastify-stable73014
✅ hono-stable73014
✅ nextjs-turbopack-canary62025
✅ nextjs-turbopack-stable7908
✅ nextjs-webpack-canary62025
✅ nextjs-webpack-stable7908
✅ nitro-stable73014
✅ nuxt-stable73014
✅ sveltekit-stable73014
✅ vite-stable73014
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable73014
✅ express-stable73014
✅ fastify-stable73014
✅ hono-stable73014
✅ nextjs-turbopack-canary62025
✅ nextjs-turbopack-stable7908
✅ nextjs-webpack-canary62025
✅ nextjs-webpack-stable7908
✅ nitro-stable73014
✅ nuxt-stable73014
✅ sveltekit-stable73014
✅ vite-stable73014
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable73014
✅ express-stable73014
✅ fastify-stable73014
✅ hono-stable73014
✅ nextjs-turbopack-canary62025
✅ nextjs-turbopack-stable7908
✅ nextjs-webpack-canary62025
✅ nextjs-webpack-stable7908
✅ nitro-stable73014
✅ nuxt-stable73014
✅ sveltekit-stable73014
✅ vite-stable73014
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack7908
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev500
❌ mongodb5848
✅ redis-dev500
❌ redis5938
✅ turso-dev500
❌ turso4588
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable73014
✅ e2e-local-postgres-nest-stable73014
✅ e2e-local-prod-nest-stable73014

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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 removes the “step functions must be async” restriction across the SWC transform and the TypeScript language service plugin, allowing synchronous functions to use the "use step" directive as a code-stripping mechanism while preserving the async requirement for "use workflow".

Changes:

  • TypeScript plugin: removes diagnostic error 9002 for synchronous step functions and updates tests accordingly.
  • SWC plugin: lifts async-only checks from "use step" transformation paths and adds a new sync-step fixture to verify output across workflow/step/client modes.
  • Documentation + release: updates SWC plugin spec validation table and adds a changeset for patch releases.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.

Show a summary per file
FileDescription
packages/typescript-plugin/src/diagnostics.tsRemoves async validation for "use step" functions in custom diagnostics.
packages/typescript-plugin/src/diagnostics.test.tsUpdates tests to assert no error 9002 for sync step functions.
packages/swc-plugin-workflow/transform/tests/fixture/sync-step/input.jsAdds fixture input covering sync function/arrow/object-method step directives.
packages/swc-plugin-workflow/transform/tests/fixture/sync-step/output-workflow.jsExpected workflow-mode output for sync-step fixture (initializer exports).
packages/swc-plugin-workflow/transform/tests/fixture/sync-step/output-step.jsExpected step-mode output for sync-step fixture (registration + preserved bodies).
packages/swc-plugin-workflow/transform/tests/fixture/sync-step/output-client.jsExpected client-mode output for sync-step fixture (stepId annotations).
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/input.jsUpdates error fixture to only cover non-async "use workflow" cases.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-workflow.jsUpdates expected workflow-mode output after removing step async restriction.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-workflow.stderrUpdates expected stderr to reflect only "use workflow" async errors.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-step.jsUpdates expected step-mode output after removing step async restriction.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-step.stderrUpdates expected stderr to reflect only "use workflow" async errors.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-client.jsUpdates expected client-mode output after removing step async restriction.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-client.stderrUpdates expected stderr to reflect only "use workflow" async errors.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/input.jsUpdates invalid-export fixture to allow sync function exports in "use step" files.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-workflow.jsExpected workflow-mode output reflecting sync function export allowance.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-workflow.stderrExpected stderr after invalid-export fixture adjustments.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-step.jsExpected step-mode output registering sync exported steps.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-step.stderrExpected stderr after invalid-export fixture adjustments.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-client.jsExpected client-mode output with stepId for sync exported steps.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-client.stderrExpected stderr after invalid-export fixture adjustments.
packages/swc-plugin-workflow/transform/src/lib.rsRemoves async guards for "use step" transformations; keeps "use workflow" async enforcement in relevant paths.
packages/swc-plugin-workflow/spec.mdUpdates validation error documentation to reflect sync "use step" allowance.
.changeset/allow-sync-step-functions.mdAdds patch changeset entries for SWC + TypeScript plugins.

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

Comment threadpackages/swc-plugin-workflow/transform/src/lib.rs Outdated
Comment threadpackages/swc-plugin-workflow/transform/src/lib.rs Outdated
…row behavior
- Remove stale 'Collect registration calls' comment from StepTransform
- Fix 'everyhwere' typo in e2e test comments
- Closure vars IIFE now throws when called outside a step function
context, matching the original __private_getClosureVars behavior
…xport message
- Remove the no-op validate_async_function method and unwrap all callers
- InvalidExport message now says 'Only functions can be exported' for
'use step' files, vs 'Only async functions' for 'use workflow' files

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI review: blocking issues found

Comment threadpackages/swc-plugin-workflow/transform/src/lib.rs Outdated
Comment threadpackages/swc-plugin-workflow/transform/src/lib.rs
Comment threadpackages/typescript-plugin/src/diagnostics.ts Outdated
Comment threadpackages/swc-plugin-workflow/spec.md Outdated
Base automatically changed from inline-step-registration to mainApril 8, 2026 23:58
…ethod async check
- Remove validate_async_function() entirely and unwrap all 8 call sites
(the function was a no-op that always returned true)
- Fix static class method handler to only check async for 'use workflow'
(was still blocking sync step functions on static methods)
- Remove no-op checkStepFunction from TypeScript plugin
- Regenerate test fixture outputs
Also bump changeset from patch to minor (new feature, not bug fix)

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 22 out of 22 changed files in this pull request and generated 4 comments.


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

Comment on lines +4057 to 4058
// Previously validated that step functions must be async. The restriction

CopilotAIApr 9, 2026

Copy link

Choose a reason for hiding this comment

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

There’s a dangling/incomplete comment here (ends mid-sentence) left over from removing the async-only validation. It should either be completed to explain the new behavior or removed to avoid confusion when maintaining this transform logic.

Suggested change
// Previously validated that step functions must be async. The restriction

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed in #1664 — removed the dangling incomplete comment entirely.

Comment on lines +6054 to +6057
// Validate exports if we have a file-level workflow directive.
// Step files allow any exports (sync or async), but workflow files
// require exported functions to be async.
if self.has_file_workflow_directive {

CopilotAIApr 9, 2026

Copy link

Choose a reason for hiding this comment

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

visit_mut_module_items no longer validates exports for module-level 'use step' files, which means non-function exports (constants/classes/re-exports) are now allowed even though they won’t be code-stripped and can easily pull Node-only code into the workflow/client bundles. Consider adding a separate validation branch for has_file_step_directive that allows sync or async functions but rejects non-function exports/re-exports, with an error message that matches that rule.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed in #1664 — added export validation for has_file_step_directive that allows sync/async function exports but rejects non-function exports (constants, classes, re-exports). Error message is "Only functions can be exported from a \"use step\" file".

Comment on lines +3 to 8
// These should all error - not functions
export const value = 42;
export function syncFunc() {
return 'not allowed';
}
export class MyClass {
method() {}
}
export * from './other';

CopilotAIApr 9, 2026

Copy link

Choose a reason for hiding this comment

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

The header comment says these exports “should all error”, but the expected stderr fixtures for this test case were removed and the outputs keep these exports. Please update the comment (and potentially relocate/rename this fixture since it no longer asserts an error) so the test intent matches the actual expected behavior.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed in #1664 — the comment is now correct again since export validation for step files has been restored. The const value, class MyClass, and export * all produce errors; the sync and async function exports pass.

"@workflow/typescript-plugin": minor
---

Allow synchronous functions to use `"use step"` directive. This enables using `"use step"` as a mechanism to strip Node.js-dependent code from the workflow VM bundle without requiring the function to be async.

CopilotAIApr 9, 2026

Copy link

Choose a reason for hiding this comment

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

The PR description mentions that packages/swc-plugin-workflow/spec.md error documentation was updated, but this PR diff doesn’t include any changes to that spec file. Please ensure the spec is updated to reflect that "use step" can be used on sync functions while "use workflow" remains async-only (and adjust any validation/export rules accordingly).

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed in #1664 — updated spec.md error table (split Non-async into workflow-only, added step export validation row) and supported function forms (added sync variants for all step function forms).

@ghostghost mentioned this pull request Apr 9, 2026
Sign up for freeto 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

@TooTallNate@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Allow synchronous functions to use "use step" directive - #1633

Merged
TooTallNate merged 11 commits into
mainfrom
allow-sync-step-functions
Apr 9, 2026
Merged

Allow synchronous functions to use "use step" directive#1633
TooTallNate merged 11 commits into
mainfrom
allow-sync-step-functions

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

Summary

  • Lifts the async function restriction from "use step" in both the SWC compiler plugin and the TypeScript language service plugin
  • Synchronous functions can now use "use step" to strip their Node.js-dependent code from the workflow VM bundle
  • The async restriction is preserved for "use workflow" functions

Motivation

This enables using "use step" as a code-stripping mechanism for synchronous methods (e.g. getReadable() on the Run class) that use Node.js APIs not available in the workflow VM. Previously, "use step" required the function to be async, which was an artificial restriction for this use case.

Changed packages

  • @workflow/swc-plugin — Removed async guards from all step function code paths; updated should_transform_function; updated InvalidExport validation for module-level "use step" files; added sync-step fixture test; cleaned up error test fixtures
  • @workflow/typescript-plugin — Removed error 9002 (sync step function diagnostic); updated tests
  • Updated spec.md error documentation

Test plan

  • 196 Rust SWC plugin tests pass (22 unit + 24 error + 150 fixture, including new sync-step fixture)
  • 95 TypeScript plugin tests pass

…/private
The SWC compiler plugin no longer generates import statements. All step
function registrations and closure variable access are now self-contained
inline IIFEs with zero module dependencies:
- Step registration uses an IIFE that writes to
globalThis[Symbol.for('@workflow/core//registeredSteps')]
- Closure variable access uses an IIFE that reads from
globalThis[Symbol.for('WORKFLOW_STEP_CONTEXT_STORAGE')]
- Registrations are placed immediately after each function definition
instead of being batched at the bottom of the file
This enables 3rd-party node_modules packages to define step functions
without needing the 'workflow' package available at runtime.
Also removes the @workflow/core/private and workflow/internal/private
public subpath exports since they are no longer referenced by generated
code.
Lift the async function restriction from "use step" in both the SWC
compiler plugin and the TypeScript language service plugin. This enables
using "use step" as a mechanism to strip Node.js-dependent code from
the workflow VM bundle without requiring the function to be async.
The async restriction is preserved for "use workflow" functions.
- SWC plugin: removed async guards from all step function code paths,
updated should_transform_function, updated InvalidExport validation
- TypeScript plugin: removed error 9002 for sync step functions
- Added sync-step fixture test, cleaned up error test fixtures
- Updated spec.md error documentation
CopilotAI review requested due to automatic review settings April 7, 2026 07:45
@changeset-bot

changeset-botBot commented Apr 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e4b8d29

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

This PR includes changesets to release 18 packages
NameType
@workflow/swc-pluginMinor
@workflow/typescript-pluginMinor
@workflow/astroPatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nestPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
workflowPatch
@workflow/vitePatch
@workflow/vitestPatch
@workflow/world-testingPatch
@workflow/nuxtPatch
@workflow/aiPatch
@workflow/corePatch
@workflow/web-sharedPatch

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

@TooTallNate
TooTallNate requested a review from a team as a code ownerApril 7, 2026 07:45
@vercel

vercelBot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.043s (-1.4%)1.005s (~)0.963s101.00x
🌐 RedisNext.js (Turbopack)0.054s1.005s0.951s101.27x
🐘 PostgresNitro0.058s (-8.7% 🟢)1.010s (~)0.952s101.34x
🐘 PostgresNext.js (Turbopack)0.059s1.010s0.951s101.37x
🐘 PostgresExpress0.059s (+1.0%)1.010s (~)0.950s101.38x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.228s (+9.1% 🔺)2.214s (+1.9%)1.986s101.00x
▲ VercelNitro0.249s (+6.6% 🔺)2.227s (+6.5% 🔺)1.979s101.09x
▲ VercelNext.js (Turbopack)0.747s (+225.1% 🔺)2.542s (+12.1% 🔺)1.794s103.27x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.124s2.007s0.883s101.00x
💻 LocalNitro1.127s (~)2.006s (~)0.879s101.00x
🐘 PostgresExpress1.132s (-1.0%)2.011s (~)0.878s101.01x
🐘 PostgresNext.js (Turbopack)1.139s2.009s0.870s101.01x
🐘 PostgresNitro1.147s (~)2.010s (~)0.862s101.02x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.873s (-1.7%)4.167s (+10.3% 🔺)2.294s101.00x
▲ VercelNext.js (Turbopack)1.940s (-5.8% 🟢)3.298s (-13.7% 🟢)1.358s101.04x
▲ VercelExpress2.322s (+25.7% 🔺)4.020s (+9.9% 🔺)1.697s101.24x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)10.794s11.025s0.231s31.00x
🐘 PostgresExpress10.866s (~)11.023s (~)0.157s31.01x
🐘 PostgresNext.js (Turbopack)10.905s11.356s0.452s31.01x
🐘 PostgresNitro10.925s (~)11.024s (~)0.099s31.01x
💻 LocalNitro10.926s (~)11.022s (~)0.096s31.01x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.403s (-13.8% 🟢)18.223s (-13.1% 🟢)1.820s21.00x
▲ VercelNext.js (Turbopack)16.427s (-4.6%)17.753s (-8.6% 🟢)1.326s21.00x
▲ VercelNitro17.053s (~)18.660s (-5.5% 🟢)1.607s21.04x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)14.456s15.028s0.573s41.00x
🐘 PostgresNext.js (Turbopack)14.512s15.028s0.515s41.00x
🐘 PostgresExpress14.546s (~)15.023s (~)0.477s41.01x
🐘 PostgresNitro14.685s (+0.5%)15.027s (~)0.342s41.02x
💻 LocalNitro14.956s (~)15.029s (~)0.073s41.03x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro29.351s (-11.0% 🟢)31.401s (-10.0% 🟢)2.050s21.00x
▲ VercelNext.js (Turbopack)29.913s (-11.6% 🟢)31.199s (-13.0% 🟢)1.287s21.02x
▲ VercelExpress30.786s (-4.0%)32.534s (-2.5%)1.748s21.05x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)13.592s14.027s0.435s71.00x
🐘 PostgresNext.js (Turbopack)13.825s14.166s0.340s71.02x
🐘 PostgresExpress13.975s (-1.3%)14.448s (-3.8%)0.473s71.03x
🐘 PostgresNitro14.252s (+0.8%)15.024s (+1.9%)0.772s61.05x
💻 LocalNitro16.674s (+0.7%)17.031s (~)0.357s61.23x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express51.717s (-74.9% 🟢)53.900s (-74.1% 🟢)2.183s21.00x
▲ VercelNitro53.533s (-74.1% 🟢)55.369s (-73.5% 🟢)1.835s21.04x
▲ VercelNext.js (Turbopack)54.318s (-10.4% 🟢)55.810s (-10.8% 🟢)1.492s21.05x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)1.230s2.010s0.780s151.00x
🐘 PostgresExpress1.259s (~)2.009s (~)0.750s151.02x
🐘 PostgresNitro1.272s (-1.4%)2.010s (~)0.738s151.03x
🌐 RedisNext.js (Turbopack)1.323s2.007s0.684s151.08x
💻 LocalNitro1.513s (-1.6%)2.006s (~)0.494s151.23x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.056s (-25.2% 🟢)3.711s (-16.8% 🟢)1.655s91.00x
▲ VercelNext.js (Turbopack)2.542s (+3.4%)3.815s (-15.8% 🟢)1.273s81.24x
▲ VercelNitro2.624s (+0.6%)4.290s (-0.8%)1.666s71.28x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.312s (-2.8%)3.007s (~)0.696s101.00x
🐘 PostgresNitro2.327s (-1.1%)3.008s (~)0.681s101.01x
🐘 PostgresNext.js (Turbopack)2.466s3.010s0.544s101.07x
🌐 RedisNext.js (Turbopack)2.582s3.008s0.426s101.12x
💻 LocalNitro3.000s (+2.5%)3.565s (+14.7% 🔺)0.565s91.30x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.381s (-30.6% 🟢)4.033s (-19.9% 🟢)1.651s81.00x
▲ VercelExpress2.543s (-16.8% 🟢)3.976s (-15.0% 🟢)1.433s81.07x
▲ VercelNext.js (Turbopack)2.993s (+5.3% 🔺)4.436s (-7.3% 🟢)1.443s71.26x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.486s (~)4.011s (~)0.525s81.00x
🐘 PostgresNitro3.491s (+0.8%)4.010s (~)0.519s81.00x
🐘 PostgresNext.js (Turbopack)3.667s4.012s0.345s81.05x
🌐 RedisNext.js (Turbopack)4.133s4.869s0.736s71.19x
💻 LocalNitro8.373s (+2.3%)9.023s (~)0.650s42.40x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.838s (-13.4% 🟢)4.503s (-8.4% 🟢)1.665s71.00x
▲ VercelExpress3.249s (+6.1% 🔺)4.654s (-3.1%)1.404s71.15x
▲ VercelNext.js (Turbopack)4.099s (+0.9%)5.650s (-10.0% 🟢)1.551s61.44x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)1.219s2.010s0.791s151.00x
🐘 PostgresNitro1.268s (+0.8%)2.009s (~)0.740s151.04x
🐘 PostgresExpress1.275s (+0.8%)2.007s (~)0.732s151.05x
🌐 RedisNext.js (Turbopack)1.365s2.006s0.641s151.12x
💻 LocalNitro1.543s (+0.8%)2.006s (~)0.463s151.27x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.086s (-8.5% 🟢)3.837s (-3.2%)1.751s81.00x
▲ VercelNitro2.154s (-6.1% 🟢)3.859s (-2.5%)1.705s81.03x
▲ VercelNext.js (Turbopack)2.260s (-3.5%)3.500s (-16.1% 🟢)1.240s91.08x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.337s (-0.6%)3.009s (~)0.672s101.00x
🐘 PostgresNitro2.354s (-0.8%)3.009s (~)0.654s101.01x
🐘 PostgresNext.js (Turbopack)2.377s3.008s0.631s101.02x
🌐 RedisNext.js (Turbopack)2.555s3.008s0.453s101.09x
💻 LocalNitro3.050s (-1.6%)4.010s (+3.2%)0.959s81.31x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.435s (-99.2% 🟢)3.952s (-98.7% 🟢)1.517s81.00x
▲ VercelExpress2.492s (-96.8% 🟢)3.849s (-95.2% 🟢)1.357s81.02x
▲ VercelNext.js (Turbopack)2.658s (-6.0% 🟢)4.030s (-15.1% 🟢)1.372s81.09x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.471s (~)4.010s (~)0.539s81.00x
🐘 PostgresExpress3.475s (~)4.010s (~)0.535s81.00x
🐘 PostgresNext.js (Turbopack)3.649s4.012s0.363s81.05x
🌐 RedisNext.js (Turbopack)4.120s4.582s0.462s71.19x
💻 LocalNitro8.769s (-2.2%)9.021s (-2.7%)0.251s42.53x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.123s (-29.9% 🟢)4.760s (-20.8% 🟢)1.637s71.00x
▲ VercelNitro3.257s (+8.6% 🔺)4.834s (+3.1%)1.576s71.04x
▲ VercelNext.js (Turbopack)3.527s (-1.8%)4.910s (-8.0% 🟢)1.384s71.13x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.699s1.004s0.305s601.00x
🐘 PostgresNext.js (Turbopack)0.769s1.006s0.236s601.10x
🐘 PostgresExpress0.808s (-5.2% 🟢)1.023s (+1.7%)0.215s591.16x
🐘 PostgresNitro0.860s (+4.4%)1.023s (+1.7%)0.163s591.23x
💻 LocalNitro0.978s (-0.7%)1.057s (-10.5% 🟢)0.079s571.40x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro8.679s (-4.7%)10.740s (-4.0%)2.061s61.00x
▲ VercelNext.js (Turbopack)9.102s (-12.0% 🟢)10.751s (-13.7% 🟢)1.649s61.05x
▲ VercelExpress9.131s (-11.4% 🟢)10.745s (-10.6% 🟢)1.614s61.05x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.676s2.006s0.329s451.00x
🐘 PostgresNext.js (Turbopack)1.872s2.075s0.203s441.12x
🐘 PostgresExpress1.952s (-5.1% 🟢)2.174s (-24.6% 🟢)0.222s421.16x
🐘 PostgresNitro2.093s (+6.2% 🔺)2.945s (+32.3% 🔺)0.852s311.25x
💻 LocalNitro3.017s (~)3.586s (+1.1%)0.569s261.80x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express27.604s (-1.7%)29.418s (-2.2%)1.814s41.00x
▲ VercelNitro28.084s (-3.0%)30.146s (-1.7%)2.062s31.02x
▲ VercelNext.js (Turbopack)28.799s (-6.5% 🟢)30.803s (-6.4% 🟢)2.004s31.04x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)3.383s4.008s0.625s301.00x
🐘 PostgresNext.js (Turbopack)3.737s4.009s0.273s301.10x
🐘 PostgresExpress3.949s (-3.0%)4.147s (-13.8% 🟢)0.197s291.17x
🐘 PostgresNitro4.252s (+2.8%)4.972s (+1.7%)0.720s251.26x
💻 LocalNitro9.279s (+1.0%)9.942s (~)0.663s132.74x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express69.222s (-8.7% 🟢)70.943s (-8.6% 🟢)1.721s21.00x
▲ VercelNitro70.767s (-3.2%)73.163s (-2.3%)2.396s21.02x
▲ VercelNext.js (Turbopack)74.888s (-10.2% 🟢)76.096s (-11.0% 🟢)1.208s21.08x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.252s1.007s0.755s601.00x
🐘 PostgresExpress0.283s (+1.4%)1.007s (~)0.724s601.12x
🐘 PostgresNitro0.286s (~)1.007s (~)0.721s601.13x
🌐 RedisNext.js (Turbopack)0.294s1.004s0.710s601.16x
💻 LocalNitro0.603s (+1.6%)1.004s (~)0.401s602.39x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.456s (-23.7% 🟢)3.016s (-15.2% 🟢)1.560s211.00x
▲ VercelNitro1.477s (-17.8% 🟢)2.985s (-16.2% 🟢)1.507s211.01x
▲ VercelNext.js (Turbopack)1.621s (-2.4%)2.966s (-8.3% 🟢)1.345s211.11x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.467s1.006s0.539s901.00x
🐘 PostgresExpress0.488s (-1.3%)1.007s (~)0.519s901.04x
🐘 PostgresNitro0.501s (~)1.007s (~)0.506s901.07x
🌐 RedisNext.js (Turbopack)1.234s2.006s0.772s452.64x
💻 LocalNitro2.785s (+8.7% 🔺)3.183s (+5.8% 🔺)0.397s295.96x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.526s (-3.3%)4.332s (~)1.807s211.00x
▲ VercelNitro2.686s (+8.3% 🔺)4.386s (+5.1% 🔺)1.701s211.06x
▲ VercelNext.js (Turbopack)3.397s (-4.3%)4.947s (-3.9%)1.550s191.34x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.760s1.014s0.255s1191.00x
🐘 PostgresExpress0.771s (-2.4%)1.007s (~)0.236s1201.01x
🐘 PostgresNitro0.803s (-6.9% 🟢)1.008s (-5.2% 🟢)0.205s1201.06x
🌐 RedisNext.js (Turbopack)2.816s3.032s0.217s403.71x
💻 LocalNitro11.426s (+3.3%)12.031s (+3.1%)0.605s1015.04x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express6.156s (-13.3% 🟢)7.581s (-14.2% 🟢)1.425s161.00x
▲ VercelNitro6.524s (-5.3% 🟢)8.084s (-5.9% 🟢)1.560s151.06x
▲ VercelNext.js (Turbopack)32.897s (+425.9% 🔺)34.290s (+334.1% 🔺)1.393s125.34x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.186s1.001s0.002s1.008s0.822s101.00x
🐘 PostgresExpress0.202s (-2.1%)0.994s (-0.5%)0.002s (+23.1% 🔺)1.010s (~)0.809s101.08x
🐘 PostgresNext.js (Turbopack)0.206s1.001s0.028s1.037s0.832s101.10x
💻 LocalNitro0.206s (+1.2%)1.004s (~)0.013s (+2.5%)1.019s (~)0.812s101.11x
🐘 PostgresNitro0.209s (+3.5%)1.000s (~)0.001s (-7.7% 🟢)1.010s (~)0.801s101.12x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.415s (-40.6% 🟢)2.521s (-33.7% 🟢)0.694s (+87.6% 🔺)3.696s (-20.5% 🟢)2.281s101.00x
▲ VercelNext.js (Turbopack)1.443s (-10.1% 🟢)2.663s (-15.5% 🟢)0.571s (+82.2% 🔺)3.613s (-8.6% 🟢)2.170s101.02x
▲ VercelExpress1.509s (-13.0% 🟢)2.868s (-11.8% 🟢)0.552s (+59.6% 🔺)3.833s (-4.8%)2.324s101.07x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.481s1.001s0.003s1.011s0.530s601.00x
🐘 PostgresNext.js (Turbopack)0.589s1.009s0.005s1.023s0.434s591.22x
🐘 PostgresExpress0.596s (-4.6%)1.005s (~)0.004s (-8.6% 🟢)1.021s (~)0.425s591.24x
🐘 PostgresNitro0.647s (+4.0%)1.005s (~)0.005s (+14.5% 🔺)1.024s (~)0.377s591.35x
💻 LocalNitro0.828s (+13.5% 🔺)1.012s (~)0.010s (+1.1%)1.116s (+9.1% 🔺)0.288s541.72x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.990s (+5.4% 🔺)5.204s (-1.5%)0.315s (-18.0% 🟢)5.965s (-1.8%)1.974s111.00x
▲ VercelNext.js (Turbopack)4.125s (-2.8%)5.578s (-3.6%)0.185s (-52.3% 🟢)6.124s (-7.7% 🟢)2.000s101.03x
▲ VercelExpress5.305s6.929s0.393s7.734s2.429s81.33x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.912s1.035s0.000s1.039s0.127s581.00x
🐘 PostgresNext.js (Turbopack)0.946s1.154s0.000s1.171s0.225s521.04x
🐘 PostgresExpress0.977s (+0.6%)1.243s (+6.1% 🔺)0.000s (+59.4% 🔺)1.257s (+5.1% 🔺)0.281s481.07x
🐘 PostgresNitro0.991s (+3.6%)1.214s (+5.7% 🔺)0.000s (-65.3% 🟢)1.228s (+5.7% 🔺)0.237s501.09x
💻 LocalNitro1.244s (~)2.021s (~)0.000s (+50.0% 🔺)2.023s (~)0.779s301.36x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.787s (+7.0% 🔺)4.205s (+13.8% 🔺)0.000s (-85.6% 🟢)4.643s (+12.6% 🔺)1.855s131.00x
▲ VercelNitro2.823s (-90.9% 🟢)4.110s (-87.2% 🟢)0.001s (+Infinity% 🔺)4.619s (-85.9% 🟢)1.796s131.01x
▲ VercelNext.js (Turbopack)3.007s (-9.8% 🟢)4.399s (-5.4% 🟢)0.000s (-100.0% 🟢)4.764s (-6.5% 🟢)1.757s131.08x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.666s2.036s0.000s2.039s0.373s301.00x
🐘 PostgresExpress1.747s (-7.0% 🟢)2.140s (-6.7% 🟢)0.000s (+Infinity% 🔺)2.152s (-6.7% 🟢)0.405s281.05x
🐘 PostgresNitro1.791s (~)2.134s (~)0.000s (-3.4%)2.147s (~)0.356s291.07x
🐘 PostgresNext.js (Turbopack)1.805s2.146s0.000s2.192s0.387s281.08x
💻 LocalNitro3.632s (+2.5%)4.232s (+4.9%)0.001s (~)4.235s (+4.9%)0.604s152.18x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.867s (+2.6%)5.104s (+4.7%)0.001s (+900.0% 🔺)5.538s (+3.8%)1.671s121.00x
▲ VercelNitro5.456s (+32.2% 🔺)6.612s (+23.8% 🔺)0.000s (+144.4% 🔺)7.089s (+22.2% 🔺)1.633s91.41x
▲ VercelNext.js (Turbopack)5.462s (+36.0% 🔺)6.548s (+22.8% 🔺)0.000s (NaN%)6.966s (+19.3% 🔺)1.504s91.41x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro21/21
🐘 PostgresNext.js (Turbopack)12/21
▲ VercelExpress13/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres19/21
Next.js (Turbopack)🌐 Redis12/21
Nitro🐘 Postgres16/21
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
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@github-actions

github-actionsBot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production890067957
✅ 💻 Local Development86601781044
✅ 📦 Local Production86601781044
✅ 🐘 Local Postgres86601781044
✅ 🪟 Windows790887
❌ 🌍 Community Worlds1366524225
✅ 📋 Other219042261
Total3922656754662

❌ Failed Tests

🌍 Community Worlds (65 failed)

mongodb (4 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNQT12HK8X4N86DEASFAYTC3
  • webhookWorkflow | wrun_01KNQT1B8CE6EZ1PEED6RR64J3
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNQT90QM3AQHKNFTTC3T4RSX
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNQTFBW8QY7AK7XNWV2MJH0N

redis (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNQT12HK8X4N86DEASFAYTC3
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNQT90QM3AQHKNFTTC3T4RSX
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNQTFBW8QY7AK7XNWV2MJH0N

turso (58 failed):

  • addTenWorkflow | wrun_01KNQSZWK13GCCQH5P3FH07BKA
  • addTenWorkflow | wrun_01KNQSZWK13GCCQH5P3FH07BKA
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KNQT0FT2RNF0HGMMDGWWFG78
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KNQT04E56N7KQ56RT376TDRY
  • promiseRaceWorkflow | wrun_01KNQT08Y6VPWJ6HA9XB3ACDVM
  • promiseAnyWorkflow | wrun_01KNQT0B3AWW74S02RSY96DFDY
  • importedStepOnlyWorkflow | wrun_01KNQT0VCPFWJEJR9NRCGH1YE1
  • hookWorkflow | wrun_01KNQT0Q25ZF0230NTFW8TT8FV
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNQT12HK8X4N86DEASFAYTC3
  • webhookWorkflow | wrun_01KNQT1B8CE6EZ1PEED6RR64J3
  • sleepingWorkflow | wrun_01KNQT1H85476RXPSMD074B2X0
  • parallelSleepWorkflow | wrun_01KNQT1X4V7GJPN458S4DTNQHZ
  • nullByteWorkflow | wrun_01KNQT20D17XGS9YA969RSNBCX
  • workflowAndStepMetadataWorkflow | wrun_01KNQT22GYCEM9QQ63EYRWYNYJ
  • fetchWorkflow | wrun_01KNQT4QEY4E6RG3M8NABTD1WT
  • promiseRaceStressTestWorkflow | wrun_01KNQT4ST3XHH8WE6DE83AQQ2C
  • 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()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KNQT8C7D0W9WVRY9DB6M4R6F
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNQT90QM3AQHKNFTTC3T4RSX
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KNQT9N3Q09Z1RWEW56XMCHA3
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KNQTA95C42ANFAA89B5TYKMB
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KNQTAJX9XKZVZ5CE2TFDDGRD
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KNQTARF9TMA086QP6MMNFMPD
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KNQTATM6MNKY1EC8MNQ9Z5RQ
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KNQTBAFJVXA1W3K58JC3MHE3
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KNQTBG2A2R586XK4ANBP75KQ
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KNQTBPRJW3W53CRJ9A43SX2T
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KNQTBXD7ED0HM67PD7H4ER2X
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KNQTC2Z4MT98F21MRWEJ9DSB
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KNQTC9NDWM216M5JCAQBM90C
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KNQTCH1WM9Z1WVTTBGMPMBRN
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KNQTCXME3Y7DX14MBYE93H4D
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KNQTD5CV0BR9DZAG478KNZWX
  • cancelRun - cancelling a running workflow | wrun_01KNQTDC6Y4PD7004JSH4NQBYC
  • cancelRun via CLI - cancelling a running workflow | wrun_01KNQTDNJ0Z5XAKHDKSY4EEN56
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KNQTE1PJA6ZM5HN105P89GME
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KNQTEPC3ZQSTTXA0PZS0GAP7
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KNQTF0MXCVDK1YB1PQDYC8YY
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KNQTF7DQSQERG48JV5RK0R6S
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KNQTF9SAC38S1HRGBERBMHNE
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNQTFBW8QY7AK7XNWV2MJH0N
  • getterStepWorkflow - getter functions with "use step" directive | wrun_01KNQTFF4388KKRERJQVTNB56C

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro8007
✅ example8007
✅ express8007
✅ fastify8007
✅ hono8007
✅ nextjs-turbopack8502
✅ nextjs-webpack8502
✅ nitro8007
✅ nuxt8007
✅ sveltekit8007
✅ vite8007
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable73014
✅ express-stable73014
✅ fastify-stable73014
✅ hono-stable73014
✅ nextjs-turbopack-canary62025
✅ nextjs-turbopack-stable7908
✅ nextjs-webpack-canary62025
✅ nextjs-webpack-stable7908
✅ nitro-stable73014
✅ nuxt-stable73014
✅ sveltekit-stable73014
✅ vite-stable73014
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable73014
✅ express-stable73014
✅ fastify-stable73014
✅ hono-stable73014
✅ nextjs-turbopack-canary62025
✅ nextjs-turbopack-stable7908
✅ nextjs-webpack-canary62025
✅ nextjs-webpack-stable7908
✅ nitro-stable73014
✅ nuxt-stable73014
✅ sveltekit-stable73014
✅ vite-stable73014
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable73014
✅ express-stable73014
✅ fastify-stable73014
✅ hono-stable73014
✅ nextjs-turbopack-canary62025
✅ nextjs-turbopack-stable7908
✅ nextjs-webpack-canary62025
✅ nextjs-webpack-stable7908
✅ nitro-stable73014
✅ nuxt-stable73014
✅ sveltekit-stable73014
✅ vite-stable73014
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack7908
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev500
❌ mongodb5848
✅ redis-dev500
❌ redis5938
✅ turso-dev500
❌ turso4588
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable73014
✅ e2e-local-postgres-nest-stable73014
✅ e2e-local-prod-nest-stable73014

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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 removes the “step functions must be async” restriction across the SWC transform and the TypeScript language service plugin, allowing synchronous functions to use the "use step" directive as a code-stripping mechanism while preserving the async requirement for "use workflow".

Changes:

  • TypeScript plugin: removes diagnostic error 9002 for synchronous step functions and updates tests accordingly.
  • SWC plugin: lifts async-only checks from "use step" transformation paths and adds a new sync-step fixture to verify output across workflow/step/client modes.
  • Documentation + release: updates SWC plugin spec validation table and adds a changeset for patch releases.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.

Show a summary per file
FileDescription
packages/typescript-plugin/src/diagnostics.tsRemoves async validation for "use step" functions in custom diagnostics.
packages/typescript-plugin/src/diagnostics.test.tsUpdates tests to assert no error 9002 for sync step functions.
packages/swc-plugin-workflow/transform/tests/fixture/sync-step/input.jsAdds fixture input covering sync function/arrow/object-method step directives.
packages/swc-plugin-workflow/transform/tests/fixture/sync-step/output-workflow.jsExpected workflow-mode output for sync-step fixture (initializer exports).
packages/swc-plugin-workflow/transform/tests/fixture/sync-step/output-step.jsExpected step-mode output for sync-step fixture (registration + preserved bodies).
packages/swc-plugin-workflow/transform/tests/fixture/sync-step/output-client.jsExpected client-mode output for sync-step fixture (stepId annotations).
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/input.jsUpdates error fixture to only cover non-async "use workflow" cases.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-workflow.jsUpdates expected workflow-mode output after removing step async restriction.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-workflow.stderrUpdates expected stderr to reflect only "use workflow" async errors.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-step.jsUpdates expected step-mode output after removing step async restriction.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-step.stderrUpdates expected stderr to reflect only "use workflow" async errors.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-client.jsUpdates expected client-mode output after removing step async restriction.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-client.stderrUpdates expected stderr to reflect only "use workflow" async errors.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/input.jsUpdates invalid-export fixture to allow sync function exports in "use step" files.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-workflow.jsExpected workflow-mode output reflecting sync function export allowance.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-workflow.stderrExpected stderr after invalid-export fixture adjustments.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-step.jsExpected step-mode output registering sync exported steps.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-step.stderrExpected stderr after invalid-export fixture adjustments.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-client.jsExpected client-mode output with stepId for sync exported steps.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-client.stderrExpected stderr after invalid-export fixture adjustments.
packages/swc-plugin-workflow/transform/src/lib.rsRemoves async guards for "use step" transformations; keeps "use workflow" async enforcement in relevant paths.
packages/swc-plugin-workflow/spec.mdUpdates validation error documentation to reflect sync "use step" allowance.
.changeset/allow-sync-step-functions.mdAdds patch changeset entries for SWC + TypeScript plugins.

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

Comment threadpackages/swc-plugin-workflow/transform/src/lib.rs Outdated
Comment threadpackages/swc-plugin-workflow/transform/src/lib.rs Outdated
…row behavior
- Remove stale 'Collect registration calls' comment from StepTransform
- Fix 'everyhwere' typo in e2e test comments
- Closure vars IIFE now throws when called outside a step function
context, matching the original __private_getClosureVars behavior
…xport message
- Remove the no-op validate_async_function method and unwrap all callers
- InvalidExport message now says 'Only functions can be exported' for
'use step' files, vs 'Only async functions' for 'use workflow' files

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI review: blocking issues found

Comment threadpackages/swc-plugin-workflow/transform/src/lib.rs Outdated
Comment threadpackages/swc-plugin-workflow/transform/src/lib.rs
Comment threadpackages/typescript-plugin/src/diagnostics.ts Outdated
Comment threadpackages/swc-plugin-workflow/spec.md Outdated
Base automatically changed from inline-step-registration to mainApril 8, 2026 23:58
…ethod async check
- Remove validate_async_function() entirely and unwrap all 8 call sites
(the function was a no-op that always returned true)
- Fix static class method handler to only check async for 'use workflow'
(was still blocking sync step functions on static methods)
- Remove no-op checkStepFunction from TypeScript plugin
- Regenerate test fixture outputs
Also bump changeset from patch to minor (new feature, not bug fix)

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 22 out of 22 changed files in this pull request and generated 4 comments.


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

Comment on lines +4057 to 4058
// Previously validated that step functions must be async. The restriction

CopilotAIApr 9, 2026

Copy link

Choose a reason for hiding this comment

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

There’s a dangling/incomplete comment here (ends mid-sentence) left over from removing the async-only validation. It should either be completed to explain the new behavior or removed to avoid confusion when maintaining this transform logic.

Suggested change
// Previously validated that step functions must be async. The restriction

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed in #1664 — removed the dangling incomplete comment entirely.

Comment on lines +6054 to +6057
// Validate exports if we have a file-level workflow directive.
// Step files allow any exports (sync or async), but workflow files
// require exported functions to be async.
if self.has_file_workflow_directive {

CopilotAIApr 9, 2026

Copy link

Choose a reason for hiding this comment

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

visit_mut_module_items no longer validates exports for module-level 'use step' files, which means non-function exports (constants/classes/re-exports) are now allowed even though they won’t be code-stripped and can easily pull Node-only code into the workflow/client bundles. Consider adding a separate validation branch for has_file_step_directive that allows sync or async functions but rejects non-function exports/re-exports, with an error message that matches that rule.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed in #1664 — added export validation for has_file_step_directive that allows sync/async function exports but rejects non-function exports (constants, classes, re-exports). Error message is "Only functions can be exported from a \"use step\" file".

Comment on lines +3 to 8
// These should all error - not functions
export const value = 42;
export function syncFunc() {
return 'not allowed';
}
export class MyClass {
method() {}
}
export * from './other';

CopilotAIApr 9, 2026

Copy link

Choose a reason for hiding this comment

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

The header comment says these exports “should all error”, but the expected stderr fixtures for this test case were removed and the outputs keep these exports. Please update the comment (and potentially relocate/rename this fixture since it no longer asserts an error) so the test intent matches the actual expected behavior.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed in #1664 — the comment is now correct again since export validation for step files has been restored. The const value, class MyClass, and export * all produce errors; the sync and async function exports pass.

"@workflow/typescript-plugin": minor
---

Allow synchronous functions to use `"use step"` directive. This enables using `"use step"` as a mechanism to strip Node.js-dependent code from the workflow VM bundle without requiring the function to be async.

CopilotAIApr 9, 2026

Copy link

Choose a reason for hiding this comment

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

The PR description mentions that packages/swc-plugin-workflow/spec.md error documentation was updated, but this PR diff doesn’t include any changes to that spec file. Please ensure the spec is updated to reflect that "use step" can be used on sync functions while "use workflow" remains async-only (and adjust any validation/export rules accordingly).

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed in #1664 — updated spec.md error table (split Non-async into workflow-only, added step export validation row) and supported function forms (added sync variants for all step function forms).

@ghostghost mentioned this pull request Apr 9, 2026
Sign up for freeto 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

@TooTallNate@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Allow synchronous functions to use "use step" directive - #1633

Merged
TooTallNate merged 11 commits into
mainfrom
allow-sync-step-functions
Apr 9, 2026
Merged

Allow synchronous functions to use "use step" directive#1633
TooTallNate merged 11 commits into
mainfrom
allow-sync-step-functions

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

Summary

  • Lifts the async function restriction from "use step" in both the SWC compiler plugin and the TypeScript language service plugin
  • Synchronous functions can now use "use step" to strip their Node.js-dependent code from the workflow VM bundle
  • The async restriction is preserved for "use workflow" functions

Motivation

This enables using "use step" as a code-stripping mechanism for synchronous methods (e.g. getReadable() on the Run class) that use Node.js APIs not available in the workflow VM. Previously, "use step" required the function to be async, which was an artificial restriction for this use case.

Changed packages

  • @workflow/swc-plugin — Removed async guards from all step function code paths; updated should_transform_function; updated InvalidExport validation for module-level "use step" files; added sync-step fixture test; cleaned up error test fixtures
  • @workflow/typescript-plugin — Removed error 9002 (sync step function diagnostic); updated tests
  • Updated spec.md error documentation

Test plan

  • 196 Rust SWC plugin tests pass (22 unit + 24 error + 150 fixture, including new sync-step fixture)
  • 95 TypeScript plugin tests pass

…/private
The SWC compiler plugin no longer generates import statements. All step
function registrations and closure variable access are now self-contained
inline IIFEs with zero module dependencies:
- Step registration uses an IIFE that writes to
globalThis[Symbol.for('@workflow/core//registeredSteps')]
- Closure variable access uses an IIFE that reads from
globalThis[Symbol.for('WORKFLOW_STEP_CONTEXT_STORAGE')]
- Registrations are placed immediately after each function definition
instead of being batched at the bottom of the file
This enables 3rd-party node_modules packages to define step functions
without needing the 'workflow' package available at runtime.
Also removes the @workflow/core/private and workflow/internal/private
public subpath exports since they are no longer referenced by generated
code.
Lift the async function restriction from "use step" in both the SWC
compiler plugin and the TypeScript language service plugin. This enables
using "use step" as a mechanism to strip Node.js-dependent code from
the workflow VM bundle without requiring the function to be async.
The async restriction is preserved for "use workflow" functions.
- SWC plugin: removed async guards from all step function code paths,
updated should_transform_function, updated InvalidExport validation
- TypeScript plugin: removed error 9002 for sync step functions
- Added sync-step fixture test, cleaned up error test fixtures
- Updated spec.md error documentation
CopilotAI review requested due to automatic review settings April 7, 2026 07:45
@changeset-bot

changeset-botBot commented Apr 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e4b8d29

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

This PR includes changesets to release 18 packages
NameType
@workflow/swc-pluginMinor
@workflow/typescript-pluginMinor
@workflow/astroPatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nestPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
workflowPatch
@workflow/vitePatch
@workflow/vitestPatch
@workflow/world-testingPatch
@workflow/nuxtPatch
@workflow/aiPatch
@workflow/corePatch
@workflow/web-sharedPatch

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

@TooTallNate
TooTallNate requested a review from a team as a code ownerApril 7, 2026 07:45
@vercel

vercelBot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.043s (-1.4%)1.005s (~)0.963s101.00x
🌐 RedisNext.js (Turbopack)0.054s1.005s0.951s101.27x
🐘 PostgresNitro0.058s (-8.7% 🟢)1.010s (~)0.952s101.34x
🐘 PostgresNext.js (Turbopack)0.059s1.010s0.951s101.37x
🐘 PostgresExpress0.059s (+1.0%)1.010s (~)0.950s101.38x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.228s (+9.1% 🔺)2.214s (+1.9%)1.986s101.00x
▲ VercelNitro0.249s (+6.6% 🔺)2.227s (+6.5% 🔺)1.979s101.09x
▲ VercelNext.js (Turbopack)0.747s (+225.1% 🔺)2.542s (+12.1% 🔺)1.794s103.27x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.124s2.007s0.883s101.00x
💻 LocalNitro1.127s (~)2.006s (~)0.879s101.00x
🐘 PostgresExpress1.132s (-1.0%)2.011s (~)0.878s101.01x
🐘 PostgresNext.js (Turbopack)1.139s2.009s0.870s101.01x
🐘 PostgresNitro1.147s (~)2.010s (~)0.862s101.02x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.873s (-1.7%)4.167s (+10.3% 🔺)2.294s101.00x
▲ VercelNext.js (Turbopack)1.940s (-5.8% 🟢)3.298s (-13.7% 🟢)1.358s101.04x
▲ VercelExpress2.322s (+25.7% 🔺)4.020s (+9.9% 🔺)1.697s101.24x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)10.794s11.025s0.231s31.00x
🐘 PostgresExpress10.866s (~)11.023s (~)0.157s31.01x
🐘 PostgresNext.js (Turbopack)10.905s11.356s0.452s31.01x
🐘 PostgresNitro10.925s (~)11.024s (~)0.099s31.01x
💻 LocalNitro10.926s (~)11.022s (~)0.096s31.01x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.403s (-13.8% 🟢)18.223s (-13.1% 🟢)1.820s21.00x
▲ VercelNext.js (Turbopack)16.427s (-4.6%)17.753s (-8.6% 🟢)1.326s21.00x
▲ VercelNitro17.053s (~)18.660s (-5.5% 🟢)1.607s21.04x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)14.456s15.028s0.573s41.00x
🐘 PostgresNext.js (Turbopack)14.512s15.028s0.515s41.00x
🐘 PostgresExpress14.546s (~)15.023s (~)0.477s41.01x
🐘 PostgresNitro14.685s (+0.5%)15.027s (~)0.342s41.02x
💻 LocalNitro14.956s (~)15.029s (~)0.073s41.03x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro29.351s (-11.0% 🟢)31.401s (-10.0% 🟢)2.050s21.00x
▲ VercelNext.js (Turbopack)29.913s (-11.6% 🟢)31.199s (-13.0% 🟢)1.287s21.02x
▲ VercelExpress30.786s (-4.0%)32.534s (-2.5%)1.748s21.05x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)13.592s14.027s0.435s71.00x
🐘 PostgresNext.js (Turbopack)13.825s14.166s0.340s71.02x
🐘 PostgresExpress13.975s (-1.3%)14.448s (-3.8%)0.473s71.03x
🐘 PostgresNitro14.252s (+0.8%)15.024s (+1.9%)0.772s61.05x
💻 LocalNitro16.674s (+0.7%)17.031s (~)0.357s61.23x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express51.717s (-74.9% 🟢)53.900s (-74.1% 🟢)2.183s21.00x
▲ VercelNitro53.533s (-74.1% 🟢)55.369s (-73.5% 🟢)1.835s21.04x
▲ VercelNext.js (Turbopack)54.318s (-10.4% 🟢)55.810s (-10.8% 🟢)1.492s21.05x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)1.230s2.010s0.780s151.00x
🐘 PostgresExpress1.259s (~)2.009s (~)0.750s151.02x
🐘 PostgresNitro1.272s (-1.4%)2.010s (~)0.738s151.03x
🌐 RedisNext.js (Turbopack)1.323s2.007s0.684s151.08x
💻 LocalNitro1.513s (-1.6%)2.006s (~)0.494s151.23x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.056s (-25.2% 🟢)3.711s (-16.8% 🟢)1.655s91.00x
▲ VercelNext.js (Turbopack)2.542s (+3.4%)3.815s (-15.8% 🟢)1.273s81.24x
▲ VercelNitro2.624s (+0.6%)4.290s (-0.8%)1.666s71.28x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.312s (-2.8%)3.007s (~)0.696s101.00x
🐘 PostgresNitro2.327s (-1.1%)3.008s (~)0.681s101.01x
🐘 PostgresNext.js (Turbopack)2.466s3.010s0.544s101.07x
🌐 RedisNext.js (Turbopack)2.582s3.008s0.426s101.12x
💻 LocalNitro3.000s (+2.5%)3.565s (+14.7% 🔺)0.565s91.30x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.381s (-30.6% 🟢)4.033s (-19.9% 🟢)1.651s81.00x
▲ VercelExpress2.543s (-16.8% 🟢)3.976s (-15.0% 🟢)1.433s81.07x
▲ VercelNext.js (Turbopack)2.993s (+5.3% 🔺)4.436s (-7.3% 🟢)1.443s71.26x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.486s (~)4.011s (~)0.525s81.00x
🐘 PostgresNitro3.491s (+0.8%)4.010s (~)0.519s81.00x
🐘 PostgresNext.js (Turbopack)3.667s4.012s0.345s81.05x
🌐 RedisNext.js (Turbopack)4.133s4.869s0.736s71.19x
💻 LocalNitro8.373s (+2.3%)9.023s (~)0.650s42.40x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.838s (-13.4% 🟢)4.503s (-8.4% 🟢)1.665s71.00x
▲ VercelExpress3.249s (+6.1% 🔺)4.654s (-3.1%)1.404s71.15x
▲ VercelNext.js (Turbopack)4.099s (+0.9%)5.650s (-10.0% 🟢)1.551s61.44x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)1.219s2.010s0.791s151.00x
🐘 PostgresNitro1.268s (+0.8%)2.009s (~)0.740s151.04x
🐘 PostgresExpress1.275s (+0.8%)2.007s (~)0.732s151.05x
🌐 RedisNext.js (Turbopack)1.365s2.006s0.641s151.12x
💻 LocalNitro1.543s (+0.8%)2.006s (~)0.463s151.27x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.086s (-8.5% 🟢)3.837s (-3.2%)1.751s81.00x
▲ VercelNitro2.154s (-6.1% 🟢)3.859s (-2.5%)1.705s81.03x
▲ VercelNext.js (Turbopack)2.260s (-3.5%)3.500s (-16.1% 🟢)1.240s91.08x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.337s (-0.6%)3.009s (~)0.672s101.00x
🐘 PostgresNitro2.354s (-0.8%)3.009s (~)0.654s101.01x
🐘 PostgresNext.js (Turbopack)2.377s3.008s0.631s101.02x
🌐 RedisNext.js (Turbopack)2.555s3.008s0.453s101.09x
💻 LocalNitro3.050s (-1.6%)4.010s (+3.2%)0.959s81.31x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.435s (-99.2% 🟢)3.952s (-98.7% 🟢)1.517s81.00x
▲ VercelExpress2.492s (-96.8% 🟢)3.849s (-95.2% 🟢)1.357s81.02x
▲ VercelNext.js (Turbopack)2.658s (-6.0% 🟢)4.030s (-15.1% 🟢)1.372s81.09x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.471s (~)4.010s (~)0.539s81.00x
🐘 PostgresExpress3.475s (~)4.010s (~)0.535s81.00x
🐘 PostgresNext.js (Turbopack)3.649s4.012s0.363s81.05x
🌐 RedisNext.js (Turbopack)4.120s4.582s0.462s71.19x
💻 LocalNitro8.769s (-2.2%)9.021s (-2.7%)0.251s42.53x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.123s (-29.9% 🟢)4.760s (-20.8% 🟢)1.637s71.00x
▲ VercelNitro3.257s (+8.6% 🔺)4.834s (+3.1%)1.576s71.04x
▲ VercelNext.js (Turbopack)3.527s (-1.8%)4.910s (-8.0% 🟢)1.384s71.13x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.699s1.004s0.305s601.00x
🐘 PostgresNext.js (Turbopack)0.769s1.006s0.236s601.10x
🐘 PostgresExpress0.808s (-5.2% 🟢)1.023s (+1.7%)0.215s591.16x
🐘 PostgresNitro0.860s (+4.4%)1.023s (+1.7%)0.163s591.23x
💻 LocalNitro0.978s (-0.7%)1.057s (-10.5% 🟢)0.079s571.40x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro8.679s (-4.7%)10.740s (-4.0%)2.061s61.00x
▲ VercelNext.js (Turbopack)9.102s (-12.0% 🟢)10.751s (-13.7% 🟢)1.649s61.05x
▲ VercelExpress9.131s (-11.4% 🟢)10.745s (-10.6% 🟢)1.614s61.05x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.676s2.006s0.329s451.00x
🐘 PostgresNext.js (Turbopack)1.872s2.075s0.203s441.12x
🐘 PostgresExpress1.952s (-5.1% 🟢)2.174s (-24.6% 🟢)0.222s421.16x
🐘 PostgresNitro2.093s (+6.2% 🔺)2.945s (+32.3% 🔺)0.852s311.25x
💻 LocalNitro3.017s (~)3.586s (+1.1%)0.569s261.80x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express27.604s (-1.7%)29.418s (-2.2%)1.814s41.00x
▲ VercelNitro28.084s (-3.0%)30.146s (-1.7%)2.062s31.02x
▲ VercelNext.js (Turbopack)28.799s (-6.5% 🟢)30.803s (-6.4% 🟢)2.004s31.04x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)3.383s4.008s0.625s301.00x
🐘 PostgresNext.js (Turbopack)3.737s4.009s0.273s301.10x
🐘 PostgresExpress3.949s (-3.0%)4.147s (-13.8% 🟢)0.197s291.17x
🐘 PostgresNitro4.252s (+2.8%)4.972s (+1.7%)0.720s251.26x
💻 LocalNitro9.279s (+1.0%)9.942s (~)0.663s132.74x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express69.222s (-8.7% 🟢)70.943s (-8.6% 🟢)1.721s21.00x
▲ VercelNitro70.767s (-3.2%)73.163s (-2.3%)2.396s21.02x
▲ VercelNext.js (Turbopack)74.888s (-10.2% 🟢)76.096s (-11.0% 🟢)1.208s21.08x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.252s1.007s0.755s601.00x
🐘 PostgresExpress0.283s (+1.4%)1.007s (~)0.724s601.12x
🐘 PostgresNitro0.286s (~)1.007s (~)0.721s601.13x
🌐 RedisNext.js (Turbopack)0.294s1.004s0.710s601.16x
💻 LocalNitro0.603s (+1.6%)1.004s (~)0.401s602.39x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.456s (-23.7% 🟢)3.016s (-15.2% 🟢)1.560s211.00x
▲ VercelNitro1.477s (-17.8% 🟢)2.985s (-16.2% 🟢)1.507s211.01x
▲ VercelNext.js (Turbopack)1.621s (-2.4%)2.966s (-8.3% 🟢)1.345s211.11x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.467s1.006s0.539s901.00x
🐘 PostgresExpress0.488s (-1.3%)1.007s (~)0.519s901.04x
🐘 PostgresNitro0.501s (~)1.007s (~)0.506s901.07x
🌐 RedisNext.js (Turbopack)1.234s2.006s0.772s452.64x
💻 LocalNitro2.785s (+8.7% 🔺)3.183s (+5.8% 🔺)0.397s295.96x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.526s (-3.3%)4.332s (~)1.807s211.00x
▲ VercelNitro2.686s (+8.3% 🔺)4.386s (+5.1% 🔺)1.701s211.06x
▲ VercelNext.js (Turbopack)3.397s (-4.3%)4.947s (-3.9%)1.550s191.34x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.760s1.014s0.255s1191.00x
🐘 PostgresExpress0.771s (-2.4%)1.007s (~)0.236s1201.01x
🐘 PostgresNitro0.803s (-6.9% 🟢)1.008s (-5.2% 🟢)0.205s1201.06x
🌐 RedisNext.js (Turbopack)2.816s3.032s0.217s403.71x
💻 LocalNitro11.426s (+3.3%)12.031s (+3.1%)0.605s1015.04x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express6.156s (-13.3% 🟢)7.581s (-14.2% 🟢)1.425s161.00x
▲ VercelNitro6.524s (-5.3% 🟢)8.084s (-5.9% 🟢)1.560s151.06x
▲ VercelNext.js (Turbopack)32.897s (+425.9% 🔺)34.290s (+334.1% 🔺)1.393s125.34x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.186s1.001s0.002s1.008s0.822s101.00x
🐘 PostgresExpress0.202s (-2.1%)0.994s (-0.5%)0.002s (+23.1% 🔺)1.010s (~)0.809s101.08x
🐘 PostgresNext.js (Turbopack)0.206s1.001s0.028s1.037s0.832s101.10x
💻 LocalNitro0.206s (+1.2%)1.004s (~)0.013s (+2.5%)1.019s (~)0.812s101.11x
🐘 PostgresNitro0.209s (+3.5%)1.000s (~)0.001s (-7.7% 🟢)1.010s (~)0.801s101.12x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.415s (-40.6% 🟢)2.521s (-33.7% 🟢)0.694s (+87.6% 🔺)3.696s (-20.5% 🟢)2.281s101.00x
▲ VercelNext.js (Turbopack)1.443s (-10.1% 🟢)2.663s (-15.5% 🟢)0.571s (+82.2% 🔺)3.613s (-8.6% 🟢)2.170s101.02x
▲ VercelExpress1.509s (-13.0% 🟢)2.868s (-11.8% 🟢)0.552s (+59.6% 🔺)3.833s (-4.8%)2.324s101.07x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.481s1.001s0.003s1.011s0.530s601.00x
🐘 PostgresNext.js (Turbopack)0.589s1.009s0.005s1.023s0.434s591.22x
🐘 PostgresExpress0.596s (-4.6%)1.005s (~)0.004s (-8.6% 🟢)1.021s (~)0.425s591.24x
🐘 PostgresNitro0.647s (+4.0%)1.005s (~)0.005s (+14.5% 🔺)1.024s (~)0.377s591.35x
💻 LocalNitro0.828s (+13.5% 🔺)1.012s (~)0.010s (+1.1%)1.116s (+9.1% 🔺)0.288s541.72x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.990s (+5.4% 🔺)5.204s (-1.5%)0.315s (-18.0% 🟢)5.965s (-1.8%)1.974s111.00x
▲ VercelNext.js (Turbopack)4.125s (-2.8%)5.578s (-3.6%)0.185s (-52.3% 🟢)6.124s (-7.7% 🟢)2.000s101.03x
▲ VercelExpress5.305s6.929s0.393s7.734s2.429s81.33x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.912s1.035s0.000s1.039s0.127s581.00x
🐘 PostgresNext.js (Turbopack)0.946s1.154s0.000s1.171s0.225s521.04x
🐘 PostgresExpress0.977s (+0.6%)1.243s (+6.1% 🔺)0.000s (+59.4% 🔺)1.257s (+5.1% 🔺)0.281s481.07x
🐘 PostgresNitro0.991s (+3.6%)1.214s (+5.7% 🔺)0.000s (-65.3% 🟢)1.228s (+5.7% 🔺)0.237s501.09x
💻 LocalNitro1.244s (~)2.021s (~)0.000s (+50.0% 🔺)2.023s (~)0.779s301.36x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.787s (+7.0% 🔺)4.205s (+13.8% 🔺)0.000s (-85.6% 🟢)4.643s (+12.6% 🔺)1.855s131.00x
▲ VercelNitro2.823s (-90.9% 🟢)4.110s (-87.2% 🟢)0.001s (+Infinity% 🔺)4.619s (-85.9% 🟢)1.796s131.01x
▲ VercelNext.js (Turbopack)3.007s (-9.8% 🟢)4.399s (-5.4% 🟢)0.000s (-100.0% 🟢)4.764s (-6.5% 🟢)1.757s131.08x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.666s2.036s0.000s2.039s0.373s301.00x
🐘 PostgresExpress1.747s (-7.0% 🟢)2.140s (-6.7% 🟢)0.000s (+Infinity% 🔺)2.152s (-6.7% 🟢)0.405s281.05x
🐘 PostgresNitro1.791s (~)2.134s (~)0.000s (-3.4%)2.147s (~)0.356s291.07x
🐘 PostgresNext.js (Turbopack)1.805s2.146s0.000s2.192s0.387s281.08x
💻 LocalNitro3.632s (+2.5%)4.232s (+4.9%)0.001s (~)4.235s (+4.9%)0.604s152.18x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.867s (+2.6%)5.104s (+4.7%)0.001s (+900.0% 🔺)5.538s (+3.8%)1.671s121.00x
▲ VercelNitro5.456s (+32.2% 🔺)6.612s (+23.8% 🔺)0.000s (+144.4% 🔺)7.089s (+22.2% 🔺)1.633s91.41x
▲ VercelNext.js (Turbopack)5.462s (+36.0% 🔺)6.548s (+22.8% 🔺)0.000s (NaN%)6.966s (+19.3% 🔺)1.504s91.41x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro21/21
🐘 PostgresNext.js (Turbopack)12/21
▲ VercelExpress13/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres19/21
Next.js (Turbopack)🌐 Redis12/21
Nitro🐘 Postgres16/21
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
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@github-actions

github-actionsBot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production890067957
✅ 💻 Local Development86601781044
✅ 📦 Local Production86601781044
✅ 🐘 Local Postgres86601781044
✅ 🪟 Windows790887
❌ 🌍 Community Worlds1366524225
✅ 📋 Other219042261
Total3922656754662

❌ Failed Tests

🌍 Community Worlds (65 failed)

mongodb (4 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNQT12HK8X4N86DEASFAYTC3
  • webhookWorkflow | wrun_01KNQT1B8CE6EZ1PEED6RR64J3
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNQT90QM3AQHKNFTTC3T4RSX
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNQTFBW8QY7AK7XNWV2MJH0N

redis (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNQT12HK8X4N86DEASFAYTC3
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNQT90QM3AQHKNFTTC3T4RSX
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNQTFBW8QY7AK7XNWV2MJH0N

turso (58 failed):

  • addTenWorkflow | wrun_01KNQSZWK13GCCQH5P3FH07BKA
  • addTenWorkflow | wrun_01KNQSZWK13GCCQH5P3FH07BKA
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KNQT0FT2RNF0HGMMDGWWFG78
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KNQT04E56N7KQ56RT376TDRY
  • promiseRaceWorkflow | wrun_01KNQT08Y6VPWJ6HA9XB3ACDVM
  • promiseAnyWorkflow | wrun_01KNQT0B3AWW74S02RSY96DFDY
  • importedStepOnlyWorkflow | wrun_01KNQT0VCPFWJEJR9NRCGH1YE1
  • hookWorkflow | wrun_01KNQT0Q25ZF0230NTFW8TT8FV
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNQT12HK8X4N86DEASFAYTC3
  • webhookWorkflow | wrun_01KNQT1B8CE6EZ1PEED6RR64J3
  • sleepingWorkflow | wrun_01KNQT1H85476RXPSMD074B2X0
  • parallelSleepWorkflow | wrun_01KNQT1X4V7GJPN458S4DTNQHZ
  • nullByteWorkflow | wrun_01KNQT20D17XGS9YA969RSNBCX
  • workflowAndStepMetadataWorkflow | wrun_01KNQT22GYCEM9QQ63EYRWYNYJ
  • fetchWorkflow | wrun_01KNQT4QEY4E6RG3M8NABTD1WT
  • promiseRaceStressTestWorkflow | wrun_01KNQT4ST3XHH8WE6DE83AQQ2C
  • 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()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KNQT8C7D0W9WVRY9DB6M4R6F
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNQT90QM3AQHKNFTTC3T4RSX
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KNQT9N3Q09Z1RWEW56XMCHA3
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KNQTA95C42ANFAA89B5TYKMB
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KNQTAJX9XKZVZ5CE2TFDDGRD
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KNQTARF9TMA086QP6MMNFMPD
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KNQTATM6MNKY1EC8MNQ9Z5RQ
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KNQTBAFJVXA1W3K58JC3MHE3
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KNQTBG2A2R586XK4ANBP75KQ
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KNQTBPRJW3W53CRJ9A43SX2T
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KNQTBXD7ED0HM67PD7H4ER2X
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KNQTC2Z4MT98F21MRWEJ9DSB
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KNQTC9NDWM216M5JCAQBM90C
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KNQTCH1WM9Z1WVTTBGMPMBRN
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KNQTCXME3Y7DX14MBYE93H4D
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KNQTD5CV0BR9DZAG478KNZWX
  • cancelRun - cancelling a running workflow | wrun_01KNQTDC6Y4PD7004JSH4NQBYC
  • cancelRun via CLI - cancelling a running workflow | wrun_01KNQTDNJ0Z5XAKHDKSY4EEN56
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KNQTE1PJA6ZM5HN105P89GME
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KNQTEPC3ZQSTTXA0PZS0GAP7
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KNQTF0MXCVDK1YB1PQDYC8YY
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KNQTF7DQSQERG48JV5RK0R6S
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KNQTF9SAC38S1HRGBERBMHNE
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNQTFBW8QY7AK7XNWV2MJH0N
  • getterStepWorkflow - getter functions with "use step" directive | wrun_01KNQTFF4388KKRERJQVTNB56C

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro8007
✅ example8007
✅ express8007
✅ fastify8007
✅ hono8007
✅ nextjs-turbopack8502
✅ nextjs-webpack8502
✅ nitro8007
✅ nuxt8007
✅ sveltekit8007
✅ vite8007
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable73014
✅ express-stable73014
✅ fastify-stable73014
✅ hono-stable73014
✅ nextjs-turbopack-canary62025
✅ nextjs-turbopack-stable7908
✅ nextjs-webpack-canary62025
✅ nextjs-webpack-stable7908
✅ nitro-stable73014
✅ nuxt-stable73014
✅ sveltekit-stable73014
✅ vite-stable73014
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable73014
✅ express-stable73014
✅ fastify-stable73014
✅ hono-stable73014
✅ nextjs-turbopack-canary62025
✅ nextjs-turbopack-stable7908
✅ nextjs-webpack-canary62025
✅ nextjs-webpack-stable7908
✅ nitro-stable73014
✅ nuxt-stable73014
✅ sveltekit-stable73014
✅ vite-stable73014
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable73014
✅ express-stable73014
✅ fastify-stable73014
✅ hono-stable73014
✅ nextjs-turbopack-canary62025
✅ nextjs-turbopack-stable7908
✅ nextjs-webpack-canary62025
✅ nextjs-webpack-stable7908
✅ nitro-stable73014
✅ nuxt-stable73014
✅ sveltekit-stable73014
✅ vite-stable73014
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack7908
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev500
❌ mongodb5848
✅ redis-dev500
❌ redis5938
✅ turso-dev500
❌ turso4588
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable73014
✅ e2e-local-postgres-nest-stable73014
✅ e2e-local-prod-nest-stable73014

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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 removes the “step functions must be async” restriction across the SWC transform and the TypeScript language service plugin, allowing synchronous functions to use the "use step" directive as a code-stripping mechanism while preserving the async requirement for "use workflow".

Changes:

  • TypeScript plugin: removes diagnostic error 9002 for synchronous step functions and updates tests accordingly.
  • SWC plugin: lifts async-only checks from "use step" transformation paths and adds a new sync-step fixture to verify output across workflow/step/client modes.
  • Documentation + release: updates SWC plugin spec validation table and adds a changeset for patch releases.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.

Show a summary per file
FileDescription
packages/typescript-plugin/src/diagnostics.tsRemoves async validation for "use step" functions in custom diagnostics.
packages/typescript-plugin/src/diagnostics.test.tsUpdates tests to assert no error 9002 for sync step functions.
packages/swc-plugin-workflow/transform/tests/fixture/sync-step/input.jsAdds fixture input covering sync function/arrow/object-method step directives.
packages/swc-plugin-workflow/transform/tests/fixture/sync-step/output-workflow.jsExpected workflow-mode output for sync-step fixture (initializer exports).
packages/swc-plugin-workflow/transform/tests/fixture/sync-step/output-step.jsExpected step-mode output for sync-step fixture (registration + preserved bodies).
packages/swc-plugin-workflow/transform/tests/fixture/sync-step/output-client.jsExpected client-mode output for sync-step fixture (stepId annotations).
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/input.jsUpdates error fixture to only cover non-async "use workflow" cases.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-workflow.jsUpdates expected workflow-mode output after removing step async restriction.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-workflow.stderrUpdates expected stderr to reflect only "use workflow" async errors.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-step.jsUpdates expected step-mode output after removing step async restriction.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-step.stderrUpdates expected stderr to reflect only "use workflow" async errors.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-client.jsUpdates expected client-mode output after removing step async restriction.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-client.stderrUpdates expected stderr to reflect only "use workflow" async errors.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/input.jsUpdates invalid-export fixture to allow sync function exports in "use step" files.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-workflow.jsExpected workflow-mode output reflecting sync function export allowance.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-workflow.stderrExpected stderr after invalid-export fixture adjustments.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-step.jsExpected step-mode output registering sync exported steps.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-step.stderrExpected stderr after invalid-export fixture adjustments.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-client.jsExpected client-mode output with stepId for sync exported steps.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-client.stderrExpected stderr after invalid-export fixture adjustments.
packages/swc-plugin-workflow/transform/src/lib.rsRemoves async guards for "use step" transformations; keeps "use workflow" async enforcement in relevant paths.
packages/swc-plugin-workflow/spec.mdUpdates validation error documentation to reflect sync "use step" allowance.
.changeset/allow-sync-step-functions.mdAdds patch changeset entries for SWC + TypeScript plugins.

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

Comment threadpackages/swc-plugin-workflow/transform/src/lib.rs Outdated
Comment threadpackages/swc-plugin-workflow/transform/src/lib.rs Outdated
…row behavior
- Remove stale 'Collect registration calls' comment from StepTransform
- Fix 'everyhwere' typo in e2e test comments
- Closure vars IIFE now throws when called outside a step function
context, matching the original __private_getClosureVars behavior
…xport message
- Remove the no-op validate_async_function method and unwrap all callers
- InvalidExport message now says 'Only functions can be exported' for
'use step' files, vs 'Only async functions' for 'use workflow' files

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI review: blocking issues found

Comment threadpackages/swc-plugin-workflow/transform/src/lib.rs Outdated
Comment threadpackages/swc-plugin-workflow/transform/src/lib.rs
Comment threadpackages/typescript-plugin/src/diagnostics.ts Outdated
Comment threadpackages/swc-plugin-workflow/spec.md Outdated
Base automatically changed from inline-step-registration to mainApril 8, 2026 23:58
…ethod async check
- Remove validate_async_function() entirely and unwrap all 8 call sites
(the function was a no-op that always returned true)
- Fix static class method handler to only check async for 'use workflow'
(was still blocking sync step functions on static methods)
- Remove no-op checkStepFunction from TypeScript plugin
- Regenerate test fixture outputs
Also bump changeset from patch to minor (new feature, not bug fix)

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 22 out of 22 changed files in this pull request and generated 4 comments.


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

Comment on lines +4057 to 4058
// Previously validated that step functions must be async. The restriction

CopilotAIApr 9, 2026

Copy link

Choose a reason for hiding this comment

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

There’s a dangling/incomplete comment here (ends mid-sentence) left over from removing the async-only validation. It should either be completed to explain the new behavior or removed to avoid confusion when maintaining this transform logic.

Suggested change
// Previously validated that step functions must be async. The restriction

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed in #1664 — removed the dangling incomplete comment entirely.

Comment on lines +6054 to +6057
// Validate exports if we have a file-level workflow directive.
// Step files allow any exports (sync or async), but workflow files
// require exported functions to be async.
if self.has_file_workflow_directive {

CopilotAIApr 9, 2026

Copy link

Choose a reason for hiding this comment

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

visit_mut_module_items no longer validates exports for module-level 'use step' files, which means non-function exports (constants/classes/re-exports) are now allowed even though they won’t be code-stripped and can easily pull Node-only code into the workflow/client bundles. Consider adding a separate validation branch for has_file_step_directive that allows sync or async functions but rejects non-function exports/re-exports, with an error message that matches that rule.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed in #1664 — added export validation for has_file_step_directive that allows sync/async function exports but rejects non-function exports (constants, classes, re-exports). Error message is "Only functions can be exported from a \"use step\" file".

Comment on lines +3 to 8
// These should all error - not functions
export const value = 42;
export function syncFunc() {
return 'not allowed';
}
export class MyClass {
method() {}
}
export * from './other';

CopilotAIApr 9, 2026

Copy link

Choose a reason for hiding this comment

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

The header comment says these exports “should all error”, but the expected stderr fixtures for this test case were removed and the outputs keep these exports. Please update the comment (and potentially relocate/rename this fixture since it no longer asserts an error) so the test intent matches the actual expected behavior.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed in #1664 — the comment is now correct again since export validation for step files has been restored. The const value, class MyClass, and export * all produce errors; the sync and async function exports pass.

"@workflow/typescript-plugin": minor
---

Allow synchronous functions to use `"use step"` directive. This enables using `"use step"` as a mechanism to strip Node.js-dependent code from the workflow VM bundle without requiring the function to be async.

CopilotAIApr 9, 2026

Copy link

Choose a reason for hiding this comment

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

The PR description mentions that packages/swc-plugin-workflow/spec.md error documentation was updated, but this PR diff doesn’t include any changes to that spec file. Please ensure the spec is updated to reflect that "use step" can be used on sync functions while "use workflow" remains async-only (and adjust any validation/export rules accordingly).

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed in #1664 — updated spec.md error table (split Non-async into workflow-only, added step export validation row) and supported function forms (added sync variants for all step function forms).

@ghostghost mentioned this pull request Apr 9, 2026
Sign up for freeto 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

@TooTallNate@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Allow synchronous functions to use "use step" directive - #1633

Merged
TooTallNate merged 11 commits into
mainfrom
allow-sync-step-functions
Apr 9, 2026
Merged

Allow synchronous functions to use "use step" directive#1633
TooTallNate merged 11 commits into
mainfrom
allow-sync-step-functions

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

Summary

  • Lifts the async function restriction from "use step" in both the SWC compiler plugin and the TypeScript language service plugin
  • Synchronous functions can now use "use step" to strip their Node.js-dependent code from the workflow VM bundle
  • The async restriction is preserved for "use workflow" functions

Motivation

This enables using "use step" as a code-stripping mechanism for synchronous methods (e.g. getReadable() on the Run class) that use Node.js APIs not available in the workflow VM. Previously, "use step" required the function to be async, which was an artificial restriction for this use case.

Changed packages

  • @workflow/swc-plugin — Removed async guards from all step function code paths; updated should_transform_function; updated InvalidExport validation for module-level "use step" files; added sync-step fixture test; cleaned up error test fixtures
  • @workflow/typescript-plugin — Removed error 9002 (sync step function diagnostic); updated tests
  • Updated spec.md error documentation

Test plan

  • 196 Rust SWC plugin tests pass (22 unit + 24 error + 150 fixture, including new sync-step fixture)
  • 95 TypeScript plugin tests pass

…/private
The SWC compiler plugin no longer generates import statements. All step
function registrations and closure variable access are now self-contained
inline IIFEs with zero module dependencies:
- Step registration uses an IIFE that writes to
globalThis[Symbol.for('@workflow/core//registeredSteps')]
- Closure variable access uses an IIFE that reads from
globalThis[Symbol.for('WORKFLOW_STEP_CONTEXT_STORAGE')]
- Registrations are placed immediately after each function definition
instead of being batched at the bottom of the file
This enables 3rd-party node_modules packages to define step functions
without needing the 'workflow' package available at runtime.
Also removes the @workflow/core/private and workflow/internal/private
public subpath exports since they are no longer referenced by generated
code.
Lift the async function restriction from "use step" in both the SWC
compiler plugin and the TypeScript language service plugin. This enables
using "use step" as a mechanism to strip Node.js-dependent code from
the workflow VM bundle without requiring the function to be async.
The async restriction is preserved for "use workflow" functions.
- SWC plugin: removed async guards from all step function code paths,
updated should_transform_function, updated InvalidExport validation
- TypeScript plugin: removed error 9002 for sync step functions
- Added sync-step fixture test, cleaned up error test fixtures
- Updated spec.md error documentation
CopilotAI review requested due to automatic review settings April 7, 2026 07:45
@changeset-bot

changeset-botBot commented Apr 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e4b8d29

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

This PR includes changesets to release 18 packages
NameType
@workflow/swc-pluginMinor
@workflow/typescript-pluginMinor
@workflow/astroPatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nestPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
workflowPatch
@workflow/vitePatch
@workflow/vitestPatch
@workflow/world-testingPatch
@workflow/nuxtPatch
@workflow/aiPatch
@workflow/corePatch
@workflow/web-sharedPatch

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

@TooTallNate
TooTallNate requested a review from a team as a code ownerApril 7, 2026 07:45
@vercel

vercelBot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.043s (-1.4%)1.005s (~)0.963s101.00x
🌐 RedisNext.js (Turbopack)0.054s1.005s0.951s101.27x
🐘 PostgresNitro0.058s (-8.7% 🟢)1.010s (~)0.952s101.34x
🐘 PostgresNext.js (Turbopack)0.059s1.010s0.951s101.37x
🐘 PostgresExpress0.059s (+1.0%)1.010s (~)0.950s101.38x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.228s (+9.1% 🔺)2.214s (+1.9%)1.986s101.00x
▲ VercelNitro0.249s (+6.6% 🔺)2.227s (+6.5% 🔺)1.979s101.09x
▲ VercelNext.js (Turbopack)0.747s (+225.1% 🔺)2.542s (+12.1% 🔺)1.794s103.27x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.124s2.007s0.883s101.00x
💻 LocalNitro1.127s (~)2.006s (~)0.879s101.00x
🐘 PostgresExpress1.132s (-1.0%)2.011s (~)0.878s101.01x
🐘 PostgresNext.js (Turbopack)1.139s2.009s0.870s101.01x
🐘 PostgresNitro1.147s (~)2.010s (~)0.862s101.02x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.873s (-1.7%)4.167s (+10.3% 🔺)2.294s101.00x
▲ VercelNext.js (Turbopack)1.940s (-5.8% 🟢)3.298s (-13.7% 🟢)1.358s101.04x
▲ VercelExpress2.322s (+25.7% 🔺)4.020s (+9.9% 🔺)1.697s101.24x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)10.794s11.025s0.231s31.00x
🐘 PostgresExpress10.866s (~)11.023s (~)0.157s31.01x
🐘 PostgresNext.js (Turbopack)10.905s11.356s0.452s31.01x
🐘 PostgresNitro10.925s (~)11.024s (~)0.099s31.01x
💻 LocalNitro10.926s (~)11.022s (~)0.096s31.01x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.403s (-13.8% 🟢)18.223s (-13.1% 🟢)1.820s21.00x
▲ VercelNext.js (Turbopack)16.427s (-4.6%)17.753s (-8.6% 🟢)1.326s21.00x
▲ VercelNitro17.053s (~)18.660s (-5.5% 🟢)1.607s21.04x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)14.456s15.028s0.573s41.00x
🐘 PostgresNext.js (Turbopack)14.512s15.028s0.515s41.00x
🐘 PostgresExpress14.546s (~)15.023s (~)0.477s41.01x
🐘 PostgresNitro14.685s (+0.5%)15.027s (~)0.342s41.02x
💻 LocalNitro14.956s (~)15.029s (~)0.073s41.03x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro29.351s (-11.0% 🟢)31.401s (-10.0% 🟢)2.050s21.00x
▲ VercelNext.js (Turbopack)29.913s (-11.6% 🟢)31.199s (-13.0% 🟢)1.287s21.02x
▲ VercelExpress30.786s (-4.0%)32.534s (-2.5%)1.748s21.05x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)13.592s14.027s0.435s71.00x
🐘 PostgresNext.js (Turbopack)13.825s14.166s0.340s71.02x
🐘 PostgresExpress13.975s (-1.3%)14.448s (-3.8%)0.473s71.03x
🐘 PostgresNitro14.252s (+0.8%)15.024s (+1.9%)0.772s61.05x
💻 LocalNitro16.674s (+0.7%)17.031s (~)0.357s61.23x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express51.717s (-74.9% 🟢)53.900s (-74.1% 🟢)2.183s21.00x
▲ VercelNitro53.533s (-74.1% 🟢)55.369s (-73.5% 🟢)1.835s21.04x
▲ VercelNext.js (Turbopack)54.318s (-10.4% 🟢)55.810s (-10.8% 🟢)1.492s21.05x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)1.230s2.010s0.780s151.00x
🐘 PostgresExpress1.259s (~)2.009s (~)0.750s151.02x
🐘 PostgresNitro1.272s (-1.4%)2.010s (~)0.738s151.03x
🌐 RedisNext.js (Turbopack)1.323s2.007s0.684s151.08x
💻 LocalNitro1.513s (-1.6%)2.006s (~)0.494s151.23x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.056s (-25.2% 🟢)3.711s (-16.8% 🟢)1.655s91.00x
▲ VercelNext.js (Turbopack)2.542s (+3.4%)3.815s (-15.8% 🟢)1.273s81.24x
▲ VercelNitro2.624s (+0.6%)4.290s (-0.8%)1.666s71.28x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.312s (-2.8%)3.007s (~)0.696s101.00x
🐘 PostgresNitro2.327s (-1.1%)3.008s (~)0.681s101.01x
🐘 PostgresNext.js (Turbopack)2.466s3.010s0.544s101.07x
🌐 RedisNext.js (Turbopack)2.582s3.008s0.426s101.12x
💻 LocalNitro3.000s (+2.5%)3.565s (+14.7% 🔺)0.565s91.30x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.381s (-30.6% 🟢)4.033s (-19.9% 🟢)1.651s81.00x
▲ VercelExpress2.543s (-16.8% 🟢)3.976s (-15.0% 🟢)1.433s81.07x
▲ VercelNext.js (Turbopack)2.993s (+5.3% 🔺)4.436s (-7.3% 🟢)1.443s71.26x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express3.486s (~)4.011s (~)0.525s81.00x
🐘 PostgresNitro3.491s (+0.8%)4.010s (~)0.519s81.00x
🐘 PostgresNext.js (Turbopack)3.667s4.012s0.345s81.05x
🌐 RedisNext.js (Turbopack)4.133s4.869s0.736s71.19x
💻 LocalNitro8.373s (+2.3%)9.023s (~)0.650s42.40x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.838s (-13.4% 🟢)4.503s (-8.4% 🟢)1.665s71.00x
▲ VercelExpress3.249s (+6.1% 🔺)4.654s (-3.1%)1.404s71.15x
▲ VercelNext.js (Turbopack)4.099s (+0.9%)5.650s (-10.0% 🟢)1.551s61.44x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)1.219s2.010s0.791s151.00x
🐘 PostgresNitro1.268s (+0.8%)2.009s (~)0.740s151.04x
🐘 PostgresExpress1.275s (+0.8%)2.007s (~)0.732s151.05x
🌐 RedisNext.js (Turbopack)1.365s2.006s0.641s151.12x
💻 LocalNitro1.543s (+0.8%)2.006s (~)0.463s151.27x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.086s (-8.5% 🟢)3.837s (-3.2%)1.751s81.00x
▲ VercelNitro2.154s (-6.1% 🟢)3.859s (-2.5%)1.705s81.03x
▲ VercelNext.js (Turbopack)2.260s (-3.5%)3.500s (-16.1% 🟢)1.240s91.08x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.337s (-0.6%)3.009s (~)0.672s101.00x
🐘 PostgresNitro2.354s (-0.8%)3.009s (~)0.654s101.01x
🐘 PostgresNext.js (Turbopack)2.377s3.008s0.631s101.02x
🌐 RedisNext.js (Turbopack)2.555s3.008s0.453s101.09x
💻 LocalNitro3.050s (-1.6%)4.010s (+3.2%)0.959s81.31x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.435s (-99.2% 🟢)3.952s (-98.7% 🟢)1.517s81.00x
▲ VercelExpress2.492s (-96.8% 🟢)3.849s (-95.2% 🟢)1.357s81.02x
▲ VercelNext.js (Turbopack)2.658s (-6.0% 🟢)4.030s (-15.1% 🟢)1.372s81.09x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.471s (~)4.010s (~)0.539s81.00x
🐘 PostgresExpress3.475s (~)4.010s (~)0.535s81.00x
🐘 PostgresNext.js (Turbopack)3.649s4.012s0.363s81.05x
🌐 RedisNext.js (Turbopack)4.120s4.582s0.462s71.19x
💻 LocalNitro8.769s (-2.2%)9.021s (-2.7%)0.251s42.53x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.123s (-29.9% 🟢)4.760s (-20.8% 🟢)1.637s71.00x
▲ VercelNitro3.257s (+8.6% 🔺)4.834s (+3.1%)1.576s71.04x
▲ VercelNext.js (Turbopack)3.527s (-1.8%)4.910s (-8.0% 🟢)1.384s71.13x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.699s1.004s0.305s601.00x
🐘 PostgresNext.js (Turbopack)0.769s1.006s0.236s601.10x
🐘 PostgresExpress0.808s (-5.2% 🟢)1.023s (+1.7%)0.215s591.16x
🐘 PostgresNitro0.860s (+4.4%)1.023s (+1.7%)0.163s591.23x
💻 LocalNitro0.978s (-0.7%)1.057s (-10.5% 🟢)0.079s571.40x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro8.679s (-4.7%)10.740s (-4.0%)2.061s61.00x
▲ VercelNext.js (Turbopack)9.102s (-12.0% 🟢)10.751s (-13.7% 🟢)1.649s61.05x
▲ VercelExpress9.131s (-11.4% 🟢)10.745s (-10.6% 🟢)1.614s61.05x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.676s2.006s0.329s451.00x
🐘 PostgresNext.js (Turbopack)1.872s2.075s0.203s441.12x
🐘 PostgresExpress1.952s (-5.1% 🟢)2.174s (-24.6% 🟢)0.222s421.16x
🐘 PostgresNitro2.093s (+6.2% 🔺)2.945s (+32.3% 🔺)0.852s311.25x
💻 LocalNitro3.017s (~)3.586s (+1.1%)0.569s261.80x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express27.604s (-1.7%)29.418s (-2.2%)1.814s41.00x
▲ VercelNitro28.084s (-3.0%)30.146s (-1.7%)2.062s31.02x
▲ VercelNext.js (Turbopack)28.799s (-6.5% 🟢)30.803s (-6.4% 🟢)2.004s31.04x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)3.383s4.008s0.625s301.00x
🐘 PostgresNext.js (Turbopack)3.737s4.009s0.273s301.10x
🐘 PostgresExpress3.949s (-3.0%)4.147s (-13.8% 🟢)0.197s291.17x
🐘 PostgresNitro4.252s (+2.8%)4.972s (+1.7%)0.720s251.26x
💻 LocalNitro9.279s (+1.0%)9.942s (~)0.663s132.74x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express69.222s (-8.7% 🟢)70.943s (-8.6% 🟢)1.721s21.00x
▲ VercelNitro70.767s (-3.2%)73.163s (-2.3%)2.396s21.02x
▲ VercelNext.js (Turbopack)74.888s (-10.2% 🟢)76.096s (-11.0% 🟢)1.208s21.08x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.252s1.007s0.755s601.00x
🐘 PostgresExpress0.283s (+1.4%)1.007s (~)0.724s601.12x
🐘 PostgresNitro0.286s (~)1.007s (~)0.721s601.13x
🌐 RedisNext.js (Turbopack)0.294s1.004s0.710s601.16x
💻 LocalNitro0.603s (+1.6%)1.004s (~)0.401s602.39x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.456s (-23.7% 🟢)3.016s (-15.2% 🟢)1.560s211.00x
▲ VercelNitro1.477s (-17.8% 🟢)2.985s (-16.2% 🟢)1.507s211.01x
▲ VercelNext.js (Turbopack)1.621s (-2.4%)2.966s (-8.3% 🟢)1.345s211.11x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.467s1.006s0.539s901.00x
🐘 PostgresExpress0.488s (-1.3%)1.007s (~)0.519s901.04x
🐘 PostgresNitro0.501s (~)1.007s (~)0.506s901.07x
🌐 RedisNext.js (Turbopack)1.234s2.006s0.772s452.64x
💻 LocalNitro2.785s (+8.7% 🔺)3.183s (+5.8% 🔺)0.397s295.96x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.526s (-3.3%)4.332s (~)1.807s211.00x
▲ VercelNitro2.686s (+8.3% 🔺)4.386s (+5.1% 🔺)1.701s211.06x
▲ VercelNext.js (Turbopack)3.397s (-4.3%)4.947s (-3.9%)1.550s191.34x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Next.js (Turbopack)0.760s1.014s0.255s1191.00x
🐘 PostgresExpress0.771s (-2.4%)1.007s (~)0.236s1201.01x
🐘 PostgresNitro0.803s (-6.9% 🟢)1.008s (-5.2% 🟢)0.205s1201.06x
🌐 RedisNext.js (Turbopack)2.816s3.032s0.217s403.71x
💻 LocalNitro11.426s (+3.3%)12.031s (+3.1%)0.605s1015.04x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express6.156s (-13.3% 🟢)7.581s (-14.2% 🟢)1.425s161.00x
▲ VercelNitro6.524s (-5.3% 🟢)8.084s (-5.9% 🟢)1.560s151.06x
▲ VercelNext.js (Turbopack)32.897s (+425.9% 🔺)34.290s (+334.1% 🔺)1.393s125.34x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.186s1.001s0.002s1.008s0.822s101.00x
🐘 PostgresExpress0.202s (-2.1%)0.994s (-0.5%)0.002s (+23.1% 🔺)1.010s (~)0.809s101.08x
🐘 PostgresNext.js (Turbopack)0.206s1.001s0.028s1.037s0.832s101.10x
💻 LocalNitro0.206s (+1.2%)1.004s (~)0.013s (+2.5%)1.019s (~)0.812s101.11x
🐘 PostgresNitro0.209s (+3.5%)1.000s (~)0.001s (-7.7% 🟢)1.010s (~)0.801s101.12x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.415s (-40.6% 🟢)2.521s (-33.7% 🟢)0.694s (+87.6% 🔺)3.696s (-20.5% 🟢)2.281s101.00x
▲ VercelNext.js (Turbopack)1.443s (-10.1% 🟢)2.663s (-15.5% 🟢)0.571s (+82.2% 🔺)3.613s (-8.6% 🟢)2.170s101.02x
▲ VercelExpress1.509s (-13.0% 🟢)2.868s (-11.8% 🟢)0.552s (+59.6% 🔺)3.833s (-4.8%)2.324s101.07x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.481s1.001s0.003s1.011s0.530s601.00x
🐘 PostgresNext.js (Turbopack)0.589s1.009s0.005s1.023s0.434s591.22x
🐘 PostgresExpress0.596s (-4.6%)1.005s (~)0.004s (-8.6% 🟢)1.021s (~)0.425s591.24x
🐘 PostgresNitro0.647s (+4.0%)1.005s (~)0.005s (+14.5% 🔺)1.024s (~)0.377s591.35x
💻 LocalNitro0.828s (+13.5% 🔺)1.012s (~)0.010s (+1.1%)1.116s (+9.1% 🔺)0.288s541.72x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.990s (+5.4% 🔺)5.204s (-1.5%)0.315s (-18.0% 🟢)5.965s (-1.8%)1.974s111.00x
▲ VercelNext.js (Turbopack)4.125s (-2.8%)5.578s (-3.6%)0.185s (-52.3% 🟢)6.124s (-7.7% 🟢)2.000s101.03x
▲ VercelExpress5.305s6.929s0.393s7.734s2.429s81.33x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)0.912s1.035s0.000s1.039s0.127s581.00x
🐘 PostgresNext.js (Turbopack)0.946s1.154s0.000s1.171s0.225s521.04x
🐘 PostgresExpress0.977s (+0.6%)1.243s (+6.1% 🔺)0.000s (+59.4% 🔺)1.257s (+5.1% 🔺)0.281s481.07x
🐘 PostgresNitro0.991s (+3.6%)1.214s (+5.7% 🔺)0.000s (-65.3% 🟢)1.228s (+5.7% 🔺)0.237s501.09x
💻 LocalNitro1.244s (~)2.021s (~)0.000s (+50.0% 🔺)2.023s (~)0.779s301.36x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.787s (+7.0% 🔺)4.205s (+13.8% 🔺)0.000s (-85.6% 🟢)4.643s (+12.6% 🔺)1.855s131.00x
▲ VercelNitro2.823s (-90.9% 🟢)4.110s (-87.2% 🟢)0.001s (+Infinity% 🔺)4.619s (-85.9% 🟢)1.796s131.01x
▲ VercelNext.js (Turbopack)3.007s (-9.8% 🟢)4.399s (-5.4% 🟢)0.000s (-100.0% 🟢)4.764s (-6.5% 🟢)1.757s131.08x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

fan-out fan-in 10 streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.666s2.036s0.000s2.039s0.373s301.00x
🐘 PostgresExpress1.747s (-7.0% 🟢)2.140s (-6.7% 🟢)0.000s (+Infinity% 🔺)2.152s (-6.7% 🟢)0.405s281.05x
🐘 PostgresNitro1.791s (~)2.134s (~)0.000s (-3.4%)2.147s (~)0.356s291.07x
🐘 PostgresNext.js (Turbopack)1.805s2.146s0.000s2.192s0.387s281.08x
💻 LocalNitro3.632s (+2.5%)4.232s (+4.9%)0.001s (~)4.235s (+4.9%)0.604s152.18x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.867s (+2.6%)5.104s (+4.7%)0.001s (+900.0% 🔺)5.538s (+3.8%)1.671s121.00x
▲ VercelNitro5.456s (+32.2% 🔺)6.612s (+23.8% 🔺)0.000s (+144.4% 🔺)7.089s (+22.2% 🔺)1.633s91.41x
▲ VercelNext.js (Turbopack)5.462s (+36.0% 🔺)6.548s (+22.8% 🔺)0.000s (NaN%)6.966s (+19.3% 🔺)1.504s91.41x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro21/21
🐘 PostgresNext.js (Turbopack)12/21
▲ VercelExpress13/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres19/21
Next.js (Turbopack)🌐 Redis12/21
Nitro🐘 Postgres16/21
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
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@github-actions

github-actionsBot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production890067957
✅ 💻 Local Development86601781044
✅ 📦 Local Production86601781044
✅ 🐘 Local Postgres86601781044
✅ 🪟 Windows790887
❌ 🌍 Community Worlds1366524225
✅ 📋 Other219042261
Total3922656754662

❌ Failed Tests

🌍 Community Worlds (65 failed)

mongodb (4 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNQT12HK8X4N86DEASFAYTC3
  • webhookWorkflow | wrun_01KNQT1B8CE6EZ1PEED6RR64J3
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNQT90QM3AQHKNFTTC3T4RSX
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNQTFBW8QY7AK7XNWV2MJH0N

redis (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNQT12HK8X4N86DEASFAYTC3
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNQT90QM3AQHKNFTTC3T4RSX
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNQTFBW8QY7AK7XNWV2MJH0N

turso (58 failed):

  • addTenWorkflow | wrun_01KNQSZWK13GCCQH5P3FH07BKA
  • addTenWorkflow | wrun_01KNQSZWK13GCCQH5P3FH07BKA
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KNQT0FT2RNF0HGMMDGWWFG78
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KNQT04E56N7KQ56RT376TDRY
  • promiseRaceWorkflow | wrun_01KNQT08Y6VPWJ6HA9XB3ACDVM
  • promiseAnyWorkflow | wrun_01KNQT0B3AWW74S02RSY96DFDY
  • importedStepOnlyWorkflow | wrun_01KNQT0VCPFWJEJR9NRCGH1YE1
  • hookWorkflow | wrun_01KNQT0Q25ZF0230NTFW8TT8FV
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNQT12HK8X4N86DEASFAYTC3
  • webhookWorkflow | wrun_01KNQT1B8CE6EZ1PEED6RR64J3
  • sleepingWorkflow | wrun_01KNQT1H85476RXPSMD074B2X0
  • parallelSleepWorkflow | wrun_01KNQT1X4V7GJPN458S4DTNQHZ
  • nullByteWorkflow | wrun_01KNQT20D17XGS9YA969RSNBCX
  • workflowAndStepMetadataWorkflow | wrun_01KNQT22GYCEM9QQ63EYRWYNYJ
  • fetchWorkflow | wrun_01KNQT4QEY4E6RG3M8NABTD1WT
  • promiseRaceStressTestWorkflow | wrun_01KNQT4ST3XHH8WE6DE83AQQ2C
  • 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()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KNQT8C7D0W9WVRY9DB6M4R6F
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNQT90QM3AQHKNFTTC3T4RSX
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KNQT9N3Q09Z1RWEW56XMCHA3
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KNQTA95C42ANFAA89B5TYKMB
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KNQTAJX9XKZVZ5CE2TFDDGRD
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KNQTARF9TMA086QP6MMNFMPD
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KNQTATM6MNKY1EC8MNQ9Z5RQ
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KNQTBAFJVXA1W3K58JC3MHE3
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KNQTBG2A2R586XK4ANBP75KQ
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KNQTBPRJW3W53CRJ9A43SX2T
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KNQTBXD7ED0HM67PD7H4ER2X
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KNQTC2Z4MT98F21MRWEJ9DSB
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KNQTC9NDWM216M5JCAQBM90C
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KNQTCH1WM9Z1WVTTBGMPMBRN
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KNQTCXME3Y7DX14MBYE93H4D
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KNQTD5CV0BR9DZAG478KNZWX
  • cancelRun - cancelling a running workflow | wrun_01KNQTDC6Y4PD7004JSH4NQBYC
  • cancelRun via CLI - cancelling a running workflow | wrun_01KNQTDNJ0Z5XAKHDKSY4EEN56
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KNQTE1PJA6ZM5HN105P89GME
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KNQTEPC3ZQSTTXA0PZS0GAP7
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KNQTF0MXCVDK1YB1PQDYC8YY
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KNQTF7DQSQERG48JV5RK0R6S
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KNQTF9SAC38S1HRGBERBMHNE
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNQTFBW8QY7AK7XNWV2MJH0N
  • getterStepWorkflow - getter functions with "use step" directive | wrun_01KNQTFF4388KKRERJQVTNB56C

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro8007
✅ example8007
✅ express8007
✅ fastify8007
✅ hono8007
✅ nextjs-turbopack8502
✅ nextjs-webpack8502
✅ nitro8007
✅ nuxt8007
✅ sveltekit8007
✅ vite8007
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable73014
✅ express-stable73014
✅ fastify-stable73014
✅ hono-stable73014
✅ nextjs-turbopack-canary62025
✅ nextjs-turbopack-stable7908
✅ nextjs-webpack-canary62025
✅ nextjs-webpack-stable7908
✅ nitro-stable73014
✅ nuxt-stable73014
✅ sveltekit-stable73014
✅ vite-stable73014
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable73014
✅ express-stable73014
✅ fastify-stable73014
✅ hono-stable73014
✅ nextjs-turbopack-canary62025
✅ nextjs-turbopack-stable7908
✅ nextjs-webpack-canary62025
✅ nextjs-webpack-stable7908
✅ nitro-stable73014
✅ nuxt-stable73014
✅ sveltekit-stable73014
✅ vite-stable73014
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable73014
✅ express-stable73014
✅ fastify-stable73014
✅ hono-stable73014
✅ nextjs-turbopack-canary62025
✅ nextjs-turbopack-stable7908
✅ nextjs-webpack-canary62025
✅ nextjs-webpack-stable7908
✅ nitro-stable73014
✅ nuxt-stable73014
✅ sveltekit-stable73014
✅ vite-stable73014
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack7908
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev500
❌ mongodb5848
✅ redis-dev500
❌ redis5938
✅ turso-dev500
❌ turso4588
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable73014
✅ e2e-local-postgres-nest-stable73014
✅ e2e-local-prod-nest-stable73014

📋 View full workflow run

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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 removes the “step functions must be async” restriction across the SWC transform and the TypeScript language service plugin, allowing synchronous functions to use the "use step" directive as a code-stripping mechanism while preserving the async requirement for "use workflow".

Changes:

  • TypeScript plugin: removes diagnostic error 9002 for synchronous step functions and updates tests accordingly.
  • SWC plugin: lifts async-only checks from "use step" transformation paths and adds a new sync-step fixture to verify output across workflow/step/client modes.
  • Documentation + release: updates SWC plugin spec validation table and adds a changeset for patch releases.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.

Show a summary per file
FileDescription
packages/typescript-plugin/src/diagnostics.tsRemoves async validation for "use step" functions in custom diagnostics.
packages/typescript-plugin/src/diagnostics.test.tsUpdates tests to assert no error 9002 for sync step functions.
packages/swc-plugin-workflow/transform/tests/fixture/sync-step/input.jsAdds fixture input covering sync function/arrow/object-method step directives.
packages/swc-plugin-workflow/transform/tests/fixture/sync-step/output-workflow.jsExpected workflow-mode output for sync-step fixture (initializer exports).
packages/swc-plugin-workflow/transform/tests/fixture/sync-step/output-step.jsExpected step-mode output for sync-step fixture (registration + preserved bodies).
packages/swc-plugin-workflow/transform/tests/fixture/sync-step/output-client.jsExpected client-mode output for sync-step fixture (stepId annotations).
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/input.jsUpdates error fixture to only cover non-async "use workflow" cases.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-workflow.jsUpdates expected workflow-mode output after removing step async restriction.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-workflow.stderrUpdates expected stderr to reflect only "use workflow" async errors.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-step.jsUpdates expected step-mode output after removing step async restriction.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-step.stderrUpdates expected stderr to reflect only "use workflow" async errors.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-client.jsUpdates expected client-mode output after removing step async restriction.
packages/swc-plugin-workflow/transform/tests/errors/non-async-functions/output-client.stderrUpdates expected stderr to reflect only "use workflow" async errors.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/input.jsUpdates invalid-export fixture to allow sync function exports in "use step" files.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-workflow.jsExpected workflow-mode output reflecting sync function export allowance.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-workflow.stderrExpected stderr after invalid-export fixture adjustments.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-step.jsExpected step-mode output registering sync exported steps.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-step.stderrExpected stderr after invalid-export fixture adjustments.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-client.jsExpected client-mode output with stepId for sync exported steps.
packages/swc-plugin-workflow/transform/tests/errors/invalid-exports/output-client.stderrExpected stderr after invalid-export fixture adjustments.
packages/swc-plugin-workflow/transform/src/lib.rsRemoves async guards for "use step" transformations; keeps "use workflow" async enforcement in relevant paths.
packages/swc-plugin-workflow/spec.mdUpdates validation error documentation to reflect sync "use step" allowance.
.changeset/allow-sync-step-functions.mdAdds patch changeset entries for SWC + TypeScript plugins.

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

Comment threadpackages/swc-plugin-workflow/transform/src/lib.rs Outdated
Comment threadpackages/swc-plugin-workflow/transform/src/lib.rs Outdated
…row behavior
- Remove stale 'Collect registration calls' comment from StepTransform
- Fix 'everyhwere' typo in e2e test comments
- Closure vars IIFE now throws when called outside a step function
context, matching the original __private_getClosureVars behavior
…xport message
- Remove the no-op validate_async_function method and unwrap all callers
- InvalidExport message now says 'Only functions can be exported' for
'use step' files, vs 'Only async functions' for 'use workflow' files

@VaguelySeriousVaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI review: blocking issues found

Comment threadpackages/swc-plugin-workflow/transform/src/lib.rs Outdated
Comment threadpackages/swc-plugin-workflow/transform/src/lib.rs
Comment threadpackages/typescript-plugin/src/diagnostics.ts Outdated
Comment threadpackages/swc-plugin-workflow/spec.md Outdated
Base automatically changed from inline-step-registration to mainApril 8, 2026 23:58
…ethod async check
- Remove validate_async_function() entirely and unwrap all 8 call sites
(the function was a no-op that always returned true)
- Fix static class method handler to only check async for 'use workflow'
(was still blocking sync step functions on static methods)
- Remove no-op checkStepFunction from TypeScript plugin
- Regenerate test fixture outputs
Also bump changeset from patch to minor (new feature, not bug fix)

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 22 out of 22 changed files in this pull request and generated 4 comments.


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

Comment on lines +4057 to 4058
// Previously validated that step functions must be async. The restriction

CopilotAIApr 9, 2026

Copy link

Choose a reason for hiding this comment

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

There’s a dangling/incomplete comment here (ends mid-sentence) left over from removing the async-only validation. It should either be completed to explain the new behavior or removed to avoid confusion when maintaining this transform logic.

Suggested change
// Previously validated that step functions must be async. The restriction

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed in #1664 — removed the dangling incomplete comment entirely.

Comment on lines +6054 to +6057
// Validate exports if we have a file-level workflow directive.
// Step files allow any exports (sync or async), but workflow files
// require exported functions to be async.
if self.has_file_workflow_directive {

CopilotAIApr 9, 2026

Copy link

Choose a reason for hiding this comment

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

visit_mut_module_items no longer validates exports for module-level 'use step' files, which means non-function exports (constants/classes/re-exports) are now allowed even though they won’t be code-stripped and can easily pull Node-only code into the workflow/client bundles. Consider adding a separate validation branch for has_file_step_directive that allows sync or async functions but rejects non-function exports/re-exports, with an error message that matches that rule.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed in #1664 — added export validation for has_file_step_directive that allows sync/async function exports but rejects non-function exports (constants, classes, re-exports). Error message is "Only functions can be exported from a \"use step\" file".

Comment on lines +3 to 8
// These should all error - not functions
export const value = 42;
export function syncFunc() {
return 'not allowed';
}
export class MyClass {
method() {}
}
export * from './other';

CopilotAIApr 9, 2026

Copy link

Choose a reason for hiding this comment

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

The header comment says these exports “should all error”, but the expected stderr fixtures for this test case were removed and the outputs keep these exports. Please update the comment (and potentially relocate/rename this fixture since it no longer asserts an error) so the test intent matches the actual expected behavior.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed in #1664 — the comment is now correct again since export validation for step files has been restored. The const value, class MyClass, and export * all produce errors; the sync and async function exports pass.

"@workflow/typescript-plugin": minor
---

Allow synchronous functions to use `"use step"` directive. This enables using `"use step"` as a mechanism to strip Node.js-dependent code from the workflow VM bundle without requiring the function to be async.

CopilotAIApr 9, 2026

Copy link

Choose a reason for hiding this comment

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

The PR description mentions that packages/swc-plugin-workflow/spec.md error documentation was updated, but this PR diff doesn’t include any changes to that spec file. Please ensure the spec is updated to reflect that "use step" can be used on sync functions while "use workflow" remains async-only (and adjust any validation/export rules accordingly).

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Fixed in #1664 — updated spec.md error table (split Non-async into workflow-only, added step export validation row) and supported function forms (added sync variants for all step function forms).

@ghostghost mentioned this pull request Apr 9, 2026
Sign up for freeto 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

@TooTallNate@VaguelySerious