Skip to content

[world] Restructure stream interface, require run ID for all step and stream operations#1293

Merged
VaguelySerious merged 19 commits into
mainfrom
peter/step-optional
Apr 9, 2026
Merged

[world] Restructure stream interface, require run ID for all step and stream operations#1293
VaguelySerious merged 19 commits into
mainfrom
peter/step-optional

Conversation

@VaguelySerious
Copy link
Copy Markdown
Member

@VaguelySerious VaguelySerious commented Mar 7, 2026

No description provided.

Signed-off-by: Peter Wielander <mittgfu@gmail.com>
… operations in namespace

Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 7, 2026

🦋 Changeset detected

Latest commit: 2c89b17

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

This PR includes changesets to release 21 packages
Name Type
@workflow/world Major
@workflow/world-local Major
@workflow/world-vercel Major
@workflow/world-postgres Major
@workflow/core Major
@workflow/cli Major
@workflow/web Major
@workflow/vitest Patch
@workflow/web-shared Patch
@workflow/world-testing Patch
@workflow/builders Patch
@workflow/next Patch
@workflow/nitro Patch
workflow Major
@workflow/astro Patch
@workflow/nest Patch
@workflow/rollup Patch
@workflow/sveltekit Patch
@workflow/vite Patch
@workflow/nuxt Patch
@workflow/ai Major

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

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

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Mar 7, 2026

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

Project Deployment Actions Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview, Comment Apr 8, 2026 8:41pm
example-nextjs-workflow-webpack Ready Ready Preview, Comment Apr 8, 2026 8:41pm
example-workflow Ready Ready Preview, Comment Apr 8, 2026 8:41pm
workbench-astro-workflow Ready Ready Preview, Comment Apr 8, 2026 8:41pm
workbench-express-workflow Ready Ready Preview, Comment Apr 8, 2026 8:41pm
workbench-fastify-workflow Ready Ready Preview, Comment Apr 8, 2026 8:41pm
workbench-hono-workflow Ready Ready Preview, Comment Apr 8, 2026 8:41pm
workbench-nitro-workflow Ready Ready Preview, Comment Apr 8, 2026 8:41pm
workbench-nuxt-workflow Ready Ready Preview, Comment Apr 8, 2026 8:41pm
workbench-sveltekit-workflow Ready Ready Preview, Comment Apr 8, 2026 8:41pm
workbench-vite-workflow Ready Ready Preview, Comment Apr 8, 2026 8:41pm
workflow-docs Ready Ready Preview, Comment, Open in v0 Apr 8, 2026 8:41pm
workflow-nest Ready Ready Preview, Comment Apr 8, 2026 8:41pm
workflow-swc-playground Ready Ready Preview, Comment Apr 8, 2026 8:41pm

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 7, 2026

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 0.040s (-6.9% 🟢) 1.005s (~) 0.965s 10 1.00x
💻 Local Express 0.045s (+3.4%) 1.006s (~) 0.961s 10 1.11x
🐘 Postgres Express 0.055s (-5.5% 🟢) 1.010s (~) 0.955s 10 1.37x
🐘 Postgres Next.js (Turbopack) 0.057s 1.010s 0.953s 10 1.40x
🐘 Postgres Nitro 0.058s (-7.5% 🟢) 1.011s (~) 0.953s 10 1.44x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 0.281s (+20.6% 🔺) 2.095s (~) 1.814s 10 1.00x
▲ Vercel Next.js (Turbopack) 0.287s (+24.9% 🔺) 2.314s (+2.1%) 2.027s 10 1.02x
▲ Vercel Express ⚠️ missing - - - -

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 1.129s (~) 2.007s (~) 0.878s 10 1.00x
🐘 Postgres Next.js (Turbopack) 1.133s 2.009s 0.876s 10 1.00x
💻 Local Express 1.137s (+1.0%) 2.006s (~) 0.869s 10 1.01x
🐘 Postgres Express 1.145s (~) 2.009s (~) 0.863s 10 1.01x
🐘 Postgres Nitro 1.148s (~) 2.009s (~) 0.861s 10 1.02x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 1.978s (+3.8%) 3.763s (~) 1.785s 10 1.00x
▲ Vercel Next.js (Turbopack) 2.055s (~) 3.699s (-3.2%) 1.644s 10 1.04x
▲ Vercel Express ⚠️ missing - - - -

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 10.859s (~) 11.019s (~) 0.160s 3 1.00x
🐘 Postgres Next.js (Turbopack) 10.866s 11.020s 0.153s 3 1.00x
💻 Local Nitro 10.909s (~) 11.022s (~) 0.113s 3 1.00x
🐘 Postgres Nitro 10.925s (~) 11.023s (~) 0.098s 3 1.01x
💻 Local Express 10.975s (~) 11.024s (~) 0.049s 3 1.01x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 16.913s (-1.2%) 18.889s (-4.3%) 1.975s 2 1.00x
▲ Vercel Next.js (Turbopack) 16.995s (-1.3%) 18.629s (-4.1%) 1.634s 2 1.00x
▲ Vercel Express ⚠️ missing - - - -

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 14.449s 15.023s 0.574s 4 1.00x
🐘 Postgres Nitro 14.547s (~) 15.026s (~) 0.478s 4 1.01x
🐘 Postgres Express 14.659s (+0.7%) 15.023s (~) 0.364s 4 1.01x
💻 Local Nitro 14.944s (~) 15.027s (~) 0.083s 4 1.03x
💻 Local Express 15.131s (+1.4%) 16.031s (+6.7% 🔺) 0.901s 4 1.05x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 32.950s (-2.6%) 35.650s (-0.6%) 2.700s 2 1.00x
▲ Vercel Nitro 339.104s (+928.6% 🔺) 341.172s (+877.4% 🔺) 2.068s 1 10.29x
▲ Vercel Express ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 50 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 13.803s 14.019s 0.216s 7 1.00x
🐘 Postgres Express 13.829s (-2.4%) 14.160s (-5.7% 🟢) 0.332s 7 1.00x
🐘 Postgres Nitro 14.066s (~) 14.738s (~) 0.672s 7 1.02x
💻 Local Nitro 16.446s (-0.7%) 17.028s (~) 0.582s 6 1.19x
💻 Local Express 17.102s (+4.4%) 17.701s (+3.9%) 0.599s 6 1.24x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 52.861s (-74.5% 🟢) 55.213s (-73.6% 🟢) 2.352s 2 1.00x
▲ Vercel Next.js (Turbopack) 55.475s (-8.5% 🟢) 57.663s (-7.8% 🟢) 2.188s 2 1.05x
▲ Vercel Express ⚠️ missing - - - -

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 1.228s 2.010s 0.782s 15 1.00x
🐘 Postgres Nitro 1.253s (-2.9%) 2.010s (~) 0.757s 15 1.02x
🐘 Postgres Express 1.267s (+0.5%) 2.010s (~) 0.743s 15 1.03x
💻 Local Nitro 1.496s (-2.7%) 2.006s (~) 0.510s 15 1.22x
💻 Local Express 1.608s (+7.3% 🔺) 2.006s (~) 0.398s 15 1.31x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 2.271s (-7.6% 🟢) 3.680s (-18.8% 🟢) 1.409s 9 1.00x
▲ Vercel Nitro 2.292s (-12.1% 🟢) 4.137s (-4.4%) 1.845s 8 1.01x
▲ Vercel Express ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 2.332s (-2.0%) 3.009s (~) 0.677s 10 1.00x
🐘 Postgres Nitro 2.348s (~) 3.010s (~) 0.662s 10 1.01x
🐘 Postgres Next.js (Turbopack) 2.412s 3.010s 0.598s 10 1.03x
💻 Local Nitro 2.878s (-1.7%) 3.108s (~) 0.230s 10 1.23x
💻 Local Express 3.046s (+7.8% 🔺) 3.885s (+25.0% 🔺) 0.839s 8 1.31x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.511s (-26.8% 🟢) 4.415s (-12.3% 🟢) 1.904s 7 1.00x
▲ Vercel Next.js (Turbopack) 2.646s (-6.9% 🟢) 4.346s (-9.2% 🟢) 1.700s 7 1.05x
▲ Vercel Express ⚠️ missing - - - -

🔍 Observability: Nitro | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 3.467s (~) 4.009s (~) 0.543s 8 1.00x
🐘 Postgres Nitro 3.492s (+0.8%) 4.012s (~) 0.520s 8 1.01x
🐘 Postgres Next.js (Turbopack) 3.674s 4.010s 0.336s 8 1.06x
💻 Local Nitro 8.039s (-1.7%) 8.521s (-5.6% 🟢) 0.482s 4 2.32x
💻 Local Express 8.656s (+13.7% 🔺) 9.024s (+9.1% 🔺) 0.368s 4 2.50x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 3.842s (-5.5% 🟢) 5.507s (-12.3% 🟢) 1.666s 6 1.00x
▲ Vercel Nitro 155.663s (+4649.4% 🔺) 157.742s (+3109.0% 🔺) 2.078s 2 40.52x
▲ Vercel Express ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 1.223s 2.009s 0.785s 15 1.00x
🐘 Postgres Express 1.253s (-0.9%) 2.008s (~) 0.755s 15 1.02x
🐘 Postgres Nitro 1.268s (+0.8%) 2.009s (~) 0.741s 15 1.04x
💻 Local Nitro 1.541s (+0.7%) 2.006s (~) 0.465s 15 1.26x
💻 Local Express 1.594s (+5.8% 🔺) 2.006s (~) 0.412s 15 1.30x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 1.964s (-16.1% 🟢) 3.636s (-12.9% 🟢) 1.672s 9 1.00x
▲ Vercel Nitro 2.467s (+7.5% 🔺) 4.354s (+10.1% 🔺) 1.887s 8 1.26x
▲ Vercel Express ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.race with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 2.329s (-1.0%) 3.010s (~) 0.681s 10 1.00x
🐘 Postgres Nitro 2.350s (-1.0%) 3.010s (~) 0.659s 10 1.01x
🐘 Postgres Next.js (Turbopack) 2.394s 3.009s 0.616s 10 1.03x
💻 Local Nitro 2.857s (-7.8% 🟢) 3.209s (-17.4% 🟢) 0.352s 10 1.23x
💻 Local Express 3.194s (+11.7% 🔺) 4.010s (+33.3% 🔺) 0.816s 8 1.37x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 2.606s (-7.9% 🟢) 4.283s (-9.8% 🟢) 1.678s 8 1.00x
▲ Vercel Nitro 3.889s (-98.7% 🟢) 5.480s (-98.2% 🟢) 1.591s 6 1.49x
▲ Vercel Express ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack) | Nitro

Promise.race with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 3.478s (~) 4.011s (~) 0.533s 8 1.00x
🐘 Postgres Nitro 3.489s (+1.0%) 4.013s (~) 0.524s 8 1.00x
🐘 Postgres Next.js (Turbopack) 3.651s 4.010s 0.360s 8 1.05x
💻 Local Nitro 8.618s (-3.9%) 9.022s (-2.7%) 0.404s 4 2.48x
💻 Local Express 8.937s (+11.4% 🔺) 9.526s (+8.6% 🔺) 0.589s 4 2.57x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 3.689s (+2.7%) 5.345s (~) 1.656s 6 1.00x
▲ Vercel Nitro 3.697s (+23.2% 🔺) 5.294s (+13.0% 🔺) 1.597s 6 1.00x
▲ Vercel Express ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 0.792s 1.041s 0.249s 58 1.00x
🐘 Postgres Express 0.817s (-4.2%) 1.006s (~) 0.189s 60 1.03x
🐘 Postgres Nitro 0.825s (~) 1.006s (~) 0.181s 60 1.04x
💻 Local Nitro 0.970s (-1.5%) 1.076s (-8.9% 🟢) 0.105s 56 1.23x
💻 Local Express 0.993s (-2.8%) 1.369s (-11.3% 🟢) 0.376s 44 1.25x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 9.277s (-10.3% 🟢) 11.204s (-10.1% 🟢) 1.926s 6 1.00x
▲ Vercel Nitro 10.310s (+13.3% 🔺) 12.229s (+9.4% 🔺) 1.919s 5 1.11x
▲ Vercel Express ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.921s (-6.6% 🟢) 2.029s (-29.6% 🟢) 0.109s 45 1.00x
🐘 Postgres Next.js (Turbopack) 1.931s 2.124s 0.193s 43 1.01x
🐘 Postgres Nitro 1.991s (+1.0%) 2.375s (+6.7% 🔺) 0.385s 38 1.04x
💻 Local Express 3.056s (~) 3.885s (+6.5% 🔺) 0.829s 24 1.59x
💻 Local Nitro 3.174s (+5.7% 🔺) 3.453s (-2.6%) 0.279s 27 1.65x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 29.015s (~) 30.850s (+0.6%) 1.835s 3 1.00x
▲ Vercel Next.js (Turbopack) 183.054s (+494.3% 🔺) 185.132s (+462.8% 🔺) 2.077s 2 6.31x
▲ Vercel Express ⚠️ missing - - - -

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 3.900s (-4.3%) 4.110s (-14.6% 🟢) 0.211s 30 1.00x
🐘 Postgres Next.js (Turbopack) 3.937s 4.217s 0.280s 29 1.01x
🐘 Postgres Nitro 4.069s (-1.7%) 4.742s (-3.1%) 0.673s 26 1.04x
💻 Local Nitro 9.115s (-0.8%) 9.788s (-1.5%) 0.672s 13 2.34x
💻 Local Express 9.303s (+4.0%) 10.018s (+6.5% 🔺) 0.716s 12 2.39x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 72.492s (-0.8%) 74.892s (~) 2.400s 2 1.00x
▲ Vercel Next.js (Turbopack) 85.933s (+3.0%) 87.658s (+2.6%) 1.725s 2 1.19x
▲ Vercel Express ⚠️ missing - - - -

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 0.248s 1.007s 0.760s 60 1.00x
🐘 Postgres Express 0.277s (-0.8%) 1.006s (~) 0.729s 60 1.12x
🐘 Postgres Nitro 0.287s (~) 1.007s (~) 0.720s 60 1.16x
💻 Local Nitro 0.567s (-4.6%) 1.004s (~) 0.438s 60 2.29x
💻 Local Express 0.604s (+2.4%) 1.005s (~) 0.400s 60 2.44x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 1.583s (-11.9% 🟢) 3.048s (-14.4% 🟢) 1.465s 20 1.00x
▲ Vercel Next.js (Turbopack) 1.899s (+14.3% 🔺) 3.671s (+13.5% 🔺) 1.772s 17 1.20x
▲ Vercel Express ⚠️ missing - - - -

🔍 Observability: Nitro | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 0.484s (-2.2%) 1.006s (~) 0.522s 90 1.00x
🐘 Postgres Next.js (Turbopack) 0.489s 1.007s 0.518s 90 1.01x
🐘 Postgres Nitro 0.501s (~) 1.007s (~) 0.506s 90 1.04x
💻 Local Nitro 2.534s (-1.1%) 3.009s (~) 0.475s 30 5.24x
💻 Local Express 2.563s (+4.8%) 3.009s (~) 0.446s 30 5.30x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 3.239s (-8.7% 🟢) 4.803s (-6.7% 🟢) 1.564s 19 1.00x
▲ Vercel Nitro 3.531s (+42.4% 🔺) 5.246s (+25.7% 🔺) 1.715s 18 1.09x
▲ Vercel Express ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack) | Nitro

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 0.774s (-2.0%) 1.007s (~) 0.233s 120 1.00x
🐘 Postgres Next.js (Turbopack) 0.775s 1.007s 0.232s 120 1.00x
🐘 Postgres Nitro 0.793s (-8.1% 🟢) 1.008s (-5.2% 🟢) 0.215s 120 1.03x
💻 Local Nitro 11.077s (~) 11.755s (+0.8%) 0.678s 11 14.32x
💻 Local Express 11.450s (+8.6% 🔺) 11.939s (+8.2% 🔺) 0.489s 11 14.80x
💻 Local Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 6.884s (+10.0% 🔺) 8.465s (+7.2% 🔺) 1.581s 15 1.00x
▲ Vercel Nitro 8.140s (+18.2% 🔺) 10.011s (+16.5% 🔺) 1.871s 14 1.18x
▲ Vercel Express ⚠️ missing - - - -

🔍 Observability: Next.js (Turbopack) | Nitro

Stream Benchmarks (includes TTFB metrics)
workflow with stream

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 0.191s 1.001s 0.002s 1.010s 0.820s 10 1.00x
💻 Local Nitro 0.197s (-3.1%) 1.004s (~) 0.012s (-3.3%) 1.018s (~) 0.820s 10 1.04x
🐘 Postgres Express 0.203s (-1.6%) 0.993s (-0.7%) 0.002s (+30.8% 🔺) 1.009s (~) 0.807s 10 1.06x
🐘 Postgres Nitro 0.205s (+1.3%) 0.994s (~) 0.001s (+7.7% 🔺) 1.010s (~) 0.805s 10 1.08x
💻 Local Express 0.220s (+8.3% 🔺) 1.004s (~) 0.013s (+30.0% 🔺) 1.020s (~) 0.800s 10 1.15x
💻 Local Next.js (Turbopack) ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 1.423s (-40.2% 🟢) 2.568s (-32.4% 🟢) 0.605s (+63.5% 🔺) 3.679s (-20.8% 🟢) 2.256s 10 1.00x
▲ Vercel Next.js (Turbopack) 1.593s (-0.7%) 3.030s (-3.8%) 0.323s (+3.1%) 3.852s (-2.6%) 2.258s 10 1.12x
▲ Vercel Express ⚠️ missing - - - - -

🔍 Observability: Nitro | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 0.599s (-4.1%) 1.003s (~) 0.004s (-12.8% 🟢) 1.023s (~) 0.424s 59 1.00x
🐘 Postgres Next.js (Turbopack) 0.618s 1.009s 0.004s 1.022s 0.404s 59 1.03x
🐘 Postgres Nitro 0.629s (+1.1%) 1.001s (~) 0.004s (+5.8% 🔺) 1.022s (~) 0.392s 59 1.05x
💻 Local Express 0.753s (-2.2%) 1.013s (~) 0.010s (+9.5% 🔺) 1.025s (~) 0.272s 59 1.26x
💻 Local Nitro 0.811s (+11.0% 🔺) 1.011s (~) 0.009s (-1.0%) 1.114s (+9.0% 🔺) 0.304s 54 1.35x
💻 Local Next.js (Turbopack) ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 4.192s (+10.7% 🔺) 6.038s (+14.3% 🔺) 0.470s (+22.6% 🔺) 6.993s (+15.1% 🔺) 2.801s 9 1.00x
▲ Vercel Next.js (Turbopack) 4.642s (+9.4% 🔺) 5.846s (+1.0%) 0.406s (+4.8%) 6.818s (+2.8%) 2.176s 9 1.11x
▲ Vercel Express ⚠️ missing - - - - -

🔍 Observability: Nitro | Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 0.954s 1.180s 0.000s 1.203s 0.249s 50 1.00x
🐘 Postgres Express 0.959s (-1.2%) 1.146s (-2.2%) 0.000s (~) 1.188s (-0.7%) 0.229s 51 1.00x
🐘 Postgres Nitro 0.991s (+3.6%) 1.327s (+15.5% 🔺) 0.000s (-61.5% 🟢) 1.342s (+15.5% 🔺) 0.350s 45 1.04x
💻 Local Nitro 1.199s (-3.9%) 2.020s (~) 0.000s (+75.0% 🔺) 2.021s (~) 0.822s 30 1.26x
💻 Local Express 1.290s (+5.2% 🔺) 2.022s (~) 0.001s (+7.1% 🔺) 2.024s (~) 0.734s 30 1.35x
💻 Local Next.js (Turbopack) ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.767s (-91.0% 🟢) 4.192s (-87.0% 🟢) 0.000s (+Infinity% 🔺) 4.655s (-85.7% 🟢) 1.888s 13 1.00x
▲ Vercel Next.js (Turbopack) 3.036s (-8.9% 🟢) 4.121s (-11.4% 🟢) 0.000s (-14.3% 🟢) 4.549s (-10.7% 🟢) 1.513s 14 1.10x
▲ Vercel Express ⚠️ missing - - - - -

🔍 Observability: Nitro | Next.js (Turbopack)

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

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.712s (-8.8% 🟢) 2.140s (-6.6% 🟢) 0.000s (+Infinity% 🔺) 2.153s (-6.6% 🟢) 0.441s 28 1.00x
🐘 Postgres Nitro 1.761s (-1.4%) 2.101s (-1.8%) 0.000s (-3.4%) 2.114s (-1.8%) 0.352s 29 1.03x
🐘 Postgres Next.js (Turbopack) 1.878s 2.182s 0.000s 2.188s 0.310s 28 1.10x
💻 Local Nitro 3.351s (-5.4% 🟢) 3.971s (-1.5%) 0.001s (+14.6% 🔺) 3.973s (-1.6%) 0.622s 16 1.96x
💻 Local Express 3.597s (+5.4% 🔺) 4.033s (~) 0.001s (+12.5% 🔺) 4.036s (~) 0.439s 15 2.10x
💻 Local Next.js (Turbopack) ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 3.903s (-5.4% 🟢) 5.204s (-2.6%) 0.000s (-100.0% 🟢) 5.687s (-1.9%) 1.784s 11 1.00x
▲ Vercel Next.js (Turbopack) 5.276s (+31.4% 🔺) 6.765s (+26.9% 🔺) 0.000s (+Infinity% 🔺) 7.181s (+23.0% 🔺) 1.905s 9 1.35x
▲ Vercel Express ⚠️ missing - - - - -

🔍 Observability: Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World 🥇 Fastest Framework Wins
💻 Local Nitro 19/21
🐘 Postgres Express 12/21
▲ Vercel Nitro 12/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework 🥇 Fastest World Wins
Express 🐘 Postgres 19/21
Next.js (Turbopack) 🐘 Postgres 21/21
Nitro 🐘 Postgres 17/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
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 7, 2026

🧪 E2E Test Results

Some tests failed

Summary

Passed Failed Skipped Total
✅ ▲ Vercel Production 890 0 67 957
✅ 💻 Local Development 866 0 178 1044
✅ 📦 Local Production 866 0 178 1044
✅ 🐘 Local Postgres 866 0 178 1044
✅ 🪟 Windows 79 0 8 87
❌ 🌍 Community Worlds 128 73 24 225
✅ 📋 Other 219 0 42 261
Total 3914 73 675 4662

❌ Failed Tests

🌍 Community Worlds (73 failed)

mongodb (7 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNQQBKE8CCV8V4WWZP6F4YCN
  • webhookWorkflow | wrun_01KNQQBWJ730BN241JS6FSCSY3
  • fetchWorkflow | wrun_01KNQQFDPCJ0XV58DYHCGCHQBE
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNQQKMXX957N7ZX0T7DKD9Z0
  • 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_01KNQQT45HMF33T6CGFSJDJ99Q

redis (7 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNQQBKE8CCV8V4WWZP6F4YCN
  • webhookWorkflow | wrun_01KNQQBWJ730BN241JS6FSCSY3
  • fetchWorkflow | wrun_01KNQQFDPCJ0XV58DYHCGCHQBE
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNQQKMXX957N7ZX0T7DKD9Z0
  • 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_01KNQQT45HMF33T6CGFSJDJ99Q

turso (59 failed):

  • addTenWorkflow | wrun_01KNQQAEEZGTQ83YKV07NB18YS
  • addTenWorkflow | wrun_01KNQQAEEZGTQ83YKV07NB18YS
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KNQQB0X8RJ715J80DMQ6WDEA
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KNQQAN9DJDADQ0SAZH7SEM45
  • promiseRaceWorkflow | wrun_01KNQQASRSXZ7QAM5QVF6B4JBV
  • promiseAnyWorkflow | wrun_01KNQQAW2R80RFMXVEVQV89WP2
  • importedStepOnlyWorkflow | wrun_01KNQQBF1KNYA7BTKX3RXP8209
  • hookWorkflow | wrun_01KNQQB860RA6DVD6M7YKXPMA9
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNQQBKE8CCV8V4WWZP6F4YCN
  • webhookWorkflow | wrun_01KNQQBWJ730BN241JS6FSCSY3
  • sleepingWorkflow | wrun_01KNQQC30RQJ75DPZ946MQRYWJ
  • parallelSleepWorkflow | wrun_01KNQQCEPPZWS2MGFVXF4FF9PM
  • nullByteWorkflow | wrun_01KNQQCHZTHMVTY8PJYHF5WQN5
  • workflowAndStepMetadataWorkflow | wrun_01KNQQCM4E6VEKC0XXW16QXA1G
  • fetchWorkflow | wrun_01KNQQFDPCJ0XV58DYHCGCHQBE
  • promiseRaceStressTestWorkflow | wrun_01KNQQFJ8C4FRWMFPAZQBTR427
  • 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_01KNQQK1G6EYXZDC5ER8WPC4QZ
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNQQKMXX957N7ZX0T7DKD9Z0
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KNQQMBKMF5CJ9V5ECP8MD7XT
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KNQQMZXFRM6SVTV761WHC1MH
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KNQQN8YM33S8ABEWC83MJHNJ
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KNQQNEQ27PN5J5RT9CFPKBYX
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KNQQNH4TJ9NS3BDGY0RD3M3C
  • 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_01KNQQP13E2HW3TSCR80MQR92M
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KNQQP6T5NX6180E95ST2EAJW
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KNQQPDX6XAZA8T1QJFKDF4V8
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KNQQPMP1YF94HX0T7N9N64MW
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KNQQPVGW3P7HPR28VDV6VEWT
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KNQQQ2K5QYXRJT0SJYYK4BMQ
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KNQQQ9C1HVZHS9FQ010Z3RJ3
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KNQQQMZTG0CQ3Y2MXQ3PZJQE
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KNQQQX376BQVSPGKMPHW4DDG
  • cancelRun - cancelling a running workflow | wrun_01KNQQR42NM5KZ7MFX9E5VMJCD
  • cancelRun via CLI - cancelling a running workflow | wrun_01KNQQRDTMGCN04EERT9C6YCE2
  • 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_01KNQQRT0X20Z3FX6PGRPF1PQ0
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KNQQSERR6JW85PX016SAABQ1
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KNQQSS5ZPSWXV06MGBCNPRRY
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KNQQSZX0G28HTEAR7CDA5VMC
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KNQQT20WSXVHPCZ4SG73AK0M
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KNQQT45HMF33T6CGFSJDJ99Q
  • getterStepWorkflow - getter functions with "use step" directive | wrun_01KNQQT7DKW12BMXRW6GGQGQ4J

Details by Category

✅ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 80 0 7
✅ example 80 0 7
✅ express 80 0 7
✅ fastify 80 0 7
✅ hono 80 0 7
✅ nextjs-turbopack 85 0 2
✅ nextjs-webpack 85 0 2
✅ nitro 80 0 7
✅ nuxt 80 0 7
✅ sveltekit 80 0 7
✅ vite 80 0 7
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 73 0 14
✅ express-stable 73 0 14
✅ fastify-stable 73 0 14
✅ hono-stable 73 0 14
✅ nextjs-turbopack-canary 62 0 25
✅ nextjs-turbopack-stable 79 0 8
✅ nextjs-webpack-canary 62 0 25
✅ nextjs-webpack-stable 79 0 8
✅ nitro-stable 73 0 14
✅ nuxt-stable 73 0 14
✅ sveltekit-stable 73 0 14
✅ vite-stable 73 0 14
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 73 0 14
✅ express-stable 73 0 14
✅ fastify-stable 73 0 14
✅ hono-stable 73 0 14
✅ nextjs-turbopack-canary 62 0 25
✅ nextjs-turbopack-stable 79 0 8
✅ nextjs-webpack-canary 62 0 25
✅ nextjs-webpack-stable 79 0 8
✅ nitro-stable 73 0 14
✅ nuxt-stable 73 0 14
✅ sveltekit-stable 73 0 14
✅ vite-stable 73 0 14
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 73 0 14
✅ express-stable 73 0 14
✅ fastify-stable 73 0 14
✅ hono-stable 73 0 14
✅ nextjs-turbopack-canary 62 0 25
✅ nextjs-turbopack-stable 79 0 8
✅ nextjs-webpack-canary 62 0 25
✅ nextjs-webpack-stable 79 0 8
✅ nitro-stable 73 0 14
✅ nuxt-stable 73 0 14
✅ sveltekit-stable 73 0 14
✅ vite-stable 73 0 14
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 79 0 8
❌ 🌍 Community Worlds
App Passed Failed Skipped
✅ mongodb-dev 5 0 0
❌ mongodb 55 7 8
✅ redis-dev 5 0 0
❌ redis 55 7 8
✅ turso-dev 5 0 0
❌ turso 3 59 8
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 73 0 14
✅ e2e-local-postgres-nest-stable 73 0 14
✅ e2e-local-prod-nest-stable 73 0 14

📋 View full workflow run

Comment thread packages/world-postgres/src/storage.ts
# Conflicts:
#	packages/world-local/src/storage/steps-storage.ts
#	packages/world-local/src/streamer.ts
#	packages/world-vercel/src/steps.ts
#	packages/world-vercel/src/streamer.ts
@VaguelySerious VaguelySerious marked this pull request as ready for review March 20, 2026 18:08
@VaguelySerious VaguelySerious requested a review from a team as a code owner March 20, 2026 18:08
…hods

Merge main into peter/step-optional, resolving conflicts in the Streamer
interface, world-local streamer, world-postgres streamer, and writable
stream tests. Incorporates negative startIndex support from main (#1460)
and pendingOps flush behavior (#1446) into the namespaced streams API.

Additionally swaps argument order so runId is always the first parameter
for all stream methods: write, writeMulti, close, get, and list. Updates
all implementations (local, postgres, vercel), callers (serialization,
runtime, CLI, web), tests, and documentation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@karthikscale3 karthikscale3 left a comment

Choose a reason for hiding this comment

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

Here's my review of PR #1293:

Summary

This PR restructures the Streamer interface on the World type, moving flat methods (writeToStream, closeStream, readFromStream, listStreamsByRunId) into a namespaced world.streams.* object (streams.write, streams.close, streams.get, streams.list). It also swaps argument order to put runId first everywhere and makes runId required (non-optional) for steps.get.

Potential Regressions

1. readStreamServerAction signature change not fully propagated

The function signature changed to accept an optional runId as a 4th parameter:

export async function readStreamServerAction(
  env: EnvMap,
  streamId: string,
  startIndex?: number,
  runId?: string

But the route caller at packages/web/app/routes/api.stream.$streamId.tsx (line 36) still calls readStreamServerAction({}, streamId, startIndex) without passing runId. This works today because all world implementations ignore _runId in their get method and it defaults to '', but it's fragile and defeats the purpose of requiring runId.

2. CLI showStream passes empty string as runId fallback

  const rawStream = await world.streams.get(opts.runId ?? '', streamId);

If --run is not provided, opts.runId is undefined and an empty string is used. This works only because no implementation validates runId in get, but it's a landmine for future implementations that might.

3. readStream in runs.ts public API signature changed

The exported readStream function gained a new required runId parameter between world and streamId. Any external consumers importing this from @workflow/core will break at compile time. Since this is marked as a breaking change in the changeset, this may be intentional, but it's worth verifying no external consumers exist.

4. Community/third-party world implementations will break

The Streamer interface changed from flat methods to a nested streams namespace. Any community world implementing the old interface (e.g., Turso, MongoDB, Redis worlds shown in CI) will need updating. The E2E results confirm this: the Turso community world has 54 failures.

Non-Blocking Issues

  • Changeset uses "patch" for what's explicitly labeled a **BREAKING CHANGE**. Per repo conventions all changes use patch, but consumers should be aware.
  • The World interface type ordering changed from extends Queue, Storage, Streamer to extends Queue, Streamer, Storage. This shouldn't have runtime impact but is worth noting.
  • Documentation at docs/content/docs/deploying/building-a-world.mdx was correctly updated, but the API reference docs (get-writable.mdx, defining-tools.mdx) reference workflow user-land functions (not world methods) so those are fine.

VaguelySerious and others added 9 commits April 7, 2026 14:52
Combine branch's streams sub-object restructure with main's new features
(getStreamChunks/getStreamInfo → getChunks/getInfo, streamFlushIntervalMs,
writeMulti pagination, pg driver change). Update all call sites, tests,
and documentation to match.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…r required runId

WorkflowServerWritableStream constructor was changed from (name, runId) to
(runId, name), but step/writable-stream.ts was not updated, causing streams
written inside steps to target the wrong stream ID and timing out the
outputStreamInsideStepWorkflow e2e test. Also update the "should retrieve a
step with only stepId" unit test to pass the now-required runId.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The webhook handler (resumeWebhook) needs to read hook metadata to
determine the respondWith behavior. However, the webhook Lambda may
not have the deployment encryption key available, causing metadata
hydration to fail with "Encrypted stream data encountered but no
encryption key is available".

Fix by passing undefined instead of the encryption key when
serializing hook metadata in the suspension handler. Hook metadata
is small (just respondWith config) and doesn't need encryption.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The package version was reset from 4.2.x-beta to 4.0.0 for the v5
beta release. The encryption format capability check used 4.2.0-beta.64
as the minimum version, causing getRunCapabilities("4.0.0") to report
encryption as unsupported. This made resumeHook strip the encryption
key, while the step handler still encrypted data — causing "Encrypted
stream data encountered but no encryption key is available" errors in
the webhook handler.

Fix by lowering the minVersion to 4.0.0 to cover the reset range.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…anges

The PR branches had version 4.0.0 (intermediate changeset reset) instead
of 5.0.0-beta.0 (the actual published version). This caused
getRunCapabilities("4.0.0") to report encryption as unsupported, breaking
the webhook respondWith flow on Vercel Prod deployments.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@TooTallNate TooTallNate left a comment

Choose a reason for hiding this comment

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

The restructuring itself is well-executed — the world.streams.* namespace is cleaner, runId-first parameter order is consistent across all 7 methods, and all callers in core, CLI, web, e2e tests, and all three world implementations have been updated. However, there are several issues to address before this can merge.

Meta

The PR has no description. For a breaking change of this scope (28 files, restructuring a public interface used by community worlds), please add a summary explaining:

  • What changed and why (namespace restructure, runId-first ordering, steps.get requiring runId)
  • Migration path for community world implementors
  • What callers need to update

Blocking (3)

  1. Health check streams.get uses a freshly generated runId that doesn't match the write-side runIdhandleHealthCheckMessage writes with generateHealthCheckRunId(), but the reader in healthCheck() calls generateHealthCheckRunId() again, producing a different ID. This works today because all three world implementations ignore runId for stream reads, but it violates the interface contract and will break any backend that scopes reads by runId. The reader should either use the same runId as the writer (requires coordination, e.g. deriving it deterministically from correlationId) or the interface should explicitly document that runId is advisory for reads.

  2. readStreamServerAction and CLI showStream pass runId ?? '' (empty string) — Both packages/web/app/server/workflow-server-actions.server.ts and packages/cli/src/lib/inspect/output.ts use runId ?? '' as a fallback when runId is not provided. An empty string for a required runId parameter will produce malformed API URLs (/v2/runs//stream/...) or incorrect DB queries. If runId is now required by the interface, these callers should also require it (or throw a clear error for missing runId).

  3. Changeset uses patch for a breaking change — should be major — AGENTS.md (line 183): "Use the correct semver bump type: patch for bug fixes, minor for new features, major for breaking changes." The changeset description already says **BREAKING CHANGE** (correct), but the bump type is patch. While on main (pre-release mode) the bump type doesn't affect beta numbering, it does matter when backported to stable (AGENTS.md line 184). Both changesets should use major for all affected packages.

Non-blocking (4)

  1. world-vercel streams.get ignores runId — The implementation has _runId (unused) and passes undefined to getStreamUrl. This preserves existing behavior but creates an asymmetry: writes go to /v2/runs/{runId}/stream/{name} but reads go to /v2/stream/{name}. Worth a comment explaining why.

  2. WorkflowServerReadableStream doesn't validate runId — The constructor validates name (non-empty string) but not runId, unlike WorkflowServerWritableStream which validates both. Add a runId check for parity.

  3. steps.get changeset (step-run-required.md) doesn't include @workflow/core, @workflow/cli, or @workflow/web — If any callers in those packages changed behavior (e.g. now always passing runId where they previously passed undefined), those packages should be in the changeset too.

  4. Community worlds will break at compile time — Expected and documented as breaking, but worth calling out explicitly: any JS (non-TS) consumer won't get a compile error, they'll get a runtime TypeError: world.writeToStream is not a function. The migration path should be noted in the PR description.

Comment thread packages/core/src/runtime/helpers.ts
Comment thread packages/web/app/server/workflow-server-actions.server.ts
Comment thread packages/cli/src/lib/inspect/output.ts Outdated
Comment thread .changeset/bright-pears-drum.md Outdated
Comment thread .changeset/step-run-required.md Outdated
- Derive health check runId deterministically from correlationId so
  writer and reader produce the same value
- Make runId required in readStreamServerAction (drop optional fallback)
- Throw explicit error in CLI showStream when --run is missing
- Bump changesets to major for breaking changes
- Add missing packages to step-run-required changeset

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@TooTallNate TooTallNate left a comment

Choose a reason for hiding this comment

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

All three blocking issues from my previous review are resolved in 2c89b170:

  1. Changesets patchmajor — Both bright-pears-drum.md and step-run-required.md now use major for all affected packages. The second changeset also added the missing @workflow/core, @workflow/cli, and @workflow/web packages.

  2. Empty-string runId fallbacks — CLI now throws '--run is required when showing a stream' instead of passing ''. Web readStreamServerAction makes runId: string required (no longer optional).

  3. Health check runId mismatchgenerateHealthCheckRunId is now deterministic: wrun_hc_${correlationId}. Both the writer (handleHealthCheckMessage) and reader (healthCheck) derive the same runId from the shared correlationId. Clean fix.

The PR description is also present now (was missing before).

LGTM.

@ghost ghost mentioned this pull request Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants