Skip to content

feat(core): add serialization support for workflow function references - #1677

Merged
TooTallNate merged 2 commits into
mainfrom
fix/workflow-function-serialization
Apr 10, 2026
Merged

feat(core): add serialization support for workflow function references#1677
TooTallNate merged 2 commits into
mainfrom
fix/workflow-function-serialization

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Apr 9, 2026

Copy link
Copy Markdown
Member

Summary

Add a WorkflowFunction reducer/reviver pair to the serialization system so that workflow function references (functions with a .workflowId property, as produced by the SWC compiler) can cross the step serialization boundary.

This is a prerequisite for allowing start() to be called directly from workflow functions with "use step" — the workflow function reference passed as the first argument needs to be serializable.

How it works

Reducer: Detects functions with a .workflowId string property, serializes as { workflowId }. Only matches functions (not plain objects) to prevent infinite recursion since the reduced form is a plain object.

Revivers: All contexts (step, workflow, external) deserialize as a function with .workflowId that throws "Workflow functions cannot be called directly. Use start() to invoke them." on direct invocation. This is sufficient because start() only reads .workflowId from the reference.

Observability: Renders as <workflow:workflowId> in the o11y UI.

Note on workflow context hydration

It is recognized that the workflow context reviver should ideally return the proper registered function reference (since the SWC compiler registers workflow functions in the VM). However, since this PR is primarily for the start() as a step use-case — where the deserialized reference is only passed to start() which reads .workflowId — returning a throwing wrapper is sufficient. Full workflow function registry hydration can be revisited in the future when there is a concrete use case requiring the actual function reference in workflow context.

Example

// In user code (workflow context):constchildRun=awaitstart(myChildWorkflow,[42]);// ^^^^^^^^^^^^^^^^// This is a function with .workflowId attached by SWC.// The WorkflowFunction reducer serializes it as { workflowId: "..." }// so it can cross the step boundary as an argument to start().

CopilotAI review requested due to automatic review settings April 9, 2026 22:53
@TooTallNate
TooTallNate requested a review from a team as a code ownerApril 9, 2026 22:53
@vercel

vercelBot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Apr 9, 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.035s (-5.9% 🟢)1.005s (~)0.970s101.00x
🐘 PostgresNitro0.056s (-11.4% 🟢)1.010s (~)0.954s101.60x
🐘 PostgresExpress0.061s (-8.6% 🟢)1.010s (~)0.949s101.74x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.234s (-3.4%)2.116s (~)1.883s101.00x
▲ VercelNext.js (Turbopack)0.286s (-35.5% 🟢)2.053s (-7.6% 🟢)1.766s101.23x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.099s (~)2.006s (~)0.906s101.00x
🐘 PostgresNitro1.139s (-1.0%)2.010s (~)0.870s101.04x
🐘 PostgresExpress1.147s (~)2.009s (~)0.861s101.04x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.807s (-12.7% 🟢)4.016s (+8.7% 🔺)2.208s101.00x
▲ VercelExpress1.949s (+4.2%)4.112s (+7.0% 🔺)2.163s101.08x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.673s (~)11.023s (~)0.349s31.00x
🐘 PostgresExpress10.858s (~)11.022s (~)0.163s31.02x
🐘 PostgresNitro10.884s (~)11.353s (+3.0%)0.468s31.02x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.963s (+1.3%)18.921s (+1.0%)1.958s21.00x
▲ VercelNext.js (Turbopack)17.475s (-1.6%)19.672s (+3.8%)2.197s21.03x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro14.241s (~)15.028s (~)0.787s41.00x
🐘 PostgresNitro14.474s (~)15.020s (~)0.546s41.02x
🐘 PostgresExpress14.476s (-0.6%)15.021s (~)0.545s41.02x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)31.526s (-7.1% 🟢)33.030s (-8.2% 🟢)1.504s21.00x
▲ VercelExpress31.686s (+5.1% 🔺)33.518s (+3.9%)1.833s21.01x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express13.811s (-2.0%)14.020s (-4.9%)0.209s71.00x
🐘 PostgresNitro13.921s (~)14.305s (+2.0%)0.384s71.01x
💻 LocalNitro14.873s (~)15.028s (~)0.156s61.08x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express50.353s (-4.2%)52.735s (-3.7%)2.382s21.00x
▲ VercelNext.js (Turbopack)54.849s (~)57.326s (+0.5%)2.478s21.09x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.262s (~)2.010s (~)0.747s151.00x
🐘 PostgresExpress1.277s (~)2.009s (~)0.732s151.01x
💻 LocalNitro1.457s (-2.5%)2.005s (~)0.548s151.15x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.308s (-2.7%)4.131s (~)1.823s81.00x
▲ VercelNext.js (Turbopack)2.639s (+11.1% 🔺)4.558s (+17.8% 🔺)1.919s71.14x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.330s (-1.2%)3.009s (~)0.680s101.00x
🐘 PostgresExpress2.335s (~)3.011s (~)0.676s101.00x
💻 LocalNitro2.665s (-2.3%)3.008s (-6.3% 🟢)0.343s101.14x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.624s (-0.9%)4.357s (+6.3% 🔺)1.733s81.00x
▲ VercelNext.js (Turbopack)2.655s (-12.2% 🟢)4.643s (+5.4% 🔺)1.988s71.01x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.459s (-1.3%)4.010s (~)0.552s81.00x
🐘 PostgresExpress3.471s (-0.9%)4.010s (~)0.538s81.00x
💻 LocalNitro7.084s (-8.5% 🟢)8.018s (-5.9% 🟢)0.934s42.05x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.181s (+7.9% 🔺)5.001s (+6.1% 🔺)1.820s61.00x
▲ VercelNext.js (Turbopack)3.623s (+19.3% 🔺)5.334s (+15.8% 🔺)1.710s61.14x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.250s (-0.6%)2.008s (~)0.757s151.00x
🐘 PostgresExpress1.262s (-2.6%)2.007s (~)0.746s151.01x
💻 LocalNitro1.482s (-1.5%)2.006s (~)0.524s151.19x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.273s (+18.1% 🔺)4.166s (+12.2% 🔺)1.893s81.00x
▲ VercelNext.js (Turbopack)2.799s (+29.2% 🔺)4.577s (+27.8% 🔺)1.778s71.23x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.306s (-3.1%)3.008s (~)0.702s101.00x
🐘 PostgresNitro2.335s (~)3.010s (~)0.674s101.01x
💻 LocalNitro2.789s (-20.2% 🟢)3.108s (-22.5% 🟢)0.319s101.21x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.975s (+20.0% 🔺)4.663s (+20.5% 🔺)1.688s71.00x
▲ VercelExpress3.231s (+23.3% 🔺)5.069s (+14.9% 🔺)1.838s61.09x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.454s (~)4.008s (~)0.554s81.00x
🐘 PostgresExpress3.477s (~)4.009s (~)0.532s81.01x
💻 LocalNitro7.837s (-7.8% 🟢)8.268s (-8.4% 🟢)0.431s42.27x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.862s (-2.4%)4.776s (+13.3% 🔺)1.913s71.00x
▲ VercelNext.js (Turbopack)4.221s (+21.8% 🔺)6.242s (+29.6% 🔺)2.021s51.47x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.697s (-5.4% 🟢)1.004s (~)0.307s601.00x
🐘 PostgresNitro0.787s (-5.9% 🟢)1.005s (-1.7%)0.219s601.13x
🐘 PostgresExpress0.793s (-8.3% 🟢)1.006s (~)0.213s601.14x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)9.026s (+1.0%)11.073s (+3.9%)2.047s61.00x
▲ VercelExpress9.258s (+0.7%)11.630s (+5.9% 🔺)2.373s61.03x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.871s (-13.2% 🟢)2.052s (-31.1% 🟢)0.181s441.00x
🐘 PostgresNitro1.940s (~)2.283s (+8.7% 🔺)0.342s401.04x
💻 LocalNitro2.272s (-11.5% 🟢)3.007s (-5.4% 🟢)0.735s301.21x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express29.451s (+5.3% 🔺)31.651s (+5.7% 🔺)2.200s41.00x
▲ VercelNext.js (Turbopack)31.188s (+8.9% 🔺)33.320s (+9.8% 🔺)2.132s31.06x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.825s (-4.2%)4.043s (-5.9% 🟢)0.219s301.00x
🐘 PostgresExpress3.858s (-10.6% 🟢)4.110s (-18.0% 🟢)0.252s301.01x
💻 LocalNitro7.329s (-5.0%)8.015s (-2.4%)0.686s151.92x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express75.268s (-4.0%)77.094s (-3.9%)1.826s21.00x
▲ VercelNext.js (Turbopack)77.509s (+0.8%)79.286s (+0.7%)1.777s21.03x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.279s (-5.8% 🟢)1.006s (~)0.728s601.00x
🐘 PostgresNitro0.282s (~)1.006s (~)0.724s601.01x
💻 LocalNitro0.586s (-11.7% 🟢)1.004s (~)0.418s602.10x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.604s (+10.7% 🔺)3.360s (+11.7% 🔺)1.757s181.00x
▲ VercelExpress1.630s (+7.1% 🔺)3.360s (+8.5% 🔺)1.729s181.02x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.490s (~)1.006s (~)0.516s901.00x
🐘 PostgresExpress0.495s (-5.8% 🟢)1.007s (~)0.512s901.01x
💻 LocalNitro2.457s (-10.6% 🟢)3.008s (-5.5% 🟢)0.550s305.01x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.697s (-1.5%)4.606s (+5.9% 🔺)1.909s201.00x
▲ VercelNext.js (Turbopack)3.111s (-7.5% 🟢)5.125s (+6.2% 🔺)2.014s181.15x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.776s (-1.3%)1.007s (~)0.231s1201.00x
🐘 PostgresExpress0.794s (-5.6% 🟢)1.016s (~)0.222s1191.02x
💻 LocalNitro10.560s (-5.2% 🟢)11.023s (-7.0% 🟢)0.463s1113.61x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express8.362s (+22.2% 🔺)10.710s (+23.2% 🔺)2.348s121.00x
▲ VercelNext.js (Turbopack)309.221s (+4172.4% 🔺)311.025s (+3509.5% 🔺)1.804s136.98x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.138s (-6.3% 🟢)1.004s (~)0.009s (+3.3%)1.015s (~)0.877s101.00x
🐘 PostgresNitro0.198s (-0.9%)0.995s (~)0.002s (+6.2% 🔺)1.009s (~)0.812s101.43x
🐘 PostgresExpress0.208s (-3.0%)0.995s (~)0.001s (-23.5% 🟢)1.010s (~)0.801s101.51x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.665s (+12.6% 🔺)3.034s (~)0.477s (+57.4% 🔺)4.039s (+7.3% 🔺)2.374s101.00x
▲ VercelNext.js (Turbopack)1.713s (+4.9%)2.960s (~)0.522s (+21.4% 🔺)3.943s (+4.1%)2.230s101.03x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.604s (-6.7% 🟢)1.005s (~)0.004s (-13.0% 🟢)1.022s (~)0.418s591.00x
🐘 PostgresNitro0.612s (+1.1%)1.023s (+2.1%)0.004s (~)1.039s (+1.8%)0.427s581.01x
💻 LocalNitro0.667s (+0.8%)1.011s (~)0.009s (-16.1% 🟢)1.114s (+8.6% 🔺)0.447s541.10x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.323s (+2.3%)6.220s (+6.3% 🔺)0.312s (+42.0% 🔺)7.042s (+8.5% 🔺)2.719s91.00x
▲ VercelNext.js (Turbopack)4.374s (+6.4% 🔺)6.022s (+7.9% 🔺)0.552s (-23.9% 🟢)7.017s (+5.0% 🔺)2.643s91.01x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.914s (-3.2%)1.104s (-3.7%)0.000s (-67.9% 🟢)1.118s (-3.8%)0.204s541.00x
🐘 PostgresExpress0.940s (-5.2% 🟢)1.103s (-17.4% 🟢)0.000s (+22.2% 🔺)1.119s (-18.3% 🟢)0.179s541.03x
💻 LocalNitro1.160s (-12.5% 🟢)2.018s (~)0.000s (-64.7% 🟢)2.020s (~)0.860s301.27x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.869s (+8.5% 🔺)4.117s (+10.9% 🔺)0.000s (+60.7% 🔺)4.607s (+11.2% 🔺)1.738s141.00x
▲ VercelNext.js (Turbopack)3.180s (-2.2%)4.680s (+6.7% 🔺)0.000s (-63.9% 🟢)5.177s (+8.5% 🔺)1.996s121.11x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.710s (-4.3%)2.139s (~)0.000s (NaN%)2.152s (~)0.442s281.00x
🐘 PostgresNitro1.780s (~)2.129s (+1.5%)0.000s (-100.0% 🟢)2.199s (+4.1%)0.418s291.04x
💻 LocalNitro3.348s (-15.1% 🟢)4.029s (-11.1% 🟢)0.000s (-68.2% 🟢)4.032s (-11.1% 🟢)0.684s161.96x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.127s (+21.6% 🔺)5.611s (+15.6% 🔺)0.000s (-100.0% 🟢)6.079s (+14.4% 🔺)1.952s101.00x
▲ VercelNext.js (Turbopack)4.514s (+3.8%)5.868s (+5.2% 🔺)0.000s (-63.3% 🟢)6.337s (+6.0% 🔺)1.823s101.09x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro21/21
🐘 PostgresNitro14/21
▲ VercelExpress16/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres19/21
Next.js (Turbopack)▲ Vercel21/21
Nitro🐘 Postgres15/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


Some benchmark jobs failed:

  • Local: cancelled
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

@github-actions

github-actionsBot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production923067990
✅ 💻 Local Development89801821080
✅ 📦 Local Production89801821080
✅ 🐘 Local Postgres89801821080
✅ 🪟 Windows820890
❌ 🌍 Community Worlds1337424231
✅ 📋 Other228042270
Total4060746874821

❌ Failed Tests

🌍 Community Worlds (74 failed)

mongodb (7 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNTAQDJDBSHTG1MWKF5KQBC5
  • webhookWorkflow | wrun_01KNTAQP2B6QNFW4V5CC2P3NZ1
  • fetchWorkflow | wrun_01KNTAV423VWE5AF0N1NWNCQ9T
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNTAYYWMXFXFVJ33YZ9V6ASZ
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNTB557DNYXNH4EV8TP26TD9

redis (7 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNTAQDJDBSHTG1MWKF5KQBC5
  • webhookWorkflow | wrun_01KNTAQP2B6QNFW4V5CC2P3NZ1
  • fetchWorkflow | wrun_01KNTAV423VWE5AF0N1NWNCQ9T
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNTAYYWMXFXFVJ33YZ9V6ASZ
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNTB557DNYXNH4EV8TP26TD9

turso (60 failed):

  • addTenWorkflow | wrun_01KNTAP9AVRTGK03SM69S63608
  • addTenWorkflow | wrun_01KNTAP9AVRTGK03SM69S63608
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KNTAQDKF2QVPYWGFH6W47PC9
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KNTAPGX7BKKR4ZRE58D7ZHH7
  • promiseRaceWorkflow | wrun_01KNTAPP407KBZNC5D2E7ZN7HT
  • promiseAnyWorkflow | wrun_01KNTAPQZ70DGD6CC21VAF8J21
  • importedStepOnlyWorkflow | wrun_01KNTAQT6HJ36G1K7T8WJB0J9S
  • hookWorkflow | wrun_01KNTAQ3D3TSW5YZRSJFXFR53D
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNTAQDJDBSHTG1MWKF5KQBC5
  • webhookWorkflow | wrun_01KNTAQP2B6QNFW4V5CC2P3NZ1
  • sleepingWorkflow | wrun_01KNTAQVQM7GW6GXQRDJFA1V3C
  • parallelSleepWorkflow | wrun_01KNTAR7NBH7YK2PSVB16SHS3Y
  • nullByteWorkflow | wrun_01KNTARC0FHC9PZ380HNHXCE3Q
  • workflowAndStepMetadataWorkflow | wrun_01KNTARDY46ZFS3910Z5TS8GM9
  • fetchWorkflow | wrun_01KNTAV423VWE5AF0N1NWNCQ9T
  • promiseRaceStressTestWorkflow | wrun_01KNTAV6CBHN7Y62R93F05FJBT
  • 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_01KNTAYC4A0HMMJ82ZAS5XHYB3
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNTAYYWMXFXFVJ33YZ9V6ASZ
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KNTAZJEVBF2HY6T73YPG2SDG
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KNTB05TEV77Z954JTQPRXCX6
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KNTB0DPKSYDHGAPJXNE6EQJJ
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KNTB0KQD8CZNSQKSNCG31HAY
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KNTB0NJRSSKBJFGDY5R3EMTG
  • runClassSerializationWorkflow - Run instances serialize across workflow/step boundaries | wrun_01KNTB0ZTHFAGXWNH9HTW4NVEN
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KNTB1DNEDKFTTXW4XT0S3QN9
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KNTB1JSSZ6Q07R4CGC7B6CS5
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KNTB1RMRHJTM9B024NEKC02R
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KNTB1YQZHV70B0TM63DE4A6J
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KNTB24NMAXHG41V7MZSRCHRZ
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KNTB2AP9VTJ7DHYEG7YSE72Q
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KNTB2GX4GDYF8R5ZESZN0EN4
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KNTB2TR3HNFKBG0RRDT44C8S
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KNTB32JA4CEPPH6MP7NF7BXW
  • cancelRun - cancelling a running workflow | wrun_01KNTB38B962CGE4Q7QRXWDP17
  • cancelRun via CLI - cancelling a running workflow | wrun_01KNTB3GWFDJBCJPNZXTX2QSZC
  • 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_01KNTB3VWCNC123S1VJDNX8JS6
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KNTB4FHKX1YRHE30BY5MHTZZ
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KNTB4T9B5T9B4RQ3CCPBBYB2
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KNTB504C25ET83GJT6S58G19
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KNTB52Y4HTXATE6XC7V3EX1D
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNTB557DNYXNH4EV8TP26TD9
  • getterStepWorkflow - getter functions with "use step" directive | wrun_01KNTB5855A2TQ9CJHJZ3H2DFP

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro8307
✅ example8307
✅ express8307
✅ fastify8307
✅ hono8307
✅ nextjs-turbopack8802
✅ nextjs-webpack8802
✅ nitro8307
✅ nuxt8307
✅ sveltekit8307
✅ vite8307
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable76014
✅ express-stable76014
✅ fastify-stable76014
✅ hono-stable76014
✅ nextjs-turbopack-canary63027
✅ nextjs-turbopack-stable8208
✅ nextjs-webpack-canary63027
✅ nextjs-webpack-stable8208
✅ nitro-stable76014
✅ nuxt-stable76014
✅ sveltekit-stable76014
✅ vite-stable76014
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable76014
✅ express-stable76014
✅ fastify-stable76014
✅ hono-stable76014
✅ nextjs-turbopack-canary63027
✅ nextjs-turbopack-stable8208
✅ nextjs-webpack-canary63027
✅ nextjs-webpack-stable8208
✅ nitro-stable76014
✅ nuxt-stable76014
✅ sveltekit-stable76014
✅ vite-stable76014
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable76014
✅ express-stable76014
✅ fastify-stable76014
✅ hono-stable76014
✅ nextjs-turbopack-canary63027
✅ nextjs-turbopack-stable8208
✅ nextjs-webpack-canary63027
✅ nextjs-webpack-stable8208
✅ nitro-stable76014
✅ nuxt-stable76014
✅ sveltekit-stable76014
✅ vite-stable76014
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack8208
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev600
❌ mongodb5678
✅ redis-dev600
❌ redis5678
✅ turso-dev600
❌ turso3608
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable76014
✅ e2e-local-postgres-nest-stable76014
✅ e2e-local-prod-nest-stable76014

📋 View full workflow run

@changeset-bot

changeset-botBot commented Apr 9, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: dfe6ba8

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

This PR includes changesets to release 16 packages
NameType
@workflow/coreMinor
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
workflowMinor
@workflow/world-testingPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch
@workflow/aiMajor

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

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

Adds first-class serialization support for workflow function references (functions tagged with .workflowId) so they can cross the step serialization boundary and be rendered nicely in observability tooling.

Changes:

  • Extend core serialization reducers/revivers with a WorkflowFunction special type that reduces workflow function refs to { workflowId }.
  • Add tests covering workflow function ref serialization behavior across step return values and step arguments.
  • Add an observability reviver rendering workflow function refs as <workflow:workflowId> and ship a minor changeset.

Reviewed changes

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

FileDescription
packages/core/src/serialization.tsAdds WorkflowFunction to special-type serialization and revives it to { workflowId } across external/workflow/step contexts.
packages/core/src/serialization.test.tsAdds unit tests for WorkflowFunction reducer/reviver behavior and boundary roundtrips.
packages/core/src/serialization-format.tsAdds o11y rendering of WorkflowFunction values as <workflow:...>.
.changeset/workflow-function-serialization.mdDeclares a minor release for the new serialization capability.

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

Comment on lines +656 to +658
WorkflowFunction: {
workflowId: string;
};

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.

SerializableSpecial was extended with WorkflowFunction, but the public Serializable union in packages/core/src/schemas.ts was not updated accordingly (see the note above this interface). This can cause TypeScript to still reject workflow function references in places typed as Serializable (e.g., step args), even though runtime serialization now supports them. Please update Serializable to explicitly include the workflow function reference shape you intend to support (and/or a dedicated workflow-metadata type), so the type-level contract matches the runtime 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.

Good point. The Serializable union in schemas.ts is primarily for type-level validation of step arguments. Since workflow function references are typically passed as the first arg to start() (which has its own overloaded type signature accepting WorkflowFunction | WorkflowMetadata), they don't flow through the generic Serializable type path. If we find cases where this causes type errors, we can add it then.

// A function without workflowId or stepId cannot be serialized
await expect(
dehydrateStepReturnValue(plainFn, 'wrun_test', undefined)
).rejects.toThrow('serialization');

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 assertion .rejects.toThrow('serialization') is unlikely to match the actual error message thrown by dehydrateStepReturnValue(), which is formatted as "Failed to serialize …" (and does not necessarily contain the substring "serialization"). This test may be flaky or fail consistently depending on the underlying error. Prefer matching on the stable prefix/message produced by formatSerializationError (e.g., "Failed to serialize") or use a regex that matches the expected error text.

Suggested change
).rejects.toThrow('serialization');
).rejects.toThrow('Failed to serialize');

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. Changed to .rejects.toThrow('Failed to serialize') which matches the stable prefix from formatSerializationError.

Comment on lines 375 to +377
StepFunction: serializedStepFunctionToString,
WorkflowFunction: (value: { workflowId: string }) =>
`<workflow:${value.workflowId}>`,

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.

observabilityRevivers gained a WorkflowFunction renderer, but serialization-format.test.ts has coverage for the other built-in display revivers (ReadableStream, StepFunction, Instance, Class) and currently none for WorkflowFunction. Please add a focused test that verifies { workflowId: "..." } renders as <workflow:...> so this o11y output remains stable.

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.

Added. New test in serialization-format.test.ts verifies observabilityRevivers.WorkflowFunction({ workflowId: '...' }) renders as <workflow:...>.

@TooTallNate
TooTallNate merged commit 9513a81 into mainApr 10, 2026
160 of 169 checks passed
@TooTallNate
TooTallNate deleted the fix/workflow-function-serialization branch April 10, 2026 06:04
@ghostghost mentioned this pull request Apr 10, 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)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
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;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
feat(core): add serialization support for workflow function references by TooTallNate · Pull Request #1677 · vercel/workflow · GitHub
Skip to content

feat(core): add serialization support for workflow function references - #1677

Merged
TooTallNate merged 2 commits into
mainfrom
fix/workflow-function-serialization
Apr 10, 2026
Merged

feat(core): add serialization support for workflow function references#1677
TooTallNate merged 2 commits into
mainfrom
fix/workflow-function-serialization

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Apr 9, 2026

Copy link
Copy Markdown
Member

Summary

Add a WorkflowFunction reducer/reviver pair to the serialization system so that workflow function references (functions with a .workflowId property, as produced by the SWC compiler) can cross the step serialization boundary.

This is a prerequisite for allowing start() to be called directly from workflow functions with "use step" — the workflow function reference passed as the first argument needs to be serializable.

How it works

Reducer: Detects functions with a .workflowId string property, serializes as { workflowId }. Only matches functions (not plain objects) to prevent infinite recursion since the reduced form is a plain object.

Revivers: All contexts (step, workflow, external) deserialize as a function with .workflowId that throws "Workflow functions cannot be called directly. Use start() to invoke them." on direct invocation. This is sufficient because start() only reads .workflowId from the reference.

Observability: Renders as <workflow:workflowId> in the o11y UI.

Note on workflow context hydration

It is recognized that the workflow context reviver should ideally return the proper registered function reference (since the SWC compiler registers workflow functions in the VM). However, since this PR is primarily for the start() as a step use-case — where the deserialized reference is only passed to start() which reads .workflowId — returning a throwing wrapper is sufficient. Full workflow function registry hydration can be revisited in the future when there is a concrete use case requiring the actual function reference in workflow context.

Example

// In user code (workflow context):constchildRun=awaitstart(myChildWorkflow,[42]);// ^^^^^^^^^^^^^^^^// This is a function with .workflowId attached by SWC.// The WorkflowFunction reducer serializes it as { workflowId: "..." }// so it can cross the step boundary as an argument to start().

CopilotAI review requested due to automatic review settings April 9, 2026 22:53
@TooTallNate
TooTallNate requested a review from a team as a code ownerApril 9, 2026 22:53
@vercel

vercelBot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Apr 9, 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.035s (-5.9% 🟢)1.005s (~)0.970s101.00x
🐘 PostgresNitro0.056s (-11.4% 🟢)1.010s (~)0.954s101.60x
🐘 PostgresExpress0.061s (-8.6% 🟢)1.010s (~)0.949s101.74x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.234s (-3.4%)2.116s (~)1.883s101.00x
▲ VercelNext.js (Turbopack)0.286s (-35.5% 🟢)2.053s (-7.6% 🟢)1.766s101.23x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.099s (~)2.006s (~)0.906s101.00x
🐘 PostgresNitro1.139s (-1.0%)2.010s (~)0.870s101.04x
🐘 PostgresExpress1.147s (~)2.009s (~)0.861s101.04x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.807s (-12.7% 🟢)4.016s (+8.7% 🔺)2.208s101.00x
▲ VercelExpress1.949s (+4.2%)4.112s (+7.0% 🔺)2.163s101.08x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.673s (~)11.023s (~)0.349s31.00x
🐘 PostgresExpress10.858s (~)11.022s (~)0.163s31.02x
🐘 PostgresNitro10.884s (~)11.353s (+3.0%)0.468s31.02x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.963s (+1.3%)18.921s (+1.0%)1.958s21.00x
▲ VercelNext.js (Turbopack)17.475s (-1.6%)19.672s (+3.8%)2.197s21.03x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro14.241s (~)15.028s (~)0.787s41.00x
🐘 PostgresNitro14.474s (~)15.020s (~)0.546s41.02x
🐘 PostgresExpress14.476s (-0.6%)15.021s (~)0.545s41.02x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)31.526s (-7.1% 🟢)33.030s (-8.2% 🟢)1.504s21.00x
▲ VercelExpress31.686s (+5.1% 🔺)33.518s (+3.9%)1.833s21.01x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express13.811s (-2.0%)14.020s (-4.9%)0.209s71.00x
🐘 PostgresNitro13.921s (~)14.305s (+2.0%)0.384s71.01x
💻 LocalNitro14.873s (~)15.028s (~)0.156s61.08x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express50.353s (-4.2%)52.735s (-3.7%)2.382s21.00x
▲ VercelNext.js (Turbopack)54.849s (~)57.326s (+0.5%)2.478s21.09x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.262s (~)2.010s (~)0.747s151.00x
🐘 PostgresExpress1.277s (~)2.009s (~)0.732s151.01x
💻 LocalNitro1.457s (-2.5%)2.005s (~)0.548s151.15x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.308s (-2.7%)4.131s (~)1.823s81.00x
▲ VercelNext.js (Turbopack)2.639s (+11.1% 🔺)4.558s (+17.8% 🔺)1.919s71.14x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.330s (-1.2%)3.009s (~)0.680s101.00x
🐘 PostgresExpress2.335s (~)3.011s (~)0.676s101.00x
💻 LocalNitro2.665s (-2.3%)3.008s (-6.3% 🟢)0.343s101.14x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.624s (-0.9%)4.357s (+6.3% 🔺)1.733s81.00x
▲ VercelNext.js (Turbopack)2.655s (-12.2% 🟢)4.643s (+5.4% 🔺)1.988s71.01x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.459s (-1.3%)4.010s (~)0.552s81.00x
🐘 PostgresExpress3.471s (-0.9%)4.010s (~)0.538s81.00x
💻 LocalNitro7.084s (-8.5% 🟢)8.018s (-5.9% 🟢)0.934s42.05x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.181s (+7.9% 🔺)5.001s (+6.1% 🔺)1.820s61.00x
▲ VercelNext.js (Turbopack)3.623s (+19.3% 🔺)5.334s (+15.8% 🔺)1.710s61.14x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.250s (-0.6%)2.008s (~)0.757s151.00x
🐘 PostgresExpress1.262s (-2.6%)2.007s (~)0.746s151.01x
💻 LocalNitro1.482s (-1.5%)2.006s (~)0.524s151.19x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.273s (+18.1% 🔺)4.166s (+12.2% 🔺)1.893s81.00x
▲ VercelNext.js (Turbopack)2.799s (+29.2% 🔺)4.577s (+27.8% 🔺)1.778s71.23x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.306s (-3.1%)3.008s (~)0.702s101.00x
🐘 PostgresNitro2.335s (~)3.010s (~)0.674s101.01x
💻 LocalNitro2.789s (-20.2% 🟢)3.108s (-22.5% 🟢)0.319s101.21x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.975s (+20.0% 🔺)4.663s (+20.5% 🔺)1.688s71.00x
▲ VercelExpress3.231s (+23.3% 🔺)5.069s (+14.9% 🔺)1.838s61.09x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.454s (~)4.008s (~)0.554s81.00x
🐘 PostgresExpress3.477s (~)4.009s (~)0.532s81.01x
💻 LocalNitro7.837s (-7.8% 🟢)8.268s (-8.4% 🟢)0.431s42.27x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.862s (-2.4%)4.776s (+13.3% 🔺)1.913s71.00x
▲ VercelNext.js (Turbopack)4.221s (+21.8% 🔺)6.242s (+29.6% 🔺)2.021s51.47x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.697s (-5.4% 🟢)1.004s (~)0.307s601.00x
🐘 PostgresNitro0.787s (-5.9% 🟢)1.005s (-1.7%)0.219s601.13x
🐘 PostgresExpress0.793s (-8.3% 🟢)1.006s (~)0.213s601.14x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)9.026s (+1.0%)11.073s (+3.9%)2.047s61.00x
▲ VercelExpress9.258s (+0.7%)11.630s (+5.9% 🔺)2.373s61.03x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.871s (-13.2% 🟢)2.052s (-31.1% 🟢)0.181s441.00x
🐘 PostgresNitro1.940s (~)2.283s (+8.7% 🔺)0.342s401.04x
💻 LocalNitro2.272s (-11.5% 🟢)3.007s (-5.4% 🟢)0.735s301.21x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express29.451s (+5.3% 🔺)31.651s (+5.7% 🔺)2.200s41.00x
▲ VercelNext.js (Turbopack)31.188s (+8.9% 🔺)33.320s (+9.8% 🔺)2.132s31.06x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.825s (-4.2%)4.043s (-5.9% 🟢)0.219s301.00x
🐘 PostgresExpress3.858s (-10.6% 🟢)4.110s (-18.0% 🟢)0.252s301.01x
💻 LocalNitro7.329s (-5.0%)8.015s (-2.4%)0.686s151.92x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express75.268s (-4.0%)77.094s (-3.9%)1.826s21.00x
▲ VercelNext.js (Turbopack)77.509s (+0.8%)79.286s (+0.7%)1.777s21.03x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.279s (-5.8% 🟢)1.006s (~)0.728s601.00x
🐘 PostgresNitro0.282s (~)1.006s (~)0.724s601.01x
💻 LocalNitro0.586s (-11.7% 🟢)1.004s (~)0.418s602.10x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.604s (+10.7% 🔺)3.360s (+11.7% 🔺)1.757s181.00x
▲ VercelExpress1.630s (+7.1% 🔺)3.360s (+8.5% 🔺)1.729s181.02x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.490s (~)1.006s (~)0.516s901.00x
🐘 PostgresExpress0.495s (-5.8% 🟢)1.007s (~)0.512s901.01x
💻 LocalNitro2.457s (-10.6% 🟢)3.008s (-5.5% 🟢)0.550s305.01x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.697s (-1.5%)4.606s (+5.9% 🔺)1.909s201.00x
▲ VercelNext.js (Turbopack)3.111s (-7.5% 🟢)5.125s (+6.2% 🔺)2.014s181.15x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.776s (-1.3%)1.007s (~)0.231s1201.00x
🐘 PostgresExpress0.794s (-5.6% 🟢)1.016s (~)0.222s1191.02x
💻 LocalNitro10.560s (-5.2% 🟢)11.023s (-7.0% 🟢)0.463s1113.61x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express8.362s (+22.2% 🔺)10.710s (+23.2% 🔺)2.348s121.00x
▲ VercelNext.js (Turbopack)309.221s (+4172.4% 🔺)311.025s (+3509.5% 🔺)1.804s136.98x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.138s (-6.3% 🟢)1.004s (~)0.009s (+3.3%)1.015s (~)0.877s101.00x
🐘 PostgresNitro0.198s (-0.9%)0.995s (~)0.002s (+6.2% 🔺)1.009s (~)0.812s101.43x
🐘 PostgresExpress0.208s (-3.0%)0.995s (~)0.001s (-23.5% 🟢)1.010s (~)0.801s101.51x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.665s (+12.6% 🔺)3.034s (~)0.477s (+57.4% 🔺)4.039s (+7.3% 🔺)2.374s101.00x
▲ VercelNext.js (Turbopack)1.713s (+4.9%)2.960s (~)0.522s (+21.4% 🔺)3.943s (+4.1%)2.230s101.03x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.604s (-6.7% 🟢)1.005s (~)0.004s (-13.0% 🟢)1.022s (~)0.418s591.00x
🐘 PostgresNitro0.612s (+1.1%)1.023s (+2.1%)0.004s (~)1.039s (+1.8%)0.427s581.01x
💻 LocalNitro0.667s (+0.8%)1.011s (~)0.009s (-16.1% 🟢)1.114s (+8.6% 🔺)0.447s541.10x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.323s (+2.3%)6.220s (+6.3% 🔺)0.312s (+42.0% 🔺)7.042s (+8.5% 🔺)2.719s91.00x
▲ VercelNext.js (Turbopack)4.374s (+6.4% 🔺)6.022s (+7.9% 🔺)0.552s (-23.9% 🟢)7.017s (+5.0% 🔺)2.643s91.01x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.914s (-3.2%)1.104s (-3.7%)0.000s (-67.9% 🟢)1.118s (-3.8%)0.204s541.00x
🐘 PostgresExpress0.940s (-5.2% 🟢)1.103s (-17.4% 🟢)0.000s (+22.2% 🔺)1.119s (-18.3% 🟢)0.179s541.03x
💻 LocalNitro1.160s (-12.5% 🟢)2.018s (~)0.000s (-64.7% 🟢)2.020s (~)0.860s301.27x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.869s (+8.5% 🔺)4.117s (+10.9% 🔺)0.000s (+60.7% 🔺)4.607s (+11.2% 🔺)1.738s141.00x
▲ VercelNext.js (Turbopack)3.180s (-2.2%)4.680s (+6.7% 🔺)0.000s (-63.9% 🟢)5.177s (+8.5% 🔺)1.996s121.11x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.710s (-4.3%)2.139s (~)0.000s (NaN%)2.152s (~)0.442s281.00x
🐘 PostgresNitro1.780s (~)2.129s (+1.5%)0.000s (-100.0% 🟢)2.199s (+4.1%)0.418s291.04x
💻 LocalNitro3.348s (-15.1% 🟢)4.029s (-11.1% 🟢)0.000s (-68.2% 🟢)4.032s (-11.1% 🟢)0.684s161.96x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.127s (+21.6% 🔺)5.611s (+15.6% 🔺)0.000s (-100.0% 🟢)6.079s (+14.4% 🔺)1.952s101.00x
▲ VercelNext.js (Turbopack)4.514s (+3.8%)5.868s (+5.2% 🔺)0.000s (-63.3% 🟢)6.337s (+6.0% 🔺)1.823s101.09x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro21/21
🐘 PostgresNitro14/21
▲ VercelExpress16/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres19/21
Next.js (Turbopack)▲ Vercel21/21
Nitro🐘 Postgres15/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


Some benchmark jobs failed:

  • Local: cancelled
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

@github-actions

github-actionsBot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production923067990
✅ 💻 Local Development89801821080
✅ 📦 Local Production89801821080
✅ 🐘 Local Postgres89801821080
✅ 🪟 Windows820890
❌ 🌍 Community Worlds1337424231
✅ 📋 Other228042270
Total4060746874821

❌ Failed Tests

🌍 Community Worlds (74 failed)

mongodb (7 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNTAQDJDBSHTG1MWKF5KQBC5
  • webhookWorkflow | wrun_01KNTAQP2B6QNFW4V5CC2P3NZ1
  • fetchWorkflow | wrun_01KNTAV423VWE5AF0N1NWNCQ9T
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNTAYYWMXFXFVJ33YZ9V6ASZ
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNTB557DNYXNH4EV8TP26TD9

redis (7 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNTAQDJDBSHTG1MWKF5KQBC5
  • webhookWorkflow | wrun_01KNTAQP2B6QNFW4V5CC2P3NZ1
  • fetchWorkflow | wrun_01KNTAV423VWE5AF0N1NWNCQ9T
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNTAYYWMXFXFVJ33YZ9V6ASZ
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNTB557DNYXNH4EV8TP26TD9

turso (60 failed):

  • addTenWorkflow | wrun_01KNTAP9AVRTGK03SM69S63608
  • addTenWorkflow | wrun_01KNTAP9AVRTGK03SM69S63608
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KNTAQDKF2QVPYWGFH6W47PC9
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KNTAPGX7BKKR4ZRE58D7ZHH7
  • promiseRaceWorkflow | wrun_01KNTAPP407KBZNC5D2E7ZN7HT
  • promiseAnyWorkflow | wrun_01KNTAPQZ70DGD6CC21VAF8J21
  • importedStepOnlyWorkflow | wrun_01KNTAQT6HJ36G1K7T8WJB0J9S
  • hookWorkflow | wrun_01KNTAQ3D3TSW5YZRSJFXFR53D
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNTAQDJDBSHTG1MWKF5KQBC5
  • webhookWorkflow | wrun_01KNTAQP2B6QNFW4V5CC2P3NZ1
  • sleepingWorkflow | wrun_01KNTAQVQM7GW6GXQRDJFA1V3C
  • parallelSleepWorkflow | wrun_01KNTAR7NBH7YK2PSVB16SHS3Y
  • nullByteWorkflow | wrun_01KNTARC0FHC9PZ380HNHXCE3Q
  • workflowAndStepMetadataWorkflow | wrun_01KNTARDY46ZFS3910Z5TS8GM9
  • fetchWorkflow | wrun_01KNTAV423VWE5AF0N1NWNCQ9T
  • promiseRaceStressTestWorkflow | wrun_01KNTAV6CBHN7Y62R93F05FJBT
  • 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_01KNTAYC4A0HMMJ82ZAS5XHYB3
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNTAYYWMXFXFVJ33YZ9V6ASZ
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KNTAZJEVBF2HY6T73YPG2SDG
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KNTB05TEV77Z954JTQPRXCX6
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KNTB0DPKSYDHGAPJXNE6EQJJ
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KNTB0KQD8CZNSQKSNCG31HAY
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KNTB0NJRSSKBJFGDY5R3EMTG
  • runClassSerializationWorkflow - Run instances serialize across workflow/step boundaries | wrun_01KNTB0ZTHFAGXWNH9HTW4NVEN
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KNTB1DNEDKFTTXW4XT0S3QN9
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KNTB1JSSZ6Q07R4CGC7B6CS5
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KNTB1RMRHJTM9B024NEKC02R
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KNTB1YQZHV70B0TM63DE4A6J
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KNTB24NMAXHG41V7MZSRCHRZ
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KNTB2AP9VTJ7DHYEG7YSE72Q
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KNTB2GX4GDYF8R5ZESZN0EN4
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KNTB2TR3HNFKBG0RRDT44C8S
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KNTB32JA4CEPPH6MP7NF7BXW
  • cancelRun - cancelling a running workflow | wrun_01KNTB38B962CGE4Q7QRXWDP17
  • cancelRun via CLI - cancelling a running workflow | wrun_01KNTB3GWFDJBCJPNZXTX2QSZC
  • 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_01KNTB3VWCNC123S1VJDNX8JS6
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KNTB4FHKX1YRHE30BY5MHTZZ
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KNTB4T9B5T9B4RQ3CCPBBYB2
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KNTB504C25ET83GJT6S58G19
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KNTB52Y4HTXATE6XC7V3EX1D
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNTB557DNYXNH4EV8TP26TD9
  • getterStepWorkflow - getter functions with "use step" directive | wrun_01KNTB5855A2TQ9CJHJZ3H2DFP

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro8307
✅ example8307
✅ express8307
✅ fastify8307
✅ hono8307
✅ nextjs-turbopack8802
✅ nextjs-webpack8802
✅ nitro8307
✅ nuxt8307
✅ sveltekit8307
✅ vite8307
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable76014
✅ express-stable76014
✅ fastify-stable76014
✅ hono-stable76014
✅ nextjs-turbopack-canary63027
✅ nextjs-turbopack-stable8208
✅ nextjs-webpack-canary63027
✅ nextjs-webpack-stable8208
✅ nitro-stable76014
✅ nuxt-stable76014
✅ sveltekit-stable76014
✅ vite-stable76014
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable76014
✅ express-stable76014
✅ fastify-stable76014
✅ hono-stable76014
✅ nextjs-turbopack-canary63027
✅ nextjs-turbopack-stable8208
✅ nextjs-webpack-canary63027
✅ nextjs-webpack-stable8208
✅ nitro-stable76014
✅ nuxt-stable76014
✅ sveltekit-stable76014
✅ vite-stable76014
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable76014
✅ express-stable76014
✅ fastify-stable76014
✅ hono-stable76014
✅ nextjs-turbopack-canary63027
✅ nextjs-turbopack-stable8208
✅ nextjs-webpack-canary63027
✅ nextjs-webpack-stable8208
✅ nitro-stable76014
✅ nuxt-stable76014
✅ sveltekit-stable76014
✅ vite-stable76014
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack8208
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev600
❌ mongodb5678
✅ redis-dev600
❌ redis5678
✅ turso-dev600
❌ turso3608
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable76014
✅ e2e-local-postgres-nest-stable76014
✅ e2e-local-prod-nest-stable76014

📋 View full workflow run

@changeset-bot

changeset-botBot commented Apr 9, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: dfe6ba8

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

This PR includes changesets to release 16 packages
NameType
@workflow/coreMinor
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
workflowMinor
@workflow/world-testingPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch
@workflow/aiMajor

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

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

Adds first-class serialization support for workflow function references (functions tagged with .workflowId) so they can cross the step serialization boundary and be rendered nicely in observability tooling.

Changes:

  • Extend core serialization reducers/revivers with a WorkflowFunction special type that reduces workflow function refs to { workflowId }.
  • Add tests covering workflow function ref serialization behavior across step return values and step arguments.
  • Add an observability reviver rendering workflow function refs as <workflow:workflowId> and ship a minor changeset.

Reviewed changes

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

FileDescription
packages/core/src/serialization.tsAdds WorkflowFunction to special-type serialization and revives it to { workflowId } across external/workflow/step contexts.
packages/core/src/serialization.test.tsAdds unit tests for WorkflowFunction reducer/reviver behavior and boundary roundtrips.
packages/core/src/serialization-format.tsAdds o11y rendering of WorkflowFunction values as <workflow:...>.
.changeset/workflow-function-serialization.mdDeclares a minor release for the new serialization capability.

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

Comment on lines +656 to +658
WorkflowFunction: {
workflowId: string;
};

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.

SerializableSpecial was extended with WorkflowFunction, but the public Serializable union in packages/core/src/schemas.ts was not updated accordingly (see the note above this interface). This can cause TypeScript to still reject workflow function references in places typed as Serializable (e.g., step args), even though runtime serialization now supports them. Please update Serializable to explicitly include the workflow function reference shape you intend to support (and/or a dedicated workflow-metadata type), so the type-level contract matches the runtime 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.

Good point. The Serializable union in schemas.ts is primarily for type-level validation of step arguments. Since workflow function references are typically passed as the first arg to start() (which has its own overloaded type signature accepting WorkflowFunction | WorkflowMetadata), they don't flow through the generic Serializable type path. If we find cases where this causes type errors, we can add it then.

// A function without workflowId or stepId cannot be serialized
await expect(
dehydrateStepReturnValue(plainFn, 'wrun_test', undefined)
).rejects.toThrow('serialization');

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 assertion .rejects.toThrow('serialization') is unlikely to match the actual error message thrown by dehydrateStepReturnValue(), which is formatted as "Failed to serialize …" (and does not necessarily contain the substring "serialization"). This test may be flaky or fail consistently depending on the underlying error. Prefer matching on the stable prefix/message produced by formatSerializationError (e.g., "Failed to serialize") or use a regex that matches the expected error text.

Suggested change
).rejects.toThrow('serialization');
).rejects.toThrow('Failed to serialize');

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. Changed to .rejects.toThrow('Failed to serialize') which matches the stable prefix from formatSerializationError.

Comment on lines 375 to +377
StepFunction: serializedStepFunctionToString,
WorkflowFunction: (value: { workflowId: string }) =>
`<workflow:${value.workflowId}>`,

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.

observabilityRevivers gained a WorkflowFunction renderer, but serialization-format.test.ts has coverage for the other built-in display revivers (ReadableStream, StepFunction, Instance, Class) and currently none for WorkflowFunction. Please add a focused test that verifies { workflowId: "..." } renders as <workflow:...> so this o11y output remains stable.

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.

Added. New test in serialization-format.test.ts verifies observabilityRevivers.WorkflowFunction({ workflowId: '...' }) renders as <workflow:...>.

@TooTallNate
TooTallNate merged commit 9513a81 into mainApr 10, 2026
160 of 169 checks passed
@TooTallNate
TooTallNate deleted the fix/workflow-function-serialization branch April 10, 2026 06:04
@ghostghost mentioned this pull request Apr 10, 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)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' feat(core): add serialization support for workflow function references by TooTallNate · Pull Request #1677 · vercel/workflow · GitHub
Skip to content

feat(core): add serialization support for workflow function references - #1677

Merged
TooTallNate merged 2 commits into
mainfrom
fix/workflow-function-serialization
Apr 10, 2026
Merged

feat(core): add serialization support for workflow function references#1677
TooTallNate merged 2 commits into
mainfrom
fix/workflow-function-serialization

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Apr 9, 2026

Copy link
Copy Markdown
Member

Summary

Add a WorkflowFunction reducer/reviver pair to the serialization system so that workflow function references (functions with a .workflowId property, as produced by the SWC compiler) can cross the step serialization boundary.

This is a prerequisite for allowing start() to be called directly from workflow functions with "use step" — the workflow function reference passed as the first argument needs to be serializable.

How it works

Reducer: Detects functions with a .workflowId string property, serializes as { workflowId }. Only matches functions (not plain objects) to prevent infinite recursion since the reduced form is a plain object.

Revivers: All contexts (step, workflow, external) deserialize as a function with .workflowId that throws "Workflow functions cannot be called directly. Use start() to invoke them." on direct invocation. This is sufficient because start() only reads .workflowId from the reference.

Observability: Renders as <workflow:workflowId> in the o11y UI.

Note on workflow context hydration

It is recognized that the workflow context reviver should ideally return the proper registered function reference (since the SWC compiler registers workflow functions in the VM). However, since this PR is primarily for the start() as a step use-case — where the deserialized reference is only passed to start() which reads .workflowId — returning a throwing wrapper is sufficient. Full workflow function registry hydration can be revisited in the future when there is a concrete use case requiring the actual function reference in workflow context.

Example

// In user code (workflow context):constchildRun=awaitstart(myChildWorkflow,[42]);// ^^^^^^^^^^^^^^^^// This is a function with .workflowId attached by SWC.// The WorkflowFunction reducer serializes it as { workflowId: "..." }// so it can cross the step boundary as an argument to start().

CopilotAI review requested due to automatic review settings April 9, 2026 22:53
@TooTallNate
TooTallNate requested a review from a team as a code ownerApril 9, 2026 22:53
@vercel

vercelBot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Apr 9, 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.035s (-5.9% 🟢)1.005s (~)0.970s101.00x
🐘 PostgresNitro0.056s (-11.4% 🟢)1.010s (~)0.954s101.60x
🐘 PostgresExpress0.061s (-8.6% 🟢)1.010s (~)0.949s101.74x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.234s (-3.4%)2.116s (~)1.883s101.00x
▲ VercelNext.js (Turbopack)0.286s (-35.5% 🟢)2.053s (-7.6% 🟢)1.766s101.23x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.099s (~)2.006s (~)0.906s101.00x
🐘 PostgresNitro1.139s (-1.0%)2.010s (~)0.870s101.04x
🐘 PostgresExpress1.147s (~)2.009s (~)0.861s101.04x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.807s (-12.7% 🟢)4.016s (+8.7% 🔺)2.208s101.00x
▲ VercelExpress1.949s (+4.2%)4.112s (+7.0% 🔺)2.163s101.08x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.673s (~)11.023s (~)0.349s31.00x
🐘 PostgresExpress10.858s (~)11.022s (~)0.163s31.02x
🐘 PostgresNitro10.884s (~)11.353s (+3.0%)0.468s31.02x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.963s (+1.3%)18.921s (+1.0%)1.958s21.00x
▲ VercelNext.js (Turbopack)17.475s (-1.6%)19.672s (+3.8%)2.197s21.03x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro14.241s (~)15.028s (~)0.787s41.00x
🐘 PostgresNitro14.474s (~)15.020s (~)0.546s41.02x
🐘 PostgresExpress14.476s (-0.6%)15.021s (~)0.545s41.02x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)31.526s (-7.1% 🟢)33.030s (-8.2% 🟢)1.504s21.00x
▲ VercelExpress31.686s (+5.1% 🔺)33.518s (+3.9%)1.833s21.01x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express13.811s (-2.0%)14.020s (-4.9%)0.209s71.00x
🐘 PostgresNitro13.921s (~)14.305s (+2.0%)0.384s71.01x
💻 LocalNitro14.873s (~)15.028s (~)0.156s61.08x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express50.353s (-4.2%)52.735s (-3.7%)2.382s21.00x
▲ VercelNext.js (Turbopack)54.849s (~)57.326s (+0.5%)2.478s21.09x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.262s (~)2.010s (~)0.747s151.00x
🐘 PostgresExpress1.277s (~)2.009s (~)0.732s151.01x
💻 LocalNitro1.457s (-2.5%)2.005s (~)0.548s151.15x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.308s (-2.7%)4.131s (~)1.823s81.00x
▲ VercelNext.js (Turbopack)2.639s (+11.1% 🔺)4.558s (+17.8% 🔺)1.919s71.14x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.330s (-1.2%)3.009s (~)0.680s101.00x
🐘 PostgresExpress2.335s (~)3.011s (~)0.676s101.00x
💻 LocalNitro2.665s (-2.3%)3.008s (-6.3% 🟢)0.343s101.14x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.624s (-0.9%)4.357s (+6.3% 🔺)1.733s81.00x
▲ VercelNext.js (Turbopack)2.655s (-12.2% 🟢)4.643s (+5.4% 🔺)1.988s71.01x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.459s (-1.3%)4.010s (~)0.552s81.00x
🐘 PostgresExpress3.471s (-0.9%)4.010s (~)0.538s81.00x
💻 LocalNitro7.084s (-8.5% 🟢)8.018s (-5.9% 🟢)0.934s42.05x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.181s (+7.9% 🔺)5.001s (+6.1% 🔺)1.820s61.00x
▲ VercelNext.js (Turbopack)3.623s (+19.3% 🔺)5.334s (+15.8% 🔺)1.710s61.14x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.250s (-0.6%)2.008s (~)0.757s151.00x
🐘 PostgresExpress1.262s (-2.6%)2.007s (~)0.746s151.01x
💻 LocalNitro1.482s (-1.5%)2.006s (~)0.524s151.19x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.273s (+18.1% 🔺)4.166s (+12.2% 🔺)1.893s81.00x
▲ VercelNext.js (Turbopack)2.799s (+29.2% 🔺)4.577s (+27.8% 🔺)1.778s71.23x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.306s (-3.1%)3.008s (~)0.702s101.00x
🐘 PostgresNitro2.335s (~)3.010s (~)0.674s101.01x
💻 LocalNitro2.789s (-20.2% 🟢)3.108s (-22.5% 🟢)0.319s101.21x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.975s (+20.0% 🔺)4.663s (+20.5% 🔺)1.688s71.00x
▲ VercelExpress3.231s (+23.3% 🔺)5.069s (+14.9% 🔺)1.838s61.09x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.454s (~)4.008s (~)0.554s81.00x
🐘 PostgresExpress3.477s (~)4.009s (~)0.532s81.01x
💻 LocalNitro7.837s (-7.8% 🟢)8.268s (-8.4% 🟢)0.431s42.27x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.862s (-2.4%)4.776s (+13.3% 🔺)1.913s71.00x
▲ VercelNext.js (Turbopack)4.221s (+21.8% 🔺)6.242s (+29.6% 🔺)2.021s51.47x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.697s (-5.4% 🟢)1.004s (~)0.307s601.00x
🐘 PostgresNitro0.787s (-5.9% 🟢)1.005s (-1.7%)0.219s601.13x
🐘 PostgresExpress0.793s (-8.3% 🟢)1.006s (~)0.213s601.14x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)9.026s (+1.0%)11.073s (+3.9%)2.047s61.00x
▲ VercelExpress9.258s (+0.7%)11.630s (+5.9% 🔺)2.373s61.03x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.871s (-13.2% 🟢)2.052s (-31.1% 🟢)0.181s441.00x
🐘 PostgresNitro1.940s (~)2.283s (+8.7% 🔺)0.342s401.04x
💻 LocalNitro2.272s (-11.5% 🟢)3.007s (-5.4% 🟢)0.735s301.21x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express29.451s (+5.3% 🔺)31.651s (+5.7% 🔺)2.200s41.00x
▲ VercelNext.js (Turbopack)31.188s (+8.9% 🔺)33.320s (+9.8% 🔺)2.132s31.06x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.825s (-4.2%)4.043s (-5.9% 🟢)0.219s301.00x
🐘 PostgresExpress3.858s (-10.6% 🟢)4.110s (-18.0% 🟢)0.252s301.01x
💻 LocalNitro7.329s (-5.0%)8.015s (-2.4%)0.686s151.92x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express75.268s (-4.0%)77.094s (-3.9%)1.826s21.00x
▲ VercelNext.js (Turbopack)77.509s (+0.8%)79.286s (+0.7%)1.777s21.03x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.279s (-5.8% 🟢)1.006s (~)0.728s601.00x
🐘 PostgresNitro0.282s (~)1.006s (~)0.724s601.01x
💻 LocalNitro0.586s (-11.7% 🟢)1.004s (~)0.418s602.10x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.604s (+10.7% 🔺)3.360s (+11.7% 🔺)1.757s181.00x
▲ VercelExpress1.630s (+7.1% 🔺)3.360s (+8.5% 🔺)1.729s181.02x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.490s (~)1.006s (~)0.516s901.00x
🐘 PostgresExpress0.495s (-5.8% 🟢)1.007s (~)0.512s901.01x
💻 LocalNitro2.457s (-10.6% 🟢)3.008s (-5.5% 🟢)0.550s305.01x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.697s (-1.5%)4.606s (+5.9% 🔺)1.909s201.00x
▲ VercelNext.js (Turbopack)3.111s (-7.5% 🟢)5.125s (+6.2% 🔺)2.014s181.15x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.776s (-1.3%)1.007s (~)0.231s1201.00x
🐘 PostgresExpress0.794s (-5.6% 🟢)1.016s (~)0.222s1191.02x
💻 LocalNitro10.560s (-5.2% 🟢)11.023s (-7.0% 🟢)0.463s1113.61x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express8.362s (+22.2% 🔺)10.710s (+23.2% 🔺)2.348s121.00x
▲ VercelNext.js (Turbopack)309.221s (+4172.4% 🔺)311.025s (+3509.5% 🔺)1.804s136.98x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.138s (-6.3% 🟢)1.004s (~)0.009s (+3.3%)1.015s (~)0.877s101.00x
🐘 PostgresNitro0.198s (-0.9%)0.995s (~)0.002s (+6.2% 🔺)1.009s (~)0.812s101.43x
🐘 PostgresExpress0.208s (-3.0%)0.995s (~)0.001s (-23.5% 🟢)1.010s (~)0.801s101.51x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.665s (+12.6% 🔺)3.034s (~)0.477s (+57.4% 🔺)4.039s (+7.3% 🔺)2.374s101.00x
▲ VercelNext.js (Turbopack)1.713s (+4.9%)2.960s (~)0.522s (+21.4% 🔺)3.943s (+4.1%)2.230s101.03x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.604s (-6.7% 🟢)1.005s (~)0.004s (-13.0% 🟢)1.022s (~)0.418s591.00x
🐘 PostgresNitro0.612s (+1.1%)1.023s (+2.1%)0.004s (~)1.039s (+1.8%)0.427s581.01x
💻 LocalNitro0.667s (+0.8%)1.011s (~)0.009s (-16.1% 🟢)1.114s (+8.6% 🔺)0.447s541.10x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.323s (+2.3%)6.220s (+6.3% 🔺)0.312s (+42.0% 🔺)7.042s (+8.5% 🔺)2.719s91.00x
▲ VercelNext.js (Turbopack)4.374s (+6.4% 🔺)6.022s (+7.9% 🔺)0.552s (-23.9% 🟢)7.017s (+5.0% 🔺)2.643s91.01x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.914s (-3.2%)1.104s (-3.7%)0.000s (-67.9% 🟢)1.118s (-3.8%)0.204s541.00x
🐘 PostgresExpress0.940s (-5.2% 🟢)1.103s (-17.4% 🟢)0.000s (+22.2% 🔺)1.119s (-18.3% 🟢)0.179s541.03x
💻 LocalNitro1.160s (-12.5% 🟢)2.018s (~)0.000s (-64.7% 🟢)2.020s (~)0.860s301.27x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.869s (+8.5% 🔺)4.117s (+10.9% 🔺)0.000s (+60.7% 🔺)4.607s (+11.2% 🔺)1.738s141.00x
▲ VercelNext.js (Turbopack)3.180s (-2.2%)4.680s (+6.7% 🔺)0.000s (-63.9% 🟢)5.177s (+8.5% 🔺)1.996s121.11x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.710s (-4.3%)2.139s (~)0.000s (NaN%)2.152s (~)0.442s281.00x
🐘 PostgresNitro1.780s (~)2.129s (+1.5%)0.000s (-100.0% 🟢)2.199s (+4.1%)0.418s291.04x
💻 LocalNitro3.348s (-15.1% 🟢)4.029s (-11.1% 🟢)0.000s (-68.2% 🟢)4.032s (-11.1% 🟢)0.684s161.96x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.127s (+21.6% 🔺)5.611s (+15.6% 🔺)0.000s (-100.0% 🟢)6.079s (+14.4% 🔺)1.952s101.00x
▲ VercelNext.js (Turbopack)4.514s (+3.8%)5.868s (+5.2% 🔺)0.000s (-63.3% 🟢)6.337s (+6.0% 🔺)1.823s101.09x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro21/21
🐘 PostgresNitro14/21
▲ VercelExpress16/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres19/21
Next.js (Turbopack)▲ Vercel21/21
Nitro🐘 Postgres15/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


Some benchmark jobs failed:

  • Local: cancelled
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

@github-actions

github-actionsBot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production923067990
✅ 💻 Local Development89801821080
✅ 📦 Local Production89801821080
✅ 🐘 Local Postgres89801821080
✅ 🪟 Windows820890
❌ 🌍 Community Worlds1337424231
✅ 📋 Other228042270
Total4060746874821

❌ Failed Tests

🌍 Community Worlds (74 failed)

mongodb (7 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNTAQDJDBSHTG1MWKF5KQBC5
  • webhookWorkflow | wrun_01KNTAQP2B6QNFW4V5CC2P3NZ1
  • fetchWorkflow | wrun_01KNTAV423VWE5AF0N1NWNCQ9T
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNTAYYWMXFXFVJ33YZ9V6ASZ
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNTB557DNYXNH4EV8TP26TD9

redis (7 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNTAQDJDBSHTG1MWKF5KQBC5
  • webhookWorkflow | wrun_01KNTAQP2B6QNFW4V5CC2P3NZ1
  • fetchWorkflow | wrun_01KNTAV423VWE5AF0N1NWNCQ9T
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNTAYYWMXFXFVJ33YZ9V6ASZ
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNTB557DNYXNH4EV8TP26TD9

turso (60 failed):

  • addTenWorkflow | wrun_01KNTAP9AVRTGK03SM69S63608
  • addTenWorkflow | wrun_01KNTAP9AVRTGK03SM69S63608
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KNTAQDKF2QVPYWGFH6W47PC9
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KNTAPGX7BKKR4ZRE58D7ZHH7
  • promiseRaceWorkflow | wrun_01KNTAPP407KBZNC5D2E7ZN7HT
  • promiseAnyWorkflow | wrun_01KNTAPQZ70DGD6CC21VAF8J21
  • importedStepOnlyWorkflow | wrun_01KNTAQT6HJ36G1K7T8WJB0J9S
  • hookWorkflow | wrun_01KNTAQ3D3TSW5YZRSJFXFR53D
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNTAQDJDBSHTG1MWKF5KQBC5
  • webhookWorkflow | wrun_01KNTAQP2B6QNFW4V5CC2P3NZ1
  • sleepingWorkflow | wrun_01KNTAQVQM7GW6GXQRDJFA1V3C
  • parallelSleepWorkflow | wrun_01KNTAR7NBH7YK2PSVB16SHS3Y
  • nullByteWorkflow | wrun_01KNTARC0FHC9PZ380HNHXCE3Q
  • workflowAndStepMetadataWorkflow | wrun_01KNTARDY46ZFS3910Z5TS8GM9
  • fetchWorkflow | wrun_01KNTAV423VWE5AF0N1NWNCQ9T
  • promiseRaceStressTestWorkflow | wrun_01KNTAV6CBHN7Y62R93F05FJBT
  • 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_01KNTAYC4A0HMMJ82ZAS5XHYB3
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNTAYYWMXFXFVJ33YZ9V6ASZ
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KNTAZJEVBF2HY6T73YPG2SDG
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KNTB05TEV77Z954JTQPRXCX6
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KNTB0DPKSYDHGAPJXNE6EQJJ
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KNTB0KQD8CZNSQKSNCG31HAY
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KNTB0NJRSSKBJFGDY5R3EMTG
  • runClassSerializationWorkflow - Run instances serialize across workflow/step boundaries | wrun_01KNTB0ZTHFAGXWNH9HTW4NVEN
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KNTB1DNEDKFTTXW4XT0S3QN9
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KNTB1JSSZ6Q07R4CGC7B6CS5
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KNTB1RMRHJTM9B024NEKC02R
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KNTB1YQZHV70B0TM63DE4A6J
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KNTB24NMAXHG41V7MZSRCHRZ
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KNTB2AP9VTJ7DHYEG7YSE72Q
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KNTB2GX4GDYF8R5ZESZN0EN4
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KNTB2TR3HNFKBG0RRDT44C8S
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KNTB32JA4CEPPH6MP7NF7BXW
  • cancelRun - cancelling a running workflow | wrun_01KNTB38B962CGE4Q7QRXWDP17
  • cancelRun via CLI - cancelling a running workflow | wrun_01KNTB3GWFDJBCJPNZXTX2QSZC
  • 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_01KNTB3VWCNC123S1VJDNX8JS6
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KNTB4FHKX1YRHE30BY5MHTZZ
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KNTB4T9B5T9B4RQ3CCPBBYB2
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KNTB504C25ET83GJT6S58G19
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KNTB52Y4HTXATE6XC7V3EX1D
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNTB557DNYXNH4EV8TP26TD9
  • getterStepWorkflow - getter functions with "use step" directive | wrun_01KNTB5855A2TQ9CJHJZ3H2DFP

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro8307
✅ example8307
✅ express8307
✅ fastify8307
✅ hono8307
✅ nextjs-turbopack8802
✅ nextjs-webpack8802
✅ nitro8307
✅ nuxt8307
✅ sveltekit8307
✅ vite8307
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable76014
✅ express-stable76014
✅ fastify-stable76014
✅ hono-stable76014
✅ nextjs-turbopack-canary63027
✅ nextjs-turbopack-stable8208
✅ nextjs-webpack-canary63027
✅ nextjs-webpack-stable8208
✅ nitro-stable76014
✅ nuxt-stable76014
✅ sveltekit-stable76014
✅ vite-stable76014
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable76014
✅ express-stable76014
✅ fastify-stable76014
✅ hono-stable76014
✅ nextjs-turbopack-canary63027
✅ nextjs-turbopack-stable8208
✅ nextjs-webpack-canary63027
✅ nextjs-webpack-stable8208
✅ nitro-stable76014
✅ nuxt-stable76014
✅ sveltekit-stable76014
✅ vite-stable76014
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable76014
✅ express-stable76014
✅ fastify-stable76014
✅ hono-stable76014
✅ nextjs-turbopack-canary63027
✅ nextjs-turbopack-stable8208
✅ nextjs-webpack-canary63027
✅ nextjs-webpack-stable8208
✅ nitro-stable76014
✅ nuxt-stable76014
✅ sveltekit-stable76014
✅ vite-stable76014
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack8208
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev600
❌ mongodb5678
✅ redis-dev600
❌ redis5678
✅ turso-dev600
❌ turso3608
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable76014
✅ e2e-local-postgres-nest-stable76014
✅ e2e-local-prod-nest-stable76014

📋 View full workflow run

@changeset-bot

changeset-botBot commented Apr 9, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: dfe6ba8

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

This PR includes changesets to release 16 packages
NameType
@workflow/coreMinor
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
workflowMinor
@workflow/world-testingPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch
@workflow/aiMajor

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

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

Adds first-class serialization support for workflow function references (functions tagged with .workflowId) so they can cross the step serialization boundary and be rendered nicely in observability tooling.

Changes:

  • Extend core serialization reducers/revivers with a WorkflowFunction special type that reduces workflow function refs to { workflowId }.
  • Add tests covering workflow function ref serialization behavior across step return values and step arguments.
  • Add an observability reviver rendering workflow function refs as <workflow:workflowId> and ship a minor changeset.

Reviewed changes

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

FileDescription
packages/core/src/serialization.tsAdds WorkflowFunction to special-type serialization and revives it to { workflowId } across external/workflow/step contexts.
packages/core/src/serialization.test.tsAdds unit tests for WorkflowFunction reducer/reviver behavior and boundary roundtrips.
packages/core/src/serialization-format.tsAdds o11y rendering of WorkflowFunction values as <workflow:...>.
.changeset/workflow-function-serialization.mdDeclares a minor release for the new serialization capability.

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

Comment on lines +656 to +658
WorkflowFunction: {
workflowId: string;
};

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.

SerializableSpecial was extended with WorkflowFunction, but the public Serializable union in packages/core/src/schemas.ts was not updated accordingly (see the note above this interface). This can cause TypeScript to still reject workflow function references in places typed as Serializable (e.g., step args), even though runtime serialization now supports them. Please update Serializable to explicitly include the workflow function reference shape you intend to support (and/or a dedicated workflow-metadata type), so the type-level contract matches the runtime 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.

Good point. The Serializable union in schemas.ts is primarily for type-level validation of step arguments. Since workflow function references are typically passed as the first arg to start() (which has its own overloaded type signature accepting WorkflowFunction | WorkflowMetadata), they don't flow through the generic Serializable type path. If we find cases where this causes type errors, we can add it then.

// A function without workflowId or stepId cannot be serialized
await expect(
dehydrateStepReturnValue(plainFn, 'wrun_test', undefined)
).rejects.toThrow('serialization');

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 assertion .rejects.toThrow('serialization') is unlikely to match the actual error message thrown by dehydrateStepReturnValue(), which is formatted as "Failed to serialize …" (and does not necessarily contain the substring "serialization"). This test may be flaky or fail consistently depending on the underlying error. Prefer matching on the stable prefix/message produced by formatSerializationError (e.g., "Failed to serialize") or use a regex that matches the expected error text.

Suggested change
).rejects.toThrow('serialization');
).rejects.toThrow('Failed to serialize');

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. Changed to .rejects.toThrow('Failed to serialize') which matches the stable prefix from formatSerializationError.

Comment on lines 375 to +377
StepFunction: serializedStepFunctionToString,
WorkflowFunction: (value: { workflowId: string }) =>
`<workflow:${value.workflowId}>`,

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.

observabilityRevivers gained a WorkflowFunction renderer, but serialization-format.test.ts has coverage for the other built-in display revivers (ReadableStream, StepFunction, Instance, Class) and currently none for WorkflowFunction. Please add a focused test that verifies { workflowId: "..." } renders as <workflow:...> so this o11y output remains stable.

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.

Added. New test in serialization-format.test.ts verifies observabilityRevivers.WorkflowFunction({ workflowId: '...' }) renders as <workflow:...>.

@TooTallNate
TooTallNate merged commit 9513a81 into mainApr 10, 2026
160 of 169 checks passed
@TooTallNate
TooTallNate deleted the fix/workflow-function-serialization branch April 10, 2026 06:04
@ghostghost mentioned this pull request Apr 10, 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)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' feat(core): add serialization support for workflow function references by TooTallNate · Pull Request #1677 · vercel/workflow · GitHub
Skip to content

feat(core): add serialization support for workflow function references - #1677

Merged
TooTallNate merged 2 commits into
mainfrom
fix/workflow-function-serialization
Apr 10, 2026
Merged

feat(core): add serialization support for workflow function references#1677
TooTallNate merged 2 commits into
mainfrom
fix/workflow-function-serialization

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Apr 9, 2026

Copy link
Copy Markdown
Member

Summary

Add a WorkflowFunction reducer/reviver pair to the serialization system so that workflow function references (functions with a .workflowId property, as produced by the SWC compiler) can cross the step serialization boundary.

This is a prerequisite for allowing start() to be called directly from workflow functions with "use step" — the workflow function reference passed as the first argument needs to be serializable.

How it works

Reducer: Detects functions with a .workflowId string property, serializes as { workflowId }. Only matches functions (not plain objects) to prevent infinite recursion since the reduced form is a plain object.

Revivers: All contexts (step, workflow, external) deserialize as a function with .workflowId that throws "Workflow functions cannot be called directly. Use start() to invoke them." on direct invocation. This is sufficient because start() only reads .workflowId from the reference.

Observability: Renders as <workflow:workflowId> in the o11y UI.

Note on workflow context hydration

It is recognized that the workflow context reviver should ideally return the proper registered function reference (since the SWC compiler registers workflow functions in the VM). However, since this PR is primarily for the start() as a step use-case — where the deserialized reference is only passed to start() which reads .workflowId — returning a throwing wrapper is sufficient. Full workflow function registry hydration can be revisited in the future when there is a concrete use case requiring the actual function reference in workflow context.

Example

// In user code (workflow context):constchildRun=awaitstart(myChildWorkflow,[42]);// ^^^^^^^^^^^^^^^^// This is a function with .workflowId attached by SWC.// The WorkflowFunction reducer serializes it as { workflowId: "..." }// so it can cross the step boundary as an argument to start().

CopilotAI review requested due to automatic review settings April 9, 2026 22:53
@TooTallNate
TooTallNate requested a review from a team as a code ownerApril 9, 2026 22:53
@vercel

vercelBot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Apr 9, 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.035s (-5.9% 🟢)1.005s (~)0.970s101.00x
🐘 PostgresNitro0.056s (-11.4% 🟢)1.010s (~)0.954s101.60x
🐘 PostgresExpress0.061s (-8.6% 🟢)1.010s (~)0.949s101.74x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.234s (-3.4%)2.116s (~)1.883s101.00x
▲ VercelNext.js (Turbopack)0.286s (-35.5% 🟢)2.053s (-7.6% 🟢)1.766s101.23x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.099s (~)2.006s (~)0.906s101.00x
🐘 PostgresNitro1.139s (-1.0%)2.010s (~)0.870s101.04x
🐘 PostgresExpress1.147s (~)2.009s (~)0.861s101.04x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.807s (-12.7% 🟢)4.016s (+8.7% 🔺)2.208s101.00x
▲ VercelExpress1.949s (+4.2%)4.112s (+7.0% 🔺)2.163s101.08x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.673s (~)11.023s (~)0.349s31.00x
🐘 PostgresExpress10.858s (~)11.022s (~)0.163s31.02x
🐘 PostgresNitro10.884s (~)11.353s (+3.0%)0.468s31.02x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.963s (+1.3%)18.921s (+1.0%)1.958s21.00x
▲ VercelNext.js (Turbopack)17.475s (-1.6%)19.672s (+3.8%)2.197s21.03x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro14.241s (~)15.028s (~)0.787s41.00x
🐘 PostgresNitro14.474s (~)15.020s (~)0.546s41.02x
🐘 PostgresExpress14.476s (-0.6%)15.021s (~)0.545s41.02x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)31.526s (-7.1% 🟢)33.030s (-8.2% 🟢)1.504s21.00x
▲ VercelExpress31.686s (+5.1% 🔺)33.518s (+3.9%)1.833s21.01x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express13.811s (-2.0%)14.020s (-4.9%)0.209s71.00x
🐘 PostgresNitro13.921s (~)14.305s (+2.0%)0.384s71.01x
💻 LocalNitro14.873s (~)15.028s (~)0.156s61.08x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express50.353s (-4.2%)52.735s (-3.7%)2.382s21.00x
▲ VercelNext.js (Turbopack)54.849s (~)57.326s (+0.5%)2.478s21.09x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.262s (~)2.010s (~)0.747s151.00x
🐘 PostgresExpress1.277s (~)2.009s (~)0.732s151.01x
💻 LocalNitro1.457s (-2.5%)2.005s (~)0.548s151.15x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.308s (-2.7%)4.131s (~)1.823s81.00x
▲ VercelNext.js (Turbopack)2.639s (+11.1% 🔺)4.558s (+17.8% 🔺)1.919s71.14x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.330s (-1.2%)3.009s (~)0.680s101.00x
🐘 PostgresExpress2.335s (~)3.011s (~)0.676s101.00x
💻 LocalNitro2.665s (-2.3%)3.008s (-6.3% 🟢)0.343s101.14x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.624s (-0.9%)4.357s (+6.3% 🔺)1.733s81.00x
▲ VercelNext.js (Turbopack)2.655s (-12.2% 🟢)4.643s (+5.4% 🔺)1.988s71.01x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.459s (-1.3%)4.010s (~)0.552s81.00x
🐘 PostgresExpress3.471s (-0.9%)4.010s (~)0.538s81.00x
💻 LocalNitro7.084s (-8.5% 🟢)8.018s (-5.9% 🟢)0.934s42.05x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.181s (+7.9% 🔺)5.001s (+6.1% 🔺)1.820s61.00x
▲ VercelNext.js (Turbopack)3.623s (+19.3% 🔺)5.334s (+15.8% 🔺)1.710s61.14x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.250s (-0.6%)2.008s (~)0.757s151.00x
🐘 PostgresExpress1.262s (-2.6%)2.007s (~)0.746s151.01x
💻 LocalNitro1.482s (-1.5%)2.006s (~)0.524s151.19x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.273s (+18.1% 🔺)4.166s (+12.2% 🔺)1.893s81.00x
▲ VercelNext.js (Turbopack)2.799s (+29.2% 🔺)4.577s (+27.8% 🔺)1.778s71.23x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.306s (-3.1%)3.008s (~)0.702s101.00x
🐘 PostgresNitro2.335s (~)3.010s (~)0.674s101.01x
💻 LocalNitro2.789s (-20.2% 🟢)3.108s (-22.5% 🟢)0.319s101.21x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.975s (+20.0% 🔺)4.663s (+20.5% 🔺)1.688s71.00x
▲ VercelExpress3.231s (+23.3% 🔺)5.069s (+14.9% 🔺)1.838s61.09x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.454s (~)4.008s (~)0.554s81.00x
🐘 PostgresExpress3.477s (~)4.009s (~)0.532s81.01x
💻 LocalNitro7.837s (-7.8% 🟢)8.268s (-8.4% 🟢)0.431s42.27x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.862s (-2.4%)4.776s (+13.3% 🔺)1.913s71.00x
▲ VercelNext.js (Turbopack)4.221s (+21.8% 🔺)6.242s (+29.6% 🔺)2.021s51.47x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.697s (-5.4% 🟢)1.004s (~)0.307s601.00x
🐘 PostgresNitro0.787s (-5.9% 🟢)1.005s (-1.7%)0.219s601.13x
🐘 PostgresExpress0.793s (-8.3% 🟢)1.006s (~)0.213s601.14x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)9.026s (+1.0%)11.073s (+3.9%)2.047s61.00x
▲ VercelExpress9.258s (+0.7%)11.630s (+5.9% 🔺)2.373s61.03x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.871s (-13.2% 🟢)2.052s (-31.1% 🟢)0.181s441.00x
🐘 PostgresNitro1.940s (~)2.283s (+8.7% 🔺)0.342s401.04x
💻 LocalNitro2.272s (-11.5% 🟢)3.007s (-5.4% 🟢)0.735s301.21x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express29.451s (+5.3% 🔺)31.651s (+5.7% 🔺)2.200s41.00x
▲ VercelNext.js (Turbopack)31.188s (+8.9% 🔺)33.320s (+9.8% 🔺)2.132s31.06x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.825s (-4.2%)4.043s (-5.9% 🟢)0.219s301.00x
🐘 PostgresExpress3.858s (-10.6% 🟢)4.110s (-18.0% 🟢)0.252s301.01x
💻 LocalNitro7.329s (-5.0%)8.015s (-2.4%)0.686s151.92x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express75.268s (-4.0%)77.094s (-3.9%)1.826s21.00x
▲ VercelNext.js (Turbopack)77.509s (+0.8%)79.286s (+0.7%)1.777s21.03x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.279s (-5.8% 🟢)1.006s (~)0.728s601.00x
🐘 PostgresNitro0.282s (~)1.006s (~)0.724s601.01x
💻 LocalNitro0.586s (-11.7% 🟢)1.004s (~)0.418s602.10x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.604s (+10.7% 🔺)3.360s (+11.7% 🔺)1.757s181.00x
▲ VercelExpress1.630s (+7.1% 🔺)3.360s (+8.5% 🔺)1.729s181.02x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.490s (~)1.006s (~)0.516s901.00x
🐘 PostgresExpress0.495s (-5.8% 🟢)1.007s (~)0.512s901.01x
💻 LocalNitro2.457s (-10.6% 🟢)3.008s (-5.5% 🟢)0.550s305.01x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.697s (-1.5%)4.606s (+5.9% 🔺)1.909s201.00x
▲ VercelNext.js (Turbopack)3.111s (-7.5% 🟢)5.125s (+6.2% 🔺)2.014s181.15x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.776s (-1.3%)1.007s (~)0.231s1201.00x
🐘 PostgresExpress0.794s (-5.6% 🟢)1.016s (~)0.222s1191.02x
💻 LocalNitro10.560s (-5.2% 🟢)11.023s (-7.0% 🟢)0.463s1113.61x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express8.362s (+22.2% 🔺)10.710s (+23.2% 🔺)2.348s121.00x
▲ VercelNext.js (Turbopack)309.221s (+4172.4% 🔺)311.025s (+3509.5% 🔺)1.804s136.98x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.138s (-6.3% 🟢)1.004s (~)0.009s (+3.3%)1.015s (~)0.877s101.00x
🐘 PostgresNitro0.198s (-0.9%)0.995s (~)0.002s (+6.2% 🔺)1.009s (~)0.812s101.43x
🐘 PostgresExpress0.208s (-3.0%)0.995s (~)0.001s (-23.5% 🟢)1.010s (~)0.801s101.51x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.665s (+12.6% 🔺)3.034s (~)0.477s (+57.4% 🔺)4.039s (+7.3% 🔺)2.374s101.00x
▲ VercelNext.js (Turbopack)1.713s (+4.9%)2.960s (~)0.522s (+21.4% 🔺)3.943s (+4.1%)2.230s101.03x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.604s (-6.7% 🟢)1.005s (~)0.004s (-13.0% 🟢)1.022s (~)0.418s591.00x
🐘 PostgresNitro0.612s (+1.1%)1.023s (+2.1%)0.004s (~)1.039s (+1.8%)0.427s581.01x
💻 LocalNitro0.667s (+0.8%)1.011s (~)0.009s (-16.1% 🟢)1.114s (+8.6% 🔺)0.447s541.10x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.323s (+2.3%)6.220s (+6.3% 🔺)0.312s (+42.0% 🔺)7.042s (+8.5% 🔺)2.719s91.00x
▲ VercelNext.js (Turbopack)4.374s (+6.4% 🔺)6.022s (+7.9% 🔺)0.552s (-23.9% 🟢)7.017s (+5.0% 🔺)2.643s91.01x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.914s (-3.2%)1.104s (-3.7%)0.000s (-67.9% 🟢)1.118s (-3.8%)0.204s541.00x
🐘 PostgresExpress0.940s (-5.2% 🟢)1.103s (-17.4% 🟢)0.000s (+22.2% 🔺)1.119s (-18.3% 🟢)0.179s541.03x
💻 LocalNitro1.160s (-12.5% 🟢)2.018s (~)0.000s (-64.7% 🟢)2.020s (~)0.860s301.27x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.869s (+8.5% 🔺)4.117s (+10.9% 🔺)0.000s (+60.7% 🔺)4.607s (+11.2% 🔺)1.738s141.00x
▲ VercelNext.js (Turbopack)3.180s (-2.2%)4.680s (+6.7% 🔺)0.000s (-63.9% 🟢)5.177s (+8.5% 🔺)1.996s121.11x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.710s (-4.3%)2.139s (~)0.000s (NaN%)2.152s (~)0.442s281.00x
🐘 PostgresNitro1.780s (~)2.129s (+1.5%)0.000s (-100.0% 🟢)2.199s (+4.1%)0.418s291.04x
💻 LocalNitro3.348s (-15.1% 🟢)4.029s (-11.1% 🟢)0.000s (-68.2% 🟢)4.032s (-11.1% 🟢)0.684s161.96x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.127s (+21.6% 🔺)5.611s (+15.6% 🔺)0.000s (-100.0% 🟢)6.079s (+14.4% 🔺)1.952s101.00x
▲ VercelNext.js (Turbopack)4.514s (+3.8%)5.868s (+5.2% 🔺)0.000s (-63.3% 🟢)6.337s (+6.0% 🔺)1.823s101.09x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro21/21
🐘 PostgresNitro14/21
▲ VercelExpress16/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres19/21
Next.js (Turbopack)▲ Vercel21/21
Nitro🐘 Postgres15/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


Some benchmark jobs failed:

  • Local: cancelled
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

@github-actions

github-actionsBot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production923067990
✅ 💻 Local Development89801821080
✅ 📦 Local Production89801821080
✅ 🐘 Local Postgres89801821080
✅ 🪟 Windows820890
❌ 🌍 Community Worlds1337424231
✅ 📋 Other228042270
Total4060746874821

❌ Failed Tests

🌍 Community Worlds (74 failed)

mongodb (7 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNTAQDJDBSHTG1MWKF5KQBC5
  • webhookWorkflow | wrun_01KNTAQP2B6QNFW4V5CC2P3NZ1
  • fetchWorkflow | wrun_01KNTAV423VWE5AF0N1NWNCQ9T
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNTAYYWMXFXFVJ33YZ9V6ASZ
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNTB557DNYXNH4EV8TP26TD9

redis (7 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNTAQDJDBSHTG1MWKF5KQBC5
  • webhookWorkflow | wrun_01KNTAQP2B6QNFW4V5CC2P3NZ1
  • fetchWorkflow | wrun_01KNTAV423VWE5AF0N1NWNCQ9T
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNTAYYWMXFXFVJ33YZ9V6ASZ
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNTB557DNYXNH4EV8TP26TD9

turso (60 failed):

  • addTenWorkflow | wrun_01KNTAP9AVRTGK03SM69S63608
  • addTenWorkflow | wrun_01KNTAP9AVRTGK03SM69S63608
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KNTAQDKF2QVPYWGFH6W47PC9
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KNTAPGX7BKKR4ZRE58D7ZHH7
  • promiseRaceWorkflow | wrun_01KNTAPP407KBZNC5D2E7ZN7HT
  • promiseAnyWorkflow | wrun_01KNTAPQZ70DGD6CC21VAF8J21
  • importedStepOnlyWorkflow | wrun_01KNTAQT6HJ36G1K7T8WJB0J9S
  • hookWorkflow | wrun_01KNTAQ3D3TSW5YZRSJFXFR53D
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNTAQDJDBSHTG1MWKF5KQBC5
  • webhookWorkflow | wrun_01KNTAQP2B6QNFW4V5CC2P3NZ1
  • sleepingWorkflow | wrun_01KNTAQVQM7GW6GXQRDJFA1V3C
  • parallelSleepWorkflow | wrun_01KNTAR7NBH7YK2PSVB16SHS3Y
  • nullByteWorkflow | wrun_01KNTARC0FHC9PZ380HNHXCE3Q
  • workflowAndStepMetadataWorkflow | wrun_01KNTARDY46ZFS3910Z5TS8GM9
  • fetchWorkflow | wrun_01KNTAV423VWE5AF0N1NWNCQ9T
  • promiseRaceStressTestWorkflow | wrun_01KNTAV6CBHN7Y62R93F05FJBT
  • 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_01KNTAYC4A0HMMJ82ZAS5XHYB3
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNTAYYWMXFXFVJ33YZ9V6ASZ
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KNTAZJEVBF2HY6T73YPG2SDG
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KNTB05TEV77Z954JTQPRXCX6
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KNTB0DPKSYDHGAPJXNE6EQJJ
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KNTB0KQD8CZNSQKSNCG31HAY
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KNTB0NJRSSKBJFGDY5R3EMTG
  • runClassSerializationWorkflow - Run instances serialize across workflow/step boundaries | wrun_01KNTB0ZTHFAGXWNH9HTW4NVEN
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KNTB1DNEDKFTTXW4XT0S3QN9
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KNTB1JSSZ6Q07R4CGC7B6CS5
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KNTB1RMRHJTM9B024NEKC02R
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KNTB1YQZHV70B0TM63DE4A6J
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KNTB24NMAXHG41V7MZSRCHRZ
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KNTB2AP9VTJ7DHYEG7YSE72Q
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KNTB2GX4GDYF8R5ZESZN0EN4
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KNTB2TR3HNFKBG0RRDT44C8S
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KNTB32JA4CEPPH6MP7NF7BXW
  • cancelRun - cancelling a running workflow | wrun_01KNTB38B962CGE4Q7QRXWDP17
  • cancelRun via CLI - cancelling a running workflow | wrun_01KNTB3GWFDJBCJPNZXTX2QSZC
  • 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_01KNTB3VWCNC123S1VJDNX8JS6
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KNTB4FHKX1YRHE30BY5MHTZZ
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KNTB4T9B5T9B4RQ3CCPBBYB2
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KNTB504C25ET83GJT6S58G19
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KNTB52Y4HTXATE6XC7V3EX1D
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNTB557DNYXNH4EV8TP26TD9
  • getterStepWorkflow - getter functions with "use step" directive | wrun_01KNTB5855A2TQ9CJHJZ3H2DFP

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro8307
✅ example8307
✅ express8307
✅ fastify8307
✅ hono8307
✅ nextjs-turbopack8802
✅ nextjs-webpack8802
✅ nitro8307
✅ nuxt8307
✅ sveltekit8307
✅ vite8307
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable76014
✅ express-stable76014
✅ fastify-stable76014
✅ hono-stable76014
✅ nextjs-turbopack-canary63027
✅ nextjs-turbopack-stable8208
✅ nextjs-webpack-canary63027
✅ nextjs-webpack-stable8208
✅ nitro-stable76014
✅ nuxt-stable76014
✅ sveltekit-stable76014
✅ vite-stable76014
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable76014
✅ express-stable76014
✅ fastify-stable76014
✅ hono-stable76014
✅ nextjs-turbopack-canary63027
✅ nextjs-turbopack-stable8208
✅ nextjs-webpack-canary63027
✅ nextjs-webpack-stable8208
✅ nitro-stable76014
✅ nuxt-stable76014
✅ sveltekit-stable76014
✅ vite-stable76014
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable76014
✅ express-stable76014
✅ fastify-stable76014
✅ hono-stable76014
✅ nextjs-turbopack-canary63027
✅ nextjs-turbopack-stable8208
✅ nextjs-webpack-canary63027
✅ nextjs-webpack-stable8208
✅ nitro-stable76014
✅ nuxt-stable76014
✅ sveltekit-stable76014
✅ vite-stable76014
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack8208
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev600
❌ mongodb5678
✅ redis-dev600
❌ redis5678
✅ turso-dev600
❌ turso3608
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable76014
✅ e2e-local-postgres-nest-stable76014
✅ e2e-local-prod-nest-stable76014

📋 View full workflow run

@changeset-bot

changeset-botBot commented Apr 9, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: dfe6ba8

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

This PR includes changesets to release 16 packages
NameType
@workflow/coreMinor
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
workflowMinor
@workflow/world-testingPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch
@workflow/aiMajor

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

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

Adds first-class serialization support for workflow function references (functions tagged with .workflowId) so they can cross the step serialization boundary and be rendered nicely in observability tooling.

Changes:

  • Extend core serialization reducers/revivers with a WorkflowFunction special type that reduces workflow function refs to { workflowId }.
  • Add tests covering workflow function ref serialization behavior across step return values and step arguments.
  • Add an observability reviver rendering workflow function refs as <workflow:workflowId> and ship a minor changeset.

Reviewed changes

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

FileDescription
packages/core/src/serialization.tsAdds WorkflowFunction to special-type serialization and revives it to { workflowId } across external/workflow/step contexts.
packages/core/src/serialization.test.tsAdds unit tests for WorkflowFunction reducer/reviver behavior and boundary roundtrips.
packages/core/src/serialization-format.tsAdds o11y rendering of WorkflowFunction values as <workflow:...>.
.changeset/workflow-function-serialization.mdDeclares a minor release for the new serialization capability.

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

Comment on lines +656 to +658
WorkflowFunction: {
workflowId: string;
};

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.

SerializableSpecial was extended with WorkflowFunction, but the public Serializable union in packages/core/src/schemas.ts was not updated accordingly (see the note above this interface). This can cause TypeScript to still reject workflow function references in places typed as Serializable (e.g., step args), even though runtime serialization now supports them. Please update Serializable to explicitly include the workflow function reference shape you intend to support (and/or a dedicated workflow-metadata type), so the type-level contract matches the runtime 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.

Good point. The Serializable union in schemas.ts is primarily for type-level validation of step arguments. Since workflow function references are typically passed as the first arg to start() (which has its own overloaded type signature accepting WorkflowFunction | WorkflowMetadata), they don't flow through the generic Serializable type path. If we find cases where this causes type errors, we can add it then.

// A function without workflowId or stepId cannot be serialized
await expect(
dehydrateStepReturnValue(plainFn, 'wrun_test', undefined)
).rejects.toThrow('serialization');

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 assertion .rejects.toThrow('serialization') is unlikely to match the actual error message thrown by dehydrateStepReturnValue(), which is formatted as "Failed to serialize …" (and does not necessarily contain the substring "serialization"). This test may be flaky or fail consistently depending on the underlying error. Prefer matching on the stable prefix/message produced by formatSerializationError (e.g., "Failed to serialize") or use a regex that matches the expected error text.

Suggested change
).rejects.toThrow('serialization');
).rejects.toThrow('Failed to serialize');

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. Changed to .rejects.toThrow('Failed to serialize') which matches the stable prefix from formatSerializationError.

Comment on lines 375 to +377
StepFunction: serializedStepFunctionToString,
WorkflowFunction: (value: { workflowId: string }) =>
`<workflow:${value.workflowId}>`,

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.

observabilityRevivers gained a WorkflowFunction renderer, but serialization-format.test.ts has coverage for the other built-in display revivers (ReadableStream, StepFunction, Instance, Class) and currently none for WorkflowFunction. Please add a focused test that verifies { workflowId: "..." } renders as <workflow:...> so this o11y output remains stable.

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.

Added. New test in serialization-format.test.ts verifies observabilityRevivers.WorkflowFunction({ workflowId: '...' }) renders as <workflow:...>.

@TooTallNate
TooTallNate merged commit 9513a81 into mainApr 10, 2026
160 of 169 checks passed
@TooTallNate
TooTallNate deleted the fix/workflow-function-serialization branch April 10, 2026 06:04
@ghostghost mentioned this pull request Apr 10, 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)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' feat(core): add serialization support for workflow function references by TooTallNate · Pull Request #1677 · vercel/workflow · GitHub
Skip to content

feat(core): add serialization support for workflow function references - #1677

Merged
TooTallNate merged 2 commits into
mainfrom
fix/workflow-function-serialization
Apr 10, 2026
Merged

feat(core): add serialization support for workflow function references#1677
TooTallNate merged 2 commits into
mainfrom
fix/workflow-function-serialization

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Apr 9, 2026

Copy link
Copy Markdown
Member

Summary

Add a WorkflowFunction reducer/reviver pair to the serialization system so that workflow function references (functions with a .workflowId property, as produced by the SWC compiler) can cross the step serialization boundary.

This is a prerequisite for allowing start() to be called directly from workflow functions with "use step" — the workflow function reference passed as the first argument needs to be serializable.

How it works

Reducer: Detects functions with a .workflowId string property, serializes as { workflowId }. Only matches functions (not plain objects) to prevent infinite recursion since the reduced form is a plain object.

Revivers: All contexts (step, workflow, external) deserialize as a function with .workflowId that throws "Workflow functions cannot be called directly. Use start() to invoke them." on direct invocation. This is sufficient because start() only reads .workflowId from the reference.

Observability: Renders as <workflow:workflowId> in the o11y UI.

Note on workflow context hydration

It is recognized that the workflow context reviver should ideally return the proper registered function reference (since the SWC compiler registers workflow functions in the VM). However, since this PR is primarily for the start() as a step use-case — where the deserialized reference is only passed to start() which reads .workflowId — returning a throwing wrapper is sufficient. Full workflow function registry hydration can be revisited in the future when there is a concrete use case requiring the actual function reference in workflow context.

Example

// In user code (workflow context):constchildRun=awaitstart(myChildWorkflow,[42]);// ^^^^^^^^^^^^^^^^// This is a function with .workflowId attached by SWC.// The WorkflowFunction reducer serializes it as { workflowId: "..." }// so it can cross the step boundary as an argument to start().

CopilotAI review requested due to automatic review settings April 9, 2026 22:53
@TooTallNate
TooTallNate requested a review from a team as a code ownerApril 9, 2026 22:53
@vercel

vercelBot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Apr 9, 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.035s (-5.9% 🟢)1.005s (~)0.970s101.00x
🐘 PostgresNitro0.056s (-11.4% 🟢)1.010s (~)0.954s101.60x
🐘 PostgresExpress0.061s (-8.6% 🟢)1.010s (~)0.949s101.74x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.234s (-3.4%)2.116s (~)1.883s101.00x
▲ VercelNext.js (Turbopack)0.286s (-35.5% 🟢)2.053s (-7.6% 🟢)1.766s101.23x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.099s (~)2.006s (~)0.906s101.00x
🐘 PostgresNitro1.139s (-1.0%)2.010s (~)0.870s101.04x
🐘 PostgresExpress1.147s (~)2.009s (~)0.861s101.04x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.807s (-12.7% 🟢)4.016s (+8.7% 🔺)2.208s101.00x
▲ VercelExpress1.949s (+4.2%)4.112s (+7.0% 🔺)2.163s101.08x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.673s (~)11.023s (~)0.349s31.00x
🐘 PostgresExpress10.858s (~)11.022s (~)0.163s31.02x
🐘 PostgresNitro10.884s (~)11.353s (+3.0%)0.468s31.02x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.963s (+1.3%)18.921s (+1.0%)1.958s21.00x
▲ VercelNext.js (Turbopack)17.475s (-1.6%)19.672s (+3.8%)2.197s21.03x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro14.241s (~)15.028s (~)0.787s41.00x
🐘 PostgresNitro14.474s (~)15.020s (~)0.546s41.02x
🐘 PostgresExpress14.476s (-0.6%)15.021s (~)0.545s41.02x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)31.526s (-7.1% 🟢)33.030s (-8.2% 🟢)1.504s21.00x
▲ VercelExpress31.686s (+5.1% 🔺)33.518s (+3.9%)1.833s21.01x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express13.811s (-2.0%)14.020s (-4.9%)0.209s71.00x
🐘 PostgresNitro13.921s (~)14.305s (+2.0%)0.384s71.01x
💻 LocalNitro14.873s (~)15.028s (~)0.156s61.08x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express50.353s (-4.2%)52.735s (-3.7%)2.382s21.00x
▲ VercelNext.js (Turbopack)54.849s (~)57.326s (+0.5%)2.478s21.09x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.262s (~)2.010s (~)0.747s151.00x
🐘 PostgresExpress1.277s (~)2.009s (~)0.732s151.01x
💻 LocalNitro1.457s (-2.5%)2.005s (~)0.548s151.15x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.308s (-2.7%)4.131s (~)1.823s81.00x
▲ VercelNext.js (Turbopack)2.639s (+11.1% 🔺)4.558s (+17.8% 🔺)1.919s71.14x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.330s (-1.2%)3.009s (~)0.680s101.00x
🐘 PostgresExpress2.335s (~)3.011s (~)0.676s101.00x
💻 LocalNitro2.665s (-2.3%)3.008s (-6.3% 🟢)0.343s101.14x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.624s (-0.9%)4.357s (+6.3% 🔺)1.733s81.00x
▲ VercelNext.js (Turbopack)2.655s (-12.2% 🟢)4.643s (+5.4% 🔺)1.988s71.01x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.459s (-1.3%)4.010s (~)0.552s81.00x
🐘 PostgresExpress3.471s (-0.9%)4.010s (~)0.538s81.00x
💻 LocalNitro7.084s (-8.5% 🟢)8.018s (-5.9% 🟢)0.934s42.05x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.181s (+7.9% 🔺)5.001s (+6.1% 🔺)1.820s61.00x
▲ VercelNext.js (Turbopack)3.623s (+19.3% 🔺)5.334s (+15.8% 🔺)1.710s61.14x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.250s (-0.6%)2.008s (~)0.757s151.00x
🐘 PostgresExpress1.262s (-2.6%)2.007s (~)0.746s151.01x
💻 LocalNitro1.482s (-1.5%)2.006s (~)0.524s151.19x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.273s (+18.1% 🔺)4.166s (+12.2% 🔺)1.893s81.00x
▲ VercelNext.js (Turbopack)2.799s (+29.2% 🔺)4.577s (+27.8% 🔺)1.778s71.23x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.306s (-3.1%)3.008s (~)0.702s101.00x
🐘 PostgresNitro2.335s (~)3.010s (~)0.674s101.01x
💻 LocalNitro2.789s (-20.2% 🟢)3.108s (-22.5% 🟢)0.319s101.21x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.975s (+20.0% 🔺)4.663s (+20.5% 🔺)1.688s71.00x
▲ VercelExpress3.231s (+23.3% 🔺)5.069s (+14.9% 🔺)1.838s61.09x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.454s (~)4.008s (~)0.554s81.00x
🐘 PostgresExpress3.477s (~)4.009s (~)0.532s81.01x
💻 LocalNitro7.837s (-7.8% 🟢)8.268s (-8.4% 🟢)0.431s42.27x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.862s (-2.4%)4.776s (+13.3% 🔺)1.913s71.00x
▲ VercelNext.js (Turbopack)4.221s (+21.8% 🔺)6.242s (+29.6% 🔺)2.021s51.47x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.697s (-5.4% 🟢)1.004s (~)0.307s601.00x
🐘 PostgresNitro0.787s (-5.9% 🟢)1.005s (-1.7%)0.219s601.13x
🐘 PostgresExpress0.793s (-8.3% 🟢)1.006s (~)0.213s601.14x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)9.026s (+1.0%)11.073s (+3.9%)2.047s61.00x
▲ VercelExpress9.258s (+0.7%)11.630s (+5.9% 🔺)2.373s61.03x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.871s (-13.2% 🟢)2.052s (-31.1% 🟢)0.181s441.00x
🐘 PostgresNitro1.940s (~)2.283s (+8.7% 🔺)0.342s401.04x
💻 LocalNitro2.272s (-11.5% 🟢)3.007s (-5.4% 🟢)0.735s301.21x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express29.451s (+5.3% 🔺)31.651s (+5.7% 🔺)2.200s41.00x
▲ VercelNext.js (Turbopack)31.188s (+8.9% 🔺)33.320s (+9.8% 🔺)2.132s31.06x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.825s (-4.2%)4.043s (-5.9% 🟢)0.219s301.00x
🐘 PostgresExpress3.858s (-10.6% 🟢)4.110s (-18.0% 🟢)0.252s301.01x
💻 LocalNitro7.329s (-5.0%)8.015s (-2.4%)0.686s151.92x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express75.268s (-4.0%)77.094s (-3.9%)1.826s21.00x
▲ VercelNext.js (Turbopack)77.509s (+0.8%)79.286s (+0.7%)1.777s21.03x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.279s (-5.8% 🟢)1.006s (~)0.728s601.00x
🐘 PostgresNitro0.282s (~)1.006s (~)0.724s601.01x
💻 LocalNitro0.586s (-11.7% 🟢)1.004s (~)0.418s602.10x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.604s (+10.7% 🔺)3.360s (+11.7% 🔺)1.757s181.00x
▲ VercelExpress1.630s (+7.1% 🔺)3.360s (+8.5% 🔺)1.729s181.02x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.490s (~)1.006s (~)0.516s901.00x
🐘 PostgresExpress0.495s (-5.8% 🟢)1.007s (~)0.512s901.01x
💻 LocalNitro2.457s (-10.6% 🟢)3.008s (-5.5% 🟢)0.550s305.01x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.697s (-1.5%)4.606s (+5.9% 🔺)1.909s201.00x
▲ VercelNext.js (Turbopack)3.111s (-7.5% 🟢)5.125s (+6.2% 🔺)2.014s181.15x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.776s (-1.3%)1.007s (~)0.231s1201.00x
🐘 PostgresExpress0.794s (-5.6% 🟢)1.016s (~)0.222s1191.02x
💻 LocalNitro10.560s (-5.2% 🟢)11.023s (-7.0% 🟢)0.463s1113.61x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express8.362s (+22.2% 🔺)10.710s (+23.2% 🔺)2.348s121.00x
▲ VercelNext.js (Turbopack)309.221s (+4172.4% 🔺)311.025s (+3509.5% 🔺)1.804s136.98x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.138s (-6.3% 🟢)1.004s (~)0.009s (+3.3%)1.015s (~)0.877s101.00x
🐘 PostgresNitro0.198s (-0.9%)0.995s (~)0.002s (+6.2% 🔺)1.009s (~)0.812s101.43x
🐘 PostgresExpress0.208s (-3.0%)0.995s (~)0.001s (-23.5% 🟢)1.010s (~)0.801s101.51x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.665s (+12.6% 🔺)3.034s (~)0.477s (+57.4% 🔺)4.039s (+7.3% 🔺)2.374s101.00x
▲ VercelNext.js (Turbopack)1.713s (+4.9%)2.960s (~)0.522s (+21.4% 🔺)3.943s (+4.1%)2.230s101.03x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.604s (-6.7% 🟢)1.005s (~)0.004s (-13.0% 🟢)1.022s (~)0.418s591.00x
🐘 PostgresNitro0.612s (+1.1%)1.023s (+2.1%)0.004s (~)1.039s (+1.8%)0.427s581.01x
💻 LocalNitro0.667s (+0.8%)1.011s (~)0.009s (-16.1% 🟢)1.114s (+8.6% 🔺)0.447s541.10x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.323s (+2.3%)6.220s (+6.3% 🔺)0.312s (+42.0% 🔺)7.042s (+8.5% 🔺)2.719s91.00x
▲ VercelNext.js (Turbopack)4.374s (+6.4% 🔺)6.022s (+7.9% 🔺)0.552s (-23.9% 🟢)7.017s (+5.0% 🔺)2.643s91.01x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.914s (-3.2%)1.104s (-3.7%)0.000s (-67.9% 🟢)1.118s (-3.8%)0.204s541.00x
🐘 PostgresExpress0.940s (-5.2% 🟢)1.103s (-17.4% 🟢)0.000s (+22.2% 🔺)1.119s (-18.3% 🟢)0.179s541.03x
💻 LocalNitro1.160s (-12.5% 🟢)2.018s (~)0.000s (-64.7% 🟢)2.020s (~)0.860s301.27x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.869s (+8.5% 🔺)4.117s (+10.9% 🔺)0.000s (+60.7% 🔺)4.607s (+11.2% 🔺)1.738s141.00x
▲ VercelNext.js (Turbopack)3.180s (-2.2%)4.680s (+6.7% 🔺)0.000s (-63.9% 🟢)5.177s (+8.5% 🔺)1.996s121.11x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.710s (-4.3%)2.139s (~)0.000s (NaN%)2.152s (~)0.442s281.00x
🐘 PostgresNitro1.780s (~)2.129s (+1.5%)0.000s (-100.0% 🟢)2.199s (+4.1%)0.418s291.04x
💻 LocalNitro3.348s (-15.1% 🟢)4.029s (-11.1% 🟢)0.000s (-68.2% 🟢)4.032s (-11.1% 🟢)0.684s161.96x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.127s (+21.6% 🔺)5.611s (+15.6% 🔺)0.000s (-100.0% 🟢)6.079s (+14.4% 🔺)1.952s101.00x
▲ VercelNext.js (Turbopack)4.514s (+3.8%)5.868s (+5.2% 🔺)0.000s (-63.3% 🟢)6.337s (+6.0% 🔺)1.823s101.09x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro21/21
🐘 PostgresNitro14/21
▲ VercelExpress16/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres19/21
Next.js (Turbopack)▲ Vercel21/21
Nitro🐘 Postgres15/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


Some benchmark jobs failed:

  • Local: cancelled
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

@github-actions

github-actionsBot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production923067990
✅ 💻 Local Development89801821080
✅ 📦 Local Production89801821080
✅ 🐘 Local Postgres89801821080
✅ 🪟 Windows820890
❌ 🌍 Community Worlds1337424231
✅ 📋 Other228042270
Total4060746874821

❌ Failed Tests

🌍 Community Worlds (74 failed)

mongodb (7 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNTAQDJDBSHTG1MWKF5KQBC5
  • webhookWorkflow | wrun_01KNTAQP2B6QNFW4V5CC2P3NZ1
  • fetchWorkflow | wrun_01KNTAV423VWE5AF0N1NWNCQ9T
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNTAYYWMXFXFVJ33YZ9V6ASZ
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNTB557DNYXNH4EV8TP26TD9

redis (7 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNTAQDJDBSHTG1MWKF5KQBC5
  • webhookWorkflow | wrun_01KNTAQP2B6QNFW4V5CC2P3NZ1
  • fetchWorkflow | wrun_01KNTAV423VWE5AF0N1NWNCQ9T
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNTAYYWMXFXFVJ33YZ9V6ASZ
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNTB557DNYXNH4EV8TP26TD9

turso (60 failed):

  • addTenWorkflow | wrun_01KNTAP9AVRTGK03SM69S63608
  • addTenWorkflow | wrun_01KNTAP9AVRTGK03SM69S63608
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KNTAQDKF2QVPYWGFH6W47PC9
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KNTAPGX7BKKR4ZRE58D7ZHH7
  • promiseRaceWorkflow | wrun_01KNTAPP407KBZNC5D2E7ZN7HT
  • promiseAnyWorkflow | wrun_01KNTAPQZ70DGD6CC21VAF8J21
  • importedStepOnlyWorkflow | wrun_01KNTAQT6HJ36G1K7T8WJB0J9S
  • hookWorkflow | wrun_01KNTAQ3D3TSW5YZRSJFXFR53D
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNTAQDJDBSHTG1MWKF5KQBC5
  • webhookWorkflow | wrun_01KNTAQP2B6QNFW4V5CC2P3NZ1
  • sleepingWorkflow | wrun_01KNTAQVQM7GW6GXQRDJFA1V3C
  • parallelSleepWorkflow | wrun_01KNTAR7NBH7YK2PSVB16SHS3Y
  • nullByteWorkflow | wrun_01KNTARC0FHC9PZ380HNHXCE3Q
  • workflowAndStepMetadataWorkflow | wrun_01KNTARDY46ZFS3910Z5TS8GM9
  • fetchWorkflow | wrun_01KNTAV423VWE5AF0N1NWNCQ9T
  • promiseRaceStressTestWorkflow | wrun_01KNTAV6CBHN7Y62R93F05FJBT
  • 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_01KNTAYC4A0HMMJ82ZAS5XHYB3
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNTAYYWMXFXFVJ33YZ9V6ASZ
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KNTAZJEVBF2HY6T73YPG2SDG
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KNTB05TEV77Z954JTQPRXCX6
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KNTB0DPKSYDHGAPJXNE6EQJJ
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KNTB0KQD8CZNSQKSNCG31HAY
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KNTB0NJRSSKBJFGDY5R3EMTG
  • runClassSerializationWorkflow - Run instances serialize across workflow/step boundaries | wrun_01KNTB0ZTHFAGXWNH9HTW4NVEN
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KNTB1DNEDKFTTXW4XT0S3QN9
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KNTB1JSSZ6Q07R4CGC7B6CS5
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KNTB1RMRHJTM9B024NEKC02R
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KNTB1YQZHV70B0TM63DE4A6J
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KNTB24NMAXHG41V7MZSRCHRZ
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KNTB2AP9VTJ7DHYEG7YSE72Q
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KNTB2GX4GDYF8R5ZESZN0EN4
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KNTB2TR3HNFKBG0RRDT44C8S
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KNTB32JA4CEPPH6MP7NF7BXW
  • cancelRun - cancelling a running workflow | wrun_01KNTB38B962CGE4Q7QRXWDP17
  • cancelRun via CLI - cancelling a running workflow | wrun_01KNTB3GWFDJBCJPNZXTX2QSZC
  • 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_01KNTB3VWCNC123S1VJDNX8JS6
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KNTB4FHKX1YRHE30BY5MHTZZ
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KNTB4T9B5T9B4RQ3CCPBBYB2
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KNTB504C25ET83GJT6S58G19
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KNTB52Y4HTXATE6XC7V3EX1D
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNTB557DNYXNH4EV8TP26TD9
  • getterStepWorkflow - getter functions with "use step" directive | wrun_01KNTB5855A2TQ9CJHJZ3H2DFP

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro8307
✅ example8307
✅ express8307
✅ fastify8307
✅ hono8307
✅ nextjs-turbopack8802
✅ nextjs-webpack8802
✅ nitro8307
✅ nuxt8307
✅ sveltekit8307
✅ vite8307
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable76014
✅ express-stable76014
✅ fastify-stable76014
✅ hono-stable76014
✅ nextjs-turbopack-canary63027
✅ nextjs-turbopack-stable8208
✅ nextjs-webpack-canary63027
✅ nextjs-webpack-stable8208
✅ nitro-stable76014
✅ nuxt-stable76014
✅ sveltekit-stable76014
✅ vite-stable76014
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable76014
✅ express-stable76014
✅ fastify-stable76014
✅ hono-stable76014
✅ nextjs-turbopack-canary63027
✅ nextjs-turbopack-stable8208
✅ nextjs-webpack-canary63027
✅ nextjs-webpack-stable8208
✅ nitro-stable76014
✅ nuxt-stable76014
✅ sveltekit-stable76014
✅ vite-stable76014
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable76014
✅ express-stable76014
✅ fastify-stable76014
✅ hono-stable76014
✅ nextjs-turbopack-canary63027
✅ nextjs-turbopack-stable8208
✅ nextjs-webpack-canary63027
✅ nextjs-webpack-stable8208
✅ nitro-stable76014
✅ nuxt-stable76014
✅ sveltekit-stable76014
✅ vite-stable76014
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack8208
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev600
❌ mongodb5678
✅ redis-dev600
❌ redis5678
✅ turso-dev600
❌ turso3608
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable76014
✅ e2e-local-postgres-nest-stable76014
✅ e2e-local-prod-nest-stable76014

📋 View full workflow run

@changeset-bot

changeset-botBot commented Apr 9, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: dfe6ba8

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

This PR includes changesets to release 16 packages
NameType
@workflow/coreMinor
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
workflowMinor
@workflow/world-testingPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch
@workflow/aiMajor

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

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

Adds first-class serialization support for workflow function references (functions tagged with .workflowId) so they can cross the step serialization boundary and be rendered nicely in observability tooling.

Changes:

  • Extend core serialization reducers/revivers with a WorkflowFunction special type that reduces workflow function refs to { workflowId }.
  • Add tests covering workflow function ref serialization behavior across step return values and step arguments.
  • Add an observability reviver rendering workflow function refs as <workflow:workflowId> and ship a minor changeset.

Reviewed changes

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

FileDescription
packages/core/src/serialization.tsAdds WorkflowFunction to special-type serialization and revives it to { workflowId } across external/workflow/step contexts.
packages/core/src/serialization.test.tsAdds unit tests for WorkflowFunction reducer/reviver behavior and boundary roundtrips.
packages/core/src/serialization-format.tsAdds o11y rendering of WorkflowFunction values as <workflow:...>.
.changeset/workflow-function-serialization.mdDeclares a minor release for the new serialization capability.

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

Comment on lines +656 to +658
WorkflowFunction: {
workflowId: string;
};

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.

SerializableSpecial was extended with WorkflowFunction, but the public Serializable union in packages/core/src/schemas.ts was not updated accordingly (see the note above this interface). This can cause TypeScript to still reject workflow function references in places typed as Serializable (e.g., step args), even though runtime serialization now supports them. Please update Serializable to explicitly include the workflow function reference shape you intend to support (and/or a dedicated workflow-metadata type), so the type-level contract matches the runtime 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.

Good point. The Serializable union in schemas.ts is primarily for type-level validation of step arguments. Since workflow function references are typically passed as the first arg to start() (which has its own overloaded type signature accepting WorkflowFunction | WorkflowMetadata), they don't flow through the generic Serializable type path. If we find cases where this causes type errors, we can add it then.

// A function without workflowId or stepId cannot be serialized
await expect(
dehydrateStepReturnValue(plainFn, 'wrun_test', undefined)
).rejects.toThrow('serialization');

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 assertion .rejects.toThrow('serialization') is unlikely to match the actual error message thrown by dehydrateStepReturnValue(), which is formatted as "Failed to serialize …" (and does not necessarily contain the substring "serialization"). This test may be flaky or fail consistently depending on the underlying error. Prefer matching on the stable prefix/message produced by formatSerializationError (e.g., "Failed to serialize") or use a regex that matches the expected error text.

Suggested change
).rejects.toThrow('serialization');
).rejects.toThrow('Failed to serialize');

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. Changed to .rejects.toThrow('Failed to serialize') which matches the stable prefix from formatSerializationError.

Comment on lines 375 to +377
StepFunction: serializedStepFunctionToString,
WorkflowFunction: (value: { workflowId: string }) =>
`<workflow:${value.workflowId}>`,

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.

observabilityRevivers gained a WorkflowFunction renderer, but serialization-format.test.ts has coverage for the other built-in display revivers (ReadableStream, StepFunction, Instance, Class) and currently none for WorkflowFunction. Please add a focused test that verifies { workflowId: "..." } renders as <workflow:...> so this o11y output remains stable.

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.

Added. New test in serialization-format.test.ts verifies observabilityRevivers.WorkflowFunction({ workflowId: '...' }) renders as <workflow:...>.

@TooTallNate
TooTallNate merged commit 9513a81 into mainApr 10, 2026
160 of 169 checks passed
@TooTallNate
TooTallNate deleted the fix/workflow-function-serialization branch April 10, 2026 06:04
@ghostghost mentioned this pull request Apr 10, 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)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' feat(core): add serialization support for workflow function references by TooTallNate · Pull Request #1677 · vercel/workflow · GitHub
Skip to content

feat(core): add serialization support for workflow function references - #1677

Merged
TooTallNate merged 2 commits into
mainfrom
fix/workflow-function-serialization
Apr 10, 2026
Merged

feat(core): add serialization support for workflow function references#1677
TooTallNate merged 2 commits into
mainfrom
fix/workflow-function-serialization

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Apr 9, 2026

Copy link
Copy Markdown
Member

Summary

Add a WorkflowFunction reducer/reviver pair to the serialization system so that workflow function references (functions with a .workflowId property, as produced by the SWC compiler) can cross the step serialization boundary.

This is a prerequisite for allowing start() to be called directly from workflow functions with "use step" — the workflow function reference passed as the first argument needs to be serializable.

How it works

Reducer: Detects functions with a .workflowId string property, serializes as { workflowId }. Only matches functions (not plain objects) to prevent infinite recursion since the reduced form is a plain object.

Revivers: All contexts (step, workflow, external) deserialize as a function with .workflowId that throws "Workflow functions cannot be called directly. Use start() to invoke them." on direct invocation. This is sufficient because start() only reads .workflowId from the reference.

Observability: Renders as <workflow:workflowId> in the o11y UI.

Note on workflow context hydration

It is recognized that the workflow context reviver should ideally return the proper registered function reference (since the SWC compiler registers workflow functions in the VM). However, since this PR is primarily for the start() as a step use-case — where the deserialized reference is only passed to start() which reads .workflowId — returning a throwing wrapper is sufficient. Full workflow function registry hydration can be revisited in the future when there is a concrete use case requiring the actual function reference in workflow context.

Example

// In user code (workflow context):constchildRun=awaitstart(myChildWorkflow,[42]);// ^^^^^^^^^^^^^^^^// This is a function with .workflowId attached by SWC.// The WorkflowFunction reducer serializes it as { workflowId: "..." }// so it can cross the step boundary as an argument to start().

CopilotAI review requested due to automatic review settings April 9, 2026 22:53
@TooTallNate
TooTallNate requested a review from a team as a code ownerApril 9, 2026 22:53
@vercel

vercelBot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Apr 9, 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.035s (-5.9% 🟢)1.005s (~)0.970s101.00x
🐘 PostgresNitro0.056s (-11.4% 🟢)1.010s (~)0.954s101.60x
🐘 PostgresExpress0.061s (-8.6% 🟢)1.010s (~)0.949s101.74x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.234s (-3.4%)2.116s (~)1.883s101.00x
▲ VercelNext.js (Turbopack)0.286s (-35.5% 🟢)2.053s (-7.6% 🟢)1.766s101.23x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.099s (~)2.006s (~)0.906s101.00x
🐘 PostgresNitro1.139s (-1.0%)2.010s (~)0.870s101.04x
🐘 PostgresExpress1.147s (~)2.009s (~)0.861s101.04x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.807s (-12.7% 🟢)4.016s (+8.7% 🔺)2.208s101.00x
▲ VercelExpress1.949s (+4.2%)4.112s (+7.0% 🔺)2.163s101.08x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.673s (~)11.023s (~)0.349s31.00x
🐘 PostgresExpress10.858s (~)11.022s (~)0.163s31.02x
🐘 PostgresNitro10.884s (~)11.353s (+3.0%)0.468s31.02x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.963s (+1.3%)18.921s (+1.0%)1.958s21.00x
▲ VercelNext.js (Turbopack)17.475s (-1.6%)19.672s (+3.8%)2.197s21.03x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro14.241s (~)15.028s (~)0.787s41.00x
🐘 PostgresNitro14.474s (~)15.020s (~)0.546s41.02x
🐘 PostgresExpress14.476s (-0.6%)15.021s (~)0.545s41.02x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)31.526s (-7.1% 🟢)33.030s (-8.2% 🟢)1.504s21.00x
▲ VercelExpress31.686s (+5.1% 🔺)33.518s (+3.9%)1.833s21.01x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express13.811s (-2.0%)14.020s (-4.9%)0.209s71.00x
🐘 PostgresNitro13.921s (~)14.305s (+2.0%)0.384s71.01x
💻 LocalNitro14.873s (~)15.028s (~)0.156s61.08x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express50.353s (-4.2%)52.735s (-3.7%)2.382s21.00x
▲ VercelNext.js (Turbopack)54.849s (~)57.326s (+0.5%)2.478s21.09x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.262s (~)2.010s (~)0.747s151.00x
🐘 PostgresExpress1.277s (~)2.009s (~)0.732s151.01x
💻 LocalNitro1.457s (-2.5%)2.005s (~)0.548s151.15x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.308s (-2.7%)4.131s (~)1.823s81.00x
▲ VercelNext.js (Turbopack)2.639s (+11.1% 🔺)4.558s (+17.8% 🔺)1.919s71.14x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.330s (-1.2%)3.009s (~)0.680s101.00x
🐘 PostgresExpress2.335s (~)3.011s (~)0.676s101.00x
💻 LocalNitro2.665s (-2.3%)3.008s (-6.3% 🟢)0.343s101.14x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.624s (-0.9%)4.357s (+6.3% 🔺)1.733s81.00x
▲ VercelNext.js (Turbopack)2.655s (-12.2% 🟢)4.643s (+5.4% 🔺)1.988s71.01x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.459s (-1.3%)4.010s (~)0.552s81.00x
🐘 PostgresExpress3.471s (-0.9%)4.010s (~)0.538s81.00x
💻 LocalNitro7.084s (-8.5% 🟢)8.018s (-5.9% 🟢)0.934s42.05x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.181s (+7.9% 🔺)5.001s (+6.1% 🔺)1.820s61.00x
▲ VercelNext.js (Turbopack)3.623s (+19.3% 🔺)5.334s (+15.8% 🔺)1.710s61.14x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.250s (-0.6%)2.008s (~)0.757s151.00x
🐘 PostgresExpress1.262s (-2.6%)2.007s (~)0.746s151.01x
💻 LocalNitro1.482s (-1.5%)2.006s (~)0.524s151.19x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.273s (+18.1% 🔺)4.166s (+12.2% 🔺)1.893s81.00x
▲ VercelNext.js (Turbopack)2.799s (+29.2% 🔺)4.577s (+27.8% 🔺)1.778s71.23x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.306s (-3.1%)3.008s (~)0.702s101.00x
🐘 PostgresNitro2.335s (~)3.010s (~)0.674s101.01x
💻 LocalNitro2.789s (-20.2% 🟢)3.108s (-22.5% 🟢)0.319s101.21x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.975s (+20.0% 🔺)4.663s (+20.5% 🔺)1.688s71.00x
▲ VercelExpress3.231s (+23.3% 🔺)5.069s (+14.9% 🔺)1.838s61.09x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.454s (~)4.008s (~)0.554s81.00x
🐘 PostgresExpress3.477s (~)4.009s (~)0.532s81.01x
💻 LocalNitro7.837s (-7.8% 🟢)8.268s (-8.4% 🟢)0.431s42.27x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.862s (-2.4%)4.776s (+13.3% 🔺)1.913s71.00x
▲ VercelNext.js (Turbopack)4.221s (+21.8% 🔺)6.242s (+29.6% 🔺)2.021s51.47x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.697s (-5.4% 🟢)1.004s (~)0.307s601.00x
🐘 PostgresNitro0.787s (-5.9% 🟢)1.005s (-1.7%)0.219s601.13x
🐘 PostgresExpress0.793s (-8.3% 🟢)1.006s (~)0.213s601.14x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)9.026s (+1.0%)11.073s (+3.9%)2.047s61.00x
▲ VercelExpress9.258s (+0.7%)11.630s (+5.9% 🔺)2.373s61.03x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.871s (-13.2% 🟢)2.052s (-31.1% 🟢)0.181s441.00x
🐘 PostgresNitro1.940s (~)2.283s (+8.7% 🔺)0.342s401.04x
💻 LocalNitro2.272s (-11.5% 🟢)3.007s (-5.4% 🟢)0.735s301.21x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express29.451s (+5.3% 🔺)31.651s (+5.7% 🔺)2.200s41.00x
▲ VercelNext.js (Turbopack)31.188s (+8.9% 🔺)33.320s (+9.8% 🔺)2.132s31.06x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.825s (-4.2%)4.043s (-5.9% 🟢)0.219s301.00x
🐘 PostgresExpress3.858s (-10.6% 🟢)4.110s (-18.0% 🟢)0.252s301.01x
💻 LocalNitro7.329s (-5.0%)8.015s (-2.4%)0.686s151.92x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express75.268s (-4.0%)77.094s (-3.9%)1.826s21.00x
▲ VercelNext.js (Turbopack)77.509s (+0.8%)79.286s (+0.7%)1.777s21.03x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.279s (-5.8% 🟢)1.006s (~)0.728s601.00x
🐘 PostgresNitro0.282s (~)1.006s (~)0.724s601.01x
💻 LocalNitro0.586s (-11.7% 🟢)1.004s (~)0.418s602.10x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.604s (+10.7% 🔺)3.360s (+11.7% 🔺)1.757s181.00x
▲ VercelExpress1.630s (+7.1% 🔺)3.360s (+8.5% 🔺)1.729s181.02x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.490s (~)1.006s (~)0.516s901.00x
🐘 PostgresExpress0.495s (-5.8% 🟢)1.007s (~)0.512s901.01x
💻 LocalNitro2.457s (-10.6% 🟢)3.008s (-5.5% 🟢)0.550s305.01x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.697s (-1.5%)4.606s (+5.9% 🔺)1.909s201.00x
▲ VercelNext.js (Turbopack)3.111s (-7.5% 🟢)5.125s (+6.2% 🔺)2.014s181.15x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.776s (-1.3%)1.007s (~)0.231s1201.00x
🐘 PostgresExpress0.794s (-5.6% 🟢)1.016s (~)0.222s1191.02x
💻 LocalNitro10.560s (-5.2% 🟢)11.023s (-7.0% 🟢)0.463s1113.61x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express8.362s (+22.2% 🔺)10.710s (+23.2% 🔺)2.348s121.00x
▲ VercelNext.js (Turbopack)309.221s (+4172.4% 🔺)311.025s (+3509.5% 🔺)1.804s136.98x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.138s (-6.3% 🟢)1.004s (~)0.009s (+3.3%)1.015s (~)0.877s101.00x
🐘 PostgresNitro0.198s (-0.9%)0.995s (~)0.002s (+6.2% 🔺)1.009s (~)0.812s101.43x
🐘 PostgresExpress0.208s (-3.0%)0.995s (~)0.001s (-23.5% 🟢)1.010s (~)0.801s101.51x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.665s (+12.6% 🔺)3.034s (~)0.477s (+57.4% 🔺)4.039s (+7.3% 🔺)2.374s101.00x
▲ VercelNext.js (Turbopack)1.713s (+4.9%)2.960s (~)0.522s (+21.4% 🔺)3.943s (+4.1%)2.230s101.03x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.604s (-6.7% 🟢)1.005s (~)0.004s (-13.0% 🟢)1.022s (~)0.418s591.00x
🐘 PostgresNitro0.612s (+1.1%)1.023s (+2.1%)0.004s (~)1.039s (+1.8%)0.427s581.01x
💻 LocalNitro0.667s (+0.8%)1.011s (~)0.009s (-16.1% 🟢)1.114s (+8.6% 🔺)0.447s541.10x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.323s (+2.3%)6.220s (+6.3% 🔺)0.312s (+42.0% 🔺)7.042s (+8.5% 🔺)2.719s91.00x
▲ VercelNext.js (Turbopack)4.374s (+6.4% 🔺)6.022s (+7.9% 🔺)0.552s (-23.9% 🟢)7.017s (+5.0% 🔺)2.643s91.01x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.914s (-3.2%)1.104s (-3.7%)0.000s (-67.9% 🟢)1.118s (-3.8%)0.204s541.00x
🐘 PostgresExpress0.940s (-5.2% 🟢)1.103s (-17.4% 🟢)0.000s (+22.2% 🔺)1.119s (-18.3% 🟢)0.179s541.03x
💻 LocalNitro1.160s (-12.5% 🟢)2.018s (~)0.000s (-64.7% 🟢)2.020s (~)0.860s301.27x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.869s (+8.5% 🔺)4.117s (+10.9% 🔺)0.000s (+60.7% 🔺)4.607s (+11.2% 🔺)1.738s141.00x
▲ VercelNext.js (Turbopack)3.180s (-2.2%)4.680s (+6.7% 🔺)0.000s (-63.9% 🟢)5.177s (+8.5% 🔺)1.996s121.11x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.710s (-4.3%)2.139s (~)0.000s (NaN%)2.152s (~)0.442s281.00x
🐘 PostgresNitro1.780s (~)2.129s (+1.5%)0.000s (-100.0% 🟢)2.199s (+4.1%)0.418s291.04x
💻 LocalNitro3.348s (-15.1% 🟢)4.029s (-11.1% 🟢)0.000s (-68.2% 🟢)4.032s (-11.1% 🟢)0.684s161.96x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.127s (+21.6% 🔺)5.611s (+15.6% 🔺)0.000s (-100.0% 🟢)6.079s (+14.4% 🔺)1.952s101.00x
▲ VercelNext.js (Turbopack)4.514s (+3.8%)5.868s (+5.2% 🔺)0.000s (-63.3% 🟢)6.337s (+6.0% 🔺)1.823s101.09x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro21/21
🐘 PostgresNitro14/21
▲ VercelExpress16/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres19/21
Next.js (Turbopack)▲ Vercel21/21
Nitro🐘 Postgres15/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


Some benchmark jobs failed:

  • Local: cancelled
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

@github-actions

github-actionsBot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production923067990
✅ 💻 Local Development89801821080
✅ 📦 Local Production89801821080
✅ 🐘 Local Postgres89801821080
✅ 🪟 Windows820890
❌ 🌍 Community Worlds1337424231
✅ 📋 Other228042270
Total4060746874821

❌ Failed Tests

🌍 Community Worlds (74 failed)

mongodb (7 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNTAQDJDBSHTG1MWKF5KQBC5
  • webhookWorkflow | wrun_01KNTAQP2B6QNFW4V5CC2P3NZ1
  • fetchWorkflow | wrun_01KNTAV423VWE5AF0N1NWNCQ9T
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNTAYYWMXFXFVJ33YZ9V6ASZ
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNTB557DNYXNH4EV8TP26TD9

redis (7 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNTAQDJDBSHTG1MWKF5KQBC5
  • webhookWorkflow | wrun_01KNTAQP2B6QNFW4V5CC2P3NZ1
  • fetchWorkflow | wrun_01KNTAV423VWE5AF0N1NWNCQ9T
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNTAYYWMXFXFVJ33YZ9V6ASZ
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNTB557DNYXNH4EV8TP26TD9

turso (60 failed):

  • addTenWorkflow | wrun_01KNTAP9AVRTGK03SM69S63608
  • addTenWorkflow | wrun_01KNTAP9AVRTGK03SM69S63608
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KNTAQDKF2QVPYWGFH6W47PC9
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KNTAPGX7BKKR4ZRE58D7ZHH7
  • promiseRaceWorkflow | wrun_01KNTAPP407KBZNC5D2E7ZN7HT
  • promiseAnyWorkflow | wrun_01KNTAPQZ70DGD6CC21VAF8J21
  • importedStepOnlyWorkflow | wrun_01KNTAQT6HJ36G1K7T8WJB0J9S
  • hookWorkflow | wrun_01KNTAQ3D3TSW5YZRSJFXFR53D
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNTAQDJDBSHTG1MWKF5KQBC5
  • webhookWorkflow | wrun_01KNTAQP2B6QNFW4V5CC2P3NZ1
  • sleepingWorkflow | wrun_01KNTAQVQM7GW6GXQRDJFA1V3C
  • parallelSleepWorkflow | wrun_01KNTAR7NBH7YK2PSVB16SHS3Y
  • nullByteWorkflow | wrun_01KNTARC0FHC9PZ380HNHXCE3Q
  • workflowAndStepMetadataWorkflow | wrun_01KNTARDY46ZFS3910Z5TS8GM9
  • fetchWorkflow | wrun_01KNTAV423VWE5AF0N1NWNCQ9T
  • promiseRaceStressTestWorkflow | wrun_01KNTAV6CBHN7Y62R93F05FJBT
  • 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_01KNTAYC4A0HMMJ82ZAS5XHYB3
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNTAYYWMXFXFVJ33YZ9V6ASZ
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KNTAZJEVBF2HY6T73YPG2SDG
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KNTB05TEV77Z954JTQPRXCX6
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KNTB0DPKSYDHGAPJXNE6EQJJ
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KNTB0KQD8CZNSQKSNCG31HAY
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KNTB0NJRSSKBJFGDY5R3EMTG
  • runClassSerializationWorkflow - Run instances serialize across workflow/step boundaries | wrun_01KNTB0ZTHFAGXWNH9HTW4NVEN
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KNTB1DNEDKFTTXW4XT0S3QN9
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KNTB1JSSZ6Q07R4CGC7B6CS5
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KNTB1RMRHJTM9B024NEKC02R
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KNTB1YQZHV70B0TM63DE4A6J
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KNTB24NMAXHG41V7MZSRCHRZ
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KNTB2AP9VTJ7DHYEG7YSE72Q
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KNTB2GX4GDYF8R5ZESZN0EN4
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KNTB2TR3HNFKBG0RRDT44C8S
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KNTB32JA4CEPPH6MP7NF7BXW
  • cancelRun - cancelling a running workflow | wrun_01KNTB38B962CGE4Q7QRXWDP17
  • cancelRun via CLI - cancelling a running workflow | wrun_01KNTB3GWFDJBCJPNZXTX2QSZC
  • 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_01KNTB3VWCNC123S1VJDNX8JS6
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KNTB4FHKX1YRHE30BY5MHTZZ
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KNTB4T9B5T9B4RQ3CCPBBYB2
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KNTB504C25ET83GJT6S58G19
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KNTB52Y4HTXATE6XC7V3EX1D
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNTB557DNYXNH4EV8TP26TD9
  • getterStepWorkflow - getter functions with "use step" directive | wrun_01KNTB5855A2TQ9CJHJZ3H2DFP

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro8307
✅ example8307
✅ express8307
✅ fastify8307
✅ hono8307
✅ nextjs-turbopack8802
✅ nextjs-webpack8802
✅ nitro8307
✅ nuxt8307
✅ sveltekit8307
✅ vite8307
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable76014
✅ express-stable76014
✅ fastify-stable76014
✅ hono-stable76014
✅ nextjs-turbopack-canary63027
✅ nextjs-turbopack-stable8208
✅ nextjs-webpack-canary63027
✅ nextjs-webpack-stable8208
✅ nitro-stable76014
✅ nuxt-stable76014
✅ sveltekit-stable76014
✅ vite-stable76014
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable76014
✅ express-stable76014
✅ fastify-stable76014
✅ hono-stable76014
✅ nextjs-turbopack-canary63027
✅ nextjs-turbopack-stable8208
✅ nextjs-webpack-canary63027
✅ nextjs-webpack-stable8208
✅ nitro-stable76014
✅ nuxt-stable76014
✅ sveltekit-stable76014
✅ vite-stable76014
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable76014
✅ express-stable76014
✅ fastify-stable76014
✅ hono-stable76014
✅ nextjs-turbopack-canary63027
✅ nextjs-turbopack-stable8208
✅ nextjs-webpack-canary63027
✅ nextjs-webpack-stable8208
✅ nitro-stable76014
✅ nuxt-stable76014
✅ sveltekit-stable76014
✅ vite-stable76014
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack8208
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev600
❌ mongodb5678
✅ redis-dev600
❌ redis5678
✅ turso-dev600
❌ turso3608
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable76014
✅ e2e-local-postgres-nest-stable76014
✅ e2e-local-prod-nest-stable76014

📋 View full workflow run

@changeset-bot

changeset-botBot commented Apr 9, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: dfe6ba8

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

This PR includes changesets to release 16 packages
NameType
@workflow/coreMinor
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
workflowMinor
@workflow/world-testingPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch
@workflow/aiMajor

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

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

Adds first-class serialization support for workflow function references (functions tagged with .workflowId) so they can cross the step serialization boundary and be rendered nicely in observability tooling.

Changes:

  • Extend core serialization reducers/revivers with a WorkflowFunction special type that reduces workflow function refs to { workflowId }.
  • Add tests covering workflow function ref serialization behavior across step return values and step arguments.
  • Add an observability reviver rendering workflow function refs as <workflow:workflowId> and ship a minor changeset.

Reviewed changes

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

FileDescription
packages/core/src/serialization.tsAdds WorkflowFunction to special-type serialization and revives it to { workflowId } across external/workflow/step contexts.
packages/core/src/serialization.test.tsAdds unit tests for WorkflowFunction reducer/reviver behavior and boundary roundtrips.
packages/core/src/serialization-format.tsAdds o11y rendering of WorkflowFunction values as <workflow:...>.
.changeset/workflow-function-serialization.mdDeclares a minor release for the new serialization capability.

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

Comment on lines +656 to +658
WorkflowFunction: {
workflowId: string;
};

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.

SerializableSpecial was extended with WorkflowFunction, but the public Serializable union in packages/core/src/schemas.ts was not updated accordingly (see the note above this interface). This can cause TypeScript to still reject workflow function references in places typed as Serializable (e.g., step args), even though runtime serialization now supports them. Please update Serializable to explicitly include the workflow function reference shape you intend to support (and/or a dedicated workflow-metadata type), so the type-level contract matches the runtime 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.

Good point. The Serializable union in schemas.ts is primarily for type-level validation of step arguments. Since workflow function references are typically passed as the first arg to start() (which has its own overloaded type signature accepting WorkflowFunction | WorkflowMetadata), they don't flow through the generic Serializable type path. If we find cases where this causes type errors, we can add it then.

// A function without workflowId or stepId cannot be serialized
await expect(
dehydrateStepReturnValue(plainFn, 'wrun_test', undefined)
).rejects.toThrow('serialization');

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 assertion .rejects.toThrow('serialization') is unlikely to match the actual error message thrown by dehydrateStepReturnValue(), which is formatted as "Failed to serialize …" (and does not necessarily contain the substring "serialization"). This test may be flaky or fail consistently depending on the underlying error. Prefer matching on the stable prefix/message produced by formatSerializationError (e.g., "Failed to serialize") or use a regex that matches the expected error text.

Suggested change
).rejects.toThrow('serialization');
).rejects.toThrow('Failed to serialize');

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. Changed to .rejects.toThrow('Failed to serialize') which matches the stable prefix from formatSerializationError.

Comment on lines 375 to +377
StepFunction: serializedStepFunctionToString,
WorkflowFunction: (value: { workflowId: string }) =>
`<workflow:${value.workflowId}>`,

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.

observabilityRevivers gained a WorkflowFunction renderer, but serialization-format.test.ts has coverage for the other built-in display revivers (ReadableStream, StepFunction, Instance, Class) and currently none for WorkflowFunction. Please add a focused test that verifies { workflowId: "..." } renders as <workflow:...> so this o11y output remains stable.

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.

Added. New test in serialization-format.test.ts verifies observabilityRevivers.WorkflowFunction({ workflowId: '...' }) renders as <workflow:...>.

@TooTallNate
TooTallNate merged commit 9513a81 into mainApr 10, 2026
160 of 169 checks passed
@TooTallNate
TooTallNate deleted the fix/workflow-function-serialization branch April 10, 2026 06:04
@ghostghost mentioned this pull request Apr 10, 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)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' feat(core): add serialization support for workflow function references by TooTallNate · Pull Request #1677 · vercel/workflow · GitHub
Skip to content

feat(core): add serialization support for workflow function references - #1677

Merged
TooTallNate merged 2 commits into
mainfrom
fix/workflow-function-serialization
Apr 10, 2026
Merged

feat(core): add serialization support for workflow function references#1677
TooTallNate merged 2 commits into
mainfrom
fix/workflow-function-serialization

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Apr 9, 2026

Copy link
Copy Markdown
Member

Summary

Add a WorkflowFunction reducer/reviver pair to the serialization system so that workflow function references (functions with a .workflowId property, as produced by the SWC compiler) can cross the step serialization boundary.

This is a prerequisite for allowing start() to be called directly from workflow functions with "use step" — the workflow function reference passed as the first argument needs to be serializable.

How it works

Reducer: Detects functions with a .workflowId string property, serializes as { workflowId }. Only matches functions (not plain objects) to prevent infinite recursion since the reduced form is a plain object.

Revivers: All contexts (step, workflow, external) deserialize as a function with .workflowId that throws "Workflow functions cannot be called directly. Use start() to invoke them." on direct invocation. This is sufficient because start() only reads .workflowId from the reference.

Observability: Renders as <workflow:workflowId> in the o11y UI.

Note on workflow context hydration

It is recognized that the workflow context reviver should ideally return the proper registered function reference (since the SWC compiler registers workflow functions in the VM). However, since this PR is primarily for the start() as a step use-case — where the deserialized reference is only passed to start() which reads .workflowId — returning a throwing wrapper is sufficient. Full workflow function registry hydration can be revisited in the future when there is a concrete use case requiring the actual function reference in workflow context.

Example

// In user code (workflow context):constchildRun=awaitstart(myChildWorkflow,[42]);// ^^^^^^^^^^^^^^^^// This is a function with .workflowId attached by SWC.// The WorkflowFunction reducer serializes it as { workflowId: "..." }// so it can cross the step boundary as an argument to start().

CopilotAI review requested due to automatic review settings April 9, 2026 22:53
@TooTallNate
TooTallNate requested a review from a team as a code ownerApril 9, 2026 22:53
@vercel

vercelBot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Apr 9, 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.035s (-5.9% 🟢)1.005s (~)0.970s101.00x
🐘 PostgresNitro0.056s (-11.4% 🟢)1.010s (~)0.954s101.60x
🐘 PostgresExpress0.061s (-8.6% 🟢)1.010s (~)0.949s101.74x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.234s (-3.4%)2.116s (~)1.883s101.00x
▲ VercelNext.js (Turbopack)0.286s (-35.5% 🟢)2.053s (-7.6% 🟢)1.766s101.23x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.099s (~)2.006s (~)0.906s101.00x
🐘 PostgresNitro1.139s (-1.0%)2.010s (~)0.870s101.04x
🐘 PostgresExpress1.147s (~)2.009s (~)0.861s101.04x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.807s (-12.7% 🟢)4.016s (+8.7% 🔺)2.208s101.00x
▲ VercelExpress1.949s (+4.2%)4.112s (+7.0% 🔺)2.163s101.08x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.673s (~)11.023s (~)0.349s31.00x
🐘 PostgresExpress10.858s (~)11.022s (~)0.163s31.02x
🐘 PostgresNitro10.884s (~)11.353s (+3.0%)0.468s31.02x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.963s (+1.3%)18.921s (+1.0%)1.958s21.00x
▲ VercelNext.js (Turbopack)17.475s (-1.6%)19.672s (+3.8%)2.197s21.03x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro14.241s (~)15.028s (~)0.787s41.00x
🐘 PostgresNitro14.474s (~)15.020s (~)0.546s41.02x
🐘 PostgresExpress14.476s (-0.6%)15.021s (~)0.545s41.02x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)31.526s (-7.1% 🟢)33.030s (-8.2% 🟢)1.504s21.00x
▲ VercelExpress31.686s (+5.1% 🔺)33.518s (+3.9%)1.833s21.01x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express13.811s (-2.0%)14.020s (-4.9%)0.209s71.00x
🐘 PostgresNitro13.921s (~)14.305s (+2.0%)0.384s71.01x
💻 LocalNitro14.873s (~)15.028s (~)0.156s61.08x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express50.353s (-4.2%)52.735s (-3.7%)2.382s21.00x
▲ VercelNext.js (Turbopack)54.849s (~)57.326s (+0.5%)2.478s21.09x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.262s (~)2.010s (~)0.747s151.00x
🐘 PostgresExpress1.277s (~)2.009s (~)0.732s151.01x
💻 LocalNitro1.457s (-2.5%)2.005s (~)0.548s151.15x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.308s (-2.7%)4.131s (~)1.823s81.00x
▲ VercelNext.js (Turbopack)2.639s (+11.1% 🔺)4.558s (+17.8% 🔺)1.919s71.14x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.330s (-1.2%)3.009s (~)0.680s101.00x
🐘 PostgresExpress2.335s (~)3.011s (~)0.676s101.00x
💻 LocalNitro2.665s (-2.3%)3.008s (-6.3% 🟢)0.343s101.14x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.624s (-0.9%)4.357s (+6.3% 🔺)1.733s81.00x
▲ VercelNext.js (Turbopack)2.655s (-12.2% 🟢)4.643s (+5.4% 🔺)1.988s71.01x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.459s (-1.3%)4.010s (~)0.552s81.00x
🐘 PostgresExpress3.471s (-0.9%)4.010s (~)0.538s81.00x
💻 LocalNitro7.084s (-8.5% 🟢)8.018s (-5.9% 🟢)0.934s42.05x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.181s (+7.9% 🔺)5.001s (+6.1% 🔺)1.820s61.00x
▲ VercelNext.js (Turbopack)3.623s (+19.3% 🔺)5.334s (+15.8% 🔺)1.710s61.14x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.250s (-0.6%)2.008s (~)0.757s151.00x
🐘 PostgresExpress1.262s (-2.6%)2.007s (~)0.746s151.01x
💻 LocalNitro1.482s (-1.5%)2.006s (~)0.524s151.19x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.273s (+18.1% 🔺)4.166s (+12.2% 🔺)1.893s81.00x
▲ VercelNext.js (Turbopack)2.799s (+29.2% 🔺)4.577s (+27.8% 🔺)1.778s71.23x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.306s (-3.1%)3.008s (~)0.702s101.00x
🐘 PostgresNitro2.335s (~)3.010s (~)0.674s101.01x
💻 LocalNitro2.789s (-20.2% 🟢)3.108s (-22.5% 🟢)0.319s101.21x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.975s (+20.0% 🔺)4.663s (+20.5% 🔺)1.688s71.00x
▲ VercelExpress3.231s (+23.3% 🔺)5.069s (+14.9% 🔺)1.838s61.09x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.454s (~)4.008s (~)0.554s81.00x
🐘 PostgresExpress3.477s (~)4.009s (~)0.532s81.01x
💻 LocalNitro7.837s (-7.8% 🟢)8.268s (-8.4% 🟢)0.431s42.27x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.862s (-2.4%)4.776s (+13.3% 🔺)1.913s71.00x
▲ VercelNext.js (Turbopack)4.221s (+21.8% 🔺)6.242s (+29.6% 🔺)2.021s51.47x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.697s (-5.4% 🟢)1.004s (~)0.307s601.00x
🐘 PostgresNitro0.787s (-5.9% 🟢)1.005s (-1.7%)0.219s601.13x
🐘 PostgresExpress0.793s (-8.3% 🟢)1.006s (~)0.213s601.14x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)9.026s (+1.0%)11.073s (+3.9%)2.047s61.00x
▲ VercelExpress9.258s (+0.7%)11.630s (+5.9% 🔺)2.373s61.03x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.871s (-13.2% 🟢)2.052s (-31.1% 🟢)0.181s441.00x
🐘 PostgresNitro1.940s (~)2.283s (+8.7% 🔺)0.342s401.04x
💻 LocalNitro2.272s (-11.5% 🟢)3.007s (-5.4% 🟢)0.735s301.21x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express29.451s (+5.3% 🔺)31.651s (+5.7% 🔺)2.200s41.00x
▲ VercelNext.js (Turbopack)31.188s (+8.9% 🔺)33.320s (+9.8% 🔺)2.132s31.06x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.825s (-4.2%)4.043s (-5.9% 🟢)0.219s301.00x
🐘 PostgresExpress3.858s (-10.6% 🟢)4.110s (-18.0% 🟢)0.252s301.01x
💻 LocalNitro7.329s (-5.0%)8.015s (-2.4%)0.686s151.92x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express75.268s (-4.0%)77.094s (-3.9%)1.826s21.00x
▲ VercelNext.js (Turbopack)77.509s (+0.8%)79.286s (+0.7%)1.777s21.03x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.279s (-5.8% 🟢)1.006s (~)0.728s601.00x
🐘 PostgresNitro0.282s (~)1.006s (~)0.724s601.01x
💻 LocalNitro0.586s (-11.7% 🟢)1.004s (~)0.418s602.10x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.604s (+10.7% 🔺)3.360s (+11.7% 🔺)1.757s181.00x
▲ VercelExpress1.630s (+7.1% 🔺)3.360s (+8.5% 🔺)1.729s181.02x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.490s (~)1.006s (~)0.516s901.00x
🐘 PostgresExpress0.495s (-5.8% 🟢)1.007s (~)0.512s901.01x
💻 LocalNitro2.457s (-10.6% 🟢)3.008s (-5.5% 🟢)0.550s305.01x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.697s (-1.5%)4.606s (+5.9% 🔺)1.909s201.00x
▲ VercelNext.js (Turbopack)3.111s (-7.5% 🟢)5.125s (+6.2% 🔺)2.014s181.15x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.776s (-1.3%)1.007s (~)0.231s1201.00x
🐘 PostgresExpress0.794s (-5.6% 🟢)1.016s (~)0.222s1191.02x
💻 LocalNitro10.560s (-5.2% 🟢)11.023s (-7.0% 🟢)0.463s1113.61x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express8.362s (+22.2% 🔺)10.710s (+23.2% 🔺)2.348s121.00x
▲ VercelNext.js (Turbopack)309.221s (+4172.4% 🔺)311.025s (+3509.5% 🔺)1.804s136.98x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.138s (-6.3% 🟢)1.004s (~)0.009s (+3.3%)1.015s (~)0.877s101.00x
🐘 PostgresNitro0.198s (-0.9%)0.995s (~)0.002s (+6.2% 🔺)1.009s (~)0.812s101.43x
🐘 PostgresExpress0.208s (-3.0%)0.995s (~)0.001s (-23.5% 🟢)1.010s (~)0.801s101.51x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.665s (+12.6% 🔺)3.034s (~)0.477s (+57.4% 🔺)4.039s (+7.3% 🔺)2.374s101.00x
▲ VercelNext.js (Turbopack)1.713s (+4.9%)2.960s (~)0.522s (+21.4% 🔺)3.943s (+4.1%)2.230s101.03x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.604s (-6.7% 🟢)1.005s (~)0.004s (-13.0% 🟢)1.022s (~)0.418s591.00x
🐘 PostgresNitro0.612s (+1.1%)1.023s (+2.1%)0.004s (~)1.039s (+1.8%)0.427s581.01x
💻 LocalNitro0.667s (+0.8%)1.011s (~)0.009s (-16.1% 🟢)1.114s (+8.6% 🔺)0.447s541.10x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.323s (+2.3%)6.220s (+6.3% 🔺)0.312s (+42.0% 🔺)7.042s (+8.5% 🔺)2.719s91.00x
▲ VercelNext.js (Turbopack)4.374s (+6.4% 🔺)6.022s (+7.9% 🔺)0.552s (-23.9% 🟢)7.017s (+5.0% 🔺)2.643s91.01x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.914s (-3.2%)1.104s (-3.7%)0.000s (-67.9% 🟢)1.118s (-3.8%)0.204s541.00x
🐘 PostgresExpress0.940s (-5.2% 🟢)1.103s (-17.4% 🟢)0.000s (+22.2% 🔺)1.119s (-18.3% 🟢)0.179s541.03x
💻 LocalNitro1.160s (-12.5% 🟢)2.018s (~)0.000s (-64.7% 🟢)2.020s (~)0.860s301.27x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.869s (+8.5% 🔺)4.117s (+10.9% 🔺)0.000s (+60.7% 🔺)4.607s (+11.2% 🔺)1.738s141.00x
▲ VercelNext.js (Turbopack)3.180s (-2.2%)4.680s (+6.7% 🔺)0.000s (-63.9% 🟢)5.177s (+8.5% 🔺)1.996s121.11x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.710s (-4.3%)2.139s (~)0.000s (NaN%)2.152s (~)0.442s281.00x
🐘 PostgresNitro1.780s (~)2.129s (+1.5%)0.000s (-100.0% 🟢)2.199s (+4.1%)0.418s291.04x
💻 LocalNitro3.348s (-15.1% 🟢)4.029s (-11.1% 🟢)0.000s (-68.2% 🟢)4.032s (-11.1% 🟢)0.684s161.96x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.127s (+21.6% 🔺)5.611s (+15.6% 🔺)0.000s (-100.0% 🟢)6.079s (+14.4% 🔺)1.952s101.00x
▲ VercelNext.js (Turbopack)4.514s (+3.8%)5.868s (+5.2% 🔺)0.000s (-63.3% 🟢)6.337s (+6.0% 🔺)1.823s101.09x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro21/21
🐘 PostgresNitro14/21
▲ VercelExpress16/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres19/21
Next.js (Turbopack)▲ Vercel21/21
Nitro🐘 Postgres15/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


Some benchmark jobs failed:

  • Local: cancelled
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

@github-actions

github-actionsBot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production923067990
✅ 💻 Local Development89801821080
✅ 📦 Local Production89801821080
✅ 🐘 Local Postgres89801821080
✅ 🪟 Windows820890
❌ 🌍 Community Worlds1337424231
✅ 📋 Other228042270
Total4060746874821

❌ Failed Tests

🌍 Community Worlds (74 failed)

mongodb (7 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNTAQDJDBSHTG1MWKF5KQBC5
  • webhookWorkflow | wrun_01KNTAQP2B6QNFW4V5CC2P3NZ1
  • fetchWorkflow | wrun_01KNTAV423VWE5AF0N1NWNCQ9T
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNTAYYWMXFXFVJ33YZ9V6ASZ
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNTB557DNYXNH4EV8TP26TD9

redis (7 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNTAQDJDBSHTG1MWKF5KQBC5
  • webhookWorkflow | wrun_01KNTAQP2B6QNFW4V5CC2P3NZ1
  • fetchWorkflow | wrun_01KNTAV423VWE5AF0N1NWNCQ9T
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNTAYYWMXFXFVJ33YZ9V6ASZ
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNTB557DNYXNH4EV8TP26TD9

turso (60 failed):

  • addTenWorkflow | wrun_01KNTAP9AVRTGK03SM69S63608
  • addTenWorkflow | wrun_01KNTAP9AVRTGK03SM69S63608
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KNTAQDKF2QVPYWGFH6W47PC9
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KNTAPGX7BKKR4ZRE58D7ZHH7
  • promiseRaceWorkflow | wrun_01KNTAPP407KBZNC5D2E7ZN7HT
  • promiseAnyWorkflow | wrun_01KNTAPQZ70DGD6CC21VAF8J21
  • importedStepOnlyWorkflow | wrun_01KNTAQT6HJ36G1K7T8WJB0J9S
  • hookWorkflow | wrun_01KNTAQ3D3TSW5YZRSJFXFR53D
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNTAQDJDBSHTG1MWKF5KQBC5
  • webhookWorkflow | wrun_01KNTAQP2B6QNFW4V5CC2P3NZ1
  • sleepingWorkflow | wrun_01KNTAQVQM7GW6GXQRDJFA1V3C
  • parallelSleepWorkflow | wrun_01KNTAR7NBH7YK2PSVB16SHS3Y
  • nullByteWorkflow | wrun_01KNTARC0FHC9PZ380HNHXCE3Q
  • workflowAndStepMetadataWorkflow | wrun_01KNTARDY46ZFS3910Z5TS8GM9
  • fetchWorkflow | wrun_01KNTAV423VWE5AF0N1NWNCQ9T
  • promiseRaceStressTestWorkflow | wrun_01KNTAV6CBHN7Y62R93F05FJBT
  • 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_01KNTAYC4A0HMMJ82ZAS5XHYB3
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNTAYYWMXFXFVJ33YZ9V6ASZ
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KNTAZJEVBF2HY6T73YPG2SDG
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KNTB05TEV77Z954JTQPRXCX6
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KNTB0DPKSYDHGAPJXNE6EQJJ
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KNTB0KQD8CZNSQKSNCG31HAY
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KNTB0NJRSSKBJFGDY5R3EMTG
  • runClassSerializationWorkflow - Run instances serialize across workflow/step boundaries | wrun_01KNTB0ZTHFAGXWNH9HTW4NVEN
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KNTB1DNEDKFTTXW4XT0S3QN9
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KNTB1JSSZ6Q07R4CGC7B6CS5
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KNTB1RMRHJTM9B024NEKC02R
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KNTB1YQZHV70B0TM63DE4A6J
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KNTB24NMAXHG41V7MZSRCHRZ
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KNTB2AP9VTJ7DHYEG7YSE72Q
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KNTB2GX4GDYF8R5ZESZN0EN4
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KNTB2TR3HNFKBG0RRDT44C8S
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KNTB32JA4CEPPH6MP7NF7BXW
  • cancelRun - cancelling a running workflow | wrun_01KNTB38B962CGE4Q7QRXWDP17
  • cancelRun via CLI - cancelling a running workflow | wrun_01KNTB3GWFDJBCJPNZXTX2QSZC
  • 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_01KNTB3VWCNC123S1VJDNX8JS6
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KNTB4FHKX1YRHE30BY5MHTZZ
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KNTB4T9B5T9B4RQ3CCPBBYB2
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KNTB504C25ET83GJT6S58G19
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KNTB52Y4HTXATE6XC7V3EX1D
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNTB557DNYXNH4EV8TP26TD9
  • getterStepWorkflow - getter functions with "use step" directive | wrun_01KNTB5855A2TQ9CJHJZ3H2DFP

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro8307
✅ example8307
✅ express8307
✅ fastify8307
✅ hono8307
✅ nextjs-turbopack8802
✅ nextjs-webpack8802
✅ nitro8307
✅ nuxt8307
✅ sveltekit8307
✅ vite8307
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable76014
✅ express-stable76014
✅ fastify-stable76014
✅ hono-stable76014
✅ nextjs-turbopack-canary63027
✅ nextjs-turbopack-stable8208
✅ nextjs-webpack-canary63027
✅ nextjs-webpack-stable8208
✅ nitro-stable76014
✅ nuxt-stable76014
✅ sveltekit-stable76014
✅ vite-stable76014
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable76014
✅ express-stable76014
✅ fastify-stable76014
✅ hono-stable76014
✅ nextjs-turbopack-canary63027
✅ nextjs-turbopack-stable8208
✅ nextjs-webpack-canary63027
✅ nextjs-webpack-stable8208
✅ nitro-stable76014
✅ nuxt-stable76014
✅ sveltekit-stable76014
✅ vite-stable76014
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable76014
✅ express-stable76014
✅ fastify-stable76014
✅ hono-stable76014
✅ nextjs-turbopack-canary63027
✅ nextjs-turbopack-stable8208
✅ nextjs-webpack-canary63027
✅ nextjs-webpack-stable8208
✅ nitro-stable76014
✅ nuxt-stable76014
✅ sveltekit-stable76014
✅ vite-stable76014
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack8208
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev600
❌ mongodb5678
✅ redis-dev600
❌ redis5678
✅ turso-dev600
❌ turso3608
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable76014
✅ e2e-local-postgres-nest-stable76014
✅ e2e-local-prod-nest-stable76014

📋 View full workflow run

@changeset-bot

changeset-botBot commented Apr 9, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: dfe6ba8

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

This PR includes changesets to release 16 packages
NameType
@workflow/coreMinor
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
workflowMinor
@workflow/world-testingPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch
@workflow/aiMajor

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

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

Adds first-class serialization support for workflow function references (functions tagged with .workflowId) so they can cross the step serialization boundary and be rendered nicely in observability tooling.

Changes:

  • Extend core serialization reducers/revivers with a WorkflowFunction special type that reduces workflow function refs to { workflowId }.
  • Add tests covering workflow function ref serialization behavior across step return values and step arguments.
  • Add an observability reviver rendering workflow function refs as <workflow:workflowId> and ship a minor changeset.

Reviewed changes

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

FileDescription
packages/core/src/serialization.tsAdds WorkflowFunction to special-type serialization and revives it to { workflowId } across external/workflow/step contexts.
packages/core/src/serialization.test.tsAdds unit tests for WorkflowFunction reducer/reviver behavior and boundary roundtrips.
packages/core/src/serialization-format.tsAdds o11y rendering of WorkflowFunction values as <workflow:...>.
.changeset/workflow-function-serialization.mdDeclares a minor release for the new serialization capability.

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

Comment on lines +656 to +658
WorkflowFunction: {
workflowId: string;
};

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.

SerializableSpecial was extended with WorkflowFunction, but the public Serializable union in packages/core/src/schemas.ts was not updated accordingly (see the note above this interface). This can cause TypeScript to still reject workflow function references in places typed as Serializable (e.g., step args), even though runtime serialization now supports them. Please update Serializable to explicitly include the workflow function reference shape you intend to support (and/or a dedicated workflow-metadata type), so the type-level contract matches the runtime 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.

Good point. The Serializable union in schemas.ts is primarily for type-level validation of step arguments. Since workflow function references are typically passed as the first arg to start() (which has its own overloaded type signature accepting WorkflowFunction | WorkflowMetadata), they don't flow through the generic Serializable type path. If we find cases where this causes type errors, we can add it then.

// A function without workflowId or stepId cannot be serialized
await expect(
dehydrateStepReturnValue(plainFn, 'wrun_test', undefined)
).rejects.toThrow('serialization');

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 assertion .rejects.toThrow('serialization') is unlikely to match the actual error message thrown by dehydrateStepReturnValue(), which is formatted as "Failed to serialize …" (and does not necessarily contain the substring "serialization"). This test may be flaky or fail consistently depending on the underlying error. Prefer matching on the stable prefix/message produced by formatSerializationError (e.g., "Failed to serialize") or use a regex that matches the expected error text.

Suggested change
).rejects.toThrow('serialization');
).rejects.toThrow('Failed to serialize');

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. Changed to .rejects.toThrow('Failed to serialize') which matches the stable prefix from formatSerializationError.

Comment on lines 375 to +377
StepFunction: serializedStepFunctionToString,
WorkflowFunction: (value: { workflowId: string }) =>
`<workflow:${value.workflowId}>`,

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.

observabilityRevivers gained a WorkflowFunction renderer, but serialization-format.test.ts has coverage for the other built-in display revivers (ReadableStream, StepFunction, Instance, Class) and currently none for WorkflowFunction. Please add a focused test that verifies { workflowId: "..." } renders as <workflow:...> so this o11y output remains stable.

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.

Added. New test in serialization-format.test.ts verifies observabilityRevivers.WorkflowFunction({ workflowId: '...' }) renders as <workflow:...>.

@TooTallNate
TooTallNate merged commit 9513a81 into mainApr 10, 2026
160 of 169 checks passed
@TooTallNate
TooTallNate deleted the fix/workflow-function-serialization branch April 10, 2026 06:04
@ghostghost mentioned this pull request Apr 10, 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)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })(); feat(core): add serialization support for workflow function references by TooTallNate · Pull Request #1677 · vercel/workflow · GitHub
Skip to content

feat(core): add serialization support for workflow function references - #1677

Merged
TooTallNate merged 2 commits into
mainfrom
fix/workflow-function-serialization
Apr 10, 2026
Merged

feat(core): add serialization support for workflow function references#1677
TooTallNate merged 2 commits into
mainfrom
fix/workflow-function-serialization

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Apr 9, 2026

Copy link
Copy Markdown
Member

Summary

Add a WorkflowFunction reducer/reviver pair to the serialization system so that workflow function references (functions with a .workflowId property, as produced by the SWC compiler) can cross the step serialization boundary.

This is a prerequisite for allowing start() to be called directly from workflow functions with "use step" — the workflow function reference passed as the first argument needs to be serializable.

How it works

Reducer: Detects functions with a .workflowId string property, serializes as { workflowId }. Only matches functions (not plain objects) to prevent infinite recursion since the reduced form is a plain object.

Revivers: All contexts (step, workflow, external) deserialize as a function with .workflowId that throws "Workflow functions cannot be called directly. Use start() to invoke them." on direct invocation. This is sufficient because start() only reads .workflowId from the reference.

Observability: Renders as <workflow:workflowId> in the o11y UI.

Note on workflow context hydration

It is recognized that the workflow context reviver should ideally return the proper registered function reference (since the SWC compiler registers workflow functions in the VM). However, since this PR is primarily for the start() as a step use-case — where the deserialized reference is only passed to start() which reads .workflowId — returning a throwing wrapper is sufficient. Full workflow function registry hydration can be revisited in the future when there is a concrete use case requiring the actual function reference in workflow context.

Example

// In user code (workflow context):constchildRun=awaitstart(myChildWorkflow,[42]);// ^^^^^^^^^^^^^^^^// This is a function with .workflowId attached by SWC.// The WorkflowFunction reducer serializes it as { workflowId: "..." }// so it can cross the step boundary as an argument to start().

CopilotAI review requested due to automatic review settings April 9, 2026 22:53
@TooTallNate
TooTallNate requested a review from a team as a code ownerApril 9, 2026 22:53
@vercel

vercelBot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Apr 9, 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.035s (-5.9% 🟢)1.005s (~)0.970s101.00x
🐘 PostgresNitro0.056s (-11.4% 🟢)1.010s (~)0.954s101.60x
🐘 PostgresExpress0.061s (-8.6% 🟢)1.010s (~)0.949s101.74x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.234s (-3.4%)2.116s (~)1.883s101.00x
▲ VercelNext.js (Turbopack)0.286s (-35.5% 🟢)2.053s (-7.6% 🟢)1.766s101.23x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.099s (~)2.006s (~)0.906s101.00x
🐘 PostgresNitro1.139s (-1.0%)2.010s (~)0.870s101.04x
🐘 PostgresExpress1.147s (~)2.009s (~)0.861s101.04x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.807s (-12.7% 🟢)4.016s (+8.7% 🔺)2.208s101.00x
▲ VercelExpress1.949s (+4.2%)4.112s (+7.0% 🔺)2.163s101.08x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.673s (~)11.023s (~)0.349s31.00x
🐘 PostgresExpress10.858s (~)11.022s (~)0.163s31.02x
🐘 PostgresNitro10.884s (~)11.353s (+3.0%)0.468s31.02x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.963s (+1.3%)18.921s (+1.0%)1.958s21.00x
▲ VercelNext.js (Turbopack)17.475s (-1.6%)19.672s (+3.8%)2.197s21.03x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro14.241s (~)15.028s (~)0.787s41.00x
🐘 PostgresNitro14.474s (~)15.020s (~)0.546s41.02x
🐘 PostgresExpress14.476s (-0.6%)15.021s (~)0.545s41.02x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)31.526s (-7.1% 🟢)33.030s (-8.2% 🟢)1.504s21.00x
▲ VercelExpress31.686s (+5.1% 🔺)33.518s (+3.9%)1.833s21.01x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express13.811s (-2.0%)14.020s (-4.9%)0.209s71.00x
🐘 PostgresNitro13.921s (~)14.305s (+2.0%)0.384s71.01x
💻 LocalNitro14.873s (~)15.028s (~)0.156s61.08x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express50.353s (-4.2%)52.735s (-3.7%)2.382s21.00x
▲ VercelNext.js (Turbopack)54.849s (~)57.326s (+0.5%)2.478s21.09x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.262s (~)2.010s (~)0.747s151.00x
🐘 PostgresExpress1.277s (~)2.009s (~)0.732s151.01x
💻 LocalNitro1.457s (-2.5%)2.005s (~)0.548s151.15x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.308s (-2.7%)4.131s (~)1.823s81.00x
▲ VercelNext.js (Turbopack)2.639s (+11.1% 🔺)4.558s (+17.8% 🔺)1.919s71.14x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.330s (-1.2%)3.009s (~)0.680s101.00x
🐘 PostgresExpress2.335s (~)3.011s (~)0.676s101.00x
💻 LocalNitro2.665s (-2.3%)3.008s (-6.3% 🟢)0.343s101.14x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.624s (-0.9%)4.357s (+6.3% 🔺)1.733s81.00x
▲ VercelNext.js (Turbopack)2.655s (-12.2% 🟢)4.643s (+5.4% 🔺)1.988s71.01x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.459s (-1.3%)4.010s (~)0.552s81.00x
🐘 PostgresExpress3.471s (-0.9%)4.010s (~)0.538s81.00x
💻 LocalNitro7.084s (-8.5% 🟢)8.018s (-5.9% 🟢)0.934s42.05x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.181s (+7.9% 🔺)5.001s (+6.1% 🔺)1.820s61.00x
▲ VercelNext.js (Turbopack)3.623s (+19.3% 🔺)5.334s (+15.8% 🔺)1.710s61.14x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.250s (-0.6%)2.008s (~)0.757s151.00x
🐘 PostgresExpress1.262s (-2.6%)2.007s (~)0.746s151.01x
💻 LocalNitro1.482s (-1.5%)2.006s (~)0.524s151.19x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.273s (+18.1% 🔺)4.166s (+12.2% 🔺)1.893s81.00x
▲ VercelNext.js (Turbopack)2.799s (+29.2% 🔺)4.577s (+27.8% 🔺)1.778s71.23x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.306s (-3.1%)3.008s (~)0.702s101.00x
🐘 PostgresNitro2.335s (~)3.010s (~)0.674s101.01x
💻 LocalNitro2.789s (-20.2% 🟢)3.108s (-22.5% 🟢)0.319s101.21x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.975s (+20.0% 🔺)4.663s (+20.5% 🔺)1.688s71.00x
▲ VercelExpress3.231s (+23.3% 🔺)5.069s (+14.9% 🔺)1.838s61.09x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.454s (~)4.008s (~)0.554s81.00x
🐘 PostgresExpress3.477s (~)4.009s (~)0.532s81.01x
💻 LocalNitro7.837s (-7.8% 🟢)8.268s (-8.4% 🟢)0.431s42.27x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.862s (-2.4%)4.776s (+13.3% 🔺)1.913s71.00x
▲ VercelNext.js (Turbopack)4.221s (+21.8% 🔺)6.242s (+29.6% 🔺)2.021s51.47x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.697s (-5.4% 🟢)1.004s (~)0.307s601.00x
🐘 PostgresNitro0.787s (-5.9% 🟢)1.005s (-1.7%)0.219s601.13x
🐘 PostgresExpress0.793s (-8.3% 🟢)1.006s (~)0.213s601.14x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)9.026s (+1.0%)11.073s (+3.9%)2.047s61.00x
▲ VercelExpress9.258s (+0.7%)11.630s (+5.9% 🔺)2.373s61.03x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.871s (-13.2% 🟢)2.052s (-31.1% 🟢)0.181s441.00x
🐘 PostgresNitro1.940s (~)2.283s (+8.7% 🔺)0.342s401.04x
💻 LocalNitro2.272s (-11.5% 🟢)3.007s (-5.4% 🟢)0.735s301.21x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express29.451s (+5.3% 🔺)31.651s (+5.7% 🔺)2.200s41.00x
▲ VercelNext.js (Turbopack)31.188s (+8.9% 🔺)33.320s (+9.8% 🔺)2.132s31.06x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.825s (-4.2%)4.043s (-5.9% 🟢)0.219s301.00x
🐘 PostgresExpress3.858s (-10.6% 🟢)4.110s (-18.0% 🟢)0.252s301.01x
💻 LocalNitro7.329s (-5.0%)8.015s (-2.4%)0.686s151.92x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express75.268s (-4.0%)77.094s (-3.9%)1.826s21.00x
▲ VercelNext.js (Turbopack)77.509s (+0.8%)79.286s (+0.7%)1.777s21.03x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.279s (-5.8% 🟢)1.006s (~)0.728s601.00x
🐘 PostgresNitro0.282s (~)1.006s (~)0.724s601.01x
💻 LocalNitro0.586s (-11.7% 🟢)1.004s (~)0.418s602.10x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)1.604s (+10.7% 🔺)3.360s (+11.7% 🔺)1.757s181.00x
▲ VercelExpress1.630s (+7.1% 🔺)3.360s (+8.5% 🔺)1.729s181.02x
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack) | Express

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.490s (~)1.006s (~)0.516s901.00x
🐘 PostgresExpress0.495s (-5.8% 🟢)1.007s (~)0.512s901.01x
💻 LocalNitro2.457s (-10.6% 🟢)3.008s (-5.5% 🟢)0.550s305.01x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.697s (-1.5%)4.606s (+5.9% 🔺)1.909s201.00x
▲ VercelNext.js (Turbopack)3.111s (-7.5% 🟢)5.125s (+6.2% 🔺)2.014s181.15x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.776s (-1.3%)1.007s (~)0.231s1201.00x
🐘 PostgresExpress0.794s (-5.6% 🟢)1.016s (~)0.222s1191.02x
💻 LocalNitro10.560s (-5.2% 🟢)11.023s (-7.0% 🟢)0.463s1113.61x
💻 LocalExpress⚠️missing----
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express8.362s (+22.2% 🔺)10.710s (+23.2% 🔺)2.348s121.00x
▲ VercelNext.js (Turbopack)309.221s (+4172.4% 🔺)311.025s (+3509.5% 🔺)1.804s136.98x
▲ VercelNitro⚠️missing----

🔍 Observability: Express | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.138s (-6.3% 🟢)1.004s (~)0.009s (+3.3%)1.015s (~)0.877s101.00x
🐘 PostgresNitro0.198s (-0.9%)0.995s (~)0.002s (+6.2% 🔺)1.009s (~)0.812s101.43x
🐘 PostgresExpress0.208s (-3.0%)0.995s (~)0.001s (-23.5% 🟢)1.010s (~)0.801s101.51x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.665s (+12.6% 🔺)3.034s (~)0.477s (+57.4% 🔺)4.039s (+7.3% 🔺)2.374s101.00x
▲ VercelNext.js (Turbopack)1.713s (+4.9%)2.960s (~)0.522s (+21.4% 🔺)3.943s (+4.1%)2.230s101.03x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.604s (-6.7% 🟢)1.005s (~)0.004s (-13.0% 🟢)1.022s (~)0.418s591.00x
🐘 PostgresNitro0.612s (+1.1%)1.023s (+2.1%)0.004s (~)1.039s (+1.8%)0.427s581.01x
💻 LocalNitro0.667s (+0.8%)1.011s (~)0.009s (-16.1% 🟢)1.114s (+8.6% 🔺)0.447s541.10x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.323s (+2.3%)6.220s (+6.3% 🔺)0.312s (+42.0% 🔺)7.042s (+8.5% 🔺)2.719s91.00x
▲ VercelNext.js (Turbopack)4.374s (+6.4% 🔺)6.022s (+7.9% 🔺)0.552s (-23.9% 🟢)7.017s (+5.0% 🔺)2.643s91.01x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.914s (-3.2%)1.104s (-3.7%)0.000s (-67.9% 🟢)1.118s (-3.8%)0.204s541.00x
🐘 PostgresExpress0.940s (-5.2% 🟢)1.103s (-17.4% 🟢)0.000s (+22.2% 🔺)1.119s (-18.3% 🟢)0.179s541.03x
💻 LocalNitro1.160s (-12.5% 🟢)2.018s (~)0.000s (-64.7% 🟢)2.020s (~)0.860s301.27x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.869s (+8.5% 🔺)4.117s (+10.9% 🔺)0.000s (+60.7% 🔺)4.607s (+11.2% 🔺)1.738s141.00x
▲ VercelNext.js (Turbopack)3.180s (-2.2%)4.680s (+6.7% 🔺)0.000s (-63.9% 🟢)5.177s (+8.5% 🔺)1.996s121.11x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.710s (-4.3%)2.139s (~)0.000s (NaN%)2.152s (~)0.442s281.00x
🐘 PostgresNitro1.780s (~)2.129s (+1.5%)0.000s (-100.0% 🟢)2.199s (+4.1%)0.418s291.04x
💻 LocalNitro3.348s (-15.1% 🟢)4.029s (-11.1% 🟢)0.000s (-68.2% 🟢)4.032s (-11.1% 🟢)0.684s161.96x
💻 LocalExpress⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.127s (+21.6% 🔺)5.611s (+15.6% 🔺)0.000s (-100.0% 🟢)6.079s (+14.4% 🔺)1.952s101.00x
▲ VercelNext.js (Turbopack)4.514s (+3.8%)5.868s (+5.2% 🔺)0.000s (-63.3% 🟢)6.337s (+6.0% 🔺)1.823s101.09x
▲ VercelNitro⚠️missing-----

🔍 Observability: Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro21/21
🐘 PostgresNitro14/21
▲ VercelExpress16/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres19/21
Next.js (Turbopack)▲ Vercel21/21
Nitro🐘 Postgres15/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


Some benchmark jobs failed:

  • Local: cancelled
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

@github-actions

github-actionsBot commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production923067990
✅ 💻 Local Development89801821080
✅ 📦 Local Production89801821080
✅ 🐘 Local Postgres89801821080
✅ 🪟 Windows820890
❌ 🌍 Community Worlds1337424231
✅ 📋 Other228042270
Total4060746874821

❌ Failed Tests

🌍 Community Worlds (74 failed)

mongodb (7 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNTAQDJDBSHTG1MWKF5KQBC5
  • webhookWorkflow | wrun_01KNTAQP2B6QNFW4V5CC2P3NZ1
  • fetchWorkflow | wrun_01KNTAV423VWE5AF0N1NWNCQ9T
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNTAYYWMXFXFVJ33YZ9V6ASZ
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNTB557DNYXNH4EV8TP26TD9

redis (7 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNTAQDJDBSHTG1MWKF5KQBC5
  • webhookWorkflow | wrun_01KNTAQP2B6QNFW4V5CC2P3NZ1
  • fetchWorkflow | wrun_01KNTAV423VWE5AF0N1NWNCQ9T
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNTAYYWMXFXFVJ33YZ9V6ASZ
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNTB557DNYXNH4EV8TP26TD9

turso (60 failed):

  • addTenWorkflow | wrun_01KNTAP9AVRTGK03SM69S63608
  • addTenWorkflow | wrun_01KNTAP9AVRTGK03SM69S63608
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KNTAQDKF2QVPYWGFH6W47PC9
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KNTAPGX7BKKR4ZRE58D7ZHH7
  • promiseRaceWorkflow | wrun_01KNTAPP407KBZNC5D2E7ZN7HT
  • promiseAnyWorkflow | wrun_01KNTAPQZ70DGD6CC21VAF8J21
  • importedStepOnlyWorkflow | wrun_01KNTAQT6HJ36G1K7T8WJB0J9S
  • hookWorkflow | wrun_01KNTAQ3D3TSW5YZRSJFXFR53D
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNTAQDJDBSHTG1MWKF5KQBC5
  • webhookWorkflow | wrun_01KNTAQP2B6QNFW4V5CC2P3NZ1
  • sleepingWorkflow | wrun_01KNTAQVQM7GW6GXQRDJFA1V3C
  • parallelSleepWorkflow | wrun_01KNTAR7NBH7YK2PSVB16SHS3Y
  • nullByteWorkflow | wrun_01KNTARC0FHC9PZ380HNHXCE3Q
  • workflowAndStepMetadataWorkflow | wrun_01KNTARDY46ZFS3910Z5TS8GM9
  • fetchWorkflow | wrun_01KNTAV423VWE5AF0N1NWNCQ9T
  • promiseRaceStressTestWorkflow | wrun_01KNTAV6CBHN7Y62R93F05FJBT
  • 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_01KNTAYC4A0HMMJ82ZAS5XHYB3
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNTAYYWMXFXFVJ33YZ9V6ASZ
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KNTAZJEVBF2HY6T73YPG2SDG
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KNTB05TEV77Z954JTQPRXCX6
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KNTB0DPKSYDHGAPJXNE6EQJJ
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KNTB0KQD8CZNSQKSNCG31HAY
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KNTB0NJRSSKBJFGDY5R3EMTG
  • runClassSerializationWorkflow - Run instances serialize across workflow/step boundaries | wrun_01KNTB0ZTHFAGXWNH9HTW4NVEN
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KNTB1DNEDKFTTXW4XT0S3QN9
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KNTB1JSSZ6Q07R4CGC7B6CS5
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KNTB1RMRHJTM9B024NEKC02R
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KNTB1YQZHV70B0TM63DE4A6J
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KNTB24NMAXHG41V7MZSRCHRZ
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KNTB2AP9VTJ7DHYEG7YSE72Q
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KNTB2GX4GDYF8R5ZESZN0EN4
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KNTB2TR3HNFKBG0RRDT44C8S
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KNTB32JA4CEPPH6MP7NF7BXW
  • cancelRun - cancelling a running workflow | wrun_01KNTB38B962CGE4Q7QRXWDP17
  • cancelRun via CLI - cancelling a running workflow | wrun_01KNTB3GWFDJBCJPNZXTX2QSZC
  • 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_01KNTB3VWCNC123S1VJDNX8JS6
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KNTB4FHKX1YRHE30BY5MHTZZ
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KNTB4T9B5T9B4RQ3CCPBBYB2
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KNTB504C25ET83GJT6S58G19
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KNTB52Y4HTXATE6XC7V3EX1D
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNTB557DNYXNH4EV8TP26TD9
  • getterStepWorkflow - getter functions with "use step" directive | wrun_01KNTB5855A2TQ9CJHJZ3H2DFP

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro8307
✅ example8307
✅ express8307
✅ fastify8307
✅ hono8307
✅ nextjs-turbopack8802
✅ nextjs-webpack8802
✅ nitro8307
✅ nuxt8307
✅ sveltekit8307
✅ vite8307
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable76014
✅ express-stable76014
✅ fastify-stable76014
✅ hono-stable76014
✅ nextjs-turbopack-canary63027
✅ nextjs-turbopack-stable8208
✅ nextjs-webpack-canary63027
✅ nextjs-webpack-stable8208
✅ nitro-stable76014
✅ nuxt-stable76014
✅ sveltekit-stable76014
✅ vite-stable76014
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable76014
✅ express-stable76014
✅ fastify-stable76014
✅ hono-stable76014
✅ nextjs-turbopack-canary63027
✅ nextjs-turbopack-stable8208
✅ nextjs-webpack-canary63027
✅ nextjs-webpack-stable8208
✅ nitro-stable76014
✅ nuxt-stable76014
✅ sveltekit-stable76014
✅ vite-stable76014
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable76014
✅ express-stable76014
✅ fastify-stable76014
✅ hono-stable76014
✅ nextjs-turbopack-canary63027
✅ nextjs-turbopack-stable8208
✅ nextjs-webpack-canary63027
✅ nextjs-webpack-stable8208
✅ nitro-stable76014
✅ nuxt-stable76014
✅ sveltekit-stable76014
✅ vite-stable76014
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack8208
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev600
❌ mongodb5678
✅ redis-dev600
❌ redis5678
✅ turso-dev600
❌ turso3608
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable76014
✅ e2e-local-postgres-nest-stable76014
✅ e2e-local-prod-nest-stable76014

📋 View full workflow run

@changeset-bot

changeset-botBot commented Apr 9, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: dfe6ba8

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

This PR includes changesets to release 16 packages
NameType
@workflow/coreMinor
@workflow/buildersPatch
@workflow/cliPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
workflowMinor
@workflow/world-testingPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch
@workflow/aiMajor

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

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

Adds first-class serialization support for workflow function references (functions tagged with .workflowId) so they can cross the step serialization boundary and be rendered nicely in observability tooling.

Changes:

  • Extend core serialization reducers/revivers with a WorkflowFunction special type that reduces workflow function refs to { workflowId }.
  • Add tests covering workflow function ref serialization behavior across step return values and step arguments.
  • Add an observability reviver rendering workflow function refs as <workflow:workflowId> and ship a minor changeset.

Reviewed changes

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

FileDescription
packages/core/src/serialization.tsAdds WorkflowFunction to special-type serialization and revives it to { workflowId } across external/workflow/step contexts.
packages/core/src/serialization.test.tsAdds unit tests for WorkflowFunction reducer/reviver behavior and boundary roundtrips.
packages/core/src/serialization-format.tsAdds o11y rendering of WorkflowFunction values as <workflow:...>.
.changeset/workflow-function-serialization.mdDeclares a minor release for the new serialization capability.

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

Comment on lines +656 to +658
WorkflowFunction: {
workflowId: string;
};

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.

SerializableSpecial was extended with WorkflowFunction, but the public Serializable union in packages/core/src/schemas.ts was not updated accordingly (see the note above this interface). This can cause TypeScript to still reject workflow function references in places typed as Serializable (e.g., step args), even though runtime serialization now supports them. Please update Serializable to explicitly include the workflow function reference shape you intend to support (and/or a dedicated workflow-metadata type), so the type-level contract matches the runtime 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.

Good point. The Serializable union in schemas.ts is primarily for type-level validation of step arguments. Since workflow function references are typically passed as the first arg to start() (which has its own overloaded type signature accepting WorkflowFunction | WorkflowMetadata), they don't flow through the generic Serializable type path. If we find cases where this causes type errors, we can add it then.

// A function without workflowId or stepId cannot be serialized
await expect(
dehydrateStepReturnValue(plainFn, 'wrun_test', undefined)
).rejects.toThrow('serialization');

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 assertion .rejects.toThrow('serialization') is unlikely to match the actual error message thrown by dehydrateStepReturnValue(), which is formatted as "Failed to serialize …" (and does not necessarily contain the substring "serialization"). This test may be flaky or fail consistently depending on the underlying error. Prefer matching on the stable prefix/message produced by formatSerializationError (e.g., "Failed to serialize") or use a regex that matches the expected error text.

Suggested change
).rejects.toThrow('serialization');
).rejects.toThrow('Failed to serialize');

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. Changed to .rejects.toThrow('Failed to serialize') which matches the stable prefix from formatSerializationError.

Comment on lines 375 to +377
StepFunction: serializedStepFunctionToString,
WorkflowFunction: (value: { workflowId: string }) =>
`<workflow:${value.workflowId}>`,

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.

observabilityRevivers gained a WorkflowFunction renderer, but serialization-format.test.ts has coverage for the other built-in display revivers (ReadableStream, StepFunction, Instance, Class) and currently none for WorkflowFunction. Please add a focused test that verifies { workflowId: "..." } renders as <workflow:...> so this o11y output remains stable.

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.

Added. New test in serialization-format.test.ts verifies observabilityRevivers.WorkflowFunction({ workflowId: '...' }) renders as <workflow:...>.

@TooTallNate
TooTallNate merged commit 9513a81 into mainApr 10, 2026
160 of 169 checks passed
@TooTallNate
TooTallNate deleted the fix/workflow-function-serialization branch April 10, 2026 06:04
@ghostghost mentioned this pull request Apr 10, 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