[core] V2: skip inline step execution when suspension also has a wait - #1924

Merged
VaguelySerious merged 2 commits into
mainfrom
peter/fix-step-vs-wait-race
May 5, 2026
Merged

[core] V2: skip inline step execution when suspension also has a wait#1924
VaguelySerious merged 2 commits into
mainfrom
peter/fix-step-vs-wait-race

Conversation

@VaguelySerious

Copy link
Copy Markdown
Member

Summary

Fix Promise.race(step, sleep) semantics in V2 mixed suspensions: when a workflow suspension contains both pending steps and at least one wait (sleep), the runtime now queues every step instead of executing one inline.

Inline `await executeStep(...)` blocks the V2 handler for the full step duration, but `wait_completed` events are only created on the next loop iteration's "complete elapsed waits" pass. So if the sleep is shorter than the step, the wait timer never fires on time — replay just sees `step_completed` first and `Promise.race` resolves with the step. A 1s sleep racing a 10s step would silently resolve to the step.

This restores V1's behavior, where each step ran in a separate function invocation and the wait timer drove a parallel queue continuation.

Reproducer (failing test from #1916)

`sleepWinsRaceWorkflow`: a 1s sleep raced against a 10s step. Expected `'sleep'` to win.

Event log on the failing run, before the fix:

t (s)Event
0.000`run_created`
1.738`step_created` + `wait_created`resumeAt = t+1s
1.742`step_started`inline execution begins
11.825`step_completed`step body finishes after ~10s
11.861`wait_completed`created right after step_completed, not on time
11.959`run_completed`replay picked `'step'`

After the fix, `wait_completed` lands at t≈1s after `wait_created` and the run completes with `'sleep'` in ~1s.

Change

One-liner in `packages/core/src/runtime.ts`:

```ts
const inlineStep =
suspensionResult.timeoutSeconds === undefined
? ownedPendingSteps[0]
: undefined;
```

The existing "queue every pending step except the inline one" loop and the `if (!inlineStep)` early-return already handle the `undefined` case correctly.

What about hooks?

Audited every flavor of suspension. Step + wait is the only fully-broken combination.

Suspension containsBehavior in V2Race-correct?
steps onlyone inline, rest queued
wait onlyreturns with timeoutSeconds
hook onlyreturns; external resumeHook drives continuation
wait + hookno steps → returns with timeoutSeconds
step + waitstep inline-blocks, wait timer never fires❌ — fixed here
step + hookstep inline-blocks, but hook continuation runs concurrently via queueConcurrency (≥1000 on world-local, 50 on world-postgres, auto on Vercel)⚠️ correct via concurrency, but step keeps running uselessly until termination

Step + hook works on all first-party worlds today. A consistent follow-up would extend the same carve-out to `hasPendingHooks`, but it would require a new field in `SuspensionHandlerResult` and isn't strictly necessary — happy to do that as a follow-up if desired.

Test plan

  • New e2e tests `sleepWinsRaceWorkflow` and `stepWinsRaceWorkflow` (the failing tests from Add dev-tmux skill for portless+tmux local Workflow SDK dev #1916, plus the symmetric stepWins case).
  • `pnpm vitest run packages/core/e2e/e2e.test.ts -t WinsRaceWorkflow` against the `nextjs-turbopack` workbench locally — both pass.
  • Event log inspection confirms `wait_completed` is now created at t≈1s.
  • All 842 `@workflow/core` unit tests pass.

Docs

`docs/content/docs/changelog/eager-processing.mdx` "Mixed Suspensions" section rewritten to describe the carve-out and explicitly call out the `Promise.race(step, sleep)` race-semantics motivation.

🤖 Generated with Claude Code

Inline `await executeStep(...)` blocks the V2 handler for the full
step duration, but `wait_completed` events are only created on the
*next* loop iteration's "complete elapsed waits" pass. This breaks
`Promise.race(step, sleep)` semantics whenever the sleep is shorter
than the step — replay still picks the step because the sleep's
wait_completed event hasn't been written yet.
Reproducer (`sleepWinsRaceWorkflow`): a 1s sleep raced against a 10s
step. Expected `'sleep'` to win; the runtime returned `'step'`. On
the failing run, `wait_completed` was created at t=11.86s — right
after `step_completed` — instead of at t≈2.74s when its `resumeAt`
elapsed.
Fix: in `runtime.ts`, gate the inline-step pick on the absence of a
wait timeout. When `suspensionResult.timeoutSeconds !== undefined`,
queue every pending step instead and return with the wait timeout.
This lets the wait timer drive a continuation in parallel, matching
V1's behavior where each step ran in a separate function
invocation. Pure step suspensions (without waits) still benefit
from inline execution.
Test plan:
- New e2e tests `sleepWinsRaceWorkflow` and `stepWinsRaceWorkflow`
exercising `Promise.race` between a step function and `sleep()`,
in both directions.
- Verified locally against `nextjs-turbopack` workbench: both pass.
Event log confirms `wait_completed` is now created on time
(t≈1s after `wait_created`) rather than after the inline step.
Eager-processing changelog updated with a "Mixed Suspensions"
section describing the carve-out and its rationale.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented May 5, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented May 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ee02092

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

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

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

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

@github-actions

github-actionsBot commented May 5, 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🥇 Express0.031s (-29.8% 🟢)1.005s (~)0.974s101.00x
💻 LocalNitro0.032s (-24.8% 🟢)1.005s (~)0.973s101.04x
🐘 PostgresNitro0.041s (-56.5% 🟢)1.011s (-3.0%)0.970s101.33x
🐘 PostgresExpress0.046s (-20.0% 🟢)1.012s (~)0.965s101.49x
🌐 RedisNext.js (Turbopack)0.053s1.005s0.952s101.70x
🐘 PostgresNext.js (Turbopack)0.061s1.013s0.952s101.95x
🌐 MongoDBNext.js (Turbopack)0.089s1.006s0.918s102.86x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.806s (+220.6% 🔺)2.783s (+19.3% 🔺)1.976s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.068s (-5.6% 🟢)2.006s (~)0.938s101.00x
💻 LocalExpress1.072s (-4.7%)2.006s (~)0.934s101.00x
🐘 PostgresExpress1.081s (-5.7% 🟢)2.009s (~)0.928s101.01x
🐘 PostgresNitro1.084s (-4.9%)2.010s (~)0.926s101.01x
🌐 RedisNext.js (Turbopack)1.111s2.006s0.895s101.04x
🐘 PostgresNext.js (Turbopack)1.131s2.010s0.879s101.06x
🌐 MongoDBNext.js (Turbopack)1.151s2.007s0.856s101.08x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.825s (+38.8% 🔺)4.958s (+29.4% 🔺)2.134s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.402s (-5.0%)11.021s (~)0.618s31.00x
💻 LocalExpress10.407s (-4.7%)11.021s (~)0.614s31.00x
🐘 PostgresExpress10.418s (-5.0%)11.015s (~)0.598s31.00x
🐘 PostgresNitro10.423s (-4.1%)11.015s (~)0.593s31.00x
🌐 RedisNext.js (Turbopack)10.663s11.023s0.360s31.03x
🌐 MongoDBNext.js (Turbopack)10.670s11.014s0.344s31.03x
🐘 PostgresNext.js (Turbopack)10.715s11.017s0.302s31.03x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)15.794s (-8.8% 🟢)17.951s (-7.5% 🟢)2.157s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express13.439s (-7.8% 🟢)14.018s (-6.7% 🟢)0.578s51.00x
💻 LocalNitro13.450s (-10.7% 🟢)14.026s (-12.5% 🟢)0.577s51.00x
💻 LocalExpress13.485s (-9.9% 🟢)14.026s (-6.7% 🟢)0.541s51.00x
🐘 PostgresNitro13.488s (-7.6% 🟢)14.019s (-6.7% 🟢)0.530s51.00x
🌐 MongoDBNext.js (Turbopack)13.940s14.219s0.279s51.04x
🐘 PostgresNext.js (Turbopack)14.131s15.022s0.891s41.05x
🌐 RedisNext.js (Turbopack)14.169s15.030s0.861s41.05x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)23.629s (-55.0% 🟢)25.826s (-52.7% 🟢)2.197s31.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro11.849s (-29.4% 🟢)12.022s (-29.4% 🟢)0.173s81.00x
💻 LocalExpress11.902s (-28.3% 🟢)12.022s (-29.4% 🟢)0.120s81.00x
🐘 PostgresExpress12.005s (-14.3% 🟢)12.394s (-15.1% 🟢)0.389s81.01x
🐘 PostgresNitro12.046s (-13.8% 🟢)12.645s (-11.6% 🟢)0.599s81.02x
🌐 MongoDBNext.js (Turbopack)12.694s13.017s0.323s71.07x
🌐 RedisNext.js (Turbopack)13.121s14.028s0.907s71.11x
🐘 PostgresNext.js (Turbopack)13.366s14.018s0.651s71.13x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)34.490s (-91.2% 🟢)36.796s (-90.7% 🟢)2.306s31.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.145s (-10.2% 🟢)2.007s (~)0.862s151.00x
🐘 PostgresExpress1.147s (-9.0% 🟢)2.008s (~)0.861s151.00x
💻 LocalNitro1.174s (-28.0% 🟢)2.006s (-3.3%)0.831s151.03x
💻 LocalExpress1.211s (-18.6% 🟢)2.006s (~)0.794s151.06x
🐘 PostgresNext.js (Turbopack)1.219s2.008s0.788s151.07x
🌐 RedisNext.js (Turbopack)1.275s2.007s0.732s151.11x
🌐 MongoDBNext.js (Turbopack)2.019s2.674s0.655s121.76x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.105s (+20.8% 🔺)6.180s (+25.3% 🔺)2.075s51.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.202s (-48.9% 🟢)2.006s (-33.3% 🟢)0.804s151.00x
🐘 PostgresExpress1.226s (-48.1% 🟢)2.007s (-33.3% 🟢)0.782s151.02x
🐘 PostgresNext.js (Turbopack)1.375s2.007s0.633s151.14x
💻 LocalNitro1.677s (-46.7% 🟢)2.005s (-48.4% 🟢)0.329s151.39x
💻 LocalExpress1.798s (-39.1% 🟢)2.008s (-41.9% 🟢)0.209s151.50x
🌐 RedisNext.js (Turbopack)2.397s3.009s0.612s101.99x
🌐 MongoDBNext.js (Turbopack)3.570s4.008s0.438s82.97x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.819s (-32.1% 🟢)6.927s (-22.2% 🟢)2.108s51.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.326s (-61.9% 🟢)2.008s (-49.9% 🟢)0.682s151.00x
🐘 PostgresExpress1.365s (-60.8% 🟢)2.008s (-49.9% 🟢)0.643s151.03x
🐘 PostgresNext.js (Turbopack)1.662s2.007s0.345s151.25x
🌐 RedisNext.js (Turbopack)3.651s4.011s0.360s82.75x
💻 LocalNitro4.459s (-46.6% 🟢)5.013s (-44.4% 🟢)0.554s73.36x
💻 LocalExpress5.277s (-36.7% 🟢)5.846s (-35.2% 🟢)0.569s63.98x
🌐 MongoDBNext.js (Turbopack)6.145s7.011s0.866s54.64x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)7.711s (-13.5% 🟢)10.175s (-7.2% 🟢)2.464s41.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.143s (-9.1% 🟢)2.008s (~)0.865s151.00x
🐘 PostgresNitro1.149s (-8.6% 🟢)2.008s (~)0.860s151.00x
🐘 PostgresNext.js (Turbopack)1.210s2.007s0.797s151.06x
🌐 RedisNext.js (Turbopack)1.237s2.007s0.770s151.08x
💻 LocalNitro1.377s (-26.2% 🟢)2.006s (-14.3% 🟢)0.629s151.20x
💻 LocalExpress1.754s (-7.4% 🟢)2.391s (+1.2%)0.638s131.53x
🌐 MongoDBNext.js (Turbopack)2.025s2.734s0.709s111.77x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.859s (+31.6% 🔺)5.663s (+22.0% 🔺)1.805s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.217s (-48.0% 🟢)2.075s (-31.1% 🟢)0.858s151.00x
🐘 PostgresExpress1.234s (-47.3% 🟢)2.010s (-33.3% 🟢)0.776s151.01x
🐘 PostgresNext.js (Turbopack)1.370s2.007s0.636s151.13x
💻 LocalNitro1.804s (-41.2% 🟢)2.222s (-42.8% 🟢)0.419s141.48x
💻 LocalExpress2.119s (-32.4% 🟢)2.590s (-31.2% 🟢)0.472s121.74x
🌐 RedisNext.js (Turbopack)2.366s3.009s0.643s101.94x
🌐 MongoDBNext.js (Turbopack)3.566s4.008s0.442s82.93x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)5.086s (+61.8% 🔺)7.055s (+56.0% 🔺)1.969s51.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.319s (-62.1% 🟢)2.007s (-49.9% 🟢)0.688s151.00x
🐘 PostgresExpress1.359s (-61.2% 🟢)2.008s (-49.9% 🟢)0.649s151.03x
🐘 PostgresNext.js (Turbopack)1.654s2.008s0.354s151.25x
🌐 RedisNext.js (Turbopack)3.666s4.010s0.344s82.78x
💻 LocalNitro4.835s (-47.1% 🟢)5.513s (-45.0% 🟢)0.677s63.67x
💻 LocalExpress5.619s (-36.2% 🟢)6.217s (-33.0% 🟢)0.598s54.26x
🌐 MongoDBNext.js (Turbopack)6.228s7.010s0.782s54.72x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.106s (-9.6% 🟢)7.716s (-9.7% 🟢)1.609s41.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.448s (-45.4% 🟢)1.006s (~)0.558s601.00x
💻 LocalExpress0.463s (-52.9% 🟢)1.004s (-6.7% 🟢)0.541s601.03x
🐘 PostgresExpress0.481s (-42.6% 🟢)1.023s (~)0.542s591.07x
💻 LocalNitro0.513s (-47.7% 🟢)1.021s (-6.7% 🟢)0.508s591.14x
🌐 MongoDBNext.js (Turbopack)0.595s1.005s0.410s601.33x
🌐 RedisNext.js (Turbopack)0.658s1.005s0.346s601.47x
🐘 PostgresNext.js (Turbopack)0.698s1.006s0.308s601.56x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.179s (-57.4% 🟢)8.102s (-49.6% 🟢)1.923s81.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.065s (-44.8% 🟢)1.772s (-15.6% 🟢)0.707s511.00x
🐘 PostgresExpress1.152s (-41.7% 🟢)1.844s (-18.3% 🟢)0.692s491.08x
💻 LocalNitro1.168s (-61.5% 🟢)2.005s (-46.6% 🟢)0.837s451.10x
💻 LocalExpress1.301s (-56.9% 🟢)2.122s (-40.8% 🟢)0.821s431.22x
🌐 MongoDBNext.js (Turbopack)1.484s2.006s0.522s451.39x
🌐 RedisNext.js (Turbopack)1.561s2.006s0.445s451.47x
🐘 PostgresNext.js (Turbopack)1.604s2.007s0.403s451.51x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)14.969s (-69.9% 🟢)17.357s (-66.4% 🟢)2.388s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.021s (-49.4% 🟢)2.456s (-43.8% 🟢)0.435s491.00x
🐘 PostgresNitro2.028s (-50.6% 🟢)2.528s (-45.1% 🟢)0.501s481.00x
💻 LocalNitro2.651s (-71.5% 🟢)3.007s (-70.0% 🟢)0.356s401.31x
💻 LocalExpress2.654s (-71.2% 🟢)3.007s (-70.0% 🟢)0.354s401.31x
🌐 RedisNext.js (Turbopack)3.018s3.396s0.378s361.49x
🐘 PostgresNext.js (Turbopack)3.183s4.009s0.825s301.58x
🌐 MongoDBNext.js (Turbopack)3.422s4.010s0.588s301.69x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)43.502s (-59.4% 🟢)46.024s (-57.7% 🟢)2.522s31.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.179s (-36.6% 🟢)1.006s (~)0.827s601.00x
🐘 PostgresNitro0.181s (-36.2% 🟢)1.006s (~)0.825s601.01x
🐘 PostgresNext.js (Turbopack)0.236s1.005s0.769s601.32x
🌐 RedisNext.js (Turbopack)0.261s1.004s0.743s601.46x
💻 LocalNitro0.410s (-32.2% 🟢)1.004s (-1.7%)0.594s602.29x
💻 LocalExpress0.449s (-19.9% 🟢)1.004s (~)0.555s602.51x
🌐 MongoDBNext.js (Turbopack)1.028s1.770s0.742s345.75x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.053s (+100.4% 🔺)6.298s (+66.0% 🔺)2.246s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.300s (-39.6% 🟢)1.006s (~)0.706s901.00x
🐘 PostgresExpress0.314s (-38.4% 🟢)1.007s (~)0.693s901.05x
🌐 RedisNext.js (Turbopack)0.431s1.004s0.573s901.44x
🐘 PostgresNext.js (Turbopack)0.455s1.006s0.550s901.52x
💻 LocalExpress2.143s (-14.7% 🟢)2.714s (-9.8% 🟢)0.572s347.15x
💻 LocalNitro2.165s (-14.7% 🟢)2.765s (-8.1% 🟢)0.600s337.22x
🌐 MongoDBNext.js (Turbopack)2.573s3.006s0.433s308.58x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)8.287s (+134.4% 🔺)10.464s (+101.5% 🔺)2.176s91.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.606s (-23.3% 🟢)1.006s (~)0.400s1201.00x
🐘 PostgresExpress0.632s (-22.8% 🟢)1.006s (-1.1%)0.373s1201.04x
🌐 RedisNext.js (Turbopack)0.810s1.004s0.195s1201.34x
🐘 PostgresNext.js (Turbopack)0.958s1.387s0.430s871.58x
🌐 MongoDBNext.js (Turbopack)5.307s6.011s0.704s208.76x
💻 LocalNitro9.751s (-12.9% 🟢)10.445s (-10.4% 🟢)0.694s1216.09x
💻 LocalExpress10.904s (-2.6%)11.399s (-4.5%)0.496s1117.99x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)20.304s (+96.6% 🔺)22.967s (+86.9% 🔺)2.663s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.131s (+451.5% 🔺)2.000s (+100.3% 🔺)0.001s (-31.3% 🟢)2.010s (+98.8% 🔺)0.879s101.00x
💻 LocalNitro1.131s (+429.3% 🔺)2.004s (+99.5% 🔺)0.011s (-15.2% 🟢)2.017s (+98.0% 🔺)0.886s101.00x
🐘 PostgresNitro1.132s (+452.2% 🔺)2.001s (+100.1% 🔺)0.001s (-26.7% 🟢)2.009s (+98.7% 🔺)0.877s101.00x
💻 LocalExpress1.141s (+473.3% 🔺)2.005s (+99.6% 🔺)0.012s (~)2.019s (+98.3% 🔺)0.878s101.01x
🐘 PostgresNext.js (Turbopack)1.201s2.001s0.001s2.011s0.810s101.06x
🌐 MongoDBNext.js (Turbopack)⚠️missing-----
🌐 RedisNext.js (Turbopack)⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.713s (-31.2% 🟢)5.161s (-40.3% 🟢)1.482s (+134.6% 🔺)8.473s (-13.4% 🟢)3.760s101.00x
▲ VercelExpress⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.505s (+139.0% 🔺)2.003s (+99.0% 🔺)0.004s (+0.9%)2.026s (+98.0% 🔺)0.520s301.00x
🐘 PostgresNitro1.522s (+143.9% 🔺)2.006s (+99.3% 🔺)0.004s (-15.4% 🟢)2.024s (+97.9% 🔺)0.502s301.01x
💻 LocalExpress1.570s (+107.4% 🔺)2.012s (+95.6% 🔺)0.011s (+14.7% 🔺)2.025s (+94.8% 🔺)0.455s301.04x
🐘 PostgresNext.js (Turbopack)1.664s2.011s0.004s2.025s0.361s301.11x
💻 LocalNitro1.688s (+101.3% 🔺)2.011s (+98.7% 🔺)0.009s (-4.0%)2.201s (+97.2% 🔺)0.513s281.12x
🌐 MongoDBNext.js (Turbopack)⚠️missing-----
🌐 RedisNext.js (Turbopack)⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)12.267s (-27.5% 🟢)13.897s (-23.8% 🟢)0.343s (+62.3% 🔺)15.237s (-19.5% 🟢)2.969s51.00x
▲ VercelExpress⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.642s (-33.7% 🟢)1.016s (-18.5% 🟢)0.000s (-59.3% 🟢)1.023s (-18.6% 🟢)0.381s591.00x
🐘 PostgresExpress0.692s (-27.9% 🟢)1.047s (-18.0% 🟢)0.000s (+21.1% 🔺)1.060s (-18.8% 🟢)0.368s571.08x
🐘 PostgresNext.js (Turbopack)0.826s1.071s0.000s1.078s0.252s561.29x
💻 LocalNitro1.335s (+9.2% 🔺)2.015s (~)0.000s (+100.0% 🔺)2.017s (~)0.681s302.08x
💻 LocalExpress1.386s (+13.2% 🔺)2.015s (~)0.000s (-80.0% 🟢)2.017s (~)0.631s302.16x
🌐 MongoDBNext.js (Turbopack)⚠️missing-----
🌐 RedisNext.js (Turbopack)⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.379s (-37.3% 🟢)7.433s (-35.5% 🟢)0.000s (NaN%)8.871s (-26.4% 🟢)2.492s71.00x
▲ VercelExpress⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack)

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.252s (-29.3% 🟢)1.996s (-8.3% 🟢)0.000s (+Infinity% 🔺)2.034s (-7.5% 🟢)0.782s301.00x
🐘 PostgresNitro1.354s (-24.4% 🟢)2.105s (-1.7%)0.000s (+93.1% 🔺)2.123s (-2.4%)0.769s291.08x
🐘 PostgresNext.js (Turbopack)1.678s2.262s0.000s2.286s0.608s271.34x
💻 LocalNitro3.014s (-11.0% 🟢)3.842s (-4.7%)0.001s (-6.2% 🟢)3.844s (-4.8%)0.831s162.41x
💻 LocalExpress3.243s (-6.5% 🟢)3.968s (-1.6%)0.000s (-45.3% 🟢)3.970s (-1.7%)0.726s162.59x
🌐 MongoDBNext.js (Turbopack)⚠️missing-----
🌐 RedisNext.js (Turbopack)⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)8.615s (+53.4% 🔺)10.007s (+43.3% 🔺)0.000s (+33.3% 🔺)11.037s (+46.4% 🔺)2.422s61.00x
▲ VercelExpress⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro17/21
🐘 PostgresNitro11/21
▲ VercelNext.js (Turbopack)21/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres16/21
Next.js (Turbopack)🐘 Postgres11/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: failure
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

@github-actions

github-actionsBot commented May 5, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production92502191144
✅ 💻 Local Development123702191456
✅ 📦 Local Production123702191456
✅ 🐘 Local Postgres123702191456
✅ 🪟 Windows10400104
✅ 📋 Other5520176728
Total5292010526344

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro78026
✅ example78026
✅ express78026
✅ fastify78026
✅ hono78026
✅ nextjs-turbopack10202
✅ nextjs-webpack10202
✅ nitro78026
✅ nuxt78026
✅ sveltekit9707
✅ vite78026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable79025
✅ express-stable79025
✅ fastify-stable79025
✅ hono-stable79025
✅ nextjs-turbopack-canary85019
✅ nextjs-turbopack-stable-lazy-discovery-disabled10400
✅ nextjs-turbopack-stable-lazy-discovery-enabled10400
✅ nextjs-webpack-canary85019
✅ nextjs-webpack-stable-lazy-discovery-disabled10400
✅ nextjs-webpack-stable-lazy-discovery-enabled10400
✅ nitro-stable79025
✅ nuxt-stable79025
✅ sveltekit-stable9806
✅ vite-stable79025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable79025
✅ express-stable79025
✅ fastify-stable79025
✅ hono-stable79025
✅ nextjs-turbopack-canary85019
✅ nextjs-turbopack-stable-lazy-discovery-disabled10400
✅ nextjs-turbopack-stable-lazy-discovery-enabled10400
✅ nextjs-webpack-canary85019
✅ nextjs-webpack-stable-lazy-discovery-disabled10400
✅ nextjs-webpack-stable-lazy-discovery-enabled10400
✅ nitro-stable79025
✅ nuxt-stable79025
✅ sveltekit-stable9806
✅ vite-stable79025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable79025
✅ express-stable79025
✅ fastify-stable79025
✅ hono-stable79025
✅ nextjs-turbopack-canary85019
✅ nextjs-turbopack-stable-lazy-discovery-disabled10400
✅ nextjs-turbopack-stable-lazy-discovery-enabled10400
✅ nextjs-webpack-canary85019
✅ nextjs-webpack-stable-lazy-discovery-disabled10400
✅ nextjs-webpack-stable-lazy-discovery-enabled10400
✅ nitro-stable79025
✅ nuxt-stable79025
✅ sveltekit-stable9806
✅ vite-stable79025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack10400
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable79025
✅ e2e-local-dev-tanstack-start-79025
✅ e2e-local-postgres-nest-stable79025
✅ e2e-local-postgres-tanstack-start-79025
✅ e2e-local-prod-nest-stable79025
✅ e2e-local-prod-tanstack-start-79025
✅ e2e-vercel-prod-tanstack-start78026

📋 View full workflow run

Comment thread.changeset/fix-step-vs-wait-race.md Outdated
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@VaguelySerious
VaguelySerious merged commit 3535caf into mainMay 5, 2026
112 of 115 checks passed
@VaguelySerious
VaguelySerious deleted the peter/fix-step-vs-wait-race branch May 5, 2026 00:49
@github-actionsgithub-actionsBot mentioned this pull request May 5, 2026
pranaygp added a commit that referenced this pull request May 5, 2026
* origin/main:
[core] Skip inline step execution when suspension also has a wait (#1924)
[errors] Replace chalk import in @workfow/errors with inline ANSI shim (#1915)
Fix compatibility with Zod 4.4.x (#1902)
Serialize `run_failed`/`step_failed` errors through serialization pipeline (#1851)
tarballs: redesign preview tarballs index page (#1911)
Remove extra changeset (#1922)
Add stable Next.js eager and lazy test coverage (#1747)
Enforce per-(run, correlation) uniqueness for entity-creating events in world-postgres (#1878)
fix(world-vercel): add default request timeout to workflow-server HTTP calls (#1807)
pranaygp added a commit that referenced this pull request May 5, 2026
PR #1924 added the same sleep/step race workflows directly to main
while this branch was open. The textual concat from `git merge`
left both copies in 99_e2e.ts; this drops the duplicate set so the
file matches origin/main verbatim and the e2e tests pick up the
upstream definitions.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
pranaygp added a commit that referenced this pull request May 5, 2026
…ignal
* origin/main:
[core] Skip inline step execution when suspension also has a wait (#1924)
[errors] Replace chalk import in @workfow/errors with inline ANSI shim (#1915)
Fix compatibility with Zod 4.4.x (#1902)
Serialize `run_failed`/`step_failed` errors through serialization pipeline (#1851)
tarballs: redesign preview tarballs index page (#1911)
Remove extra changeset (#1922)
Add stable Next.js eager and lazy test coverage (#1747)
Enforce per-(run, correlation) uniqueness for entity-creating events in world-postgres (#1878)
fix(world-vercel): add default request timeout to workflow-server HTTP calls (#1807)
Allow disabling step sourcemap with new `sourcemap` option in builders (#1842)
[ci] Enable Vercel-prod e2e for tanstack-start (#1904)
web: configure vercelPreset() for Vercel deployments (#1815)
[core] Combine flow+step bundle and process steps eagerly (#1338)
[world-vercel] Revert stream close control framing (#1891)
[tarballs] Use turbo to build workspace deps before packing (#1908)
# Conflicts:
#	packages/core/src/runtime/step-handler.test.ts
#	packages/core/src/runtime/step-handler.ts
#	packages/core/src/runtime/suspension-handler.ts
#	packages/core/src/step.test.ts
#	packages/world-local/src/storage/events-storage.ts
#	packages/world-postgres/src/drizzle/migrations/meta/_journal.json
pranaygp added a commit that referenced this pull request May 5, 2026
* [e2e] Add step-vs-sleep race tests + dev-tmux skill
Adds two race workflows (sleepWinsRaceWorkflow, stepWinsRaceWorkflow)
that exercise Promise.race between a step function and a sleep call.
The current `sleepWinsRaceWorkflow` test fails — surfacing how the
replay engine resolves a previously-completed step instantly while
sleep still has to elapse.
Also adds a `dev-tmux` skill that documents the 3-pane tmux + portless
setup for testing workflows interactively in a worktree alongside the
observability UI.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [workbench/nextjs-turbopack] Allow *.turbopack.localhost in dev
Adds allowedDevOrigins entries so portless-style worktree-prefixed
.localhost URLs (e.g. https://<branch>.turbopack.localhost) can hit
HMR and dev-only endpoints without Next's cross-origin protection
flooding the logs with warnings.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Drop duplicate race workflows after merging main
PR #1924 added the same sleep/step race workflows directly to main
while this branch was open. The textual concat from `git merge`
left both copies in 99_e2e.ts; this drops the duplicate set so the
file matches origin/main verbatim and the e2e tests pick up the
upstream definitions.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Narrow activation, robust pane IDs, statusline helper
- Tighten activation phrases so the skill only fires for the specific
portless+tmux setup it documents, not the generic "start the dev
server" task. Addresses #1916 review.
- Capture pane IDs at split time (-P -F '#{pane_id}') so the snippet
works under both pane-base-index 0 and 1. Addresses Copilot review.
- Add `statusline.sh` that filters `portless list` to the current
worktree's routes and emits a one-line summary, plus instructions
for wiring it into Claude Code's `statusLine.command`.
- Bump version to 1.1.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Recommend primary-checkout path for statusline
Worktrees get deleted, so wiring the statusline to a worktree path
breaks the moment the worktree is removed. Update the skill and the
script header to recommend pointing `statusLine.command` at the
primary checkout (`$HOME/github/vercel/workflow/...`). The script
itself is already worktree-aware via Claude's `workspace.current_dir`
stdin JSON, so the same invocation surfaces routes for whichever
worktree the session is in.
Bump version to 1.2.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] OSC 8 link statusline + worktree-named tmux session
- Statusline overlay now renders `[dev] · [obs] · tmux:<prefix>`,
with the bracketed labels emitted as OSC 8 hyperlinks (clickable in
any modern terminal) styled cyan + underline so they stand out.
Replaces the old long-URL form that was hard to scan and click.
- Add a tmux-session indicator: shown when a session named exactly the
worktree prefix exists (uses `tmux has-session -t =<prefix>` for
exact matching).
- Change the skill's tmux session naming convention from the fixed
`workflow-dev` to `<worktree-prefix>` (basename of the branch — same
string portless uses as the subdomain prefix). This lets the
statusline locate the session deterministically and lets multiple
worktrees run dev sessions concurrently without manual disambiguation.
- Bump skill to v1.3.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Statusline: print full `tmux attach -t <name>` command
Replaces the abbreviated `tmux:<prefix>` indicator with the full
copy-paste-ready `tmux attach -t <prefix>` invocation. Saves a step
when grabbing the session from another shell.
Bump skill to v1.4.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Brighter statusline + Nerd Font icons
- Drop the dim styling that made the overlay hard to read; use bold
bright cyan + underline for links and bold bright green for the
tmux command.
- Add Nerd Font glyphs: for dev, for obs, for the
tmux copy-paste hint. Falls back to box-drawing if the font lacks
Nerd Font ranges; layout is unaffected.
- Visual differentiation: cyan + underline = clickable hyperlink;
green = copy this command.
Bump skill to v1.5.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Restore Nerd Font icons via Unicode escapes
The copy glyph in `emit_tmux` was a literal Nerd Font byte embedded in
the printf string and got stripped during a prior rewrite. Promote all
three icons (rocket / graph / copy) to top-level shell variables that
use \uHHHH-equivalent UTF-8 escapes, so the source survives editor
round-trips that don't preserve Private Use Area code points.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/internal-dev-workbench] Rename from dev-tmux, set author + reset version
- Rename `skills/dev-tmux/` → `skills/internal-dev-workbench/` to make
the name self-explanatory about the skill's scope (an internal
contributor's local dev workbench, not a generic tmux helper).
- Author: Pranay Prakash. Version: 0.1 (first release of the skill).
- Update internal references in SKILL.md and statusline.sh accordingly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

2 participants

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

[core] V2: skip inline step execution when suspension also has a wait - #1924

Merged
VaguelySerious merged 2 commits into
mainfrom
peter/fix-step-vs-wait-race
May 5, 2026
Merged

[core] V2: skip inline step execution when suspension also has a wait#1924
VaguelySerious merged 2 commits into
mainfrom
peter/fix-step-vs-wait-race

Conversation

@VaguelySerious

Copy link
Copy Markdown
Member

Summary

Fix Promise.race(step, sleep) semantics in V2 mixed suspensions: when a workflow suspension contains both pending steps and at least one wait (sleep), the runtime now queues every step instead of executing one inline.

Inline `await executeStep(...)` blocks the V2 handler for the full step duration, but `wait_completed` events are only created on the next loop iteration's "complete elapsed waits" pass. So if the sleep is shorter than the step, the wait timer never fires on time — replay just sees `step_completed` first and `Promise.race` resolves with the step. A 1s sleep racing a 10s step would silently resolve to the step.

This restores V1's behavior, where each step ran in a separate function invocation and the wait timer drove a parallel queue continuation.

Reproducer (failing test from #1916)

`sleepWinsRaceWorkflow`: a 1s sleep raced against a 10s step. Expected `'sleep'` to win.

Event log on the failing run, before the fix:

t (s)Event
0.000`run_created`
1.738`step_created` + `wait_created`resumeAt = t+1s
1.742`step_started`inline execution begins
11.825`step_completed`step body finishes after ~10s
11.861`wait_completed`created right after step_completed, not on time
11.959`run_completed`replay picked `'step'`

After the fix, `wait_completed` lands at t≈1s after `wait_created` and the run completes with `'sleep'` in ~1s.

Change

One-liner in `packages/core/src/runtime.ts`:

```ts
const inlineStep =
suspensionResult.timeoutSeconds === undefined
? ownedPendingSteps[0]
: undefined;
```

The existing "queue every pending step except the inline one" loop and the `if (!inlineStep)` early-return already handle the `undefined` case correctly.

What about hooks?

Audited every flavor of suspension. Step + wait is the only fully-broken combination.

Suspension containsBehavior in V2Race-correct?
steps onlyone inline, rest queued
wait onlyreturns with timeoutSeconds
hook onlyreturns; external resumeHook drives continuation
wait + hookno steps → returns with timeoutSeconds
step + waitstep inline-blocks, wait timer never fires❌ — fixed here
step + hookstep inline-blocks, but hook continuation runs concurrently via queueConcurrency (≥1000 on world-local, 50 on world-postgres, auto on Vercel)⚠️ correct via concurrency, but step keeps running uselessly until termination

Step + hook works on all first-party worlds today. A consistent follow-up would extend the same carve-out to `hasPendingHooks`, but it would require a new field in `SuspensionHandlerResult` and isn't strictly necessary — happy to do that as a follow-up if desired.

Test plan

  • New e2e tests `sleepWinsRaceWorkflow` and `stepWinsRaceWorkflow` (the failing tests from Add dev-tmux skill for portless+tmux local Workflow SDK dev #1916, plus the symmetric stepWins case).
  • `pnpm vitest run packages/core/e2e/e2e.test.ts -t WinsRaceWorkflow` against the `nextjs-turbopack` workbench locally — both pass.
  • Event log inspection confirms `wait_completed` is now created at t≈1s.
  • All 842 `@workflow/core` unit tests pass.

Docs

`docs/content/docs/changelog/eager-processing.mdx` "Mixed Suspensions" section rewritten to describe the carve-out and explicitly call out the `Promise.race(step, sleep)` race-semantics motivation.

🤖 Generated with Claude Code

Inline `await executeStep(...)` blocks the V2 handler for the full
step duration, but `wait_completed` events are only created on the
*next* loop iteration's "complete elapsed waits" pass. This breaks
`Promise.race(step, sleep)` semantics whenever the sleep is shorter
than the step — replay still picks the step because the sleep's
wait_completed event hasn't been written yet.
Reproducer (`sleepWinsRaceWorkflow`): a 1s sleep raced against a 10s
step. Expected `'sleep'` to win; the runtime returned `'step'`. On
the failing run, `wait_completed` was created at t=11.86s — right
after `step_completed` — instead of at t≈2.74s when its `resumeAt`
elapsed.
Fix: in `runtime.ts`, gate the inline-step pick on the absence of a
wait timeout. When `suspensionResult.timeoutSeconds !== undefined`,
queue every pending step instead and return with the wait timeout.
This lets the wait timer drive a continuation in parallel, matching
V1's behavior where each step ran in a separate function
invocation. Pure step suspensions (without waits) still benefit
from inline execution.
Test plan:
- New e2e tests `sleepWinsRaceWorkflow` and `stepWinsRaceWorkflow`
exercising `Promise.race` between a step function and `sleep()`,
in both directions.
- Verified locally against `nextjs-turbopack` workbench: both pass.
Event log confirms `wait_completed` is now created on time
(t≈1s after `wait_created`) rather than after the inline step.
Eager-processing changelog updated with a "Mixed Suspensions"
section describing the carve-out and its rationale.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented May 5, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented May 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ee02092

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

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

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

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

@github-actions

github-actionsBot commented May 5, 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🥇 Express0.031s (-29.8% 🟢)1.005s (~)0.974s101.00x
💻 LocalNitro0.032s (-24.8% 🟢)1.005s (~)0.973s101.04x
🐘 PostgresNitro0.041s (-56.5% 🟢)1.011s (-3.0%)0.970s101.33x
🐘 PostgresExpress0.046s (-20.0% 🟢)1.012s (~)0.965s101.49x
🌐 RedisNext.js (Turbopack)0.053s1.005s0.952s101.70x
🐘 PostgresNext.js (Turbopack)0.061s1.013s0.952s101.95x
🌐 MongoDBNext.js (Turbopack)0.089s1.006s0.918s102.86x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.806s (+220.6% 🔺)2.783s (+19.3% 🔺)1.976s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.068s (-5.6% 🟢)2.006s (~)0.938s101.00x
💻 LocalExpress1.072s (-4.7%)2.006s (~)0.934s101.00x
🐘 PostgresExpress1.081s (-5.7% 🟢)2.009s (~)0.928s101.01x
🐘 PostgresNitro1.084s (-4.9%)2.010s (~)0.926s101.01x
🌐 RedisNext.js (Turbopack)1.111s2.006s0.895s101.04x
🐘 PostgresNext.js (Turbopack)1.131s2.010s0.879s101.06x
🌐 MongoDBNext.js (Turbopack)1.151s2.007s0.856s101.08x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.825s (+38.8% 🔺)4.958s (+29.4% 🔺)2.134s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.402s (-5.0%)11.021s (~)0.618s31.00x
💻 LocalExpress10.407s (-4.7%)11.021s (~)0.614s31.00x
🐘 PostgresExpress10.418s (-5.0%)11.015s (~)0.598s31.00x
🐘 PostgresNitro10.423s (-4.1%)11.015s (~)0.593s31.00x
🌐 RedisNext.js (Turbopack)10.663s11.023s0.360s31.03x
🌐 MongoDBNext.js (Turbopack)10.670s11.014s0.344s31.03x
🐘 PostgresNext.js (Turbopack)10.715s11.017s0.302s31.03x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)15.794s (-8.8% 🟢)17.951s (-7.5% 🟢)2.157s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express13.439s (-7.8% 🟢)14.018s (-6.7% 🟢)0.578s51.00x
💻 LocalNitro13.450s (-10.7% 🟢)14.026s (-12.5% 🟢)0.577s51.00x
💻 LocalExpress13.485s (-9.9% 🟢)14.026s (-6.7% 🟢)0.541s51.00x
🐘 PostgresNitro13.488s (-7.6% 🟢)14.019s (-6.7% 🟢)0.530s51.00x
🌐 MongoDBNext.js (Turbopack)13.940s14.219s0.279s51.04x
🐘 PostgresNext.js (Turbopack)14.131s15.022s0.891s41.05x
🌐 RedisNext.js (Turbopack)14.169s15.030s0.861s41.05x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)23.629s (-55.0% 🟢)25.826s (-52.7% 🟢)2.197s31.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro11.849s (-29.4% 🟢)12.022s (-29.4% 🟢)0.173s81.00x
💻 LocalExpress11.902s (-28.3% 🟢)12.022s (-29.4% 🟢)0.120s81.00x
🐘 PostgresExpress12.005s (-14.3% 🟢)12.394s (-15.1% 🟢)0.389s81.01x
🐘 PostgresNitro12.046s (-13.8% 🟢)12.645s (-11.6% 🟢)0.599s81.02x
🌐 MongoDBNext.js (Turbopack)12.694s13.017s0.323s71.07x
🌐 RedisNext.js (Turbopack)13.121s14.028s0.907s71.11x
🐘 PostgresNext.js (Turbopack)13.366s14.018s0.651s71.13x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)34.490s (-91.2% 🟢)36.796s (-90.7% 🟢)2.306s31.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.145s (-10.2% 🟢)2.007s (~)0.862s151.00x
🐘 PostgresExpress1.147s (-9.0% 🟢)2.008s (~)0.861s151.00x
💻 LocalNitro1.174s (-28.0% 🟢)2.006s (-3.3%)0.831s151.03x
💻 LocalExpress1.211s (-18.6% 🟢)2.006s (~)0.794s151.06x
🐘 PostgresNext.js (Turbopack)1.219s2.008s0.788s151.07x
🌐 RedisNext.js (Turbopack)1.275s2.007s0.732s151.11x
🌐 MongoDBNext.js (Turbopack)2.019s2.674s0.655s121.76x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.105s (+20.8% 🔺)6.180s (+25.3% 🔺)2.075s51.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.202s (-48.9% 🟢)2.006s (-33.3% 🟢)0.804s151.00x
🐘 PostgresExpress1.226s (-48.1% 🟢)2.007s (-33.3% 🟢)0.782s151.02x
🐘 PostgresNext.js (Turbopack)1.375s2.007s0.633s151.14x
💻 LocalNitro1.677s (-46.7% 🟢)2.005s (-48.4% 🟢)0.329s151.39x
💻 LocalExpress1.798s (-39.1% 🟢)2.008s (-41.9% 🟢)0.209s151.50x
🌐 RedisNext.js (Turbopack)2.397s3.009s0.612s101.99x
🌐 MongoDBNext.js (Turbopack)3.570s4.008s0.438s82.97x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.819s (-32.1% 🟢)6.927s (-22.2% 🟢)2.108s51.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.326s (-61.9% 🟢)2.008s (-49.9% 🟢)0.682s151.00x
🐘 PostgresExpress1.365s (-60.8% 🟢)2.008s (-49.9% 🟢)0.643s151.03x
🐘 PostgresNext.js (Turbopack)1.662s2.007s0.345s151.25x
🌐 RedisNext.js (Turbopack)3.651s4.011s0.360s82.75x
💻 LocalNitro4.459s (-46.6% 🟢)5.013s (-44.4% 🟢)0.554s73.36x
💻 LocalExpress5.277s (-36.7% 🟢)5.846s (-35.2% 🟢)0.569s63.98x
🌐 MongoDBNext.js (Turbopack)6.145s7.011s0.866s54.64x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)7.711s (-13.5% 🟢)10.175s (-7.2% 🟢)2.464s41.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.143s (-9.1% 🟢)2.008s (~)0.865s151.00x
🐘 PostgresNitro1.149s (-8.6% 🟢)2.008s (~)0.860s151.00x
🐘 PostgresNext.js (Turbopack)1.210s2.007s0.797s151.06x
🌐 RedisNext.js (Turbopack)1.237s2.007s0.770s151.08x
💻 LocalNitro1.377s (-26.2% 🟢)2.006s (-14.3% 🟢)0.629s151.20x
💻 LocalExpress1.754s (-7.4% 🟢)2.391s (+1.2%)0.638s131.53x
🌐 MongoDBNext.js (Turbopack)2.025s2.734s0.709s111.77x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.859s (+31.6% 🔺)5.663s (+22.0% 🔺)1.805s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.217s (-48.0% 🟢)2.075s (-31.1% 🟢)0.858s151.00x
🐘 PostgresExpress1.234s (-47.3% 🟢)2.010s (-33.3% 🟢)0.776s151.01x
🐘 PostgresNext.js (Turbopack)1.370s2.007s0.636s151.13x
💻 LocalNitro1.804s (-41.2% 🟢)2.222s (-42.8% 🟢)0.419s141.48x
💻 LocalExpress2.119s (-32.4% 🟢)2.590s (-31.2% 🟢)0.472s121.74x
🌐 RedisNext.js (Turbopack)2.366s3.009s0.643s101.94x
🌐 MongoDBNext.js (Turbopack)3.566s4.008s0.442s82.93x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)5.086s (+61.8% 🔺)7.055s (+56.0% 🔺)1.969s51.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.319s (-62.1% 🟢)2.007s (-49.9% 🟢)0.688s151.00x
🐘 PostgresExpress1.359s (-61.2% 🟢)2.008s (-49.9% 🟢)0.649s151.03x
🐘 PostgresNext.js (Turbopack)1.654s2.008s0.354s151.25x
🌐 RedisNext.js (Turbopack)3.666s4.010s0.344s82.78x
💻 LocalNitro4.835s (-47.1% 🟢)5.513s (-45.0% 🟢)0.677s63.67x
💻 LocalExpress5.619s (-36.2% 🟢)6.217s (-33.0% 🟢)0.598s54.26x
🌐 MongoDBNext.js (Turbopack)6.228s7.010s0.782s54.72x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.106s (-9.6% 🟢)7.716s (-9.7% 🟢)1.609s41.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.448s (-45.4% 🟢)1.006s (~)0.558s601.00x
💻 LocalExpress0.463s (-52.9% 🟢)1.004s (-6.7% 🟢)0.541s601.03x
🐘 PostgresExpress0.481s (-42.6% 🟢)1.023s (~)0.542s591.07x
💻 LocalNitro0.513s (-47.7% 🟢)1.021s (-6.7% 🟢)0.508s591.14x
🌐 MongoDBNext.js (Turbopack)0.595s1.005s0.410s601.33x
🌐 RedisNext.js (Turbopack)0.658s1.005s0.346s601.47x
🐘 PostgresNext.js (Turbopack)0.698s1.006s0.308s601.56x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.179s (-57.4% 🟢)8.102s (-49.6% 🟢)1.923s81.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.065s (-44.8% 🟢)1.772s (-15.6% 🟢)0.707s511.00x
🐘 PostgresExpress1.152s (-41.7% 🟢)1.844s (-18.3% 🟢)0.692s491.08x
💻 LocalNitro1.168s (-61.5% 🟢)2.005s (-46.6% 🟢)0.837s451.10x
💻 LocalExpress1.301s (-56.9% 🟢)2.122s (-40.8% 🟢)0.821s431.22x
🌐 MongoDBNext.js (Turbopack)1.484s2.006s0.522s451.39x
🌐 RedisNext.js (Turbopack)1.561s2.006s0.445s451.47x
🐘 PostgresNext.js (Turbopack)1.604s2.007s0.403s451.51x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)14.969s (-69.9% 🟢)17.357s (-66.4% 🟢)2.388s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.021s (-49.4% 🟢)2.456s (-43.8% 🟢)0.435s491.00x
🐘 PostgresNitro2.028s (-50.6% 🟢)2.528s (-45.1% 🟢)0.501s481.00x
💻 LocalNitro2.651s (-71.5% 🟢)3.007s (-70.0% 🟢)0.356s401.31x
💻 LocalExpress2.654s (-71.2% 🟢)3.007s (-70.0% 🟢)0.354s401.31x
🌐 RedisNext.js (Turbopack)3.018s3.396s0.378s361.49x
🐘 PostgresNext.js (Turbopack)3.183s4.009s0.825s301.58x
🌐 MongoDBNext.js (Turbopack)3.422s4.010s0.588s301.69x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)43.502s (-59.4% 🟢)46.024s (-57.7% 🟢)2.522s31.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.179s (-36.6% 🟢)1.006s (~)0.827s601.00x
🐘 PostgresNitro0.181s (-36.2% 🟢)1.006s (~)0.825s601.01x
🐘 PostgresNext.js (Turbopack)0.236s1.005s0.769s601.32x
🌐 RedisNext.js (Turbopack)0.261s1.004s0.743s601.46x
💻 LocalNitro0.410s (-32.2% 🟢)1.004s (-1.7%)0.594s602.29x
💻 LocalExpress0.449s (-19.9% 🟢)1.004s (~)0.555s602.51x
🌐 MongoDBNext.js (Turbopack)1.028s1.770s0.742s345.75x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.053s (+100.4% 🔺)6.298s (+66.0% 🔺)2.246s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.300s (-39.6% 🟢)1.006s (~)0.706s901.00x
🐘 PostgresExpress0.314s (-38.4% 🟢)1.007s (~)0.693s901.05x
🌐 RedisNext.js (Turbopack)0.431s1.004s0.573s901.44x
🐘 PostgresNext.js (Turbopack)0.455s1.006s0.550s901.52x
💻 LocalExpress2.143s (-14.7% 🟢)2.714s (-9.8% 🟢)0.572s347.15x
💻 LocalNitro2.165s (-14.7% 🟢)2.765s (-8.1% 🟢)0.600s337.22x
🌐 MongoDBNext.js (Turbopack)2.573s3.006s0.433s308.58x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)8.287s (+134.4% 🔺)10.464s (+101.5% 🔺)2.176s91.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.606s (-23.3% 🟢)1.006s (~)0.400s1201.00x
🐘 PostgresExpress0.632s (-22.8% 🟢)1.006s (-1.1%)0.373s1201.04x
🌐 RedisNext.js (Turbopack)0.810s1.004s0.195s1201.34x
🐘 PostgresNext.js (Turbopack)0.958s1.387s0.430s871.58x
🌐 MongoDBNext.js (Turbopack)5.307s6.011s0.704s208.76x
💻 LocalNitro9.751s (-12.9% 🟢)10.445s (-10.4% 🟢)0.694s1216.09x
💻 LocalExpress10.904s (-2.6%)11.399s (-4.5%)0.496s1117.99x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)20.304s (+96.6% 🔺)22.967s (+86.9% 🔺)2.663s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.131s (+451.5% 🔺)2.000s (+100.3% 🔺)0.001s (-31.3% 🟢)2.010s (+98.8% 🔺)0.879s101.00x
💻 LocalNitro1.131s (+429.3% 🔺)2.004s (+99.5% 🔺)0.011s (-15.2% 🟢)2.017s (+98.0% 🔺)0.886s101.00x
🐘 PostgresNitro1.132s (+452.2% 🔺)2.001s (+100.1% 🔺)0.001s (-26.7% 🟢)2.009s (+98.7% 🔺)0.877s101.00x
💻 LocalExpress1.141s (+473.3% 🔺)2.005s (+99.6% 🔺)0.012s (~)2.019s (+98.3% 🔺)0.878s101.01x
🐘 PostgresNext.js (Turbopack)1.201s2.001s0.001s2.011s0.810s101.06x
🌐 MongoDBNext.js (Turbopack)⚠️missing-----
🌐 RedisNext.js (Turbopack)⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.713s (-31.2% 🟢)5.161s (-40.3% 🟢)1.482s (+134.6% 🔺)8.473s (-13.4% 🟢)3.760s101.00x
▲ VercelExpress⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.505s (+139.0% 🔺)2.003s (+99.0% 🔺)0.004s (+0.9%)2.026s (+98.0% 🔺)0.520s301.00x
🐘 PostgresNitro1.522s (+143.9% 🔺)2.006s (+99.3% 🔺)0.004s (-15.4% 🟢)2.024s (+97.9% 🔺)0.502s301.01x
💻 LocalExpress1.570s (+107.4% 🔺)2.012s (+95.6% 🔺)0.011s (+14.7% 🔺)2.025s (+94.8% 🔺)0.455s301.04x
🐘 PostgresNext.js (Turbopack)1.664s2.011s0.004s2.025s0.361s301.11x
💻 LocalNitro1.688s (+101.3% 🔺)2.011s (+98.7% 🔺)0.009s (-4.0%)2.201s (+97.2% 🔺)0.513s281.12x
🌐 MongoDBNext.js (Turbopack)⚠️missing-----
🌐 RedisNext.js (Turbopack)⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)12.267s (-27.5% 🟢)13.897s (-23.8% 🟢)0.343s (+62.3% 🔺)15.237s (-19.5% 🟢)2.969s51.00x
▲ VercelExpress⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.642s (-33.7% 🟢)1.016s (-18.5% 🟢)0.000s (-59.3% 🟢)1.023s (-18.6% 🟢)0.381s591.00x
🐘 PostgresExpress0.692s (-27.9% 🟢)1.047s (-18.0% 🟢)0.000s (+21.1% 🔺)1.060s (-18.8% 🟢)0.368s571.08x
🐘 PostgresNext.js (Turbopack)0.826s1.071s0.000s1.078s0.252s561.29x
💻 LocalNitro1.335s (+9.2% 🔺)2.015s (~)0.000s (+100.0% 🔺)2.017s (~)0.681s302.08x
💻 LocalExpress1.386s (+13.2% 🔺)2.015s (~)0.000s (-80.0% 🟢)2.017s (~)0.631s302.16x
🌐 MongoDBNext.js (Turbopack)⚠️missing-----
🌐 RedisNext.js (Turbopack)⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.379s (-37.3% 🟢)7.433s (-35.5% 🟢)0.000s (NaN%)8.871s (-26.4% 🟢)2.492s71.00x
▲ VercelExpress⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack)

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.252s (-29.3% 🟢)1.996s (-8.3% 🟢)0.000s (+Infinity% 🔺)2.034s (-7.5% 🟢)0.782s301.00x
🐘 PostgresNitro1.354s (-24.4% 🟢)2.105s (-1.7%)0.000s (+93.1% 🔺)2.123s (-2.4%)0.769s291.08x
🐘 PostgresNext.js (Turbopack)1.678s2.262s0.000s2.286s0.608s271.34x
💻 LocalNitro3.014s (-11.0% 🟢)3.842s (-4.7%)0.001s (-6.2% 🟢)3.844s (-4.8%)0.831s162.41x
💻 LocalExpress3.243s (-6.5% 🟢)3.968s (-1.6%)0.000s (-45.3% 🟢)3.970s (-1.7%)0.726s162.59x
🌐 MongoDBNext.js (Turbopack)⚠️missing-----
🌐 RedisNext.js (Turbopack)⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)8.615s (+53.4% 🔺)10.007s (+43.3% 🔺)0.000s (+33.3% 🔺)11.037s (+46.4% 🔺)2.422s61.00x
▲ VercelExpress⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro17/21
🐘 PostgresNitro11/21
▲ VercelNext.js (Turbopack)21/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres16/21
Next.js (Turbopack)🐘 Postgres11/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: failure
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

@github-actions

github-actionsBot commented May 5, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production92502191144
✅ 💻 Local Development123702191456
✅ 📦 Local Production123702191456
✅ 🐘 Local Postgres123702191456
✅ 🪟 Windows10400104
✅ 📋 Other5520176728
Total5292010526344

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro78026
✅ example78026
✅ express78026
✅ fastify78026
✅ hono78026
✅ nextjs-turbopack10202
✅ nextjs-webpack10202
✅ nitro78026
✅ nuxt78026
✅ sveltekit9707
✅ vite78026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable79025
✅ express-stable79025
✅ fastify-stable79025
✅ hono-stable79025
✅ nextjs-turbopack-canary85019
✅ nextjs-turbopack-stable-lazy-discovery-disabled10400
✅ nextjs-turbopack-stable-lazy-discovery-enabled10400
✅ nextjs-webpack-canary85019
✅ nextjs-webpack-stable-lazy-discovery-disabled10400
✅ nextjs-webpack-stable-lazy-discovery-enabled10400
✅ nitro-stable79025
✅ nuxt-stable79025
✅ sveltekit-stable9806
✅ vite-stable79025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable79025
✅ express-stable79025
✅ fastify-stable79025
✅ hono-stable79025
✅ nextjs-turbopack-canary85019
✅ nextjs-turbopack-stable-lazy-discovery-disabled10400
✅ nextjs-turbopack-stable-lazy-discovery-enabled10400
✅ nextjs-webpack-canary85019
✅ nextjs-webpack-stable-lazy-discovery-disabled10400
✅ nextjs-webpack-stable-lazy-discovery-enabled10400
✅ nitro-stable79025
✅ nuxt-stable79025
✅ sveltekit-stable9806
✅ vite-stable79025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable79025
✅ express-stable79025
✅ fastify-stable79025
✅ hono-stable79025
✅ nextjs-turbopack-canary85019
✅ nextjs-turbopack-stable-lazy-discovery-disabled10400
✅ nextjs-turbopack-stable-lazy-discovery-enabled10400
✅ nextjs-webpack-canary85019
✅ nextjs-webpack-stable-lazy-discovery-disabled10400
✅ nextjs-webpack-stable-lazy-discovery-enabled10400
✅ nitro-stable79025
✅ nuxt-stable79025
✅ sveltekit-stable9806
✅ vite-stable79025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack10400
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable79025
✅ e2e-local-dev-tanstack-start-79025
✅ e2e-local-postgres-nest-stable79025
✅ e2e-local-postgres-tanstack-start-79025
✅ e2e-local-prod-nest-stable79025
✅ e2e-local-prod-tanstack-start-79025
✅ e2e-vercel-prod-tanstack-start78026

📋 View full workflow run

Comment thread.changeset/fix-step-vs-wait-race.md Outdated
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@VaguelySerious
VaguelySerious merged commit 3535caf into mainMay 5, 2026
112 of 115 checks passed
@VaguelySerious
VaguelySerious deleted the peter/fix-step-vs-wait-race branch May 5, 2026 00:49
@github-actionsgithub-actionsBot mentioned this pull request May 5, 2026
pranaygp added a commit that referenced this pull request May 5, 2026
* origin/main:
[core] Skip inline step execution when suspension also has a wait (#1924)
[errors] Replace chalk import in @workfow/errors with inline ANSI shim (#1915)
Fix compatibility with Zod 4.4.x (#1902)
Serialize `run_failed`/`step_failed` errors through serialization pipeline (#1851)
tarballs: redesign preview tarballs index page (#1911)
Remove extra changeset (#1922)
Add stable Next.js eager and lazy test coverage (#1747)
Enforce per-(run, correlation) uniqueness for entity-creating events in world-postgres (#1878)
fix(world-vercel): add default request timeout to workflow-server HTTP calls (#1807)
pranaygp added a commit that referenced this pull request May 5, 2026
PR #1924 added the same sleep/step race workflows directly to main
while this branch was open. The textual concat from `git merge`
left both copies in 99_e2e.ts; this drops the duplicate set so the
file matches origin/main verbatim and the e2e tests pick up the
upstream definitions.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
pranaygp added a commit that referenced this pull request May 5, 2026
…ignal
* origin/main:
[core] Skip inline step execution when suspension also has a wait (#1924)
[errors] Replace chalk import in @workfow/errors with inline ANSI shim (#1915)
Fix compatibility with Zod 4.4.x (#1902)
Serialize `run_failed`/`step_failed` errors through serialization pipeline (#1851)
tarballs: redesign preview tarballs index page (#1911)
Remove extra changeset (#1922)
Add stable Next.js eager and lazy test coverage (#1747)
Enforce per-(run, correlation) uniqueness for entity-creating events in world-postgres (#1878)
fix(world-vercel): add default request timeout to workflow-server HTTP calls (#1807)
Allow disabling step sourcemap with new `sourcemap` option in builders (#1842)
[ci] Enable Vercel-prod e2e for tanstack-start (#1904)
web: configure vercelPreset() for Vercel deployments (#1815)
[core] Combine flow+step bundle and process steps eagerly (#1338)
[world-vercel] Revert stream close control framing (#1891)
[tarballs] Use turbo to build workspace deps before packing (#1908)
# Conflicts:
#	packages/core/src/runtime/step-handler.test.ts
#	packages/core/src/runtime/step-handler.ts
#	packages/core/src/runtime/suspension-handler.ts
#	packages/core/src/step.test.ts
#	packages/world-local/src/storage/events-storage.ts
#	packages/world-postgres/src/drizzle/migrations/meta/_journal.json
pranaygp added a commit that referenced this pull request May 5, 2026
* [e2e] Add step-vs-sleep race tests + dev-tmux skill
Adds two race workflows (sleepWinsRaceWorkflow, stepWinsRaceWorkflow)
that exercise Promise.race between a step function and a sleep call.
The current `sleepWinsRaceWorkflow` test fails — surfacing how the
replay engine resolves a previously-completed step instantly while
sleep still has to elapse.
Also adds a `dev-tmux` skill that documents the 3-pane tmux + portless
setup for testing workflows interactively in a worktree alongside the
observability UI.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [workbench/nextjs-turbopack] Allow *.turbopack.localhost in dev
Adds allowedDevOrigins entries so portless-style worktree-prefixed
.localhost URLs (e.g. https://<branch>.turbopack.localhost) can hit
HMR and dev-only endpoints without Next's cross-origin protection
flooding the logs with warnings.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Drop duplicate race workflows after merging main
PR #1924 added the same sleep/step race workflows directly to main
while this branch was open. The textual concat from `git merge`
left both copies in 99_e2e.ts; this drops the duplicate set so the
file matches origin/main verbatim and the e2e tests pick up the
upstream definitions.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Narrow activation, robust pane IDs, statusline helper
- Tighten activation phrases so the skill only fires for the specific
portless+tmux setup it documents, not the generic "start the dev
server" task. Addresses #1916 review.
- Capture pane IDs at split time (-P -F '#{pane_id}') so the snippet
works under both pane-base-index 0 and 1. Addresses Copilot review.
- Add `statusline.sh` that filters `portless list` to the current
worktree's routes and emits a one-line summary, plus instructions
for wiring it into Claude Code's `statusLine.command`.
- Bump version to 1.1.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Recommend primary-checkout path for statusline
Worktrees get deleted, so wiring the statusline to a worktree path
breaks the moment the worktree is removed. Update the skill and the
script header to recommend pointing `statusLine.command` at the
primary checkout (`$HOME/github/vercel/workflow/...`). The script
itself is already worktree-aware via Claude's `workspace.current_dir`
stdin JSON, so the same invocation surfaces routes for whichever
worktree the session is in.
Bump version to 1.2.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] OSC 8 link statusline + worktree-named tmux session
- Statusline overlay now renders `[dev] · [obs] · tmux:<prefix>`,
with the bracketed labels emitted as OSC 8 hyperlinks (clickable in
any modern terminal) styled cyan + underline so they stand out.
Replaces the old long-URL form that was hard to scan and click.
- Add a tmux-session indicator: shown when a session named exactly the
worktree prefix exists (uses `tmux has-session -t =<prefix>` for
exact matching).
- Change the skill's tmux session naming convention from the fixed
`workflow-dev` to `<worktree-prefix>` (basename of the branch — same
string portless uses as the subdomain prefix). This lets the
statusline locate the session deterministically and lets multiple
worktrees run dev sessions concurrently without manual disambiguation.
- Bump skill to v1.3.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Statusline: print full `tmux attach -t <name>` command
Replaces the abbreviated `tmux:<prefix>` indicator with the full
copy-paste-ready `tmux attach -t <prefix>` invocation. Saves a step
when grabbing the session from another shell.
Bump skill to v1.4.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Brighter statusline + Nerd Font icons
- Drop the dim styling that made the overlay hard to read; use bold
bright cyan + underline for links and bold bright green for the
tmux command.
- Add Nerd Font glyphs: for dev, for obs, for the
tmux copy-paste hint. Falls back to box-drawing if the font lacks
Nerd Font ranges; layout is unaffected.
- Visual differentiation: cyan + underline = clickable hyperlink;
green = copy this command.
Bump skill to v1.5.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Restore Nerd Font icons via Unicode escapes
The copy glyph in `emit_tmux` was a literal Nerd Font byte embedded in
the printf string and got stripped during a prior rewrite. Promote all
three icons (rocket / graph / copy) to top-level shell variables that
use \uHHHH-equivalent UTF-8 escapes, so the source survives editor
round-trips that don't preserve Private Use Area code points.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/internal-dev-workbench] Rename from dev-tmux, set author + reset version
- Rename `skills/dev-tmux/` → `skills/internal-dev-workbench/` to make
the name self-explanatory about the skill's scope (an internal
contributor's local dev workbench, not a generic tmux helper).
- Author: Pranay Prakash. Version: 0.1 (first release of the skill).
- Update internal references in SKILL.md and statusline.sh accordingly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

2 participants

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

[core] V2: skip inline step execution when suspension also has a wait - #1924

Merged
VaguelySerious merged 2 commits into
mainfrom
peter/fix-step-vs-wait-race
May 5, 2026
Merged

[core] V2: skip inline step execution when suspension also has a wait#1924
VaguelySerious merged 2 commits into
mainfrom
peter/fix-step-vs-wait-race

Conversation

@VaguelySerious

Copy link
Copy Markdown
Member

Summary

Fix Promise.race(step, sleep) semantics in V2 mixed suspensions: when a workflow suspension contains both pending steps and at least one wait (sleep), the runtime now queues every step instead of executing one inline.

Inline `await executeStep(...)` blocks the V2 handler for the full step duration, but `wait_completed` events are only created on the next loop iteration's "complete elapsed waits" pass. So if the sleep is shorter than the step, the wait timer never fires on time — replay just sees `step_completed` first and `Promise.race` resolves with the step. A 1s sleep racing a 10s step would silently resolve to the step.

This restores V1's behavior, where each step ran in a separate function invocation and the wait timer drove a parallel queue continuation.

Reproducer (failing test from #1916)

`sleepWinsRaceWorkflow`: a 1s sleep raced against a 10s step. Expected `'sleep'` to win.

Event log on the failing run, before the fix:

t (s)Event
0.000`run_created`
1.738`step_created` + `wait_created`resumeAt = t+1s
1.742`step_started`inline execution begins
11.825`step_completed`step body finishes after ~10s
11.861`wait_completed`created right after step_completed, not on time
11.959`run_completed`replay picked `'step'`

After the fix, `wait_completed` lands at t≈1s after `wait_created` and the run completes with `'sleep'` in ~1s.

Change

One-liner in `packages/core/src/runtime.ts`:

```ts
const inlineStep =
suspensionResult.timeoutSeconds === undefined
? ownedPendingSteps[0]
: undefined;
```

The existing "queue every pending step except the inline one" loop and the `if (!inlineStep)` early-return already handle the `undefined` case correctly.

What about hooks?

Audited every flavor of suspension. Step + wait is the only fully-broken combination.

Suspension containsBehavior in V2Race-correct?
steps onlyone inline, rest queued
wait onlyreturns with timeoutSeconds
hook onlyreturns; external resumeHook drives continuation
wait + hookno steps → returns with timeoutSeconds
step + waitstep inline-blocks, wait timer never fires❌ — fixed here
step + hookstep inline-blocks, but hook continuation runs concurrently via queueConcurrency (≥1000 on world-local, 50 on world-postgres, auto on Vercel)⚠️ correct via concurrency, but step keeps running uselessly until termination

Step + hook works on all first-party worlds today. A consistent follow-up would extend the same carve-out to `hasPendingHooks`, but it would require a new field in `SuspensionHandlerResult` and isn't strictly necessary — happy to do that as a follow-up if desired.

Test plan

  • New e2e tests `sleepWinsRaceWorkflow` and `stepWinsRaceWorkflow` (the failing tests from Add dev-tmux skill for portless+tmux local Workflow SDK dev #1916, plus the symmetric stepWins case).
  • `pnpm vitest run packages/core/e2e/e2e.test.ts -t WinsRaceWorkflow` against the `nextjs-turbopack` workbench locally — both pass.
  • Event log inspection confirms `wait_completed` is now created at t≈1s.
  • All 842 `@workflow/core` unit tests pass.

Docs

`docs/content/docs/changelog/eager-processing.mdx` "Mixed Suspensions" section rewritten to describe the carve-out and explicitly call out the `Promise.race(step, sleep)` race-semantics motivation.

🤖 Generated with Claude Code

Inline `await executeStep(...)` blocks the V2 handler for the full
step duration, but `wait_completed` events are only created on the
*next* loop iteration's "complete elapsed waits" pass. This breaks
`Promise.race(step, sleep)` semantics whenever the sleep is shorter
than the step — replay still picks the step because the sleep's
wait_completed event hasn't been written yet.
Reproducer (`sleepWinsRaceWorkflow`): a 1s sleep raced against a 10s
step. Expected `'sleep'` to win; the runtime returned `'step'`. On
the failing run, `wait_completed` was created at t=11.86s — right
after `step_completed` — instead of at t≈2.74s when its `resumeAt`
elapsed.
Fix: in `runtime.ts`, gate the inline-step pick on the absence of a
wait timeout. When `suspensionResult.timeoutSeconds !== undefined`,
queue every pending step instead and return with the wait timeout.
This lets the wait timer drive a continuation in parallel, matching
V1's behavior where each step ran in a separate function
invocation. Pure step suspensions (without waits) still benefit
from inline execution.
Test plan:
- New e2e tests `sleepWinsRaceWorkflow` and `stepWinsRaceWorkflow`
exercising `Promise.race` between a step function and `sleep()`,
in both directions.
- Verified locally against `nextjs-turbopack` workbench: both pass.
Event log confirms `wait_completed` is now created on time
(t≈1s after `wait_created`) rather than after the inline step.
Eager-processing changelog updated with a "Mixed Suspensions"
section describing the carve-out and its rationale.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented May 5, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented May 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ee02092

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

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

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

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

@github-actions

github-actionsBot commented May 5, 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🥇 Express0.031s (-29.8% 🟢)1.005s (~)0.974s101.00x
💻 LocalNitro0.032s (-24.8% 🟢)1.005s (~)0.973s101.04x
🐘 PostgresNitro0.041s (-56.5% 🟢)1.011s (-3.0%)0.970s101.33x
🐘 PostgresExpress0.046s (-20.0% 🟢)1.012s (~)0.965s101.49x
🌐 RedisNext.js (Turbopack)0.053s1.005s0.952s101.70x
🐘 PostgresNext.js (Turbopack)0.061s1.013s0.952s101.95x
🌐 MongoDBNext.js (Turbopack)0.089s1.006s0.918s102.86x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.806s (+220.6% 🔺)2.783s (+19.3% 🔺)1.976s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.068s (-5.6% 🟢)2.006s (~)0.938s101.00x
💻 LocalExpress1.072s (-4.7%)2.006s (~)0.934s101.00x
🐘 PostgresExpress1.081s (-5.7% 🟢)2.009s (~)0.928s101.01x
🐘 PostgresNitro1.084s (-4.9%)2.010s (~)0.926s101.01x
🌐 RedisNext.js (Turbopack)1.111s2.006s0.895s101.04x
🐘 PostgresNext.js (Turbopack)1.131s2.010s0.879s101.06x
🌐 MongoDBNext.js (Turbopack)1.151s2.007s0.856s101.08x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.825s (+38.8% 🔺)4.958s (+29.4% 🔺)2.134s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.402s (-5.0%)11.021s (~)0.618s31.00x
💻 LocalExpress10.407s (-4.7%)11.021s (~)0.614s31.00x
🐘 PostgresExpress10.418s (-5.0%)11.015s (~)0.598s31.00x
🐘 PostgresNitro10.423s (-4.1%)11.015s (~)0.593s31.00x
🌐 RedisNext.js (Turbopack)10.663s11.023s0.360s31.03x
🌐 MongoDBNext.js (Turbopack)10.670s11.014s0.344s31.03x
🐘 PostgresNext.js (Turbopack)10.715s11.017s0.302s31.03x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)15.794s (-8.8% 🟢)17.951s (-7.5% 🟢)2.157s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express13.439s (-7.8% 🟢)14.018s (-6.7% 🟢)0.578s51.00x
💻 LocalNitro13.450s (-10.7% 🟢)14.026s (-12.5% 🟢)0.577s51.00x
💻 LocalExpress13.485s (-9.9% 🟢)14.026s (-6.7% 🟢)0.541s51.00x
🐘 PostgresNitro13.488s (-7.6% 🟢)14.019s (-6.7% 🟢)0.530s51.00x
🌐 MongoDBNext.js (Turbopack)13.940s14.219s0.279s51.04x
🐘 PostgresNext.js (Turbopack)14.131s15.022s0.891s41.05x
🌐 RedisNext.js (Turbopack)14.169s15.030s0.861s41.05x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)23.629s (-55.0% 🟢)25.826s (-52.7% 🟢)2.197s31.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro11.849s (-29.4% 🟢)12.022s (-29.4% 🟢)0.173s81.00x
💻 LocalExpress11.902s (-28.3% 🟢)12.022s (-29.4% 🟢)0.120s81.00x
🐘 PostgresExpress12.005s (-14.3% 🟢)12.394s (-15.1% 🟢)0.389s81.01x
🐘 PostgresNitro12.046s (-13.8% 🟢)12.645s (-11.6% 🟢)0.599s81.02x
🌐 MongoDBNext.js (Turbopack)12.694s13.017s0.323s71.07x
🌐 RedisNext.js (Turbopack)13.121s14.028s0.907s71.11x
🐘 PostgresNext.js (Turbopack)13.366s14.018s0.651s71.13x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)34.490s (-91.2% 🟢)36.796s (-90.7% 🟢)2.306s31.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.145s (-10.2% 🟢)2.007s (~)0.862s151.00x
🐘 PostgresExpress1.147s (-9.0% 🟢)2.008s (~)0.861s151.00x
💻 LocalNitro1.174s (-28.0% 🟢)2.006s (-3.3%)0.831s151.03x
💻 LocalExpress1.211s (-18.6% 🟢)2.006s (~)0.794s151.06x
🐘 PostgresNext.js (Turbopack)1.219s2.008s0.788s151.07x
🌐 RedisNext.js (Turbopack)1.275s2.007s0.732s151.11x
🌐 MongoDBNext.js (Turbopack)2.019s2.674s0.655s121.76x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.105s (+20.8% 🔺)6.180s (+25.3% 🔺)2.075s51.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.202s (-48.9% 🟢)2.006s (-33.3% 🟢)0.804s151.00x
🐘 PostgresExpress1.226s (-48.1% 🟢)2.007s (-33.3% 🟢)0.782s151.02x
🐘 PostgresNext.js (Turbopack)1.375s2.007s0.633s151.14x
💻 LocalNitro1.677s (-46.7% 🟢)2.005s (-48.4% 🟢)0.329s151.39x
💻 LocalExpress1.798s (-39.1% 🟢)2.008s (-41.9% 🟢)0.209s151.50x
🌐 RedisNext.js (Turbopack)2.397s3.009s0.612s101.99x
🌐 MongoDBNext.js (Turbopack)3.570s4.008s0.438s82.97x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.819s (-32.1% 🟢)6.927s (-22.2% 🟢)2.108s51.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.326s (-61.9% 🟢)2.008s (-49.9% 🟢)0.682s151.00x
🐘 PostgresExpress1.365s (-60.8% 🟢)2.008s (-49.9% 🟢)0.643s151.03x
🐘 PostgresNext.js (Turbopack)1.662s2.007s0.345s151.25x
🌐 RedisNext.js (Turbopack)3.651s4.011s0.360s82.75x
💻 LocalNitro4.459s (-46.6% 🟢)5.013s (-44.4% 🟢)0.554s73.36x
💻 LocalExpress5.277s (-36.7% 🟢)5.846s (-35.2% 🟢)0.569s63.98x
🌐 MongoDBNext.js (Turbopack)6.145s7.011s0.866s54.64x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)7.711s (-13.5% 🟢)10.175s (-7.2% 🟢)2.464s41.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.143s (-9.1% 🟢)2.008s (~)0.865s151.00x
🐘 PostgresNitro1.149s (-8.6% 🟢)2.008s (~)0.860s151.00x
🐘 PostgresNext.js (Turbopack)1.210s2.007s0.797s151.06x
🌐 RedisNext.js (Turbopack)1.237s2.007s0.770s151.08x
💻 LocalNitro1.377s (-26.2% 🟢)2.006s (-14.3% 🟢)0.629s151.20x
💻 LocalExpress1.754s (-7.4% 🟢)2.391s (+1.2%)0.638s131.53x
🌐 MongoDBNext.js (Turbopack)2.025s2.734s0.709s111.77x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.859s (+31.6% 🔺)5.663s (+22.0% 🔺)1.805s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.217s (-48.0% 🟢)2.075s (-31.1% 🟢)0.858s151.00x
🐘 PostgresExpress1.234s (-47.3% 🟢)2.010s (-33.3% 🟢)0.776s151.01x
🐘 PostgresNext.js (Turbopack)1.370s2.007s0.636s151.13x
💻 LocalNitro1.804s (-41.2% 🟢)2.222s (-42.8% 🟢)0.419s141.48x
💻 LocalExpress2.119s (-32.4% 🟢)2.590s (-31.2% 🟢)0.472s121.74x
🌐 RedisNext.js (Turbopack)2.366s3.009s0.643s101.94x
🌐 MongoDBNext.js (Turbopack)3.566s4.008s0.442s82.93x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)5.086s (+61.8% 🔺)7.055s (+56.0% 🔺)1.969s51.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.319s (-62.1% 🟢)2.007s (-49.9% 🟢)0.688s151.00x
🐘 PostgresExpress1.359s (-61.2% 🟢)2.008s (-49.9% 🟢)0.649s151.03x
🐘 PostgresNext.js (Turbopack)1.654s2.008s0.354s151.25x
🌐 RedisNext.js (Turbopack)3.666s4.010s0.344s82.78x
💻 LocalNitro4.835s (-47.1% 🟢)5.513s (-45.0% 🟢)0.677s63.67x
💻 LocalExpress5.619s (-36.2% 🟢)6.217s (-33.0% 🟢)0.598s54.26x
🌐 MongoDBNext.js (Turbopack)6.228s7.010s0.782s54.72x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.106s (-9.6% 🟢)7.716s (-9.7% 🟢)1.609s41.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.448s (-45.4% 🟢)1.006s (~)0.558s601.00x
💻 LocalExpress0.463s (-52.9% 🟢)1.004s (-6.7% 🟢)0.541s601.03x
🐘 PostgresExpress0.481s (-42.6% 🟢)1.023s (~)0.542s591.07x
💻 LocalNitro0.513s (-47.7% 🟢)1.021s (-6.7% 🟢)0.508s591.14x
🌐 MongoDBNext.js (Turbopack)0.595s1.005s0.410s601.33x
🌐 RedisNext.js (Turbopack)0.658s1.005s0.346s601.47x
🐘 PostgresNext.js (Turbopack)0.698s1.006s0.308s601.56x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.179s (-57.4% 🟢)8.102s (-49.6% 🟢)1.923s81.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.065s (-44.8% 🟢)1.772s (-15.6% 🟢)0.707s511.00x
🐘 PostgresExpress1.152s (-41.7% 🟢)1.844s (-18.3% 🟢)0.692s491.08x
💻 LocalNitro1.168s (-61.5% 🟢)2.005s (-46.6% 🟢)0.837s451.10x
💻 LocalExpress1.301s (-56.9% 🟢)2.122s (-40.8% 🟢)0.821s431.22x
🌐 MongoDBNext.js (Turbopack)1.484s2.006s0.522s451.39x
🌐 RedisNext.js (Turbopack)1.561s2.006s0.445s451.47x
🐘 PostgresNext.js (Turbopack)1.604s2.007s0.403s451.51x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)14.969s (-69.9% 🟢)17.357s (-66.4% 🟢)2.388s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.021s (-49.4% 🟢)2.456s (-43.8% 🟢)0.435s491.00x
🐘 PostgresNitro2.028s (-50.6% 🟢)2.528s (-45.1% 🟢)0.501s481.00x
💻 LocalNitro2.651s (-71.5% 🟢)3.007s (-70.0% 🟢)0.356s401.31x
💻 LocalExpress2.654s (-71.2% 🟢)3.007s (-70.0% 🟢)0.354s401.31x
🌐 RedisNext.js (Turbopack)3.018s3.396s0.378s361.49x
🐘 PostgresNext.js (Turbopack)3.183s4.009s0.825s301.58x
🌐 MongoDBNext.js (Turbopack)3.422s4.010s0.588s301.69x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)43.502s (-59.4% 🟢)46.024s (-57.7% 🟢)2.522s31.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.179s (-36.6% 🟢)1.006s (~)0.827s601.00x
🐘 PostgresNitro0.181s (-36.2% 🟢)1.006s (~)0.825s601.01x
🐘 PostgresNext.js (Turbopack)0.236s1.005s0.769s601.32x
🌐 RedisNext.js (Turbopack)0.261s1.004s0.743s601.46x
💻 LocalNitro0.410s (-32.2% 🟢)1.004s (-1.7%)0.594s602.29x
💻 LocalExpress0.449s (-19.9% 🟢)1.004s (~)0.555s602.51x
🌐 MongoDBNext.js (Turbopack)1.028s1.770s0.742s345.75x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.053s (+100.4% 🔺)6.298s (+66.0% 🔺)2.246s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.300s (-39.6% 🟢)1.006s (~)0.706s901.00x
🐘 PostgresExpress0.314s (-38.4% 🟢)1.007s (~)0.693s901.05x
🌐 RedisNext.js (Turbopack)0.431s1.004s0.573s901.44x
🐘 PostgresNext.js (Turbopack)0.455s1.006s0.550s901.52x
💻 LocalExpress2.143s (-14.7% 🟢)2.714s (-9.8% 🟢)0.572s347.15x
💻 LocalNitro2.165s (-14.7% 🟢)2.765s (-8.1% 🟢)0.600s337.22x
🌐 MongoDBNext.js (Turbopack)2.573s3.006s0.433s308.58x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)8.287s (+134.4% 🔺)10.464s (+101.5% 🔺)2.176s91.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.606s (-23.3% 🟢)1.006s (~)0.400s1201.00x
🐘 PostgresExpress0.632s (-22.8% 🟢)1.006s (-1.1%)0.373s1201.04x
🌐 RedisNext.js (Turbopack)0.810s1.004s0.195s1201.34x
🐘 PostgresNext.js (Turbopack)0.958s1.387s0.430s871.58x
🌐 MongoDBNext.js (Turbopack)5.307s6.011s0.704s208.76x
💻 LocalNitro9.751s (-12.9% 🟢)10.445s (-10.4% 🟢)0.694s1216.09x
💻 LocalExpress10.904s (-2.6%)11.399s (-4.5%)0.496s1117.99x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)20.304s (+96.6% 🔺)22.967s (+86.9% 🔺)2.663s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.131s (+451.5% 🔺)2.000s (+100.3% 🔺)0.001s (-31.3% 🟢)2.010s (+98.8% 🔺)0.879s101.00x
💻 LocalNitro1.131s (+429.3% 🔺)2.004s (+99.5% 🔺)0.011s (-15.2% 🟢)2.017s (+98.0% 🔺)0.886s101.00x
🐘 PostgresNitro1.132s (+452.2% 🔺)2.001s (+100.1% 🔺)0.001s (-26.7% 🟢)2.009s (+98.7% 🔺)0.877s101.00x
💻 LocalExpress1.141s (+473.3% 🔺)2.005s (+99.6% 🔺)0.012s (~)2.019s (+98.3% 🔺)0.878s101.01x
🐘 PostgresNext.js (Turbopack)1.201s2.001s0.001s2.011s0.810s101.06x
🌐 MongoDBNext.js (Turbopack)⚠️missing-----
🌐 RedisNext.js (Turbopack)⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.713s (-31.2% 🟢)5.161s (-40.3% 🟢)1.482s (+134.6% 🔺)8.473s (-13.4% 🟢)3.760s101.00x
▲ VercelExpress⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.505s (+139.0% 🔺)2.003s (+99.0% 🔺)0.004s (+0.9%)2.026s (+98.0% 🔺)0.520s301.00x
🐘 PostgresNitro1.522s (+143.9% 🔺)2.006s (+99.3% 🔺)0.004s (-15.4% 🟢)2.024s (+97.9% 🔺)0.502s301.01x
💻 LocalExpress1.570s (+107.4% 🔺)2.012s (+95.6% 🔺)0.011s (+14.7% 🔺)2.025s (+94.8% 🔺)0.455s301.04x
🐘 PostgresNext.js (Turbopack)1.664s2.011s0.004s2.025s0.361s301.11x
💻 LocalNitro1.688s (+101.3% 🔺)2.011s (+98.7% 🔺)0.009s (-4.0%)2.201s (+97.2% 🔺)0.513s281.12x
🌐 MongoDBNext.js (Turbopack)⚠️missing-----
🌐 RedisNext.js (Turbopack)⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)12.267s (-27.5% 🟢)13.897s (-23.8% 🟢)0.343s (+62.3% 🔺)15.237s (-19.5% 🟢)2.969s51.00x
▲ VercelExpress⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.642s (-33.7% 🟢)1.016s (-18.5% 🟢)0.000s (-59.3% 🟢)1.023s (-18.6% 🟢)0.381s591.00x
🐘 PostgresExpress0.692s (-27.9% 🟢)1.047s (-18.0% 🟢)0.000s (+21.1% 🔺)1.060s (-18.8% 🟢)0.368s571.08x
🐘 PostgresNext.js (Turbopack)0.826s1.071s0.000s1.078s0.252s561.29x
💻 LocalNitro1.335s (+9.2% 🔺)2.015s (~)0.000s (+100.0% 🔺)2.017s (~)0.681s302.08x
💻 LocalExpress1.386s (+13.2% 🔺)2.015s (~)0.000s (-80.0% 🟢)2.017s (~)0.631s302.16x
🌐 MongoDBNext.js (Turbopack)⚠️missing-----
🌐 RedisNext.js (Turbopack)⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.379s (-37.3% 🟢)7.433s (-35.5% 🟢)0.000s (NaN%)8.871s (-26.4% 🟢)2.492s71.00x
▲ VercelExpress⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack)

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.252s (-29.3% 🟢)1.996s (-8.3% 🟢)0.000s (+Infinity% 🔺)2.034s (-7.5% 🟢)0.782s301.00x
🐘 PostgresNitro1.354s (-24.4% 🟢)2.105s (-1.7%)0.000s (+93.1% 🔺)2.123s (-2.4%)0.769s291.08x
🐘 PostgresNext.js (Turbopack)1.678s2.262s0.000s2.286s0.608s271.34x
💻 LocalNitro3.014s (-11.0% 🟢)3.842s (-4.7%)0.001s (-6.2% 🟢)3.844s (-4.8%)0.831s162.41x
💻 LocalExpress3.243s (-6.5% 🟢)3.968s (-1.6%)0.000s (-45.3% 🟢)3.970s (-1.7%)0.726s162.59x
🌐 MongoDBNext.js (Turbopack)⚠️missing-----
🌐 RedisNext.js (Turbopack)⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)8.615s (+53.4% 🔺)10.007s (+43.3% 🔺)0.000s (+33.3% 🔺)11.037s (+46.4% 🔺)2.422s61.00x
▲ VercelExpress⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro17/21
🐘 PostgresNitro11/21
▲ VercelNext.js (Turbopack)21/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres16/21
Next.js (Turbopack)🐘 Postgres11/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: failure
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

@github-actions

github-actionsBot commented May 5, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production92502191144
✅ 💻 Local Development123702191456
✅ 📦 Local Production123702191456
✅ 🐘 Local Postgres123702191456
✅ 🪟 Windows10400104
✅ 📋 Other5520176728
Total5292010526344

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro78026
✅ example78026
✅ express78026
✅ fastify78026
✅ hono78026
✅ nextjs-turbopack10202
✅ nextjs-webpack10202
✅ nitro78026
✅ nuxt78026
✅ sveltekit9707
✅ vite78026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable79025
✅ express-stable79025
✅ fastify-stable79025
✅ hono-stable79025
✅ nextjs-turbopack-canary85019
✅ nextjs-turbopack-stable-lazy-discovery-disabled10400
✅ nextjs-turbopack-stable-lazy-discovery-enabled10400
✅ nextjs-webpack-canary85019
✅ nextjs-webpack-stable-lazy-discovery-disabled10400
✅ nextjs-webpack-stable-lazy-discovery-enabled10400
✅ nitro-stable79025
✅ nuxt-stable79025
✅ sveltekit-stable9806
✅ vite-stable79025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable79025
✅ express-stable79025
✅ fastify-stable79025
✅ hono-stable79025
✅ nextjs-turbopack-canary85019
✅ nextjs-turbopack-stable-lazy-discovery-disabled10400
✅ nextjs-turbopack-stable-lazy-discovery-enabled10400
✅ nextjs-webpack-canary85019
✅ nextjs-webpack-stable-lazy-discovery-disabled10400
✅ nextjs-webpack-stable-lazy-discovery-enabled10400
✅ nitro-stable79025
✅ nuxt-stable79025
✅ sveltekit-stable9806
✅ vite-stable79025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable79025
✅ express-stable79025
✅ fastify-stable79025
✅ hono-stable79025
✅ nextjs-turbopack-canary85019
✅ nextjs-turbopack-stable-lazy-discovery-disabled10400
✅ nextjs-turbopack-stable-lazy-discovery-enabled10400
✅ nextjs-webpack-canary85019
✅ nextjs-webpack-stable-lazy-discovery-disabled10400
✅ nextjs-webpack-stable-lazy-discovery-enabled10400
✅ nitro-stable79025
✅ nuxt-stable79025
✅ sveltekit-stable9806
✅ vite-stable79025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack10400
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable79025
✅ e2e-local-dev-tanstack-start-79025
✅ e2e-local-postgres-nest-stable79025
✅ e2e-local-postgres-tanstack-start-79025
✅ e2e-local-prod-nest-stable79025
✅ e2e-local-prod-tanstack-start-79025
✅ e2e-vercel-prod-tanstack-start78026

📋 View full workflow run

Comment thread.changeset/fix-step-vs-wait-race.md Outdated
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@VaguelySerious
VaguelySerious merged commit 3535caf into mainMay 5, 2026
112 of 115 checks passed
@VaguelySerious
VaguelySerious deleted the peter/fix-step-vs-wait-race branch May 5, 2026 00:49
@github-actionsgithub-actionsBot mentioned this pull request May 5, 2026
pranaygp added a commit that referenced this pull request May 5, 2026
* origin/main:
[core] Skip inline step execution when suspension also has a wait (#1924)
[errors] Replace chalk import in @workfow/errors with inline ANSI shim (#1915)
Fix compatibility with Zod 4.4.x (#1902)
Serialize `run_failed`/`step_failed` errors through serialization pipeline (#1851)
tarballs: redesign preview tarballs index page (#1911)
Remove extra changeset (#1922)
Add stable Next.js eager and lazy test coverage (#1747)
Enforce per-(run, correlation) uniqueness for entity-creating events in world-postgres (#1878)
fix(world-vercel): add default request timeout to workflow-server HTTP calls (#1807)
pranaygp added a commit that referenced this pull request May 5, 2026
PR #1924 added the same sleep/step race workflows directly to main
while this branch was open. The textual concat from `git merge`
left both copies in 99_e2e.ts; this drops the duplicate set so the
file matches origin/main verbatim and the e2e tests pick up the
upstream definitions.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
pranaygp added a commit that referenced this pull request May 5, 2026
…ignal
* origin/main:
[core] Skip inline step execution when suspension also has a wait (#1924)
[errors] Replace chalk import in @workfow/errors with inline ANSI shim (#1915)
Fix compatibility with Zod 4.4.x (#1902)
Serialize `run_failed`/`step_failed` errors through serialization pipeline (#1851)
tarballs: redesign preview tarballs index page (#1911)
Remove extra changeset (#1922)
Add stable Next.js eager and lazy test coverage (#1747)
Enforce per-(run, correlation) uniqueness for entity-creating events in world-postgres (#1878)
fix(world-vercel): add default request timeout to workflow-server HTTP calls (#1807)
Allow disabling step sourcemap with new `sourcemap` option in builders (#1842)
[ci] Enable Vercel-prod e2e for tanstack-start (#1904)
web: configure vercelPreset() for Vercel deployments (#1815)
[core] Combine flow+step bundle and process steps eagerly (#1338)
[world-vercel] Revert stream close control framing (#1891)
[tarballs] Use turbo to build workspace deps before packing (#1908)
# Conflicts:
#	packages/core/src/runtime/step-handler.test.ts
#	packages/core/src/runtime/step-handler.ts
#	packages/core/src/runtime/suspension-handler.ts
#	packages/core/src/step.test.ts
#	packages/world-local/src/storage/events-storage.ts
#	packages/world-postgres/src/drizzle/migrations/meta/_journal.json
pranaygp added a commit that referenced this pull request May 5, 2026
* [e2e] Add step-vs-sleep race tests + dev-tmux skill
Adds two race workflows (sleepWinsRaceWorkflow, stepWinsRaceWorkflow)
that exercise Promise.race between a step function and a sleep call.
The current `sleepWinsRaceWorkflow` test fails — surfacing how the
replay engine resolves a previously-completed step instantly while
sleep still has to elapse.
Also adds a `dev-tmux` skill that documents the 3-pane tmux + portless
setup for testing workflows interactively in a worktree alongside the
observability UI.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [workbench/nextjs-turbopack] Allow *.turbopack.localhost in dev
Adds allowedDevOrigins entries so portless-style worktree-prefixed
.localhost URLs (e.g. https://<branch>.turbopack.localhost) can hit
HMR and dev-only endpoints without Next's cross-origin protection
flooding the logs with warnings.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Drop duplicate race workflows after merging main
PR #1924 added the same sleep/step race workflows directly to main
while this branch was open. The textual concat from `git merge`
left both copies in 99_e2e.ts; this drops the duplicate set so the
file matches origin/main verbatim and the e2e tests pick up the
upstream definitions.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Narrow activation, robust pane IDs, statusline helper
- Tighten activation phrases so the skill only fires for the specific
portless+tmux setup it documents, not the generic "start the dev
server" task. Addresses #1916 review.
- Capture pane IDs at split time (-P -F '#{pane_id}') so the snippet
works under both pane-base-index 0 and 1. Addresses Copilot review.
- Add `statusline.sh` that filters `portless list` to the current
worktree's routes and emits a one-line summary, plus instructions
for wiring it into Claude Code's `statusLine.command`.
- Bump version to 1.1.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Recommend primary-checkout path for statusline
Worktrees get deleted, so wiring the statusline to a worktree path
breaks the moment the worktree is removed. Update the skill and the
script header to recommend pointing `statusLine.command` at the
primary checkout (`$HOME/github/vercel/workflow/...`). The script
itself is already worktree-aware via Claude's `workspace.current_dir`
stdin JSON, so the same invocation surfaces routes for whichever
worktree the session is in.
Bump version to 1.2.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] OSC 8 link statusline + worktree-named tmux session
- Statusline overlay now renders `[dev] · [obs] · tmux:<prefix>`,
with the bracketed labels emitted as OSC 8 hyperlinks (clickable in
any modern terminal) styled cyan + underline so they stand out.
Replaces the old long-URL form that was hard to scan and click.
- Add a tmux-session indicator: shown when a session named exactly the
worktree prefix exists (uses `tmux has-session -t =<prefix>` for
exact matching).
- Change the skill's tmux session naming convention from the fixed
`workflow-dev` to `<worktree-prefix>` (basename of the branch — same
string portless uses as the subdomain prefix). This lets the
statusline locate the session deterministically and lets multiple
worktrees run dev sessions concurrently without manual disambiguation.
- Bump skill to v1.3.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Statusline: print full `tmux attach -t <name>` command
Replaces the abbreviated `tmux:<prefix>` indicator with the full
copy-paste-ready `tmux attach -t <prefix>` invocation. Saves a step
when grabbing the session from another shell.
Bump skill to v1.4.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Brighter statusline + Nerd Font icons
- Drop the dim styling that made the overlay hard to read; use bold
bright cyan + underline for links and bold bright green for the
tmux command.
- Add Nerd Font glyphs: for dev, for obs, for the
tmux copy-paste hint. Falls back to box-drawing if the font lacks
Nerd Font ranges; layout is unaffected.
- Visual differentiation: cyan + underline = clickable hyperlink;
green = copy this command.
Bump skill to v1.5.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Restore Nerd Font icons via Unicode escapes
The copy glyph in `emit_tmux` was a literal Nerd Font byte embedded in
the printf string and got stripped during a prior rewrite. Promote all
three icons (rocket / graph / copy) to top-level shell variables that
use \uHHHH-equivalent UTF-8 escapes, so the source survives editor
round-trips that don't preserve Private Use Area code points.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/internal-dev-workbench] Rename from dev-tmux, set author + reset version
- Rename `skills/dev-tmux/` → `skills/internal-dev-workbench/` to make
the name self-explanatory about the skill's scope (an internal
contributor's local dev workbench, not a generic tmux helper).
- Author: Pranay Prakash. Version: 0.1 (first release of the skill).
- Update internal references in SKILL.md and statusline.sh accordingly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

2 participants

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

[core] V2: skip inline step execution when suspension also has a wait - #1924

Merged
VaguelySerious merged 2 commits into
mainfrom
peter/fix-step-vs-wait-race
May 5, 2026
Merged

[core] V2: skip inline step execution when suspension also has a wait#1924
VaguelySerious merged 2 commits into
mainfrom
peter/fix-step-vs-wait-race

Conversation

@VaguelySerious

Copy link
Copy Markdown
Member

Summary

Fix Promise.race(step, sleep) semantics in V2 mixed suspensions: when a workflow suspension contains both pending steps and at least one wait (sleep), the runtime now queues every step instead of executing one inline.

Inline `await executeStep(...)` blocks the V2 handler for the full step duration, but `wait_completed` events are only created on the next loop iteration's "complete elapsed waits" pass. So if the sleep is shorter than the step, the wait timer never fires on time — replay just sees `step_completed` first and `Promise.race` resolves with the step. A 1s sleep racing a 10s step would silently resolve to the step.

This restores V1's behavior, where each step ran in a separate function invocation and the wait timer drove a parallel queue continuation.

Reproducer (failing test from #1916)

`sleepWinsRaceWorkflow`: a 1s sleep raced against a 10s step. Expected `'sleep'` to win.

Event log on the failing run, before the fix:

t (s)Event
0.000`run_created`
1.738`step_created` + `wait_created`resumeAt = t+1s
1.742`step_started`inline execution begins
11.825`step_completed`step body finishes after ~10s
11.861`wait_completed`created right after step_completed, not on time
11.959`run_completed`replay picked `'step'`

After the fix, `wait_completed` lands at t≈1s after `wait_created` and the run completes with `'sleep'` in ~1s.

Change

One-liner in `packages/core/src/runtime.ts`:

```ts
const inlineStep =
suspensionResult.timeoutSeconds === undefined
? ownedPendingSteps[0]
: undefined;
```

The existing "queue every pending step except the inline one" loop and the `if (!inlineStep)` early-return already handle the `undefined` case correctly.

What about hooks?

Audited every flavor of suspension. Step + wait is the only fully-broken combination.

Suspension containsBehavior in V2Race-correct?
steps onlyone inline, rest queued
wait onlyreturns with timeoutSeconds
hook onlyreturns; external resumeHook drives continuation
wait + hookno steps → returns with timeoutSeconds
step + waitstep inline-blocks, wait timer never fires❌ — fixed here
step + hookstep inline-blocks, but hook continuation runs concurrently via queueConcurrency (≥1000 on world-local, 50 on world-postgres, auto on Vercel)⚠️ correct via concurrency, but step keeps running uselessly until termination

Step + hook works on all first-party worlds today. A consistent follow-up would extend the same carve-out to `hasPendingHooks`, but it would require a new field in `SuspensionHandlerResult` and isn't strictly necessary — happy to do that as a follow-up if desired.

Test plan

  • New e2e tests `sleepWinsRaceWorkflow` and `stepWinsRaceWorkflow` (the failing tests from Add dev-tmux skill for portless+tmux local Workflow SDK dev #1916, plus the symmetric stepWins case).
  • `pnpm vitest run packages/core/e2e/e2e.test.ts -t WinsRaceWorkflow` against the `nextjs-turbopack` workbench locally — both pass.
  • Event log inspection confirms `wait_completed` is now created at t≈1s.
  • All 842 `@workflow/core` unit tests pass.

Docs

`docs/content/docs/changelog/eager-processing.mdx` "Mixed Suspensions" section rewritten to describe the carve-out and explicitly call out the `Promise.race(step, sleep)` race-semantics motivation.

🤖 Generated with Claude Code

Inline `await executeStep(...)` blocks the V2 handler for the full
step duration, but `wait_completed` events are only created on the
*next* loop iteration's "complete elapsed waits" pass. This breaks
`Promise.race(step, sleep)` semantics whenever the sleep is shorter
than the step — replay still picks the step because the sleep's
wait_completed event hasn't been written yet.
Reproducer (`sleepWinsRaceWorkflow`): a 1s sleep raced against a 10s
step. Expected `'sleep'` to win; the runtime returned `'step'`. On
the failing run, `wait_completed` was created at t=11.86s — right
after `step_completed` — instead of at t≈2.74s when its `resumeAt`
elapsed.
Fix: in `runtime.ts`, gate the inline-step pick on the absence of a
wait timeout. When `suspensionResult.timeoutSeconds !== undefined`,
queue every pending step instead and return with the wait timeout.
This lets the wait timer drive a continuation in parallel, matching
V1's behavior where each step ran in a separate function
invocation. Pure step suspensions (without waits) still benefit
from inline execution.
Test plan:
- New e2e tests `sleepWinsRaceWorkflow` and `stepWinsRaceWorkflow`
exercising `Promise.race` between a step function and `sleep()`,
in both directions.
- Verified locally against `nextjs-turbopack` workbench: both pass.
Event log confirms `wait_completed` is now created on time
(t≈1s after `wait_created`) rather than after the inline step.
Eager-processing changelog updated with a "Mixed Suspensions"
section describing the carve-out and its rationale.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented May 5, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented May 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ee02092

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

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

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

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

@github-actions

github-actionsBot commented May 5, 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🥇 Express0.031s (-29.8% 🟢)1.005s (~)0.974s101.00x
💻 LocalNitro0.032s (-24.8% 🟢)1.005s (~)0.973s101.04x
🐘 PostgresNitro0.041s (-56.5% 🟢)1.011s (-3.0%)0.970s101.33x
🐘 PostgresExpress0.046s (-20.0% 🟢)1.012s (~)0.965s101.49x
🌐 RedisNext.js (Turbopack)0.053s1.005s0.952s101.70x
🐘 PostgresNext.js (Turbopack)0.061s1.013s0.952s101.95x
🌐 MongoDBNext.js (Turbopack)0.089s1.006s0.918s102.86x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.806s (+220.6% 🔺)2.783s (+19.3% 🔺)1.976s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.068s (-5.6% 🟢)2.006s (~)0.938s101.00x
💻 LocalExpress1.072s (-4.7%)2.006s (~)0.934s101.00x
🐘 PostgresExpress1.081s (-5.7% 🟢)2.009s (~)0.928s101.01x
🐘 PostgresNitro1.084s (-4.9%)2.010s (~)0.926s101.01x
🌐 RedisNext.js (Turbopack)1.111s2.006s0.895s101.04x
🐘 PostgresNext.js (Turbopack)1.131s2.010s0.879s101.06x
🌐 MongoDBNext.js (Turbopack)1.151s2.007s0.856s101.08x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.825s (+38.8% 🔺)4.958s (+29.4% 🔺)2.134s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.402s (-5.0%)11.021s (~)0.618s31.00x
💻 LocalExpress10.407s (-4.7%)11.021s (~)0.614s31.00x
🐘 PostgresExpress10.418s (-5.0%)11.015s (~)0.598s31.00x
🐘 PostgresNitro10.423s (-4.1%)11.015s (~)0.593s31.00x
🌐 RedisNext.js (Turbopack)10.663s11.023s0.360s31.03x
🌐 MongoDBNext.js (Turbopack)10.670s11.014s0.344s31.03x
🐘 PostgresNext.js (Turbopack)10.715s11.017s0.302s31.03x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)15.794s (-8.8% 🟢)17.951s (-7.5% 🟢)2.157s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express13.439s (-7.8% 🟢)14.018s (-6.7% 🟢)0.578s51.00x
💻 LocalNitro13.450s (-10.7% 🟢)14.026s (-12.5% 🟢)0.577s51.00x
💻 LocalExpress13.485s (-9.9% 🟢)14.026s (-6.7% 🟢)0.541s51.00x
🐘 PostgresNitro13.488s (-7.6% 🟢)14.019s (-6.7% 🟢)0.530s51.00x
🌐 MongoDBNext.js (Turbopack)13.940s14.219s0.279s51.04x
🐘 PostgresNext.js (Turbopack)14.131s15.022s0.891s41.05x
🌐 RedisNext.js (Turbopack)14.169s15.030s0.861s41.05x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)23.629s (-55.0% 🟢)25.826s (-52.7% 🟢)2.197s31.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro11.849s (-29.4% 🟢)12.022s (-29.4% 🟢)0.173s81.00x
💻 LocalExpress11.902s (-28.3% 🟢)12.022s (-29.4% 🟢)0.120s81.00x
🐘 PostgresExpress12.005s (-14.3% 🟢)12.394s (-15.1% 🟢)0.389s81.01x
🐘 PostgresNitro12.046s (-13.8% 🟢)12.645s (-11.6% 🟢)0.599s81.02x
🌐 MongoDBNext.js (Turbopack)12.694s13.017s0.323s71.07x
🌐 RedisNext.js (Turbopack)13.121s14.028s0.907s71.11x
🐘 PostgresNext.js (Turbopack)13.366s14.018s0.651s71.13x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)34.490s (-91.2% 🟢)36.796s (-90.7% 🟢)2.306s31.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.145s (-10.2% 🟢)2.007s (~)0.862s151.00x
🐘 PostgresExpress1.147s (-9.0% 🟢)2.008s (~)0.861s151.00x
💻 LocalNitro1.174s (-28.0% 🟢)2.006s (-3.3%)0.831s151.03x
💻 LocalExpress1.211s (-18.6% 🟢)2.006s (~)0.794s151.06x
🐘 PostgresNext.js (Turbopack)1.219s2.008s0.788s151.07x
🌐 RedisNext.js (Turbopack)1.275s2.007s0.732s151.11x
🌐 MongoDBNext.js (Turbopack)2.019s2.674s0.655s121.76x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.105s (+20.8% 🔺)6.180s (+25.3% 🔺)2.075s51.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.202s (-48.9% 🟢)2.006s (-33.3% 🟢)0.804s151.00x
🐘 PostgresExpress1.226s (-48.1% 🟢)2.007s (-33.3% 🟢)0.782s151.02x
🐘 PostgresNext.js (Turbopack)1.375s2.007s0.633s151.14x
💻 LocalNitro1.677s (-46.7% 🟢)2.005s (-48.4% 🟢)0.329s151.39x
💻 LocalExpress1.798s (-39.1% 🟢)2.008s (-41.9% 🟢)0.209s151.50x
🌐 RedisNext.js (Turbopack)2.397s3.009s0.612s101.99x
🌐 MongoDBNext.js (Turbopack)3.570s4.008s0.438s82.97x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.819s (-32.1% 🟢)6.927s (-22.2% 🟢)2.108s51.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.326s (-61.9% 🟢)2.008s (-49.9% 🟢)0.682s151.00x
🐘 PostgresExpress1.365s (-60.8% 🟢)2.008s (-49.9% 🟢)0.643s151.03x
🐘 PostgresNext.js (Turbopack)1.662s2.007s0.345s151.25x
🌐 RedisNext.js (Turbopack)3.651s4.011s0.360s82.75x
💻 LocalNitro4.459s (-46.6% 🟢)5.013s (-44.4% 🟢)0.554s73.36x
💻 LocalExpress5.277s (-36.7% 🟢)5.846s (-35.2% 🟢)0.569s63.98x
🌐 MongoDBNext.js (Turbopack)6.145s7.011s0.866s54.64x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)7.711s (-13.5% 🟢)10.175s (-7.2% 🟢)2.464s41.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.143s (-9.1% 🟢)2.008s (~)0.865s151.00x
🐘 PostgresNitro1.149s (-8.6% 🟢)2.008s (~)0.860s151.00x
🐘 PostgresNext.js (Turbopack)1.210s2.007s0.797s151.06x
🌐 RedisNext.js (Turbopack)1.237s2.007s0.770s151.08x
💻 LocalNitro1.377s (-26.2% 🟢)2.006s (-14.3% 🟢)0.629s151.20x
💻 LocalExpress1.754s (-7.4% 🟢)2.391s (+1.2%)0.638s131.53x
🌐 MongoDBNext.js (Turbopack)2.025s2.734s0.709s111.77x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.859s (+31.6% 🔺)5.663s (+22.0% 🔺)1.805s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.217s (-48.0% 🟢)2.075s (-31.1% 🟢)0.858s151.00x
🐘 PostgresExpress1.234s (-47.3% 🟢)2.010s (-33.3% 🟢)0.776s151.01x
🐘 PostgresNext.js (Turbopack)1.370s2.007s0.636s151.13x
💻 LocalNitro1.804s (-41.2% 🟢)2.222s (-42.8% 🟢)0.419s141.48x
💻 LocalExpress2.119s (-32.4% 🟢)2.590s (-31.2% 🟢)0.472s121.74x
🌐 RedisNext.js (Turbopack)2.366s3.009s0.643s101.94x
🌐 MongoDBNext.js (Turbopack)3.566s4.008s0.442s82.93x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)5.086s (+61.8% 🔺)7.055s (+56.0% 🔺)1.969s51.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.319s (-62.1% 🟢)2.007s (-49.9% 🟢)0.688s151.00x
🐘 PostgresExpress1.359s (-61.2% 🟢)2.008s (-49.9% 🟢)0.649s151.03x
🐘 PostgresNext.js (Turbopack)1.654s2.008s0.354s151.25x
🌐 RedisNext.js (Turbopack)3.666s4.010s0.344s82.78x
💻 LocalNitro4.835s (-47.1% 🟢)5.513s (-45.0% 🟢)0.677s63.67x
💻 LocalExpress5.619s (-36.2% 🟢)6.217s (-33.0% 🟢)0.598s54.26x
🌐 MongoDBNext.js (Turbopack)6.228s7.010s0.782s54.72x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.106s (-9.6% 🟢)7.716s (-9.7% 🟢)1.609s41.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.448s (-45.4% 🟢)1.006s (~)0.558s601.00x
💻 LocalExpress0.463s (-52.9% 🟢)1.004s (-6.7% 🟢)0.541s601.03x
🐘 PostgresExpress0.481s (-42.6% 🟢)1.023s (~)0.542s591.07x
💻 LocalNitro0.513s (-47.7% 🟢)1.021s (-6.7% 🟢)0.508s591.14x
🌐 MongoDBNext.js (Turbopack)0.595s1.005s0.410s601.33x
🌐 RedisNext.js (Turbopack)0.658s1.005s0.346s601.47x
🐘 PostgresNext.js (Turbopack)0.698s1.006s0.308s601.56x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.179s (-57.4% 🟢)8.102s (-49.6% 🟢)1.923s81.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.065s (-44.8% 🟢)1.772s (-15.6% 🟢)0.707s511.00x
🐘 PostgresExpress1.152s (-41.7% 🟢)1.844s (-18.3% 🟢)0.692s491.08x
💻 LocalNitro1.168s (-61.5% 🟢)2.005s (-46.6% 🟢)0.837s451.10x
💻 LocalExpress1.301s (-56.9% 🟢)2.122s (-40.8% 🟢)0.821s431.22x
🌐 MongoDBNext.js (Turbopack)1.484s2.006s0.522s451.39x
🌐 RedisNext.js (Turbopack)1.561s2.006s0.445s451.47x
🐘 PostgresNext.js (Turbopack)1.604s2.007s0.403s451.51x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)14.969s (-69.9% 🟢)17.357s (-66.4% 🟢)2.388s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.021s (-49.4% 🟢)2.456s (-43.8% 🟢)0.435s491.00x
🐘 PostgresNitro2.028s (-50.6% 🟢)2.528s (-45.1% 🟢)0.501s481.00x
💻 LocalNitro2.651s (-71.5% 🟢)3.007s (-70.0% 🟢)0.356s401.31x
💻 LocalExpress2.654s (-71.2% 🟢)3.007s (-70.0% 🟢)0.354s401.31x
🌐 RedisNext.js (Turbopack)3.018s3.396s0.378s361.49x
🐘 PostgresNext.js (Turbopack)3.183s4.009s0.825s301.58x
🌐 MongoDBNext.js (Turbopack)3.422s4.010s0.588s301.69x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)43.502s (-59.4% 🟢)46.024s (-57.7% 🟢)2.522s31.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.179s (-36.6% 🟢)1.006s (~)0.827s601.00x
🐘 PostgresNitro0.181s (-36.2% 🟢)1.006s (~)0.825s601.01x
🐘 PostgresNext.js (Turbopack)0.236s1.005s0.769s601.32x
🌐 RedisNext.js (Turbopack)0.261s1.004s0.743s601.46x
💻 LocalNitro0.410s (-32.2% 🟢)1.004s (-1.7%)0.594s602.29x
💻 LocalExpress0.449s (-19.9% 🟢)1.004s (~)0.555s602.51x
🌐 MongoDBNext.js (Turbopack)1.028s1.770s0.742s345.75x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.053s (+100.4% 🔺)6.298s (+66.0% 🔺)2.246s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.300s (-39.6% 🟢)1.006s (~)0.706s901.00x
🐘 PostgresExpress0.314s (-38.4% 🟢)1.007s (~)0.693s901.05x
🌐 RedisNext.js (Turbopack)0.431s1.004s0.573s901.44x
🐘 PostgresNext.js (Turbopack)0.455s1.006s0.550s901.52x
💻 LocalExpress2.143s (-14.7% 🟢)2.714s (-9.8% 🟢)0.572s347.15x
💻 LocalNitro2.165s (-14.7% 🟢)2.765s (-8.1% 🟢)0.600s337.22x
🌐 MongoDBNext.js (Turbopack)2.573s3.006s0.433s308.58x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)8.287s (+134.4% 🔺)10.464s (+101.5% 🔺)2.176s91.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.606s (-23.3% 🟢)1.006s (~)0.400s1201.00x
🐘 PostgresExpress0.632s (-22.8% 🟢)1.006s (-1.1%)0.373s1201.04x
🌐 RedisNext.js (Turbopack)0.810s1.004s0.195s1201.34x
🐘 PostgresNext.js (Turbopack)0.958s1.387s0.430s871.58x
🌐 MongoDBNext.js (Turbopack)5.307s6.011s0.704s208.76x
💻 LocalNitro9.751s (-12.9% 🟢)10.445s (-10.4% 🟢)0.694s1216.09x
💻 LocalExpress10.904s (-2.6%)11.399s (-4.5%)0.496s1117.99x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)20.304s (+96.6% 🔺)22.967s (+86.9% 🔺)2.663s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.131s (+451.5% 🔺)2.000s (+100.3% 🔺)0.001s (-31.3% 🟢)2.010s (+98.8% 🔺)0.879s101.00x
💻 LocalNitro1.131s (+429.3% 🔺)2.004s (+99.5% 🔺)0.011s (-15.2% 🟢)2.017s (+98.0% 🔺)0.886s101.00x
🐘 PostgresNitro1.132s (+452.2% 🔺)2.001s (+100.1% 🔺)0.001s (-26.7% 🟢)2.009s (+98.7% 🔺)0.877s101.00x
💻 LocalExpress1.141s (+473.3% 🔺)2.005s (+99.6% 🔺)0.012s (~)2.019s (+98.3% 🔺)0.878s101.01x
🐘 PostgresNext.js (Turbopack)1.201s2.001s0.001s2.011s0.810s101.06x
🌐 MongoDBNext.js (Turbopack)⚠️missing-----
🌐 RedisNext.js (Turbopack)⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.713s (-31.2% 🟢)5.161s (-40.3% 🟢)1.482s (+134.6% 🔺)8.473s (-13.4% 🟢)3.760s101.00x
▲ VercelExpress⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.505s (+139.0% 🔺)2.003s (+99.0% 🔺)0.004s (+0.9%)2.026s (+98.0% 🔺)0.520s301.00x
🐘 PostgresNitro1.522s (+143.9% 🔺)2.006s (+99.3% 🔺)0.004s (-15.4% 🟢)2.024s (+97.9% 🔺)0.502s301.01x
💻 LocalExpress1.570s (+107.4% 🔺)2.012s (+95.6% 🔺)0.011s (+14.7% 🔺)2.025s (+94.8% 🔺)0.455s301.04x
🐘 PostgresNext.js (Turbopack)1.664s2.011s0.004s2.025s0.361s301.11x
💻 LocalNitro1.688s (+101.3% 🔺)2.011s (+98.7% 🔺)0.009s (-4.0%)2.201s (+97.2% 🔺)0.513s281.12x
🌐 MongoDBNext.js (Turbopack)⚠️missing-----
🌐 RedisNext.js (Turbopack)⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)12.267s (-27.5% 🟢)13.897s (-23.8% 🟢)0.343s (+62.3% 🔺)15.237s (-19.5% 🟢)2.969s51.00x
▲ VercelExpress⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.642s (-33.7% 🟢)1.016s (-18.5% 🟢)0.000s (-59.3% 🟢)1.023s (-18.6% 🟢)0.381s591.00x
🐘 PostgresExpress0.692s (-27.9% 🟢)1.047s (-18.0% 🟢)0.000s (+21.1% 🔺)1.060s (-18.8% 🟢)0.368s571.08x
🐘 PostgresNext.js (Turbopack)0.826s1.071s0.000s1.078s0.252s561.29x
💻 LocalNitro1.335s (+9.2% 🔺)2.015s (~)0.000s (+100.0% 🔺)2.017s (~)0.681s302.08x
💻 LocalExpress1.386s (+13.2% 🔺)2.015s (~)0.000s (-80.0% 🟢)2.017s (~)0.631s302.16x
🌐 MongoDBNext.js (Turbopack)⚠️missing-----
🌐 RedisNext.js (Turbopack)⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.379s (-37.3% 🟢)7.433s (-35.5% 🟢)0.000s (NaN%)8.871s (-26.4% 🟢)2.492s71.00x
▲ VercelExpress⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack)

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.252s (-29.3% 🟢)1.996s (-8.3% 🟢)0.000s (+Infinity% 🔺)2.034s (-7.5% 🟢)0.782s301.00x
🐘 PostgresNitro1.354s (-24.4% 🟢)2.105s (-1.7%)0.000s (+93.1% 🔺)2.123s (-2.4%)0.769s291.08x
🐘 PostgresNext.js (Turbopack)1.678s2.262s0.000s2.286s0.608s271.34x
💻 LocalNitro3.014s (-11.0% 🟢)3.842s (-4.7%)0.001s (-6.2% 🟢)3.844s (-4.8%)0.831s162.41x
💻 LocalExpress3.243s (-6.5% 🟢)3.968s (-1.6%)0.000s (-45.3% 🟢)3.970s (-1.7%)0.726s162.59x
🌐 MongoDBNext.js (Turbopack)⚠️missing-----
🌐 RedisNext.js (Turbopack)⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)8.615s (+53.4% 🔺)10.007s (+43.3% 🔺)0.000s (+33.3% 🔺)11.037s (+46.4% 🔺)2.422s61.00x
▲ VercelExpress⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro17/21
🐘 PostgresNitro11/21
▲ VercelNext.js (Turbopack)21/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres16/21
Next.js (Turbopack)🐘 Postgres11/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: failure
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

@github-actions

github-actionsBot commented May 5, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production92502191144
✅ 💻 Local Development123702191456
✅ 📦 Local Production123702191456
✅ 🐘 Local Postgres123702191456
✅ 🪟 Windows10400104
✅ 📋 Other5520176728
Total5292010526344

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro78026
✅ example78026
✅ express78026
✅ fastify78026
✅ hono78026
✅ nextjs-turbopack10202
✅ nextjs-webpack10202
✅ nitro78026
✅ nuxt78026
✅ sveltekit9707
✅ vite78026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable79025
✅ express-stable79025
✅ fastify-stable79025
✅ hono-stable79025
✅ nextjs-turbopack-canary85019
✅ nextjs-turbopack-stable-lazy-discovery-disabled10400
✅ nextjs-turbopack-stable-lazy-discovery-enabled10400
✅ nextjs-webpack-canary85019
✅ nextjs-webpack-stable-lazy-discovery-disabled10400
✅ nextjs-webpack-stable-lazy-discovery-enabled10400
✅ nitro-stable79025
✅ nuxt-stable79025
✅ sveltekit-stable9806
✅ vite-stable79025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable79025
✅ express-stable79025
✅ fastify-stable79025
✅ hono-stable79025
✅ nextjs-turbopack-canary85019
✅ nextjs-turbopack-stable-lazy-discovery-disabled10400
✅ nextjs-turbopack-stable-lazy-discovery-enabled10400
✅ nextjs-webpack-canary85019
✅ nextjs-webpack-stable-lazy-discovery-disabled10400
✅ nextjs-webpack-stable-lazy-discovery-enabled10400
✅ nitro-stable79025
✅ nuxt-stable79025
✅ sveltekit-stable9806
✅ vite-stable79025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable79025
✅ express-stable79025
✅ fastify-stable79025
✅ hono-stable79025
✅ nextjs-turbopack-canary85019
✅ nextjs-turbopack-stable-lazy-discovery-disabled10400
✅ nextjs-turbopack-stable-lazy-discovery-enabled10400
✅ nextjs-webpack-canary85019
✅ nextjs-webpack-stable-lazy-discovery-disabled10400
✅ nextjs-webpack-stable-lazy-discovery-enabled10400
✅ nitro-stable79025
✅ nuxt-stable79025
✅ sveltekit-stable9806
✅ vite-stable79025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack10400
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable79025
✅ e2e-local-dev-tanstack-start-79025
✅ e2e-local-postgres-nest-stable79025
✅ e2e-local-postgres-tanstack-start-79025
✅ e2e-local-prod-nest-stable79025
✅ e2e-local-prod-tanstack-start-79025
✅ e2e-vercel-prod-tanstack-start78026

📋 View full workflow run

Comment thread.changeset/fix-step-vs-wait-race.md Outdated
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@VaguelySerious
VaguelySerious merged commit 3535caf into mainMay 5, 2026
112 of 115 checks passed
@VaguelySerious
VaguelySerious deleted the peter/fix-step-vs-wait-race branch May 5, 2026 00:49
@github-actionsgithub-actionsBot mentioned this pull request May 5, 2026
pranaygp added a commit that referenced this pull request May 5, 2026
* origin/main:
[core] Skip inline step execution when suspension also has a wait (#1924)
[errors] Replace chalk import in @workfow/errors with inline ANSI shim (#1915)
Fix compatibility with Zod 4.4.x (#1902)
Serialize `run_failed`/`step_failed` errors through serialization pipeline (#1851)
tarballs: redesign preview tarballs index page (#1911)
Remove extra changeset (#1922)
Add stable Next.js eager and lazy test coverage (#1747)
Enforce per-(run, correlation) uniqueness for entity-creating events in world-postgres (#1878)
fix(world-vercel): add default request timeout to workflow-server HTTP calls (#1807)
pranaygp added a commit that referenced this pull request May 5, 2026
PR #1924 added the same sleep/step race workflows directly to main
while this branch was open. The textual concat from `git merge`
left both copies in 99_e2e.ts; this drops the duplicate set so the
file matches origin/main verbatim and the e2e tests pick up the
upstream definitions.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
pranaygp added a commit that referenced this pull request May 5, 2026
…ignal
* origin/main:
[core] Skip inline step execution when suspension also has a wait (#1924)
[errors] Replace chalk import in @workfow/errors with inline ANSI shim (#1915)
Fix compatibility with Zod 4.4.x (#1902)
Serialize `run_failed`/`step_failed` errors through serialization pipeline (#1851)
tarballs: redesign preview tarballs index page (#1911)
Remove extra changeset (#1922)
Add stable Next.js eager and lazy test coverage (#1747)
Enforce per-(run, correlation) uniqueness for entity-creating events in world-postgres (#1878)
fix(world-vercel): add default request timeout to workflow-server HTTP calls (#1807)
Allow disabling step sourcemap with new `sourcemap` option in builders (#1842)
[ci] Enable Vercel-prod e2e for tanstack-start (#1904)
web: configure vercelPreset() for Vercel deployments (#1815)
[core] Combine flow+step bundle and process steps eagerly (#1338)
[world-vercel] Revert stream close control framing (#1891)
[tarballs] Use turbo to build workspace deps before packing (#1908)
# Conflicts:
#	packages/core/src/runtime/step-handler.test.ts
#	packages/core/src/runtime/step-handler.ts
#	packages/core/src/runtime/suspension-handler.ts
#	packages/core/src/step.test.ts
#	packages/world-local/src/storage/events-storage.ts
#	packages/world-postgres/src/drizzle/migrations/meta/_journal.json
pranaygp added a commit that referenced this pull request May 5, 2026
* [e2e] Add step-vs-sleep race tests + dev-tmux skill
Adds two race workflows (sleepWinsRaceWorkflow, stepWinsRaceWorkflow)
that exercise Promise.race between a step function and a sleep call.
The current `sleepWinsRaceWorkflow` test fails — surfacing how the
replay engine resolves a previously-completed step instantly while
sleep still has to elapse.
Also adds a `dev-tmux` skill that documents the 3-pane tmux + portless
setup for testing workflows interactively in a worktree alongside the
observability UI.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [workbench/nextjs-turbopack] Allow *.turbopack.localhost in dev
Adds allowedDevOrigins entries so portless-style worktree-prefixed
.localhost URLs (e.g. https://<branch>.turbopack.localhost) can hit
HMR and dev-only endpoints without Next's cross-origin protection
flooding the logs with warnings.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Drop duplicate race workflows after merging main
PR #1924 added the same sleep/step race workflows directly to main
while this branch was open. The textual concat from `git merge`
left both copies in 99_e2e.ts; this drops the duplicate set so the
file matches origin/main verbatim and the e2e tests pick up the
upstream definitions.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Narrow activation, robust pane IDs, statusline helper
- Tighten activation phrases so the skill only fires for the specific
portless+tmux setup it documents, not the generic "start the dev
server" task. Addresses #1916 review.
- Capture pane IDs at split time (-P -F '#{pane_id}') so the snippet
works under both pane-base-index 0 and 1. Addresses Copilot review.
- Add `statusline.sh` that filters `portless list` to the current
worktree's routes and emits a one-line summary, plus instructions
for wiring it into Claude Code's `statusLine.command`.
- Bump version to 1.1.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Recommend primary-checkout path for statusline
Worktrees get deleted, so wiring the statusline to a worktree path
breaks the moment the worktree is removed. Update the skill and the
script header to recommend pointing `statusLine.command` at the
primary checkout (`$HOME/github/vercel/workflow/...`). The script
itself is already worktree-aware via Claude's `workspace.current_dir`
stdin JSON, so the same invocation surfaces routes for whichever
worktree the session is in.
Bump version to 1.2.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] OSC 8 link statusline + worktree-named tmux session
- Statusline overlay now renders `[dev] · [obs] · tmux:<prefix>`,
with the bracketed labels emitted as OSC 8 hyperlinks (clickable in
any modern terminal) styled cyan + underline so they stand out.
Replaces the old long-URL form that was hard to scan and click.
- Add a tmux-session indicator: shown when a session named exactly the
worktree prefix exists (uses `tmux has-session -t =<prefix>` for
exact matching).
- Change the skill's tmux session naming convention from the fixed
`workflow-dev` to `<worktree-prefix>` (basename of the branch — same
string portless uses as the subdomain prefix). This lets the
statusline locate the session deterministically and lets multiple
worktrees run dev sessions concurrently without manual disambiguation.
- Bump skill to v1.3.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Statusline: print full `tmux attach -t <name>` command
Replaces the abbreviated `tmux:<prefix>` indicator with the full
copy-paste-ready `tmux attach -t <prefix>` invocation. Saves a step
when grabbing the session from another shell.
Bump skill to v1.4.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Brighter statusline + Nerd Font icons
- Drop the dim styling that made the overlay hard to read; use bold
bright cyan + underline for links and bold bright green for the
tmux command.
- Add Nerd Font glyphs: for dev, for obs, for the
tmux copy-paste hint. Falls back to box-drawing if the font lacks
Nerd Font ranges; layout is unaffected.
- Visual differentiation: cyan + underline = clickable hyperlink;
green = copy this command.
Bump skill to v1.5.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Restore Nerd Font icons via Unicode escapes
The copy glyph in `emit_tmux` was a literal Nerd Font byte embedded in
the printf string and got stripped during a prior rewrite. Promote all
three icons (rocket / graph / copy) to top-level shell variables that
use \uHHHH-equivalent UTF-8 escapes, so the source survives editor
round-trips that don't preserve Private Use Area code points.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/internal-dev-workbench] Rename from dev-tmux, set author + reset version
- Rename `skills/dev-tmux/` → `skills/internal-dev-workbench/` to make
the name self-explanatory about the skill's scope (an internal
contributor's local dev workbench, not a generic tmux helper).
- Author: Pranay Prakash. Version: 0.1 (first release of the skill).
- Update internal references in SKILL.md and statusline.sh accordingly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

2 participants

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

[core] V2: skip inline step execution when suspension also has a wait - #1924

Merged
VaguelySerious merged 2 commits into
mainfrom
peter/fix-step-vs-wait-race
May 5, 2026
Merged

[core] V2: skip inline step execution when suspension also has a wait#1924
VaguelySerious merged 2 commits into
mainfrom
peter/fix-step-vs-wait-race

Conversation

@VaguelySerious

Copy link
Copy Markdown
Member

Summary

Fix Promise.race(step, sleep) semantics in V2 mixed suspensions: when a workflow suspension contains both pending steps and at least one wait (sleep), the runtime now queues every step instead of executing one inline.

Inline `await executeStep(...)` blocks the V2 handler for the full step duration, but `wait_completed` events are only created on the next loop iteration's "complete elapsed waits" pass. So if the sleep is shorter than the step, the wait timer never fires on time — replay just sees `step_completed` first and `Promise.race` resolves with the step. A 1s sleep racing a 10s step would silently resolve to the step.

This restores V1's behavior, where each step ran in a separate function invocation and the wait timer drove a parallel queue continuation.

Reproducer (failing test from #1916)

`sleepWinsRaceWorkflow`: a 1s sleep raced against a 10s step. Expected `'sleep'` to win.

Event log on the failing run, before the fix:

t (s)Event
0.000`run_created`
1.738`step_created` + `wait_created`resumeAt = t+1s
1.742`step_started`inline execution begins
11.825`step_completed`step body finishes after ~10s
11.861`wait_completed`created right after step_completed, not on time
11.959`run_completed`replay picked `'step'`

After the fix, `wait_completed` lands at t≈1s after `wait_created` and the run completes with `'sleep'` in ~1s.

Change

One-liner in `packages/core/src/runtime.ts`:

```ts
const inlineStep =
suspensionResult.timeoutSeconds === undefined
? ownedPendingSteps[0]
: undefined;
```

The existing "queue every pending step except the inline one" loop and the `if (!inlineStep)` early-return already handle the `undefined` case correctly.

What about hooks?

Audited every flavor of suspension. Step + wait is the only fully-broken combination.

Suspension containsBehavior in V2Race-correct?
steps onlyone inline, rest queued
wait onlyreturns with timeoutSeconds
hook onlyreturns; external resumeHook drives continuation
wait + hookno steps → returns with timeoutSeconds
step + waitstep inline-blocks, wait timer never fires❌ — fixed here
step + hookstep inline-blocks, but hook continuation runs concurrently via queueConcurrency (≥1000 on world-local, 50 on world-postgres, auto on Vercel)⚠️ correct via concurrency, but step keeps running uselessly until termination

Step + hook works on all first-party worlds today. A consistent follow-up would extend the same carve-out to `hasPendingHooks`, but it would require a new field in `SuspensionHandlerResult` and isn't strictly necessary — happy to do that as a follow-up if desired.

Test plan

  • New e2e tests `sleepWinsRaceWorkflow` and `stepWinsRaceWorkflow` (the failing tests from Add dev-tmux skill for portless+tmux local Workflow SDK dev #1916, plus the symmetric stepWins case).
  • `pnpm vitest run packages/core/e2e/e2e.test.ts -t WinsRaceWorkflow` against the `nextjs-turbopack` workbench locally — both pass.
  • Event log inspection confirms `wait_completed` is now created at t≈1s.
  • All 842 `@workflow/core` unit tests pass.

Docs

`docs/content/docs/changelog/eager-processing.mdx` "Mixed Suspensions" section rewritten to describe the carve-out and explicitly call out the `Promise.race(step, sleep)` race-semantics motivation.

🤖 Generated with Claude Code

Inline `await executeStep(...)` blocks the V2 handler for the full
step duration, but `wait_completed` events are only created on the
*next* loop iteration's "complete elapsed waits" pass. This breaks
`Promise.race(step, sleep)` semantics whenever the sleep is shorter
than the step — replay still picks the step because the sleep's
wait_completed event hasn't been written yet.
Reproducer (`sleepWinsRaceWorkflow`): a 1s sleep raced against a 10s
step. Expected `'sleep'` to win; the runtime returned `'step'`. On
the failing run, `wait_completed` was created at t=11.86s — right
after `step_completed` — instead of at t≈2.74s when its `resumeAt`
elapsed.
Fix: in `runtime.ts`, gate the inline-step pick on the absence of a
wait timeout. When `suspensionResult.timeoutSeconds !== undefined`,
queue every pending step instead and return with the wait timeout.
This lets the wait timer drive a continuation in parallel, matching
V1's behavior where each step ran in a separate function
invocation. Pure step suspensions (without waits) still benefit
from inline execution.
Test plan:
- New e2e tests `sleepWinsRaceWorkflow` and `stepWinsRaceWorkflow`
exercising `Promise.race` between a step function and `sleep()`,
in both directions.
- Verified locally against `nextjs-turbopack` workbench: both pass.
Event log confirms `wait_completed` is now created on time
(t≈1s after `wait_created`) rather than after the inline step.
Eager-processing changelog updated with a "Mixed Suspensions"
section describing the carve-out and its rationale.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented May 5, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented May 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ee02092

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

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

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

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

@github-actions

github-actionsBot commented May 5, 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🥇 Express0.031s (-29.8% 🟢)1.005s (~)0.974s101.00x
💻 LocalNitro0.032s (-24.8% 🟢)1.005s (~)0.973s101.04x
🐘 PostgresNitro0.041s (-56.5% 🟢)1.011s (-3.0%)0.970s101.33x
🐘 PostgresExpress0.046s (-20.0% 🟢)1.012s (~)0.965s101.49x
🌐 RedisNext.js (Turbopack)0.053s1.005s0.952s101.70x
🐘 PostgresNext.js (Turbopack)0.061s1.013s0.952s101.95x
🌐 MongoDBNext.js (Turbopack)0.089s1.006s0.918s102.86x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.806s (+220.6% 🔺)2.783s (+19.3% 🔺)1.976s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.068s (-5.6% 🟢)2.006s (~)0.938s101.00x
💻 LocalExpress1.072s (-4.7%)2.006s (~)0.934s101.00x
🐘 PostgresExpress1.081s (-5.7% 🟢)2.009s (~)0.928s101.01x
🐘 PostgresNitro1.084s (-4.9%)2.010s (~)0.926s101.01x
🌐 RedisNext.js (Turbopack)1.111s2.006s0.895s101.04x
🐘 PostgresNext.js (Turbopack)1.131s2.010s0.879s101.06x
🌐 MongoDBNext.js (Turbopack)1.151s2.007s0.856s101.08x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.825s (+38.8% 🔺)4.958s (+29.4% 🔺)2.134s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.402s (-5.0%)11.021s (~)0.618s31.00x
💻 LocalExpress10.407s (-4.7%)11.021s (~)0.614s31.00x
🐘 PostgresExpress10.418s (-5.0%)11.015s (~)0.598s31.00x
🐘 PostgresNitro10.423s (-4.1%)11.015s (~)0.593s31.00x
🌐 RedisNext.js (Turbopack)10.663s11.023s0.360s31.03x
🌐 MongoDBNext.js (Turbopack)10.670s11.014s0.344s31.03x
🐘 PostgresNext.js (Turbopack)10.715s11.017s0.302s31.03x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)15.794s (-8.8% 🟢)17.951s (-7.5% 🟢)2.157s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express13.439s (-7.8% 🟢)14.018s (-6.7% 🟢)0.578s51.00x
💻 LocalNitro13.450s (-10.7% 🟢)14.026s (-12.5% 🟢)0.577s51.00x
💻 LocalExpress13.485s (-9.9% 🟢)14.026s (-6.7% 🟢)0.541s51.00x
🐘 PostgresNitro13.488s (-7.6% 🟢)14.019s (-6.7% 🟢)0.530s51.00x
🌐 MongoDBNext.js (Turbopack)13.940s14.219s0.279s51.04x
🐘 PostgresNext.js (Turbopack)14.131s15.022s0.891s41.05x
🌐 RedisNext.js (Turbopack)14.169s15.030s0.861s41.05x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)23.629s (-55.0% 🟢)25.826s (-52.7% 🟢)2.197s31.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro11.849s (-29.4% 🟢)12.022s (-29.4% 🟢)0.173s81.00x
💻 LocalExpress11.902s (-28.3% 🟢)12.022s (-29.4% 🟢)0.120s81.00x
🐘 PostgresExpress12.005s (-14.3% 🟢)12.394s (-15.1% 🟢)0.389s81.01x
🐘 PostgresNitro12.046s (-13.8% 🟢)12.645s (-11.6% 🟢)0.599s81.02x
🌐 MongoDBNext.js (Turbopack)12.694s13.017s0.323s71.07x
🌐 RedisNext.js (Turbopack)13.121s14.028s0.907s71.11x
🐘 PostgresNext.js (Turbopack)13.366s14.018s0.651s71.13x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)34.490s (-91.2% 🟢)36.796s (-90.7% 🟢)2.306s31.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.145s (-10.2% 🟢)2.007s (~)0.862s151.00x
🐘 PostgresExpress1.147s (-9.0% 🟢)2.008s (~)0.861s151.00x
💻 LocalNitro1.174s (-28.0% 🟢)2.006s (-3.3%)0.831s151.03x
💻 LocalExpress1.211s (-18.6% 🟢)2.006s (~)0.794s151.06x
🐘 PostgresNext.js (Turbopack)1.219s2.008s0.788s151.07x
🌐 RedisNext.js (Turbopack)1.275s2.007s0.732s151.11x
🌐 MongoDBNext.js (Turbopack)2.019s2.674s0.655s121.76x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.105s (+20.8% 🔺)6.180s (+25.3% 🔺)2.075s51.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.202s (-48.9% 🟢)2.006s (-33.3% 🟢)0.804s151.00x
🐘 PostgresExpress1.226s (-48.1% 🟢)2.007s (-33.3% 🟢)0.782s151.02x
🐘 PostgresNext.js (Turbopack)1.375s2.007s0.633s151.14x
💻 LocalNitro1.677s (-46.7% 🟢)2.005s (-48.4% 🟢)0.329s151.39x
💻 LocalExpress1.798s (-39.1% 🟢)2.008s (-41.9% 🟢)0.209s151.50x
🌐 RedisNext.js (Turbopack)2.397s3.009s0.612s101.99x
🌐 MongoDBNext.js (Turbopack)3.570s4.008s0.438s82.97x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.819s (-32.1% 🟢)6.927s (-22.2% 🟢)2.108s51.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.326s (-61.9% 🟢)2.008s (-49.9% 🟢)0.682s151.00x
🐘 PostgresExpress1.365s (-60.8% 🟢)2.008s (-49.9% 🟢)0.643s151.03x
🐘 PostgresNext.js (Turbopack)1.662s2.007s0.345s151.25x
🌐 RedisNext.js (Turbopack)3.651s4.011s0.360s82.75x
💻 LocalNitro4.459s (-46.6% 🟢)5.013s (-44.4% 🟢)0.554s73.36x
💻 LocalExpress5.277s (-36.7% 🟢)5.846s (-35.2% 🟢)0.569s63.98x
🌐 MongoDBNext.js (Turbopack)6.145s7.011s0.866s54.64x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)7.711s (-13.5% 🟢)10.175s (-7.2% 🟢)2.464s41.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.143s (-9.1% 🟢)2.008s (~)0.865s151.00x
🐘 PostgresNitro1.149s (-8.6% 🟢)2.008s (~)0.860s151.00x
🐘 PostgresNext.js (Turbopack)1.210s2.007s0.797s151.06x
🌐 RedisNext.js (Turbopack)1.237s2.007s0.770s151.08x
💻 LocalNitro1.377s (-26.2% 🟢)2.006s (-14.3% 🟢)0.629s151.20x
💻 LocalExpress1.754s (-7.4% 🟢)2.391s (+1.2%)0.638s131.53x
🌐 MongoDBNext.js (Turbopack)2.025s2.734s0.709s111.77x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.859s (+31.6% 🔺)5.663s (+22.0% 🔺)1.805s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.217s (-48.0% 🟢)2.075s (-31.1% 🟢)0.858s151.00x
🐘 PostgresExpress1.234s (-47.3% 🟢)2.010s (-33.3% 🟢)0.776s151.01x
🐘 PostgresNext.js (Turbopack)1.370s2.007s0.636s151.13x
💻 LocalNitro1.804s (-41.2% 🟢)2.222s (-42.8% 🟢)0.419s141.48x
💻 LocalExpress2.119s (-32.4% 🟢)2.590s (-31.2% 🟢)0.472s121.74x
🌐 RedisNext.js (Turbopack)2.366s3.009s0.643s101.94x
🌐 MongoDBNext.js (Turbopack)3.566s4.008s0.442s82.93x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)5.086s (+61.8% 🔺)7.055s (+56.0% 🔺)1.969s51.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.319s (-62.1% 🟢)2.007s (-49.9% 🟢)0.688s151.00x
🐘 PostgresExpress1.359s (-61.2% 🟢)2.008s (-49.9% 🟢)0.649s151.03x
🐘 PostgresNext.js (Turbopack)1.654s2.008s0.354s151.25x
🌐 RedisNext.js (Turbopack)3.666s4.010s0.344s82.78x
💻 LocalNitro4.835s (-47.1% 🟢)5.513s (-45.0% 🟢)0.677s63.67x
💻 LocalExpress5.619s (-36.2% 🟢)6.217s (-33.0% 🟢)0.598s54.26x
🌐 MongoDBNext.js (Turbopack)6.228s7.010s0.782s54.72x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.106s (-9.6% 🟢)7.716s (-9.7% 🟢)1.609s41.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.448s (-45.4% 🟢)1.006s (~)0.558s601.00x
💻 LocalExpress0.463s (-52.9% 🟢)1.004s (-6.7% 🟢)0.541s601.03x
🐘 PostgresExpress0.481s (-42.6% 🟢)1.023s (~)0.542s591.07x
💻 LocalNitro0.513s (-47.7% 🟢)1.021s (-6.7% 🟢)0.508s591.14x
🌐 MongoDBNext.js (Turbopack)0.595s1.005s0.410s601.33x
🌐 RedisNext.js (Turbopack)0.658s1.005s0.346s601.47x
🐘 PostgresNext.js (Turbopack)0.698s1.006s0.308s601.56x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.179s (-57.4% 🟢)8.102s (-49.6% 🟢)1.923s81.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.065s (-44.8% 🟢)1.772s (-15.6% 🟢)0.707s511.00x
🐘 PostgresExpress1.152s (-41.7% 🟢)1.844s (-18.3% 🟢)0.692s491.08x
💻 LocalNitro1.168s (-61.5% 🟢)2.005s (-46.6% 🟢)0.837s451.10x
💻 LocalExpress1.301s (-56.9% 🟢)2.122s (-40.8% 🟢)0.821s431.22x
🌐 MongoDBNext.js (Turbopack)1.484s2.006s0.522s451.39x
🌐 RedisNext.js (Turbopack)1.561s2.006s0.445s451.47x
🐘 PostgresNext.js (Turbopack)1.604s2.007s0.403s451.51x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)14.969s (-69.9% 🟢)17.357s (-66.4% 🟢)2.388s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.021s (-49.4% 🟢)2.456s (-43.8% 🟢)0.435s491.00x
🐘 PostgresNitro2.028s (-50.6% 🟢)2.528s (-45.1% 🟢)0.501s481.00x
💻 LocalNitro2.651s (-71.5% 🟢)3.007s (-70.0% 🟢)0.356s401.31x
💻 LocalExpress2.654s (-71.2% 🟢)3.007s (-70.0% 🟢)0.354s401.31x
🌐 RedisNext.js (Turbopack)3.018s3.396s0.378s361.49x
🐘 PostgresNext.js (Turbopack)3.183s4.009s0.825s301.58x
🌐 MongoDBNext.js (Turbopack)3.422s4.010s0.588s301.69x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)43.502s (-59.4% 🟢)46.024s (-57.7% 🟢)2.522s31.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.179s (-36.6% 🟢)1.006s (~)0.827s601.00x
🐘 PostgresNitro0.181s (-36.2% 🟢)1.006s (~)0.825s601.01x
🐘 PostgresNext.js (Turbopack)0.236s1.005s0.769s601.32x
🌐 RedisNext.js (Turbopack)0.261s1.004s0.743s601.46x
💻 LocalNitro0.410s (-32.2% 🟢)1.004s (-1.7%)0.594s602.29x
💻 LocalExpress0.449s (-19.9% 🟢)1.004s (~)0.555s602.51x
🌐 MongoDBNext.js (Turbopack)1.028s1.770s0.742s345.75x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.053s (+100.4% 🔺)6.298s (+66.0% 🔺)2.246s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.300s (-39.6% 🟢)1.006s (~)0.706s901.00x
🐘 PostgresExpress0.314s (-38.4% 🟢)1.007s (~)0.693s901.05x
🌐 RedisNext.js (Turbopack)0.431s1.004s0.573s901.44x
🐘 PostgresNext.js (Turbopack)0.455s1.006s0.550s901.52x
💻 LocalExpress2.143s (-14.7% 🟢)2.714s (-9.8% 🟢)0.572s347.15x
💻 LocalNitro2.165s (-14.7% 🟢)2.765s (-8.1% 🟢)0.600s337.22x
🌐 MongoDBNext.js (Turbopack)2.573s3.006s0.433s308.58x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)8.287s (+134.4% 🔺)10.464s (+101.5% 🔺)2.176s91.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.606s (-23.3% 🟢)1.006s (~)0.400s1201.00x
🐘 PostgresExpress0.632s (-22.8% 🟢)1.006s (-1.1%)0.373s1201.04x
🌐 RedisNext.js (Turbopack)0.810s1.004s0.195s1201.34x
🐘 PostgresNext.js (Turbopack)0.958s1.387s0.430s871.58x
🌐 MongoDBNext.js (Turbopack)5.307s6.011s0.704s208.76x
💻 LocalNitro9.751s (-12.9% 🟢)10.445s (-10.4% 🟢)0.694s1216.09x
💻 LocalExpress10.904s (-2.6%)11.399s (-4.5%)0.496s1117.99x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)20.304s (+96.6% 🔺)22.967s (+86.9% 🔺)2.663s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.131s (+451.5% 🔺)2.000s (+100.3% 🔺)0.001s (-31.3% 🟢)2.010s (+98.8% 🔺)0.879s101.00x
💻 LocalNitro1.131s (+429.3% 🔺)2.004s (+99.5% 🔺)0.011s (-15.2% 🟢)2.017s (+98.0% 🔺)0.886s101.00x
🐘 PostgresNitro1.132s (+452.2% 🔺)2.001s (+100.1% 🔺)0.001s (-26.7% 🟢)2.009s (+98.7% 🔺)0.877s101.00x
💻 LocalExpress1.141s (+473.3% 🔺)2.005s (+99.6% 🔺)0.012s (~)2.019s (+98.3% 🔺)0.878s101.01x
🐘 PostgresNext.js (Turbopack)1.201s2.001s0.001s2.011s0.810s101.06x
🌐 MongoDBNext.js (Turbopack)⚠️missing-----
🌐 RedisNext.js (Turbopack)⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.713s (-31.2% 🟢)5.161s (-40.3% 🟢)1.482s (+134.6% 🔺)8.473s (-13.4% 🟢)3.760s101.00x
▲ VercelExpress⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.505s (+139.0% 🔺)2.003s (+99.0% 🔺)0.004s (+0.9%)2.026s (+98.0% 🔺)0.520s301.00x
🐘 PostgresNitro1.522s (+143.9% 🔺)2.006s (+99.3% 🔺)0.004s (-15.4% 🟢)2.024s (+97.9% 🔺)0.502s301.01x
💻 LocalExpress1.570s (+107.4% 🔺)2.012s (+95.6% 🔺)0.011s (+14.7% 🔺)2.025s (+94.8% 🔺)0.455s301.04x
🐘 PostgresNext.js (Turbopack)1.664s2.011s0.004s2.025s0.361s301.11x
💻 LocalNitro1.688s (+101.3% 🔺)2.011s (+98.7% 🔺)0.009s (-4.0%)2.201s (+97.2% 🔺)0.513s281.12x
🌐 MongoDBNext.js (Turbopack)⚠️missing-----
🌐 RedisNext.js (Turbopack)⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)12.267s (-27.5% 🟢)13.897s (-23.8% 🟢)0.343s (+62.3% 🔺)15.237s (-19.5% 🟢)2.969s51.00x
▲ VercelExpress⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.642s (-33.7% 🟢)1.016s (-18.5% 🟢)0.000s (-59.3% 🟢)1.023s (-18.6% 🟢)0.381s591.00x
🐘 PostgresExpress0.692s (-27.9% 🟢)1.047s (-18.0% 🟢)0.000s (+21.1% 🔺)1.060s (-18.8% 🟢)0.368s571.08x
🐘 PostgresNext.js (Turbopack)0.826s1.071s0.000s1.078s0.252s561.29x
💻 LocalNitro1.335s (+9.2% 🔺)2.015s (~)0.000s (+100.0% 🔺)2.017s (~)0.681s302.08x
💻 LocalExpress1.386s (+13.2% 🔺)2.015s (~)0.000s (-80.0% 🟢)2.017s (~)0.631s302.16x
🌐 MongoDBNext.js (Turbopack)⚠️missing-----
🌐 RedisNext.js (Turbopack)⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.379s (-37.3% 🟢)7.433s (-35.5% 🟢)0.000s (NaN%)8.871s (-26.4% 🟢)2.492s71.00x
▲ VercelExpress⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack)

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.252s (-29.3% 🟢)1.996s (-8.3% 🟢)0.000s (+Infinity% 🔺)2.034s (-7.5% 🟢)0.782s301.00x
🐘 PostgresNitro1.354s (-24.4% 🟢)2.105s (-1.7%)0.000s (+93.1% 🔺)2.123s (-2.4%)0.769s291.08x
🐘 PostgresNext.js (Turbopack)1.678s2.262s0.000s2.286s0.608s271.34x
💻 LocalNitro3.014s (-11.0% 🟢)3.842s (-4.7%)0.001s (-6.2% 🟢)3.844s (-4.8%)0.831s162.41x
💻 LocalExpress3.243s (-6.5% 🟢)3.968s (-1.6%)0.000s (-45.3% 🟢)3.970s (-1.7%)0.726s162.59x
🌐 MongoDBNext.js (Turbopack)⚠️missing-----
🌐 RedisNext.js (Turbopack)⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)8.615s (+53.4% 🔺)10.007s (+43.3% 🔺)0.000s (+33.3% 🔺)11.037s (+46.4% 🔺)2.422s61.00x
▲ VercelExpress⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro17/21
🐘 PostgresNitro11/21
▲ VercelNext.js (Turbopack)21/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres16/21
Next.js (Turbopack)🐘 Postgres11/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: failure
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

@github-actions

github-actionsBot commented May 5, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production92502191144
✅ 💻 Local Development123702191456
✅ 📦 Local Production123702191456
✅ 🐘 Local Postgres123702191456
✅ 🪟 Windows10400104
✅ 📋 Other5520176728
Total5292010526344

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro78026
✅ example78026
✅ express78026
✅ fastify78026
✅ hono78026
✅ nextjs-turbopack10202
✅ nextjs-webpack10202
✅ nitro78026
✅ nuxt78026
✅ sveltekit9707
✅ vite78026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable79025
✅ express-stable79025
✅ fastify-stable79025
✅ hono-stable79025
✅ nextjs-turbopack-canary85019
✅ nextjs-turbopack-stable-lazy-discovery-disabled10400
✅ nextjs-turbopack-stable-lazy-discovery-enabled10400
✅ nextjs-webpack-canary85019
✅ nextjs-webpack-stable-lazy-discovery-disabled10400
✅ nextjs-webpack-stable-lazy-discovery-enabled10400
✅ nitro-stable79025
✅ nuxt-stable79025
✅ sveltekit-stable9806
✅ vite-stable79025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable79025
✅ express-stable79025
✅ fastify-stable79025
✅ hono-stable79025
✅ nextjs-turbopack-canary85019
✅ nextjs-turbopack-stable-lazy-discovery-disabled10400
✅ nextjs-turbopack-stable-lazy-discovery-enabled10400
✅ nextjs-webpack-canary85019
✅ nextjs-webpack-stable-lazy-discovery-disabled10400
✅ nextjs-webpack-stable-lazy-discovery-enabled10400
✅ nitro-stable79025
✅ nuxt-stable79025
✅ sveltekit-stable9806
✅ vite-stable79025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable79025
✅ express-stable79025
✅ fastify-stable79025
✅ hono-stable79025
✅ nextjs-turbopack-canary85019
✅ nextjs-turbopack-stable-lazy-discovery-disabled10400
✅ nextjs-turbopack-stable-lazy-discovery-enabled10400
✅ nextjs-webpack-canary85019
✅ nextjs-webpack-stable-lazy-discovery-disabled10400
✅ nextjs-webpack-stable-lazy-discovery-enabled10400
✅ nitro-stable79025
✅ nuxt-stable79025
✅ sveltekit-stable9806
✅ vite-stable79025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack10400
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable79025
✅ e2e-local-dev-tanstack-start-79025
✅ e2e-local-postgres-nest-stable79025
✅ e2e-local-postgres-tanstack-start-79025
✅ e2e-local-prod-nest-stable79025
✅ e2e-local-prod-tanstack-start-79025
✅ e2e-vercel-prod-tanstack-start78026

📋 View full workflow run

Comment thread.changeset/fix-step-vs-wait-race.md Outdated
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@VaguelySerious
VaguelySerious merged commit 3535caf into mainMay 5, 2026
112 of 115 checks passed
@VaguelySerious
VaguelySerious deleted the peter/fix-step-vs-wait-race branch May 5, 2026 00:49
@github-actionsgithub-actionsBot mentioned this pull request May 5, 2026
pranaygp added a commit that referenced this pull request May 5, 2026
* origin/main:
[core] Skip inline step execution when suspension also has a wait (#1924)
[errors] Replace chalk import in @workfow/errors with inline ANSI shim (#1915)
Fix compatibility with Zod 4.4.x (#1902)
Serialize `run_failed`/`step_failed` errors through serialization pipeline (#1851)
tarballs: redesign preview tarballs index page (#1911)
Remove extra changeset (#1922)
Add stable Next.js eager and lazy test coverage (#1747)
Enforce per-(run, correlation) uniqueness for entity-creating events in world-postgres (#1878)
fix(world-vercel): add default request timeout to workflow-server HTTP calls (#1807)
pranaygp added a commit that referenced this pull request May 5, 2026
PR #1924 added the same sleep/step race workflows directly to main
while this branch was open. The textual concat from `git merge`
left both copies in 99_e2e.ts; this drops the duplicate set so the
file matches origin/main verbatim and the e2e tests pick up the
upstream definitions.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
pranaygp added a commit that referenced this pull request May 5, 2026
…ignal
* origin/main:
[core] Skip inline step execution when suspension also has a wait (#1924)
[errors] Replace chalk import in @workfow/errors with inline ANSI shim (#1915)
Fix compatibility with Zod 4.4.x (#1902)
Serialize `run_failed`/`step_failed` errors through serialization pipeline (#1851)
tarballs: redesign preview tarballs index page (#1911)
Remove extra changeset (#1922)
Add stable Next.js eager and lazy test coverage (#1747)
Enforce per-(run, correlation) uniqueness for entity-creating events in world-postgres (#1878)
fix(world-vercel): add default request timeout to workflow-server HTTP calls (#1807)
Allow disabling step sourcemap with new `sourcemap` option in builders (#1842)
[ci] Enable Vercel-prod e2e for tanstack-start (#1904)
web: configure vercelPreset() for Vercel deployments (#1815)
[core] Combine flow+step bundle and process steps eagerly (#1338)
[world-vercel] Revert stream close control framing (#1891)
[tarballs] Use turbo to build workspace deps before packing (#1908)
# Conflicts:
#	packages/core/src/runtime/step-handler.test.ts
#	packages/core/src/runtime/step-handler.ts
#	packages/core/src/runtime/suspension-handler.ts
#	packages/core/src/step.test.ts
#	packages/world-local/src/storage/events-storage.ts
#	packages/world-postgres/src/drizzle/migrations/meta/_journal.json
pranaygp added a commit that referenced this pull request May 5, 2026
* [e2e] Add step-vs-sleep race tests + dev-tmux skill
Adds two race workflows (sleepWinsRaceWorkflow, stepWinsRaceWorkflow)
that exercise Promise.race between a step function and a sleep call.
The current `sleepWinsRaceWorkflow` test fails — surfacing how the
replay engine resolves a previously-completed step instantly while
sleep still has to elapse.
Also adds a `dev-tmux` skill that documents the 3-pane tmux + portless
setup for testing workflows interactively in a worktree alongside the
observability UI.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [workbench/nextjs-turbopack] Allow *.turbopack.localhost in dev
Adds allowedDevOrigins entries so portless-style worktree-prefixed
.localhost URLs (e.g. https://<branch>.turbopack.localhost) can hit
HMR and dev-only endpoints without Next's cross-origin protection
flooding the logs with warnings.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Drop duplicate race workflows after merging main
PR #1924 added the same sleep/step race workflows directly to main
while this branch was open. The textual concat from `git merge`
left both copies in 99_e2e.ts; this drops the duplicate set so the
file matches origin/main verbatim and the e2e tests pick up the
upstream definitions.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Narrow activation, robust pane IDs, statusline helper
- Tighten activation phrases so the skill only fires for the specific
portless+tmux setup it documents, not the generic "start the dev
server" task. Addresses #1916 review.
- Capture pane IDs at split time (-P -F '#{pane_id}') so the snippet
works under both pane-base-index 0 and 1. Addresses Copilot review.
- Add `statusline.sh` that filters `portless list` to the current
worktree's routes and emits a one-line summary, plus instructions
for wiring it into Claude Code's `statusLine.command`.
- Bump version to 1.1.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Recommend primary-checkout path for statusline
Worktrees get deleted, so wiring the statusline to a worktree path
breaks the moment the worktree is removed. Update the skill and the
script header to recommend pointing `statusLine.command` at the
primary checkout (`$HOME/github/vercel/workflow/...`). The script
itself is already worktree-aware via Claude's `workspace.current_dir`
stdin JSON, so the same invocation surfaces routes for whichever
worktree the session is in.
Bump version to 1.2.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] OSC 8 link statusline + worktree-named tmux session
- Statusline overlay now renders `[dev] · [obs] · tmux:<prefix>`,
with the bracketed labels emitted as OSC 8 hyperlinks (clickable in
any modern terminal) styled cyan + underline so they stand out.
Replaces the old long-URL form that was hard to scan and click.
- Add a tmux-session indicator: shown when a session named exactly the
worktree prefix exists (uses `tmux has-session -t =<prefix>` for
exact matching).
- Change the skill's tmux session naming convention from the fixed
`workflow-dev` to `<worktree-prefix>` (basename of the branch — same
string portless uses as the subdomain prefix). This lets the
statusline locate the session deterministically and lets multiple
worktrees run dev sessions concurrently without manual disambiguation.
- Bump skill to v1.3.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Statusline: print full `tmux attach -t <name>` command
Replaces the abbreviated `tmux:<prefix>` indicator with the full
copy-paste-ready `tmux attach -t <prefix>` invocation. Saves a step
when grabbing the session from another shell.
Bump skill to v1.4.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Brighter statusline + Nerd Font icons
- Drop the dim styling that made the overlay hard to read; use bold
bright cyan + underline for links and bold bright green for the
tmux command.
- Add Nerd Font glyphs: for dev, for obs, for the
tmux copy-paste hint. Falls back to box-drawing if the font lacks
Nerd Font ranges; layout is unaffected.
- Visual differentiation: cyan + underline = clickable hyperlink;
green = copy this command.
Bump skill to v1.5.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Restore Nerd Font icons via Unicode escapes
The copy glyph in `emit_tmux` was a literal Nerd Font byte embedded in
the printf string and got stripped during a prior rewrite. Promote all
three icons (rocket / graph / copy) to top-level shell variables that
use \uHHHH-equivalent UTF-8 escapes, so the source survives editor
round-trips that don't preserve Private Use Area code points.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/internal-dev-workbench] Rename from dev-tmux, set author + reset version
- Rename `skills/dev-tmux/` → `skills/internal-dev-workbench/` to make
the name self-explanatory about the skill's scope (an internal
contributor's local dev workbench, not a generic tmux helper).
- Author: Pranay Prakash. Version: 0.1 (first release of the skill).
- Update internal references in SKILL.md and statusline.sh accordingly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

2 participants

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

[core] V2: skip inline step execution when suspension also has a wait - #1924

Merged
VaguelySerious merged 2 commits into
mainfrom
peter/fix-step-vs-wait-race
May 5, 2026
Merged

[core] V2: skip inline step execution when suspension also has a wait#1924
VaguelySerious merged 2 commits into
mainfrom
peter/fix-step-vs-wait-race

Conversation

@VaguelySerious

Copy link
Copy Markdown
Member

Summary

Fix Promise.race(step, sleep) semantics in V2 mixed suspensions: when a workflow suspension contains both pending steps and at least one wait (sleep), the runtime now queues every step instead of executing one inline.

Inline `await executeStep(...)` blocks the V2 handler for the full step duration, but `wait_completed` events are only created on the next loop iteration's "complete elapsed waits" pass. So if the sleep is shorter than the step, the wait timer never fires on time — replay just sees `step_completed` first and `Promise.race` resolves with the step. A 1s sleep racing a 10s step would silently resolve to the step.

This restores V1's behavior, where each step ran in a separate function invocation and the wait timer drove a parallel queue continuation.

Reproducer (failing test from #1916)

`sleepWinsRaceWorkflow`: a 1s sleep raced against a 10s step. Expected `'sleep'` to win.

Event log on the failing run, before the fix:

t (s)Event
0.000`run_created`
1.738`step_created` + `wait_created`resumeAt = t+1s
1.742`step_started`inline execution begins
11.825`step_completed`step body finishes after ~10s
11.861`wait_completed`created right after step_completed, not on time
11.959`run_completed`replay picked `'step'`

After the fix, `wait_completed` lands at t≈1s after `wait_created` and the run completes with `'sleep'` in ~1s.

Change

One-liner in `packages/core/src/runtime.ts`:

```ts
const inlineStep =
suspensionResult.timeoutSeconds === undefined
? ownedPendingSteps[0]
: undefined;
```

The existing "queue every pending step except the inline one" loop and the `if (!inlineStep)` early-return already handle the `undefined` case correctly.

What about hooks?

Audited every flavor of suspension. Step + wait is the only fully-broken combination.

Suspension containsBehavior in V2Race-correct?
steps onlyone inline, rest queued
wait onlyreturns with timeoutSeconds
hook onlyreturns; external resumeHook drives continuation
wait + hookno steps → returns with timeoutSeconds
step + waitstep inline-blocks, wait timer never fires❌ — fixed here
step + hookstep inline-blocks, but hook continuation runs concurrently via queueConcurrency (≥1000 on world-local, 50 on world-postgres, auto on Vercel)⚠️ correct via concurrency, but step keeps running uselessly until termination

Step + hook works on all first-party worlds today. A consistent follow-up would extend the same carve-out to `hasPendingHooks`, but it would require a new field in `SuspensionHandlerResult` and isn't strictly necessary — happy to do that as a follow-up if desired.

Test plan

  • New e2e tests `sleepWinsRaceWorkflow` and `stepWinsRaceWorkflow` (the failing tests from Add dev-tmux skill for portless+tmux local Workflow SDK dev #1916, plus the symmetric stepWins case).
  • `pnpm vitest run packages/core/e2e/e2e.test.ts -t WinsRaceWorkflow` against the `nextjs-turbopack` workbench locally — both pass.
  • Event log inspection confirms `wait_completed` is now created at t≈1s.
  • All 842 `@workflow/core` unit tests pass.

Docs

`docs/content/docs/changelog/eager-processing.mdx` "Mixed Suspensions" section rewritten to describe the carve-out and explicitly call out the `Promise.race(step, sleep)` race-semantics motivation.

🤖 Generated with Claude Code

Inline `await executeStep(...)` blocks the V2 handler for the full
step duration, but `wait_completed` events are only created on the
*next* loop iteration's "complete elapsed waits" pass. This breaks
`Promise.race(step, sleep)` semantics whenever the sleep is shorter
than the step — replay still picks the step because the sleep's
wait_completed event hasn't been written yet.
Reproducer (`sleepWinsRaceWorkflow`): a 1s sleep raced against a 10s
step. Expected `'sleep'` to win; the runtime returned `'step'`. On
the failing run, `wait_completed` was created at t=11.86s — right
after `step_completed` — instead of at t≈2.74s when its `resumeAt`
elapsed.
Fix: in `runtime.ts`, gate the inline-step pick on the absence of a
wait timeout. When `suspensionResult.timeoutSeconds !== undefined`,
queue every pending step instead and return with the wait timeout.
This lets the wait timer drive a continuation in parallel, matching
V1's behavior where each step ran in a separate function
invocation. Pure step suspensions (without waits) still benefit
from inline execution.
Test plan:
- New e2e tests `sleepWinsRaceWorkflow` and `stepWinsRaceWorkflow`
exercising `Promise.race` between a step function and `sleep()`,
in both directions.
- Verified locally against `nextjs-turbopack` workbench: both pass.
Event log confirms `wait_completed` is now created on time
(t≈1s after `wait_created`) rather than after the inline step.
Eager-processing changelog updated with a "Mixed Suspensions"
section describing the carve-out and its rationale.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented May 5, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented May 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ee02092

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

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

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

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

@github-actions

github-actionsBot commented May 5, 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🥇 Express0.031s (-29.8% 🟢)1.005s (~)0.974s101.00x
💻 LocalNitro0.032s (-24.8% 🟢)1.005s (~)0.973s101.04x
🐘 PostgresNitro0.041s (-56.5% 🟢)1.011s (-3.0%)0.970s101.33x
🐘 PostgresExpress0.046s (-20.0% 🟢)1.012s (~)0.965s101.49x
🌐 RedisNext.js (Turbopack)0.053s1.005s0.952s101.70x
🐘 PostgresNext.js (Turbopack)0.061s1.013s0.952s101.95x
🌐 MongoDBNext.js (Turbopack)0.089s1.006s0.918s102.86x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.806s (+220.6% 🔺)2.783s (+19.3% 🔺)1.976s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.068s (-5.6% 🟢)2.006s (~)0.938s101.00x
💻 LocalExpress1.072s (-4.7%)2.006s (~)0.934s101.00x
🐘 PostgresExpress1.081s (-5.7% 🟢)2.009s (~)0.928s101.01x
🐘 PostgresNitro1.084s (-4.9%)2.010s (~)0.926s101.01x
🌐 RedisNext.js (Turbopack)1.111s2.006s0.895s101.04x
🐘 PostgresNext.js (Turbopack)1.131s2.010s0.879s101.06x
🌐 MongoDBNext.js (Turbopack)1.151s2.007s0.856s101.08x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.825s (+38.8% 🔺)4.958s (+29.4% 🔺)2.134s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.402s (-5.0%)11.021s (~)0.618s31.00x
💻 LocalExpress10.407s (-4.7%)11.021s (~)0.614s31.00x
🐘 PostgresExpress10.418s (-5.0%)11.015s (~)0.598s31.00x
🐘 PostgresNitro10.423s (-4.1%)11.015s (~)0.593s31.00x
🌐 RedisNext.js (Turbopack)10.663s11.023s0.360s31.03x
🌐 MongoDBNext.js (Turbopack)10.670s11.014s0.344s31.03x
🐘 PostgresNext.js (Turbopack)10.715s11.017s0.302s31.03x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)15.794s (-8.8% 🟢)17.951s (-7.5% 🟢)2.157s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express13.439s (-7.8% 🟢)14.018s (-6.7% 🟢)0.578s51.00x
💻 LocalNitro13.450s (-10.7% 🟢)14.026s (-12.5% 🟢)0.577s51.00x
💻 LocalExpress13.485s (-9.9% 🟢)14.026s (-6.7% 🟢)0.541s51.00x
🐘 PostgresNitro13.488s (-7.6% 🟢)14.019s (-6.7% 🟢)0.530s51.00x
🌐 MongoDBNext.js (Turbopack)13.940s14.219s0.279s51.04x
🐘 PostgresNext.js (Turbopack)14.131s15.022s0.891s41.05x
🌐 RedisNext.js (Turbopack)14.169s15.030s0.861s41.05x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)23.629s (-55.0% 🟢)25.826s (-52.7% 🟢)2.197s31.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro11.849s (-29.4% 🟢)12.022s (-29.4% 🟢)0.173s81.00x
💻 LocalExpress11.902s (-28.3% 🟢)12.022s (-29.4% 🟢)0.120s81.00x
🐘 PostgresExpress12.005s (-14.3% 🟢)12.394s (-15.1% 🟢)0.389s81.01x
🐘 PostgresNitro12.046s (-13.8% 🟢)12.645s (-11.6% 🟢)0.599s81.02x
🌐 MongoDBNext.js (Turbopack)12.694s13.017s0.323s71.07x
🌐 RedisNext.js (Turbopack)13.121s14.028s0.907s71.11x
🐘 PostgresNext.js (Turbopack)13.366s14.018s0.651s71.13x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)34.490s (-91.2% 🟢)36.796s (-90.7% 🟢)2.306s31.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.145s (-10.2% 🟢)2.007s (~)0.862s151.00x
🐘 PostgresExpress1.147s (-9.0% 🟢)2.008s (~)0.861s151.00x
💻 LocalNitro1.174s (-28.0% 🟢)2.006s (-3.3%)0.831s151.03x
💻 LocalExpress1.211s (-18.6% 🟢)2.006s (~)0.794s151.06x
🐘 PostgresNext.js (Turbopack)1.219s2.008s0.788s151.07x
🌐 RedisNext.js (Turbopack)1.275s2.007s0.732s151.11x
🌐 MongoDBNext.js (Turbopack)2.019s2.674s0.655s121.76x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.105s (+20.8% 🔺)6.180s (+25.3% 🔺)2.075s51.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.202s (-48.9% 🟢)2.006s (-33.3% 🟢)0.804s151.00x
🐘 PostgresExpress1.226s (-48.1% 🟢)2.007s (-33.3% 🟢)0.782s151.02x
🐘 PostgresNext.js (Turbopack)1.375s2.007s0.633s151.14x
💻 LocalNitro1.677s (-46.7% 🟢)2.005s (-48.4% 🟢)0.329s151.39x
💻 LocalExpress1.798s (-39.1% 🟢)2.008s (-41.9% 🟢)0.209s151.50x
🌐 RedisNext.js (Turbopack)2.397s3.009s0.612s101.99x
🌐 MongoDBNext.js (Turbopack)3.570s4.008s0.438s82.97x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.819s (-32.1% 🟢)6.927s (-22.2% 🟢)2.108s51.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.326s (-61.9% 🟢)2.008s (-49.9% 🟢)0.682s151.00x
🐘 PostgresExpress1.365s (-60.8% 🟢)2.008s (-49.9% 🟢)0.643s151.03x
🐘 PostgresNext.js (Turbopack)1.662s2.007s0.345s151.25x
🌐 RedisNext.js (Turbopack)3.651s4.011s0.360s82.75x
💻 LocalNitro4.459s (-46.6% 🟢)5.013s (-44.4% 🟢)0.554s73.36x
💻 LocalExpress5.277s (-36.7% 🟢)5.846s (-35.2% 🟢)0.569s63.98x
🌐 MongoDBNext.js (Turbopack)6.145s7.011s0.866s54.64x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)7.711s (-13.5% 🟢)10.175s (-7.2% 🟢)2.464s41.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.143s (-9.1% 🟢)2.008s (~)0.865s151.00x
🐘 PostgresNitro1.149s (-8.6% 🟢)2.008s (~)0.860s151.00x
🐘 PostgresNext.js (Turbopack)1.210s2.007s0.797s151.06x
🌐 RedisNext.js (Turbopack)1.237s2.007s0.770s151.08x
💻 LocalNitro1.377s (-26.2% 🟢)2.006s (-14.3% 🟢)0.629s151.20x
💻 LocalExpress1.754s (-7.4% 🟢)2.391s (+1.2%)0.638s131.53x
🌐 MongoDBNext.js (Turbopack)2.025s2.734s0.709s111.77x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.859s (+31.6% 🔺)5.663s (+22.0% 🔺)1.805s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.217s (-48.0% 🟢)2.075s (-31.1% 🟢)0.858s151.00x
🐘 PostgresExpress1.234s (-47.3% 🟢)2.010s (-33.3% 🟢)0.776s151.01x
🐘 PostgresNext.js (Turbopack)1.370s2.007s0.636s151.13x
💻 LocalNitro1.804s (-41.2% 🟢)2.222s (-42.8% 🟢)0.419s141.48x
💻 LocalExpress2.119s (-32.4% 🟢)2.590s (-31.2% 🟢)0.472s121.74x
🌐 RedisNext.js (Turbopack)2.366s3.009s0.643s101.94x
🌐 MongoDBNext.js (Turbopack)3.566s4.008s0.442s82.93x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)5.086s (+61.8% 🔺)7.055s (+56.0% 🔺)1.969s51.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.319s (-62.1% 🟢)2.007s (-49.9% 🟢)0.688s151.00x
🐘 PostgresExpress1.359s (-61.2% 🟢)2.008s (-49.9% 🟢)0.649s151.03x
🐘 PostgresNext.js (Turbopack)1.654s2.008s0.354s151.25x
🌐 RedisNext.js (Turbopack)3.666s4.010s0.344s82.78x
💻 LocalNitro4.835s (-47.1% 🟢)5.513s (-45.0% 🟢)0.677s63.67x
💻 LocalExpress5.619s (-36.2% 🟢)6.217s (-33.0% 🟢)0.598s54.26x
🌐 MongoDBNext.js (Turbopack)6.228s7.010s0.782s54.72x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.106s (-9.6% 🟢)7.716s (-9.7% 🟢)1.609s41.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.448s (-45.4% 🟢)1.006s (~)0.558s601.00x
💻 LocalExpress0.463s (-52.9% 🟢)1.004s (-6.7% 🟢)0.541s601.03x
🐘 PostgresExpress0.481s (-42.6% 🟢)1.023s (~)0.542s591.07x
💻 LocalNitro0.513s (-47.7% 🟢)1.021s (-6.7% 🟢)0.508s591.14x
🌐 MongoDBNext.js (Turbopack)0.595s1.005s0.410s601.33x
🌐 RedisNext.js (Turbopack)0.658s1.005s0.346s601.47x
🐘 PostgresNext.js (Turbopack)0.698s1.006s0.308s601.56x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.179s (-57.4% 🟢)8.102s (-49.6% 🟢)1.923s81.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.065s (-44.8% 🟢)1.772s (-15.6% 🟢)0.707s511.00x
🐘 PostgresExpress1.152s (-41.7% 🟢)1.844s (-18.3% 🟢)0.692s491.08x
💻 LocalNitro1.168s (-61.5% 🟢)2.005s (-46.6% 🟢)0.837s451.10x
💻 LocalExpress1.301s (-56.9% 🟢)2.122s (-40.8% 🟢)0.821s431.22x
🌐 MongoDBNext.js (Turbopack)1.484s2.006s0.522s451.39x
🌐 RedisNext.js (Turbopack)1.561s2.006s0.445s451.47x
🐘 PostgresNext.js (Turbopack)1.604s2.007s0.403s451.51x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)14.969s (-69.9% 🟢)17.357s (-66.4% 🟢)2.388s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.021s (-49.4% 🟢)2.456s (-43.8% 🟢)0.435s491.00x
🐘 PostgresNitro2.028s (-50.6% 🟢)2.528s (-45.1% 🟢)0.501s481.00x
💻 LocalNitro2.651s (-71.5% 🟢)3.007s (-70.0% 🟢)0.356s401.31x
💻 LocalExpress2.654s (-71.2% 🟢)3.007s (-70.0% 🟢)0.354s401.31x
🌐 RedisNext.js (Turbopack)3.018s3.396s0.378s361.49x
🐘 PostgresNext.js (Turbopack)3.183s4.009s0.825s301.58x
🌐 MongoDBNext.js (Turbopack)3.422s4.010s0.588s301.69x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)43.502s (-59.4% 🟢)46.024s (-57.7% 🟢)2.522s31.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.179s (-36.6% 🟢)1.006s (~)0.827s601.00x
🐘 PostgresNitro0.181s (-36.2% 🟢)1.006s (~)0.825s601.01x
🐘 PostgresNext.js (Turbopack)0.236s1.005s0.769s601.32x
🌐 RedisNext.js (Turbopack)0.261s1.004s0.743s601.46x
💻 LocalNitro0.410s (-32.2% 🟢)1.004s (-1.7%)0.594s602.29x
💻 LocalExpress0.449s (-19.9% 🟢)1.004s (~)0.555s602.51x
🌐 MongoDBNext.js (Turbopack)1.028s1.770s0.742s345.75x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.053s (+100.4% 🔺)6.298s (+66.0% 🔺)2.246s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.300s (-39.6% 🟢)1.006s (~)0.706s901.00x
🐘 PostgresExpress0.314s (-38.4% 🟢)1.007s (~)0.693s901.05x
🌐 RedisNext.js (Turbopack)0.431s1.004s0.573s901.44x
🐘 PostgresNext.js (Turbopack)0.455s1.006s0.550s901.52x
💻 LocalExpress2.143s (-14.7% 🟢)2.714s (-9.8% 🟢)0.572s347.15x
💻 LocalNitro2.165s (-14.7% 🟢)2.765s (-8.1% 🟢)0.600s337.22x
🌐 MongoDBNext.js (Turbopack)2.573s3.006s0.433s308.58x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)8.287s (+134.4% 🔺)10.464s (+101.5% 🔺)2.176s91.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.606s (-23.3% 🟢)1.006s (~)0.400s1201.00x
🐘 PostgresExpress0.632s (-22.8% 🟢)1.006s (-1.1%)0.373s1201.04x
🌐 RedisNext.js (Turbopack)0.810s1.004s0.195s1201.34x
🐘 PostgresNext.js (Turbopack)0.958s1.387s0.430s871.58x
🌐 MongoDBNext.js (Turbopack)5.307s6.011s0.704s208.76x
💻 LocalNitro9.751s (-12.9% 🟢)10.445s (-10.4% 🟢)0.694s1216.09x
💻 LocalExpress10.904s (-2.6%)11.399s (-4.5%)0.496s1117.99x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)20.304s (+96.6% 🔺)22.967s (+86.9% 🔺)2.663s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.131s (+451.5% 🔺)2.000s (+100.3% 🔺)0.001s (-31.3% 🟢)2.010s (+98.8% 🔺)0.879s101.00x
💻 LocalNitro1.131s (+429.3% 🔺)2.004s (+99.5% 🔺)0.011s (-15.2% 🟢)2.017s (+98.0% 🔺)0.886s101.00x
🐘 PostgresNitro1.132s (+452.2% 🔺)2.001s (+100.1% 🔺)0.001s (-26.7% 🟢)2.009s (+98.7% 🔺)0.877s101.00x
💻 LocalExpress1.141s (+473.3% 🔺)2.005s (+99.6% 🔺)0.012s (~)2.019s (+98.3% 🔺)0.878s101.01x
🐘 PostgresNext.js (Turbopack)1.201s2.001s0.001s2.011s0.810s101.06x
🌐 MongoDBNext.js (Turbopack)⚠️missing-----
🌐 RedisNext.js (Turbopack)⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.713s (-31.2% 🟢)5.161s (-40.3% 🟢)1.482s (+134.6% 🔺)8.473s (-13.4% 🟢)3.760s101.00x
▲ VercelExpress⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.505s (+139.0% 🔺)2.003s (+99.0% 🔺)0.004s (+0.9%)2.026s (+98.0% 🔺)0.520s301.00x
🐘 PostgresNitro1.522s (+143.9% 🔺)2.006s (+99.3% 🔺)0.004s (-15.4% 🟢)2.024s (+97.9% 🔺)0.502s301.01x
💻 LocalExpress1.570s (+107.4% 🔺)2.012s (+95.6% 🔺)0.011s (+14.7% 🔺)2.025s (+94.8% 🔺)0.455s301.04x
🐘 PostgresNext.js (Turbopack)1.664s2.011s0.004s2.025s0.361s301.11x
💻 LocalNitro1.688s (+101.3% 🔺)2.011s (+98.7% 🔺)0.009s (-4.0%)2.201s (+97.2% 🔺)0.513s281.12x
🌐 MongoDBNext.js (Turbopack)⚠️missing-----
🌐 RedisNext.js (Turbopack)⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)12.267s (-27.5% 🟢)13.897s (-23.8% 🟢)0.343s (+62.3% 🔺)15.237s (-19.5% 🟢)2.969s51.00x
▲ VercelExpress⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.642s (-33.7% 🟢)1.016s (-18.5% 🟢)0.000s (-59.3% 🟢)1.023s (-18.6% 🟢)0.381s591.00x
🐘 PostgresExpress0.692s (-27.9% 🟢)1.047s (-18.0% 🟢)0.000s (+21.1% 🔺)1.060s (-18.8% 🟢)0.368s571.08x
🐘 PostgresNext.js (Turbopack)0.826s1.071s0.000s1.078s0.252s561.29x
💻 LocalNitro1.335s (+9.2% 🔺)2.015s (~)0.000s (+100.0% 🔺)2.017s (~)0.681s302.08x
💻 LocalExpress1.386s (+13.2% 🔺)2.015s (~)0.000s (-80.0% 🟢)2.017s (~)0.631s302.16x
🌐 MongoDBNext.js (Turbopack)⚠️missing-----
🌐 RedisNext.js (Turbopack)⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.379s (-37.3% 🟢)7.433s (-35.5% 🟢)0.000s (NaN%)8.871s (-26.4% 🟢)2.492s71.00x
▲ VercelExpress⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack)

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.252s (-29.3% 🟢)1.996s (-8.3% 🟢)0.000s (+Infinity% 🔺)2.034s (-7.5% 🟢)0.782s301.00x
🐘 PostgresNitro1.354s (-24.4% 🟢)2.105s (-1.7%)0.000s (+93.1% 🔺)2.123s (-2.4%)0.769s291.08x
🐘 PostgresNext.js (Turbopack)1.678s2.262s0.000s2.286s0.608s271.34x
💻 LocalNitro3.014s (-11.0% 🟢)3.842s (-4.7%)0.001s (-6.2% 🟢)3.844s (-4.8%)0.831s162.41x
💻 LocalExpress3.243s (-6.5% 🟢)3.968s (-1.6%)0.000s (-45.3% 🟢)3.970s (-1.7%)0.726s162.59x
🌐 MongoDBNext.js (Turbopack)⚠️missing-----
🌐 RedisNext.js (Turbopack)⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)8.615s (+53.4% 🔺)10.007s (+43.3% 🔺)0.000s (+33.3% 🔺)11.037s (+46.4% 🔺)2.422s61.00x
▲ VercelExpress⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro17/21
🐘 PostgresNitro11/21
▲ VercelNext.js (Turbopack)21/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres16/21
Next.js (Turbopack)🐘 Postgres11/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: failure
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

@github-actions

github-actionsBot commented May 5, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production92502191144
✅ 💻 Local Development123702191456
✅ 📦 Local Production123702191456
✅ 🐘 Local Postgres123702191456
✅ 🪟 Windows10400104
✅ 📋 Other5520176728
Total5292010526344

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro78026
✅ example78026
✅ express78026
✅ fastify78026
✅ hono78026
✅ nextjs-turbopack10202
✅ nextjs-webpack10202
✅ nitro78026
✅ nuxt78026
✅ sveltekit9707
✅ vite78026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable79025
✅ express-stable79025
✅ fastify-stable79025
✅ hono-stable79025
✅ nextjs-turbopack-canary85019
✅ nextjs-turbopack-stable-lazy-discovery-disabled10400
✅ nextjs-turbopack-stable-lazy-discovery-enabled10400
✅ nextjs-webpack-canary85019
✅ nextjs-webpack-stable-lazy-discovery-disabled10400
✅ nextjs-webpack-stable-lazy-discovery-enabled10400
✅ nitro-stable79025
✅ nuxt-stable79025
✅ sveltekit-stable9806
✅ vite-stable79025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable79025
✅ express-stable79025
✅ fastify-stable79025
✅ hono-stable79025
✅ nextjs-turbopack-canary85019
✅ nextjs-turbopack-stable-lazy-discovery-disabled10400
✅ nextjs-turbopack-stable-lazy-discovery-enabled10400
✅ nextjs-webpack-canary85019
✅ nextjs-webpack-stable-lazy-discovery-disabled10400
✅ nextjs-webpack-stable-lazy-discovery-enabled10400
✅ nitro-stable79025
✅ nuxt-stable79025
✅ sveltekit-stable9806
✅ vite-stable79025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable79025
✅ express-stable79025
✅ fastify-stable79025
✅ hono-stable79025
✅ nextjs-turbopack-canary85019
✅ nextjs-turbopack-stable-lazy-discovery-disabled10400
✅ nextjs-turbopack-stable-lazy-discovery-enabled10400
✅ nextjs-webpack-canary85019
✅ nextjs-webpack-stable-lazy-discovery-disabled10400
✅ nextjs-webpack-stable-lazy-discovery-enabled10400
✅ nitro-stable79025
✅ nuxt-stable79025
✅ sveltekit-stable9806
✅ vite-stable79025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack10400
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable79025
✅ e2e-local-dev-tanstack-start-79025
✅ e2e-local-postgres-nest-stable79025
✅ e2e-local-postgres-tanstack-start-79025
✅ e2e-local-prod-nest-stable79025
✅ e2e-local-prod-tanstack-start-79025
✅ e2e-vercel-prod-tanstack-start78026

📋 View full workflow run

Comment thread.changeset/fix-step-vs-wait-race.md Outdated
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@VaguelySerious
VaguelySerious merged commit 3535caf into mainMay 5, 2026
112 of 115 checks passed
@VaguelySerious
VaguelySerious deleted the peter/fix-step-vs-wait-race branch May 5, 2026 00:49
@github-actionsgithub-actionsBot mentioned this pull request May 5, 2026
pranaygp added a commit that referenced this pull request May 5, 2026
* origin/main:
[core] Skip inline step execution when suspension also has a wait (#1924)
[errors] Replace chalk import in @workfow/errors with inline ANSI shim (#1915)
Fix compatibility with Zod 4.4.x (#1902)
Serialize `run_failed`/`step_failed` errors through serialization pipeline (#1851)
tarballs: redesign preview tarballs index page (#1911)
Remove extra changeset (#1922)
Add stable Next.js eager and lazy test coverage (#1747)
Enforce per-(run, correlation) uniqueness for entity-creating events in world-postgres (#1878)
fix(world-vercel): add default request timeout to workflow-server HTTP calls (#1807)
pranaygp added a commit that referenced this pull request May 5, 2026
PR #1924 added the same sleep/step race workflows directly to main
while this branch was open. The textual concat from `git merge`
left both copies in 99_e2e.ts; this drops the duplicate set so the
file matches origin/main verbatim and the e2e tests pick up the
upstream definitions.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
pranaygp added a commit that referenced this pull request May 5, 2026
…ignal
* origin/main:
[core] Skip inline step execution when suspension also has a wait (#1924)
[errors] Replace chalk import in @workfow/errors with inline ANSI shim (#1915)
Fix compatibility with Zod 4.4.x (#1902)
Serialize `run_failed`/`step_failed` errors through serialization pipeline (#1851)
tarballs: redesign preview tarballs index page (#1911)
Remove extra changeset (#1922)
Add stable Next.js eager and lazy test coverage (#1747)
Enforce per-(run, correlation) uniqueness for entity-creating events in world-postgres (#1878)
fix(world-vercel): add default request timeout to workflow-server HTTP calls (#1807)
Allow disabling step sourcemap with new `sourcemap` option in builders (#1842)
[ci] Enable Vercel-prod e2e for tanstack-start (#1904)
web: configure vercelPreset() for Vercel deployments (#1815)
[core] Combine flow+step bundle and process steps eagerly (#1338)
[world-vercel] Revert stream close control framing (#1891)
[tarballs] Use turbo to build workspace deps before packing (#1908)
# Conflicts:
#	packages/core/src/runtime/step-handler.test.ts
#	packages/core/src/runtime/step-handler.ts
#	packages/core/src/runtime/suspension-handler.ts
#	packages/core/src/step.test.ts
#	packages/world-local/src/storage/events-storage.ts
#	packages/world-postgres/src/drizzle/migrations/meta/_journal.json
pranaygp added a commit that referenced this pull request May 5, 2026
* [e2e] Add step-vs-sleep race tests + dev-tmux skill
Adds two race workflows (sleepWinsRaceWorkflow, stepWinsRaceWorkflow)
that exercise Promise.race between a step function and a sleep call.
The current `sleepWinsRaceWorkflow` test fails — surfacing how the
replay engine resolves a previously-completed step instantly while
sleep still has to elapse.
Also adds a `dev-tmux` skill that documents the 3-pane tmux + portless
setup for testing workflows interactively in a worktree alongside the
observability UI.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [workbench/nextjs-turbopack] Allow *.turbopack.localhost in dev
Adds allowedDevOrigins entries so portless-style worktree-prefixed
.localhost URLs (e.g. https://<branch>.turbopack.localhost) can hit
HMR and dev-only endpoints without Next's cross-origin protection
flooding the logs with warnings.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Drop duplicate race workflows after merging main
PR #1924 added the same sleep/step race workflows directly to main
while this branch was open. The textual concat from `git merge`
left both copies in 99_e2e.ts; this drops the duplicate set so the
file matches origin/main verbatim and the e2e tests pick up the
upstream definitions.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Narrow activation, robust pane IDs, statusline helper
- Tighten activation phrases so the skill only fires for the specific
portless+tmux setup it documents, not the generic "start the dev
server" task. Addresses #1916 review.
- Capture pane IDs at split time (-P -F '#{pane_id}') so the snippet
works under both pane-base-index 0 and 1. Addresses Copilot review.
- Add `statusline.sh` that filters `portless list` to the current
worktree's routes and emits a one-line summary, plus instructions
for wiring it into Claude Code's `statusLine.command`.
- Bump version to 1.1.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Recommend primary-checkout path for statusline
Worktrees get deleted, so wiring the statusline to a worktree path
breaks the moment the worktree is removed. Update the skill and the
script header to recommend pointing `statusLine.command` at the
primary checkout (`$HOME/github/vercel/workflow/...`). The script
itself is already worktree-aware via Claude's `workspace.current_dir`
stdin JSON, so the same invocation surfaces routes for whichever
worktree the session is in.
Bump version to 1.2.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] OSC 8 link statusline + worktree-named tmux session
- Statusline overlay now renders `[dev] · [obs] · tmux:<prefix>`,
with the bracketed labels emitted as OSC 8 hyperlinks (clickable in
any modern terminal) styled cyan + underline so they stand out.
Replaces the old long-URL form that was hard to scan and click.
- Add a tmux-session indicator: shown when a session named exactly the
worktree prefix exists (uses `tmux has-session -t =<prefix>` for
exact matching).
- Change the skill's tmux session naming convention from the fixed
`workflow-dev` to `<worktree-prefix>` (basename of the branch — same
string portless uses as the subdomain prefix). This lets the
statusline locate the session deterministically and lets multiple
worktrees run dev sessions concurrently without manual disambiguation.
- Bump skill to v1.3.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Statusline: print full `tmux attach -t <name>` command
Replaces the abbreviated `tmux:<prefix>` indicator with the full
copy-paste-ready `tmux attach -t <prefix>` invocation. Saves a step
when grabbing the session from another shell.
Bump skill to v1.4.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Brighter statusline + Nerd Font icons
- Drop the dim styling that made the overlay hard to read; use bold
bright cyan + underline for links and bold bright green for the
tmux command.
- Add Nerd Font glyphs: for dev, for obs, for the
tmux copy-paste hint. Falls back to box-drawing if the font lacks
Nerd Font ranges; layout is unaffected.
- Visual differentiation: cyan + underline = clickable hyperlink;
green = copy this command.
Bump skill to v1.5.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Restore Nerd Font icons via Unicode escapes
The copy glyph in `emit_tmux` was a literal Nerd Font byte embedded in
the printf string and got stripped during a prior rewrite. Promote all
three icons (rocket / graph / copy) to top-level shell variables that
use \uHHHH-equivalent UTF-8 escapes, so the source survives editor
round-trips that don't preserve Private Use Area code points.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/internal-dev-workbench] Rename from dev-tmux, set author + reset version
- Rename `skills/dev-tmux/` → `skills/internal-dev-workbench/` to make
the name self-explanatory about the skill's scope (an internal
contributor's local dev workbench, not a generic tmux helper).
- Author: Pranay Prakash. Version: 0.1 (first release of the skill).
- Update internal references in SKILL.md and statusline.sh accordingly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

2 participants

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

[core] V2: skip inline step execution when suspension also has a wait - #1924

Merged
VaguelySerious merged 2 commits into
mainfrom
peter/fix-step-vs-wait-race
May 5, 2026
Merged

[core] V2: skip inline step execution when suspension also has a wait#1924
VaguelySerious merged 2 commits into
mainfrom
peter/fix-step-vs-wait-race

Conversation

@VaguelySerious

Copy link
Copy Markdown
Member

Summary

Fix Promise.race(step, sleep) semantics in V2 mixed suspensions: when a workflow suspension contains both pending steps and at least one wait (sleep), the runtime now queues every step instead of executing one inline.

Inline `await executeStep(...)` blocks the V2 handler for the full step duration, but `wait_completed` events are only created on the next loop iteration's "complete elapsed waits" pass. So if the sleep is shorter than the step, the wait timer never fires on time — replay just sees `step_completed` first and `Promise.race` resolves with the step. A 1s sleep racing a 10s step would silently resolve to the step.

This restores V1's behavior, where each step ran in a separate function invocation and the wait timer drove a parallel queue continuation.

Reproducer (failing test from #1916)

`sleepWinsRaceWorkflow`: a 1s sleep raced against a 10s step. Expected `'sleep'` to win.

Event log on the failing run, before the fix:

t (s)Event
0.000`run_created`
1.738`step_created` + `wait_created`resumeAt = t+1s
1.742`step_started`inline execution begins
11.825`step_completed`step body finishes after ~10s
11.861`wait_completed`created right after step_completed, not on time
11.959`run_completed`replay picked `'step'`

After the fix, `wait_completed` lands at t≈1s after `wait_created` and the run completes with `'sleep'` in ~1s.

Change

One-liner in `packages/core/src/runtime.ts`:

```ts
const inlineStep =
suspensionResult.timeoutSeconds === undefined
? ownedPendingSteps[0]
: undefined;
```

The existing "queue every pending step except the inline one" loop and the `if (!inlineStep)` early-return already handle the `undefined` case correctly.

What about hooks?

Audited every flavor of suspension. Step + wait is the only fully-broken combination.

Suspension containsBehavior in V2Race-correct?
steps onlyone inline, rest queued
wait onlyreturns with timeoutSeconds
hook onlyreturns; external resumeHook drives continuation
wait + hookno steps → returns with timeoutSeconds
step + waitstep inline-blocks, wait timer never fires❌ — fixed here
step + hookstep inline-blocks, but hook continuation runs concurrently via queueConcurrency (≥1000 on world-local, 50 on world-postgres, auto on Vercel)⚠️ correct via concurrency, but step keeps running uselessly until termination

Step + hook works on all first-party worlds today. A consistent follow-up would extend the same carve-out to `hasPendingHooks`, but it would require a new field in `SuspensionHandlerResult` and isn't strictly necessary — happy to do that as a follow-up if desired.

Test plan

  • New e2e tests `sleepWinsRaceWorkflow` and `stepWinsRaceWorkflow` (the failing tests from Add dev-tmux skill for portless+tmux local Workflow SDK dev #1916, plus the symmetric stepWins case).
  • `pnpm vitest run packages/core/e2e/e2e.test.ts -t WinsRaceWorkflow` against the `nextjs-turbopack` workbench locally — both pass.
  • Event log inspection confirms `wait_completed` is now created at t≈1s.
  • All 842 `@workflow/core` unit tests pass.

Docs

`docs/content/docs/changelog/eager-processing.mdx` "Mixed Suspensions" section rewritten to describe the carve-out and explicitly call out the `Promise.race(step, sleep)` race-semantics motivation.

🤖 Generated with Claude Code

Inline `await executeStep(...)` blocks the V2 handler for the full
step duration, but `wait_completed` events are only created on the
*next* loop iteration's "complete elapsed waits" pass. This breaks
`Promise.race(step, sleep)` semantics whenever the sleep is shorter
than the step — replay still picks the step because the sleep's
wait_completed event hasn't been written yet.
Reproducer (`sleepWinsRaceWorkflow`): a 1s sleep raced against a 10s
step. Expected `'sleep'` to win; the runtime returned `'step'`. On
the failing run, `wait_completed` was created at t=11.86s — right
after `step_completed` — instead of at t≈2.74s when its `resumeAt`
elapsed.
Fix: in `runtime.ts`, gate the inline-step pick on the absence of a
wait timeout. When `suspensionResult.timeoutSeconds !== undefined`,
queue every pending step instead and return with the wait timeout.
This lets the wait timer drive a continuation in parallel, matching
V1's behavior where each step ran in a separate function
invocation. Pure step suspensions (without waits) still benefit
from inline execution.
Test plan:
- New e2e tests `sleepWinsRaceWorkflow` and `stepWinsRaceWorkflow`
exercising `Promise.race` between a step function and `sleep()`,
in both directions.
- Verified locally against `nextjs-turbopack` workbench: both pass.
Event log confirms `wait_completed` is now created on time
(t≈1s after `wait_created`) rather than after the inline step.
Eager-processing changelog updated with a "Mixed Suspensions"
section describing the carve-out and its rationale.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented May 5, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented May 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ee02092

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

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

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

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

@github-actions

github-actionsBot commented May 5, 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🥇 Express0.031s (-29.8% 🟢)1.005s (~)0.974s101.00x
💻 LocalNitro0.032s (-24.8% 🟢)1.005s (~)0.973s101.04x
🐘 PostgresNitro0.041s (-56.5% 🟢)1.011s (-3.0%)0.970s101.33x
🐘 PostgresExpress0.046s (-20.0% 🟢)1.012s (~)0.965s101.49x
🌐 RedisNext.js (Turbopack)0.053s1.005s0.952s101.70x
🐘 PostgresNext.js (Turbopack)0.061s1.013s0.952s101.95x
🌐 MongoDBNext.js (Turbopack)0.089s1.006s0.918s102.86x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.806s (+220.6% 🔺)2.783s (+19.3% 🔺)1.976s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.068s (-5.6% 🟢)2.006s (~)0.938s101.00x
💻 LocalExpress1.072s (-4.7%)2.006s (~)0.934s101.00x
🐘 PostgresExpress1.081s (-5.7% 🟢)2.009s (~)0.928s101.01x
🐘 PostgresNitro1.084s (-4.9%)2.010s (~)0.926s101.01x
🌐 RedisNext.js (Turbopack)1.111s2.006s0.895s101.04x
🐘 PostgresNext.js (Turbopack)1.131s2.010s0.879s101.06x
🌐 MongoDBNext.js (Turbopack)1.151s2.007s0.856s101.08x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.825s (+38.8% 🔺)4.958s (+29.4% 🔺)2.134s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.402s (-5.0%)11.021s (~)0.618s31.00x
💻 LocalExpress10.407s (-4.7%)11.021s (~)0.614s31.00x
🐘 PostgresExpress10.418s (-5.0%)11.015s (~)0.598s31.00x
🐘 PostgresNitro10.423s (-4.1%)11.015s (~)0.593s31.00x
🌐 RedisNext.js (Turbopack)10.663s11.023s0.360s31.03x
🌐 MongoDBNext.js (Turbopack)10.670s11.014s0.344s31.03x
🐘 PostgresNext.js (Turbopack)10.715s11.017s0.302s31.03x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)15.794s (-8.8% 🟢)17.951s (-7.5% 🟢)2.157s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express13.439s (-7.8% 🟢)14.018s (-6.7% 🟢)0.578s51.00x
💻 LocalNitro13.450s (-10.7% 🟢)14.026s (-12.5% 🟢)0.577s51.00x
💻 LocalExpress13.485s (-9.9% 🟢)14.026s (-6.7% 🟢)0.541s51.00x
🐘 PostgresNitro13.488s (-7.6% 🟢)14.019s (-6.7% 🟢)0.530s51.00x
🌐 MongoDBNext.js (Turbopack)13.940s14.219s0.279s51.04x
🐘 PostgresNext.js (Turbopack)14.131s15.022s0.891s41.05x
🌐 RedisNext.js (Turbopack)14.169s15.030s0.861s41.05x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)23.629s (-55.0% 🟢)25.826s (-52.7% 🟢)2.197s31.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro11.849s (-29.4% 🟢)12.022s (-29.4% 🟢)0.173s81.00x
💻 LocalExpress11.902s (-28.3% 🟢)12.022s (-29.4% 🟢)0.120s81.00x
🐘 PostgresExpress12.005s (-14.3% 🟢)12.394s (-15.1% 🟢)0.389s81.01x
🐘 PostgresNitro12.046s (-13.8% 🟢)12.645s (-11.6% 🟢)0.599s81.02x
🌐 MongoDBNext.js (Turbopack)12.694s13.017s0.323s71.07x
🌐 RedisNext.js (Turbopack)13.121s14.028s0.907s71.11x
🐘 PostgresNext.js (Turbopack)13.366s14.018s0.651s71.13x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)34.490s (-91.2% 🟢)36.796s (-90.7% 🟢)2.306s31.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.145s (-10.2% 🟢)2.007s (~)0.862s151.00x
🐘 PostgresExpress1.147s (-9.0% 🟢)2.008s (~)0.861s151.00x
💻 LocalNitro1.174s (-28.0% 🟢)2.006s (-3.3%)0.831s151.03x
💻 LocalExpress1.211s (-18.6% 🟢)2.006s (~)0.794s151.06x
🐘 PostgresNext.js (Turbopack)1.219s2.008s0.788s151.07x
🌐 RedisNext.js (Turbopack)1.275s2.007s0.732s151.11x
🌐 MongoDBNext.js (Turbopack)2.019s2.674s0.655s121.76x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.105s (+20.8% 🔺)6.180s (+25.3% 🔺)2.075s51.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.202s (-48.9% 🟢)2.006s (-33.3% 🟢)0.804s151.00x
🐘 PostgresExpress1.226s (-48.1% 🟢)2.007s (-33.3% 🟢)0.782s151.02x
🐘 PostgresNext.js (Turbopack)1.375s2.007s0.633s151.14x
💻 LocalNitro1.677s (-46.7% 🟢)2.005s (-48.4% 🟢)0.329s151.39x
💻 LocalExpress1.798s (-39.1% 🟢)2.008s (-41.9% 🟢)0.209s151.50x
🌐 RedisNext.js (Turbopack)2.397s3.009s0.612s101.99x
🌐 MongoDBNext.js (Turbopack)3.570s4.008s0.438s82.97x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.819s (-32.1% 🟢)6.927s (-22.2% 🟢)2.108s51.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.326s (-61.9% 🟢)2.008s (-49.9% 🟢)0.682s151.00x
🐘 PostgresExpress1.365s (-60.8% 🟢)2.008s (-49.9% 🟢)0.643s151.03x
🐘 PostgresNext.js (Turbopack)1.662s2.007s0.345s151.25x
🌐 RedisNext.js (Turbopack)3.651s4.011s0.360s82.75x
💻 LocalNitro4.459s (-46.6% 🟢)5.013s (-44.4% 🟢)0.554s73.36x
💻 LocalExpress5.277s (-36.7% 🟢)5.846s (-35.2% 🟢)0.569s63.98x
🌐 MongoDBNext.js (Turbopack)6.145s7.011s0.866s54.64x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)7.711s (-13.5% 🟢)10.175s (-7.2% 🟢)2.464s41.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.143s (-9.1% 🟢)2.008s (~)0.865s151.00x
🐘 PostgresNitro1.149s (-8.6% 🟢)2.008s (~)0.860s151.00x
🐘 PostgresNext.js (Turbopack)1.210s2.007s0.797s151.06x
🌐 RedisNext.js (Turbopack)1.237s2.007s0.770s151.08x
💻 LocalNitro1.377s (-26.2% 🟢)2.006s (-14.3% 🟢)0.629s151.20x
💻 LocalExpress1.754s (-7.4% 🟢)2.391s (+1.2%)0.638s131.53x
🌐 MongoDBNext.js (Turbopack)2.025s2.734s0.709s111.77x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.859s (+31.6% 🔺)5.663s (+22.0% 🔺)1.805s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.217s (-48.0% 🟢)2.075s (-31.1% 🟢)0.858s151.00x
🐘 PostgresExpress1.234s (-47.3% 🟢)2.010s (-33.3% 🟢)0.776s151.01x
🐘 PostgresNext.js (Turbopack)1.370s2.007s0.636s151.13x
💻 LocalNitro1.804s (-41.2% 🟢)2.222s (-42.8% 🟢)0.419s141.48x
💻 LocalExpress2.119s (-32.4% 🟢)2.590s (-31.2% 🟢)0.472s121.74x
🌐 RedisNext.js (Turbopack)2.366s3.009s0.643s101.94x
🌐 MongoDBNext.js (Turbopack)3.566s4.008s0.442s82.93x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)5.086s (+61.8% 🔺)7.055s (+56.0% 🔺)1.969s51.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.319s (-62.1% 🟢)2.007s (-49.9% 🟢)0.688s151.00x
🐘 PostgresExpress1.359s (-61.2% 🟢)2.008s (-49.9% 🟢)0.649s151.03x
🐘 PostgresNext.js (Turbopack)1.654s2.008s0.354s151.25x
🌐 RedisNext.js (Turbopack)3.666s4.010s0.344s82.78x
💻 LocalNitro4.835s (-47.1% 🟢)5.513s (-45.0% 🟢)0.677s63.67x
💻 LocalExpress5.619s (-36.2% 🟢)6.217s (-33.0% 🟢)0.598s54.26x
🌐 MongoDBNext.js (Turbopack)6.228s7.010s0.782s54.72x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.106s (-9.6% 🟢)7.716s (-9.7% 🟢)1.609s41.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.448s (-45.4% 🟢)1.006s (~)0.558s601.00x
💻 LocalExpress0.463s (-52.9% 🟢)1.004s (-6.7% 🟢)0.541s601.03x
🐘 PostgresExpress0.481s (-42.6% 🟢)1.023s (~)0.542s591.07x
💻 LocalNitro0.513s (-47.7% 🟢)1.021s (-6.7% 🟢)0.508s591.14x
🌐 MongoDBNext.js (Turbopack)0.595s1.005s0.410s601.33x
🌐 RedisNext.js (Turbopack)0.658s1.005s0.346s601.47x
🐘 PostgresNext.js (Turbopack)0.698s1.006s0.308s601.56x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.179s (-57.4% 🟢)8.102s (-49.6% 🟢)1.923s81.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.065s (-44.8% 🟢)1.772s (-15.6% 🟢)0.707s511.00x
🐘 PostgresExpress1.152s (-41.7% 🟢)1.844s (-18.3% 🟢)0.692s491.08x
💻 LocalNitro1.168s (-61.5% 🟢)2.005s (-46.6% 🟢)0.837s451.10x
💻 LocalExpress1.301s (-56.9% 🟢)2.122s (-40.8% 🟢)0.821s431.22x
🌐 MongoDBNext.js (Turbopack)1.484s2.006s0.522s451.39x
🌐 RedisNext.js (Turbopack)1.561s2.006s0.445s451.47x
🐘 PostgresNext.js (Turbopack)1.604s2.007s0.403s451.51x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)14.969s (-69.9% 🟢)17.357s (-66.4% 🟢)2.388s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.021s (-49.4% 🟢)2.456s (-43.8% 🟢)0.435s491.00x
🐘 PostgresNitro2.028s (-50.6% 🟢)2.528s (-45.1% 🟢)0.501s481.00x
💻 LocalNitro2.651s (-71.5% 🟢)3.007s (-70.0% 🟢)0.356s401.31x
💻 LocalExpress2.654s (-71.2% 🟢)3.007s (-70.0% 🟢)0.354s401.31x
🌐 RedisNext.js (Turbopack)3.018s3.396s0.378s361.49x
🐘 PostgresNext.js (Turbopack)3.183s4.009s0.825s301.58x
🌐 MongoDBNext.js (Turbopack)3.422s4.010s0.588s301.69x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)43.502s (-59.4% 🟢)46.024s (-57.7% 🟢)2.522s31.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.179s (-36.6% 🟢)1.006s (~)0.827s601.00x
🐘 PostgresNitro0.181s (-36.2% 🟢)1.006s (~)0.825s601.01x
🐘 PostgresNext.js (Turbopack)0.236s1.005s0.769s601.32x
🌐 RedisNext.js (Turbopack)0.261s1.004s0.743s601.46x
💻 LocalNitro0.410s (-32.2% 🟢)1.004s (-1.7%)0.594s602.29x
💻 LocalExpress0.449s (-19.9% 🟢)1.004s (~)0.555s602.51x
🌐 MongoDBNext.js (Turbopack)1.028s1.770s0.742s345.75x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.053s (+100.4% 🔺)6.298s (+66.0% 🔺)2.246s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.300s (-39.6% 🟢)1.006s (~)0.706s901.00x
🐘 PostgresExpress0.314s (-38.4% 🟢)1.007s (~)0.693s901.05x
🌐 RedisNext.js (Turbopack)0.431s1.004s0.573s901.44x
🐘 PostgresNext.js (Turbopack)0.455s1.006s0.550s901.52x
💻 LocalExpress2.143s (-14.7% 🟢)2.714s (-9.8% 🟢)0.572s347.15x
💻 LocalNitro2.165s (-14.7% 🟢)2.765s (-8.1% 🟢)0.600s337.22x
🌐 MongoDBNext.js (Turbopack)2.573s3.006s0.433s308.58x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)8.287s (+134.4% 🔺)10.464s (+101.5% 🔺)2.176s91.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.606s (-23.3% 🟢)1.006s (~)0.400s1201.00x
🐘 PostgresExpress0.632s (-22.8% 🟢)1.006s (-1.1%)0.373s1201.04x
🌐 RedisNext.js (Turbopack)0.810s1.004s0.195s1201.34x
🐘 PostgresNext.js (Turbopack)0.958s1.387s0.430s871.58x
🌐 MongoDBNext.js (Turbopack)5.307s6.011s0.704s208.76x
💻 LocalNitro9.751s (-12.9% 🟢)10.445s (-10.4% 🟢)0.694s1216.09x
💻 LocalExpress10.904s (-2.6%)11.399s (-4.5%)0.496s1117.99x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)20.304s (+96.6% 🔺)22.967s (+86.9% 🔺)2.663s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.131s (+451.5% 🔺)2.000s (+100.3% 🔺)0.001s (-31.3% 🟢)2.010s (+98.8% 🔺)0.879s101.00x
💻 LocalNitro1.131s (+429.3% 🔺)2.004s (+99.5% 🔺)0.011s (-15.2% 🟢)2.017s (+98.0% 🔺)0.886s101.00x
🐘 PostgresNitro1.132s (+452.2% 🔺)2.001s (+100.1% 🔺)0.001s (-26.7% 🟢)2.009s (+98.7% 🔺)0.877s101.00x
💻 LocalExpress1.141s (+473.3% 🔺)2.005s (+99.6% 🔺)0.012s (~)2.019s (+98.3% 🔺)0.878s101.01x
🐘 PostgresNext.js (Turbopack)1.201s2.001s0.001s2.011s0.810s101.06x
🌐 MongoDBNext.js (Turbopack)⚠️missing-----
🌐 RedisNext.js (Turbopack)⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.713s (-31.2% 🟢)5.161s (-40.3% 🟢)1.482s (+134.6% 🔺)8.473s (-13.4% 🟢)3.760s101.00x
▲ VercelExpress⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.505s (+139.0% 🔺)2.003s (+99.0% 🔺)0.004s (+0.9%)2.026s (+98.0% 🔺)0.520s301.00x
🐘 PostgresNitro1.522s (+143.9% 🔺)2.006s (+99.3% 🔺)0.004s (-15.4% 🟢)2.024s (+97.9% 🔺)0.502s301.01x
💻 LocalExpress1.570s (+107.4% 🔺)2.012s (+95.6% 🔺)0.011s (+14.7% 🔺)2.025s (+94.8% 🔺)0.455s301.04x
🐘 PostgresNext.js (Turbopack)1.664s2.011s0.004s2.025s0.361s301.11x
💻 LocalNitro1.688s (+101.3% 🔺)2.011s (+98.7% 🔺)0.009s (-4.0%)2.201s (+97.2% 🔺)0.513s281.12x
🌐 MongoDBNext.js (Turbopack)⚠️missing-----
🌐 RedisNext.js (Turbopack)⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)12.267s (-27.5% 🟢)13.897s (-23.8% 🟢)0.343s (+62.3% 🔺)15.237s (-19.5% 🟢)2.969s51.00x
▲ VercelExpress⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.642s (-33.7% 🟢)1.016s (-18.5% 🟢)0.000s (-59.3% 🟢)1.023s (-18.6% 🟢)0.381s591.00x
🐘 PostgresExpress0.692s (-27.9% 🟢)1.047s (-18.0% 🟢)0.000s (+21.1% 🔺)1.060s (-18.8% 🟢)0.368s571.08x
🐘 PostgresNext.js (Turbopack)0.826s1.071s0.000s1.078s0.252s561.29x
💻 LocalNitro1.335s (+9.2% 🔺)2.015s (~)0.000s (+100.0% 🔺)2.017s (~)0.681s302.08x
💻 LocalExpress1.386s (+13.2% 🔺)2.015s (~)0.000s (-80.0% 🟢)2.017s (~)0.631s302.16x
🌐 MongoDBNext.js (Turbopack)⚠️missing-----
🌐 RedisNext.js (Turbopack)⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.379s (-37.3% 🟢)7.433s (-35.5% 🟢)0.000s (NaN%)8.871s (-26.4% 🟢)2.492s71.00x
▲ VercelExpress⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack)

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.252s (-29.3% 🟢)1.996s (-8.3% 🟢)0.000s (+Infinity% 🔺)2.034s (-7.5% 🟢)0.782s301.00x
🐘 PostgresNitro1.354s (-24.4% 🟢)2.105s (-1.7%)0.000s (+93.1% 🔺)2.123s (-2.4%)0.769s291.08x
🐘 PostgresNext.js (Turbopack)1.678s2.262s0.000s2.286s0.608s271.34x
💻 LocalNitro3.014s (-11.0% 🟢)3.842s (-4.7%)0.001s (-6.2% 🟢)3.844s (-4.8%)0.831s162.41x
💻 LocalExpress3.243s (-6.5% 🟢)3.968s (-1.6%)0.000s (-45.3% 🟢)3.970s (-1.7%)0.726s162.59x
🌐 MongoDBNext.js (Turbopack)⚠️missing-----
🌐 RedisNext.js (Turbopack)⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)8.615s (+53.4% 🔺)10.007s (+43.3% 🔺)0.000s (+33.3% 🔺)11.037s (+46.4% 🔺)2.422s61.00x
▲ VercelExpress⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro17/21
🐘 PostgresNitro11/21
▲ VercelNext.js (Turbopack)21/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres16/21
Next.js (Turbopack)🐘 Postgres11/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: failure
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

@github-actions

github-actionsBot commented May 5, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production92502191144
✅ 💻 Local Development123702191456
✅ 📦 Local Production123702191456
✅ 🐘 Local Postgres123702191456
✅ 🪟 Windows10400104
✅ 📋 Other5520176728
Total5292010526344

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro78026
✅ example78026
✅ express78026
✅ fastify78026
✅ hono78026
✅ nextjs-turbopack10202
✅ nextjs-webpack10202
✅ nitro78026
✅ nuxt78026
✅ sveltekit9707
✅ vite78026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable79025
✅ express-stable79025
✅ fastify-stable79025
✅ hono-stable79025
✅ nextjs-turbopack-canary85019
✅ nextjs-turbopack-stable-lazy-discovery-disabled10400
✅ nextjs-turbopack-stable-lazy-discovery-enabled10400
✅ nextjs-webpack-canary85019
✅ nextjs-webpack-stable-lazy-discovery-disabled10400
✅ nextjs-webpack-stable-lazy-discovery-enabled10400
✅ nitro-stable79025
✅ nuxt-stable79025
✅ sveltekit-stable9806
✅ vite-stable79025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable79025
✅ express-stable79025
✅ fastify-stable79025
✅ hono-stable79025
✅ nextjs-turbopack-canary85019
✅ nextjs-turbopack-stable-lazy-discovery-disabled10400
✅ nextjs-turbopack-stable-lazy-discovery-enabled10400
✅ nextjs-webpack-canary85019
✅ nextjs-webpack-stable-lazy-discovery-disabled10400
✅ nextjs-webpack-stable-lazy-discovery-enabled10400
✅ nitro-stable79025
✅ nuxt-stable79025
✅ sveltekit-stable9806
✅ vite-stable79025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable79025
✅ express-stable79025
✅ fastify-stable79025
✅ hono-stable79025
✅ nextjs-turbopack-canary85019
✅ nextjs-turbopack-stable-lazy-discovery-disabled10400
✅ nextjs-turbopack-stable-lazy-discovery-enabled10400
✅ nextjs-webpack-canary85019
✅ nextjs-webpack-stable-lazy-discovery-disabled10400
✅ nextjs-webpack-stable-lazy-discovery-enabled10400
✅ nitro-stable79025
✅ nuxt-stable79025
✅ sveltekit-stable9806
✅ vite-stable79025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack10400
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable79025
✅ e2e-local-dev-tanstack-start-79025
✅ e2e-local-postgres-nest-stable79025
✅ e2e-local-postgres-tanstack-start-79025
✅ e2e-local-prod-nest-stable79025
✅ e2e-local-prod-tanstack-start-79025
✅ e2e-vercel-prod-tanstack-start78026

📋 View full workflow run

Comment thread.changeset/fix-step-vs-wait-race.md Outdated
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@VaguelySerious
VaguelySerious merged commit 3535caf into mainMay 5, 2026
112 of 115 checks passed
@VaguelySerious
VaguelySerious deleted the peter/fix-step-vs-wait-race branch May 5, 2026 00:49
@github-actionsgithub-actionsBot mentioned this pull request May 5, 2026
pranaygp added a commit that referenced this pull request May 5, 2026
* origin/main:
[core] Skip inline step execution when suspension also has a wait (#1924)
[errors] Replace chalk import in @workfow/errors with inline ANSI shim (#1915)
Fix compatibility with Zod 4.4.x (#1902)
Serialize `run_failed`/`step_failed` errors through serialization pipeline (#1851)
tarballs: redesign preview tarballs index page (#1911)
Remove extra changeset (#1922)
Add stable Next.js eager and lazy test coverage (#1747)
Enforce per-(run, correlation) uniqueness for entity-creating events in world-postgres (#1878)
fix(world-vercel): add default request timeout to workflow-server HTTP calls (#1807)
pranaygp added a commit that referenced this pull request May 5, 2026
PR #1924 added the same sleep/step race workflows directly to main
while this branch was open. The textual concat from `git merge`
left both copies in 99_e2e.ts; this drops the duplicate set so the
file matches origin/main verbatim and the e2e tests pick up the
upstream definitions.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
pranaygp added a commit that referenced this pull request May 5, 2026
…ignal
* origin/main:
[core] Skip inline step execution when suspension also has a wait (#1924)
[errors] Replace chalk import in @workfow/errors with inline ANSI shim (#1915)
Fix compatibility with Zod 4.4.x (#1902)
Serialize `run_failed`/`step_failed` errors through serialization pipeline (#1851)
tarballs: redesign preview tarballs index page (#1911)
Remove extra changeset (#1922)
Add stable Next.js eager and lazy test coverage (#1747)
Enforce per-(run, correlation) uniqueness for entity-creating events in world-postgres (#1878)
fix(world-vercel): add default request timeout to workflow-server HTTP calls (#1807)
Allow disabling step sourcemap with new `sourcemap` option in builders (#1842)
[ci] Enable Vercel-prod e2e for tanstack-start (#1904)
web: configure vercelPreset() for Vercel deployments (#1815)
[core] Combine flow+step bundle and process steps eagerly (#1338)
[world-vercel] Revert stream close control framing (#1891)
[tarballs] Use turbo to build workspace deps before packing (#1908)
# Conflicts:
#	packages/core/src/runtime/step-handler.test.ts
#	packages/core/src/runtime/step-handler.ts
#	packages/core/src/runtime/suspension-handler.ts
#	packages/core/src/step.test.ts
#	packages/world-local/src/storage/events-storage.ts
#	packages/world-postgres/src/drizzle/migrations/meta/_journal.json
pranaygp added a commit that referenced this pull request May 5, 2026
* [e2e] Add step-vs-sleep race tests + dev-tmux skill
Adds two race workflows (sleepWinsRaceWorkflow, stepWinsRaceWorkflow)
that exercise Promise.race between a step function and a sleep call.
The current `sleepWinsRaceWorkflow` test fails — surfacing how the
replay engine resolves a previously-completed step instantly while
sleep still has to elapse.
Also adds a `dev-tmux` skill that documents the 3-pane tmux + portless
setup for testing workflows interactively in a worktree alongside the
observability UI.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [workbench/nextjs-turbopack] Allow *.turbopack.localhost in dev
Adds allowedDevOrigins entries so portless-style worktree-prefixed
.localhost URLs (e.g. https://<branch>.turbopack.localhost) can hit
HMR and dev-only endpoints without Next's cross-origin protection
flooding the logs with warnings.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Drop duplicate race workflows after merging main
PR #1924 added the same sleep/step race workflows directly to main
while this branch was open. The textual concat from `git merge`
left both copies in 99_e2e.ts; this drops the duplicate set so the
file matches origin/main verbatim and the e2e tests pick up the
upstream definitions.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Narrow activation, robust pane IDs, statusline helper
- Tighten activation phrases so the skill only fires for the specific
portless+tmux setup it documents, not the generic "start the dev
server" task. Addresses #1916 review.
- Capture pane IDs at split time (-P -F '#{pane_id}') so the snippet
works under both pane-base-index 0 and 1. Addresses Copilot review.
- Add `statusline.sh` that filters `portless list` to the current
worktree's routes and emits a one-line summary, plus instructions
for wiring it into Claude Code's `statusLine.command`.
- Bump version to 1.1.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Recommend primary-checkout path for statusline
Worktrees get deleted, so wiring the statusline to a worktree path
breaks the moment the worktree is removed. Update the skill and the
script header to recommend pointing `statusLine.command` at the
primary checkout (`$HOME/github/vercel/workflow/...`). The script
itself is already worktree-aware via Claude's `workspace.current_dir`
stdin JSON, so the same invocation surfaces routes for whichever
worktree the session is in.
Bump version to 1.2.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] OSC 8 link statusline + worktree-named tmux session
- Statusline overlay now renders `[dev] · [obs] · tmux:<prefix>`,
with the bracketed labels emitted as OSC 8 hyperlinks (clickable in
any modern terminal) styled cyan + underline so they stand out.
Replaces the old long-URL form that was hard to scan and click.
- Add a tmux-session indicator: shown when a session named exactly the
worktree prefix exists (uses `tmux has-session -t =<prefix>` for
exact matching).
- Change the skill's tmux session naming convention from the fixed
`workflow-dev` to `<worktree-prefix>` (basename of the branch — same
string portless uses as the subdomain prefix). This lets the
statusline locate the session deterministically and lets multiple
worktrees run dev sessions concurrently without manual disambiguation.
- Bump skill to v1.3.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Statusline: print full `tmux attach -t <name>` command
Replaces the abbreviated `tmux:<prefix>` indicator with the full
copy-paste-ready `tmux attach -t <prefix>` invocation. Saves a step
when grabbing the session from another shell.
Bump skill to v1.4.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Brighter statusline + Nerd Font icons
- Drop the dim styling that made the overlay hard to read; use bold
bright cyan + underline for links and bold bright green for the
tmux command.
- Add Nerd Font glyphs: for dev, for obs, for the
tmux copy-paste hint. Falls back to box-drawing if the font lacks
Nerd Font ranges; layout is unaffected.
- Visual differentiation: cyan + underline = clickable hyperlink;
green = copy this command.
Bump skill to v1.5.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Restore Nerd Font icons via Unicode escapes
The copy glyph in `emit_tmux` was a literal Nerd Font byte embedded in
the printf string and got stripped during a prior rewrite. Promote all
three icons (rocket / graph / copy) to top-level shell variables that
use \uHHHH-equivalent UTF-8 escapes, so the source survives editor
round-trips that don't preserve Private Use Area code points.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/internal-dev-workbench] Rename from dev-tmux, set author + reset version
- Rename `skills/dev-tmux/` → `skills/internal-dev-workbench/` to make
the name self-explanatory about the skill's scope (an internal
contributor's local dev workbench, not a generic tmux helper).
- Author: Pranay Prakash. Version: 0.1 (first release of the skill).
- Update internal references in SKILL.md and statusline.sh accordingly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

2 participants

@VaguelySerious@pranaygp
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

[core] V2: skip inline step execution when suspension also has a wait - #1924

Merged
VaguelySerious merged 2 commits into
mainfrom
peter/fix-step-vs-wait-race
May 5, 2026
Merged

[core] V2: skip inline step execution when suspension also has a wait#1924
VaguelySerious merged 2 commits into
mainfrom
peter/fix-step-vs-wait-race

Conversation

@VaguelySerious

Copy link
Copy Markdown
Member

Summary

Fix Promise.race(step, sleep) semantics in V2 mixed suspensions: when a workflow suspension contains both pending steps and at least one wait (sleep), the runtime now queues every step instead of executing one inline.

Inline `await executeStep(...)` blocks the V2 handler for the full step duration, but `wait_completed` events are only created on the next loop iteration's "complete elapsed waits" pass. So if the sleep is shorter than the step, the wait timer never fires on time — replay just sees `step_completed` first and `Promise.race` resolves with the step. A 1s sleep racing a 10s step would silently resolve to the step.

This restores V1's behavior, where each step ran in a separate function invocation and the wait timer drove a parallel queue continuation.

Reproducer (failing test from #1916)

`sleepWinsRaceWorkflow`: a 1s sleep raced against a 10s step. Expected `'sleep'` to win.

Event log on the failing run, before the fix:

t (s)Event
0.000`run_created`
1.738`step_created` + `wait_created`resumeAt = t+1s
1.742`step_started`inline execution begins
11.825`step_completed`step body finishes after ~10s
11.861`wait_completed`created right after step_completed, not on time
11.959`run_completed`replay picked `'step'`

After the fix, `wait_completed` lands at t≈1s after `wait_created` and the run completes with `'sleep'` in ~1s.

Change

One-liner in `packages/core/src/runtime.ts`:

```ts
const inlineStep =
suspensionResult.timeoutSeconds === undefined
? ownedPendingSteps[0]
: undefined;
```

The existing "queue every pending step except the inline one" loop and the `if (!inlineStep)` early-return already handle the `undefined` case correctly.

What about hooks?

Audited every flavor of suspension. Step + wait is the only fully-broken combination.

Suspension containsBehavior in V2Race-correct?
steps onlyone inline, rest queued
wait onlyreturns with timeoutSeconds
hook onlyreturns; external resumeHook drives continuation
wait + hookno steps → returns with timeoutSeconds
step + waitstep inline-blocks, wait timer never fires❌ — fixed here
step + hookstep inline-blocks, but hook continuation runs concurrently via queueConcurrency (≥1000 on world-local, 50 on world-postgres, auto on Vercel)⚠️ correct via concurrency, but step keeps running uselessly until termination

Step + hook works on all first-party worlds today. A consistent follow-up would extend the same carve-out to `hasPendingHooks`, but it would require a new field in `SuspensionHandlerResult` and isn't strictly necessary — happy to do that as a follow-up if desired.

Test plan

  • New e2e tests `sleepWinsRaceWorkflow` and `stepWinsRaceWorkflow` (the failing tests from Add dev-tmux skill for portless+tmux local Workflow SDK dev #1916, plus the symmetric stepWins case).
  • `pnpm vitest run packages/core/e2e/e2e.test.ts -t WinsRaceWorkflow` against the `nextjs-turbopack` workbench locally — both pass.
  • Event log inspection confirms `wait_completed` is now created at t≈1s.
  • All 842 `@workflow/core` unit tests pass.

Docs

`docs/content/docs/changelog/eager-processing.mdx` "Mixed Suspensions" section rewritten to describe the carve-out and explicitly call out the `Promise.race(step, sleep)` race-semantics motivation.

🤖 Generated with Claude Code

Inline `await executeStep(...)` blocks the V2 handler for the full
step duration, but `wait_completed` events are only created on the
*next* loop iteration's "complete elapsed waits" pass. This breaks
`Promise.race(step, sleep)` semantics whenever the sleep is shorter
than the step — replay still picks the step because the sleep's
wait_completed event hasn't been written yet.
Reproducer (`sleepWinsRaceWorkflow`): a 1s sleep raced against a 10s
step. Expected `'sleep'` to win; the runtime returned `'step'`. On
the failing run, `wait_completed` was created at t=11.86s — right
after `step_completed` — instead of at t≈2.74s when its `resumeAt`
elapsed.
Fix: in `runtime.ts`, gate the inline-step pick on the absence of a
wait timeout. When `suspensionResult.timeoutSeconds !== undefined`,
queue every pending step instead and return with the wait timeout.
This lets the wait timer drive a continuation in parallel, matching
V1's behavior where each step ran in a separate function
invocation. Pure step suspensions (without waits) still benefit
from inline execution.
Test plan:
- New e2e tests `sleepWinsRaceWorkflow` and `stepWinsRaceWorkflow`
exercising `Promise.race` between a step function and `sleep()`,
in both directions.
- Verified locally against `nextjs-turbopack` workbench: both pass.
Event log confirms `wait_completed` is now created on time
(t≈1s after `wait_created`) rather than after the inline step.
Eager-processing changelog updated with a "Mixed Suspensions"
section describing the carve-out and its rationale.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented May 5, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented May 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ee02092

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

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

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

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

@github-actions

github-actionsBot commented May 5, 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🥇 Express0.031s (-29.8% 🟢)1.005s (~)0.974s101.00x
💻 LocalNitro0.032s (-24.8% 🟢)1.005s (~)0.973s101.04x
🐘 PostgresNitro0.041s (-56.5% 🟢)1.011s (-3.0%)0.970s101.33x
🐘 PostgresExpress0.046s (-20.0% 🟢)1.012s (~)0.965s101.49x
🌐 RedisNext.js (Turbopack)0.053s1.005s0.952s101.70x
🐘 PostgresNext.js (Turbopack)0.061s1.013s0.952s101.95x
🌐 MongoDBNext.js (Turbopack)0.089s1.006s0.918s102.86x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)0.806s (+220.6% 🔺)2.783s (+19.3% 🔺)1.976s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.068s (-5.6% 🟢)2.006s (~)0.938s101.00x
💻 LocalExpress1.072s (-4.7%)2.006s (~)0.934s101.00x
🐘 PostgresExpress1.081s (-5.7% 🟢)2.009s (~)0.928s101.01x
🐘 PostgresNitro1.084s (-4.9%)2.010s (~)0.926s101.01x
🌐 RedisNext.js (Turbopack)1.111s2.006s0.895s101.04x
🐘 PostgresNext.js (Turbopack)1.131s2.010s0.879s101.06x
🌐 MongoDBNext.js (Turbopack)1.151s2.007s0.856s101.08x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.825s (+38.8% 🔺)4.958s (+29.4% 🔺)2.134s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.402s (-5.0%)11.021s (~)0.618s31.00x
💻 LocalExpress10.407s (-4.7%)11.021s (~)0.614s31.00x
🐘 PostgresExpress10.418s (-5.0%)11.015s (~)0.598s31.00x
🐘 PostgresNitro10.423s (-4.1%)11.015s (~)0.593s31.00x
🌐 RedisNext.js (Turbopack)10.663s11.023s0.360s31.03x
🌐 MongoDBNext.js (Turbopack)10.670s11.014s0.344s31.03x
🐘 PostgresNext.js (Turbopack)10.715s11.017s0.302s31.03x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)15.794s (-8.8% 🟢)17.951s (-7.5% 🟢)2.157s21.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express13.439s (-7.8% 🟢)14.018s (-6.7% 🟢)0.578s51.00x
💻 LocalNitro13.450s (-10.7% 🟢)14.026s (-12.5% 🟢)0.577s51.00x
💻 LocalExpress13.485s (-9.9% 🟢)14.026s (-6.7% 🟢)0.541s51.00x
🐘 PostgresNitro13.488s (-7.6% 🟢)14.019s (-6.7% 🟢)0.530s51.00x
🌐 MongoDBNext.js (Turbopack)13.940s14.219s0.279s51.04x
🐘 PostgresNext.js (Turbopack)14.131s15.022s0.891s41.05x
🌐 RedisNext.js (Turbopack)14.169s15.030s0.861s41.05x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)23.629s (-55.0% 🟢)25.826s (-52.7% 🟢)2.197s31.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro11.849s (-29.4% 🟢)12.022s (-29.4% 🟢)0.173s81.00x
💻 LocalExpress11.902s (-28.3% 🟢)12.022s (-29.4% 🟢)0.120s81.00x
🐘 PostgresExpress12.005s (-14.3% 🟢)12.394s (-15.1% 🟢)0.389s81.01x
🐘 PostgresNitro12.046s (-13.8% 🟢)12.645s (-11.6% 🟢)0.599s81.02x
🌐 MongoDBNext.js (Turbopack)12.694s13.017s0.323s71.07x
🌐 RedisNext.js (Turbopack)13.121s14.028s0.907s71.11x
🐘 PostgresNext.js (Turbopack)13.366s14.018s0.651s71.13x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)34.490s (-91.2% 🟢)36.796s (-90.7% 🟢)2.306s31.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.145s (-10.2% 🟢)2.007s (~)0.862s151.00x
🐘 PostgresExpress1.147s (-9.0% 🟢)2.008s (~)0.861s151.00x
💻 LocalNitro1.174s (-28.0% 🟢)2.006s (-3.3%)0.831s151.03x
💻 LocalExpress1.211s (-18.6% 🟢)2.006s (~)0.794s151.06x
🐘 PostgresNext.js (Turbopack)1.219s2.008s0.788s151.07x
🌐 RedisNext.js (Turbopack)1.275s2.007s0.732s151.11x
🌐 MongoDBNext.js (Turbopack)2.019s2.674s0.655s121.76x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.105s (+20.8% 🔺)6.180s (+25.3% 🔺)2.075s51.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.202s (-48.9% 🟢)2.006s (-33.3% 🟢)0.804s151.00x
🐘 PostgresExpress1.226s (-48.1% 🟢)2.007s (-33.3% 🟢)0.782s151.02x
🐘 PostgresNext.js (Turbopack)1.375s2.007s0.633s151.14x
💻 LocalNitro1.677s (-46.7% 🟢)2.005s (-48.4% 🟢)0.329s151.39x
💻 LocalExpress1.798s (-39.1% 🟢)2.008s (-41.9% 🟢)0.209s151.50x
🌐 RedisNext.js (Turbopack)2.397s3.009s0.612s101.99x
🌐 MongoDBNext.js (Turbopack)3.570s4.008s0.438s82.97x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.819s (-32.1% 🟢)6.927s (-22.2% 🟢)2.108s51.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.326s (-61.9% 🟢)2.008s (-49.9% 🟢)0.682s151.00x
🐘 PostgresExpress1.365s (-60.8% 🟢)2.008s (-49.9% 🟢)0.643s151.03x
🐘 PostgresNext.js (Turbopack)1.662s2.007s0.345s151.25x
🌐 RedisNext.js (Turbopack)3.651s4.011s0.360s82.75x
💻 LocalNitro4.459s (-46.6% 🟢)5.013s (-44.4% 🟢)0.554s73.36x
💻 LocalExpress5.277s (-36.7% 🟢)5.846s (-35.2% 🟢)0.569s63.98x
🌐 MongoDBNext.js (Turbopack)6.145s7.011s0.866s54.64x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)7.711s (-13.5% 🟢)10.175s (-7.2% 🟢)2.464s41.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.143s (-9.1% 🟢)2.008s (~)0.865s151.00x
🐘 PostgresNitro1.149s (-8.6% 🟢)2.008s (~)0.860s151.00x
🐘 PostgresNext.js (Turbopack)1.210s2.007s0.797s151.06x
🌐 RedisNext.js (Turbopack)1.237s2.007s0.770s151.08x
💻 LocalNitro1.377s (-26.2% 🟢)2.006s (-14.3% 🟢)0.629s151.20x
💻 LocalExpress1.754s (-7.4% 🟢)2.391s (+1.2%)0.638s131.53x
🌐 MongoDBNext.js (Turbopack)2.025s2.734s0.709s111.77x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.859s (+31.6% 🔺)5.663s (+22.0% 🔺)1.805s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.217s (-48.0% 🟢)2.075s (-31.1% 🟢)0.858s151.00x
🐘 PostgresExpress1.234s (-47.3% 🟢)2.010s (-33.3% 🟢)0.776s151.01x
🐘 PostgresNext.js (Turbopack)1.370s2.007s0.636s151.13x
💻 LocalNitro1.804s (-41.2% 🟢)2.222s (-42.8% 🟢)0.419s141.48x
💻 LocalExpress2.119s (-32.4% 🟢)2.590s (-31.2% 🟢)0.472s121.74x
🌐 RedisNext.js (Turbopack)2.366s3.009s0.643s101.94x
🌐 MongoDBNext.js (Turbopack)3.566s4.008s0.442s82.93x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)5.086s (+61.8% 🔺)7.055s (+56.0% 🔺)1.969s51.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.319s (-62.1% 🟢)2.007s (-49.9% 🟢)0.688s151.00x
🐘 PostgresExpress1.359s (-61.2% 🟢)2.008s (-49.9% 🟢)0.649s151.03x
🐘 PostgresNext.js (Turbopack)1.654s2.008s0.354s151.25x
🌐 RedisNext.js (Turbopack)3.666s4.010s0.344s82.78x
💻 LocalNitro4.835s (-47.1% 🟢)5.513s (-45.0% 🟢)0.677s63.67x
💻 LocalExpress5.619s (-36.2% 🟢)6.217s (-33.0% 🟢)0.598s54.26x
🌐 MongoDBNext.js (Turbopack)6.228s7.010s0.782s54.72x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.106s (-9.6% 🟢)7.716s (-9.7% 🟢)1.609s41.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.448s (-45.4% 🟢)1.006s (~)0.558s601.00x
💻 LocalExpress0.463s (-52.9% 🟢)1.004s (-6.7% 🟢)0.541s601.03x
🐘 PostgresExpress0.481s (-42.6% 🟢)1.023s (~)0.542s591.07x
💻 LocalNitro0.513s (-47.7% 🟢)1.021s (-6.7% 🟢)0.508s591.14x
🌐 MongoDBNext.js (Turbopack)0.595s1.005s0.410s601.33x
🌐 RedisNext.js (Turbopack)0.658s1.005s0.346s601.47x
🐘 PostgresNext.js (Turbopack)0.698s1.006s0.308s601.56x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.179s (-57.4% 🟢)8.102s (-49.6% 🟢)1.923s81.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.065s (-44.8% 🟢)1.772s (-15.6% 🟢)0.707s511.00x
🐘 PostgresExpress1.152s (-41.7% 🟢)1.844s (-18.3% 🟢)0.692s491.08x
💻 LocalNitro1.168s (-61.5% 🟢)2.005s (-46.6% 🟢)0.837s451.10x
💻 LocalExpress1.301s (-56.9% 🟢)2.122s (-40.8% 🟢)0.821s431.22x
🌐 MongoDBNext.js (Turbopack)1.484s2.006s0.522s451.39x
🌐 RedisNext.js (Turbopack)1.561s2.006s0.445s451.47x
🐘 PostgresNext.js (Turbopack)1.604s2.007s0.403s451.51x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)14.969s (-69.9% 🟢)17.357s (-66.4% 🟢)2.388s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.021s (-49.4% 🟢)2.456s (-43.8% 🟢)0.435s491.00x
🐘 PostgresNitro2.028s (-50.6% 🟢)2.528s (-45.1% 🟢)0.501s481.00x
💻 LocalNitro2.651s (-71.5% 🟢)3.007s (-70.0% 🟢)0.356s401.31x
💻 LocalExpress2.654s (-71.2% 🟢)3.007s (-70.0% 🟢)0.354s401.31x
🌐 RedisNext.js (Turbopack)3.018s3.396s0.378s361.49x
🐘 PostgresNext.js (Turbopack)3.183s4.009s0.825s301.58x
🌐 MongoDBNext.js (Turbopack)3.422s4.010s0.588s301.69x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)43.502s (-59.4% 🟢)46.024s (-57.7% 🟢)2.522s31.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express0.179s (-36.6% 🟢)1.006s (~)0.827s601.00x
🐘 PostgresNitro0.181s (-36.2% 🟢)1.006s (~)0.825s601.01x
🐘 PostgresNext.js (Turbopack)0.236s1.005s0.769s601.32x
🌐 RedisNext.js (Turbopack)0.261s1.004s0.743s601.46x
💻 LocalNitro0.410s (-32.2% 🟢)1.004s (-1.7%)0.594s602.29x
💻 LocalExpress0.449s (-19.9% 🟢)1.004s (~)0.555s602.51x
🌐 MongoDBNext.js (Turbopack)1.028s1.770s0.742s345.75x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.053s (+100.4% 🔺)6.298s (+66.0% 🔺)2.246s101.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.300s (-39.6% 🟢)1.006s (~)0.706s901.00x
🐘 PostgresExpress0.314s (-38.4% 🟢)1.007s (~)0.693s901.05x
🌐 RedisNext.js (Turbopack)0.431s1.004s0.573s901.44x
🐘 PostgresNext.js (Turbopack)0.455s1.006s0.550s901.52x
💻 LocalExpress2.143s (-14.7% 🟢)2.714s (-9.8% 🟢)0.572s347.15x
💻 LocalNitro2.165s (-14.7% 🟢)2.765s (-8.1% 🟢)0.600s337.22x
🌐 MongoDBNext.js (Turbopack)2.573s3.006s0.433s308.58x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)8.287s (+134.4% 🔺)10.464s (+101.5% 🔺)2.176s91.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.606s (-23.3% 🟢)1.006s (~)0.400s1201.00x
🐘 PostgresExpress0.632s (-22.8% 🟢)1.006s (-1.1%)0.373s1201.04x
🌐 RedisNext.js (Turbopack)0.810s1.004s0.195s1201.34x
🐘 PostgresNext.js (Turbopack)0.958s1.387s0.430s871.58x
🌐 MongoDBNext.js (Turbopack)5.307s6.011s0.704s208.76x
💻 LocalNitro9.751s (-12.9% 🟢)10.445s (-10.4% 🟢)0.694s1216.09x
💻 LocalExpress10.904s (-2.6%)11.399s (-4.5%)0.496s1117.99x
💻 LocalNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)20.304s (+96.6% 🔺)22.967s (+86.9% 🔺)2.663s61.00x
▲ VercelExpress⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.131s (+451.5% 🔺)2.000s (+100.3% 🔺)0.001s (-31.3% 🟢)2.010s (+98.8% 🔺)0.879s101.00x
💻 LocalNitro1.131s (+429.3% 🔺)2.004s (+99.5% 🔺)0.011s (-15.2% 🟢)2.017s (+98.0% 🔺)0.886s101.00x
🐘 PostgresNitro1.132s (+452.2% 🔺)2.001s (+100.1% 🔺)0.001s (-26.7% 🟢)2.009s (+98.7% 🔺)0.877s101.00x
💻 LocalExpress1.141s (+473.3% 🔺)2.005s (+99.6% 🔺)0.012s (~)2.019s (+98.3% 🔺)0.878s101.01x
🐘 PostgresNext.js (Turbopack)1.201s2.001s0.001s2.011s0.810s101.06x
🌐 MongoDBNext.js (Turbopack)⚠️missing-----
🌐 RedisNext.js (Turbopack)⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)4.713s (-31.2% 🟢)5.161s (-40.3% 🟢)1.482s (+134.6% 🔺)8.473s (-13.4% 🟢)3.760s101.00x
▲ VercelExpress⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.505s (+139.0% 🔺)2.003s (+99.0% 🔺)0.004s (+0.9%)2.026s (+98.0% 🔺)0.520s301.00x
🐘 PostgresNitro1.522s (+143.9% 🔺)2.006s (+99.3% 🔺)0.004s (-15.4% 🟢)2.024s (+97.9% 🔺)0.502s301.01x
💻 LocalExpress1.570s (+107.4% 🔺)2.012s (+95.6% 🔺)0.011s (+14.7% 🔺)2.025s (+94.8% 🔺)0.455s301.04x
🐘 PostgresNext.js (Turbopack)1.664s2.011s0.004s2.025s0.361s301.11x
💻 LocalNitro1.688s (+101.3% 🔺)2.011s (+98.7% 🔺)0.009s (-4.0%)2.201s (+97.2% 🔺)0.513s281.12x
🌐 MongoDBNext.js (Turbopack)⚠️missing-----
🌐 RedisNext.js (Turbopack)⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)12.267s (-27.5% 🟢)13.897s (-23.8% 🟢)0.343s (+62.3% 🔺)15.237s (-19.5% 🟢)2.969s51.00x
▲ VercelExpress⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack)

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.642s (-33.7% 🟢)1.016s (-18.5% 🟢)0.000s (-59.3% 🟢)1.023s (-18.6% 🟢)0.381s591.00x
🐘 PostgresExpress0.692s (-27.9% 🟢)1.047s (-18.0% 🟢)0.000s (+21.1% 🔺)1.060s (-18.8% 🟢)0.368s571.08x
🐘 PostgresNext.js (Turbopack)0.826s1.071s0.000s1.078s0.252s561.29x
💻 LocalNitro1.335s (+9.2% 🔺)2.015s (~)0.000s (+100.0% 🔺)2.017s (~)0.681s302.08x
💻 LocalExpress1.386s (+13.2% 🔺)2.015s (~)0.000s (-80.0% 🟢)2.017s (~)0.631s302.16x
🌐 MongoDBNext.js (Turbopack)⚠️missing-----
🌐 RedisNext.js (Turbopack)⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)6.379s (-37.3% 🟢)7.433s (-35.5% 🟢)0.000s (NaN%)8.871s (-26.4% 🟢)2.492s71.00x
▲ VercelExpress⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack)

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.252s (-29.3% 🟢)1.996s (-8.3% 🟢)0.000s (+Infinity% 🔺)2.034s (-7.5% 🟢)0.782s301.00x
🐘 PostgresNitro1.354s (-24.4% 🟢)2.105s (-1.7%)0.000s (+93.1% 🔺)2.123s (-2.4%)0.769s291.08x
🐘 PostgresNext.js (Turbopack)1.678s2.262s0.000s2.286s0.608s271.34x
💻 LocalNitro3.014s (-11.0% 🟢)3.842s (-4.7%)0.001s (-6.2% 🟢)3.844s (-4.8%)0.831s162.41x
💻 LocalExpress3.243s (-6.5% 🟢)3.968s (-1.6%)0.000s (-45.3% 🟢)3.970s (-1.7%)0.726s162.59x
🌐 MongoDBNext.js (Turbopack)⚠️missing-----
🌐 RedisNext.js (Turbopack)⚠️missing-----
💻 LocalNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)8.615s (+53.4% 🔺)10.007s (+43.3% 🔺)0.000s (+33.3% 🔺)11.037s (+46.4% 🔺)2.422s61.00x
▲ VercelExpress⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro17/21
🐘 PostgresNitro11/21
▲ VercelNext.js (Turbopack)21/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres16/21
Next.js (Turbopack)🐘 Postgres11/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: failure
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

@github-actions

github-actionsBot commented May 5, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production92502191144
✅ 💻 Local Development123702191456
✅ 📦 Local Production123702191456
✅ 🐘 Local Postgres123702191456
✅ 🪟 Windows10400104
✅ 📋 Other5520176728
Total5292010526344

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro78026
✅ example78026
✅ express78026
✅ fastify78026
✅ hono78026
✅ nextjs-turbopack10202
✅ nextjs-webpack10202
✅ nitro78026
✅ nuxt78026
✅ sveltekit9707
✅ vite78026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable79025
✅ express-stable79025
✅ fastify-stable79025
✅ hono-stable79025
✅ nextjs-turbopack-canary85019
✅ nextjs-turbopack-stable-lazy-discovery-disabled10400
✅ nextjs-turbopack-stable-lazy-discovery-enabled10400
✅ nextjs-webpack-canary85019
✅ nextjs-webpack-stable-lazy-discovery-disabled10400
✅ nextjs-webpack-stable-lazy-discovery-enabled10400
✅ nitro-stable79025
✅ nuxt-stable79025
✅ sveltekit-stable9806
✅ vite-stable79025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable79025
✅ express-stable79025
✅ fastify-stable79025
✅ hono-stable79025
✅ nextjs-turbopack-canary85019
✅ nextjs-turbopack-stable-lazy-discovery-disabled10400
✅ nextjs-turbopack-stable-lazy-discovery-enabled10400
✅ nextjs-webpack-canary85019
✅ nextjs-webpack-stable-lazy-discovery-disabled10400
✅ nextjs-webpack-stable-lazy-discovery-enabled10400
✅ nitro-stable79025
✅ nuxt-stable79025
✅ sveltekit-stable9806
✅ vite-stable79025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable79025
✅ express-stable79025
✅ fastify-stable79025
✅ hono-stable79025
✅ nextjs-turbopack-canary85019
✅ nextjs-turbopack-stable-lazy-discovery-disabled10400
✅ nextjs-turbopack-stable-lazy-discovery-enabled10400
✅ nextjs-webpack-canary85019
✅ nextjs-webpack-stable-lazy-discovery-disabled10400
✅ nextjs-webpack-stable-lazy-discovery-enabled10400
✅ nitro-stable79025
✅ nuxt-stable79025
✅ sveltekit-stable9806
✅ vite-stable79025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack10400
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable79025
✅ e2e-local-dev-tanstack-start-79025
✅ e2e-local-postgres-nest-stable79025
✅ e2e-local-postgres-tanstack-start-79025
✅ e2e-local-prod-nest-stable79025
✅ e2e-local-prod-tanstack-start-79025
✅ e2e-vercel-prod-tanstack-start78026

📋 View full workflow run

Comment thread.changeset/fix-step-vs-wait-race.md Outdated
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@VaguelySerious
VaguelySerious merged commit 3535caf into mainMay 5, 2026
112 of 115 checks passed
@VaguelySerious
VaguelySerious deleted the peter/fix-step-vs-wait-race branch May 5, 2026 00:49
@github-actionsgithub-actionsBot mentioned this pull request May 5, 2026
pranaygp added a commit that referenced this pull request May 5, 2026
* origin/main:
[core] Skip inline step execution when suspension also has a wait (#1924)
[errors] Replace chalk import in @workfow/errors with inline ANSI shim (#1915)
Fix compatibility with Zod 4.4.x (#1902)
Serialize `run_failed`/`step_failed` errors through serialization pipeline (#1851)
tarballs: redesign preview tarballs index page (#1911)
Remove extra changeset (#1922)
Add stable Next.js eager and lazy test coverage (#1747)
Enforce per-(run, correlation) uniqueness for entity-creating events in world-postgres (#1878)
fix(world-vercel): add default request timeout to workflow-server HTTP calls (#1807)
pranaygp added a commit that referenced this pull request May 5, 2026
PR #1924 added the same sleep/step race workflows directly to main
while this branch was open. The textual concat from `git merge`
left both copies in 99_e2e.ts; this drops the duplicate set so the
file matches origin/main verbatim and the e2e tests pick up the
upstream definitions.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
pranaygp added a commit that referenced this pull request May 5, 2026
…ignal
* origin/main:
[core] Skip inline step execution when suspension also has a wait (#1924)
[errors] Replace chalk import in @workfow/errors with inline ANSI shim (#1915)
Fix compatibility with Zod 4.4.x (#1902)
Serialize `run_failed`/`step_failed` errors through serialization pipeline (#1851)
tarballs: redesign preview tarballs index page (#1911)
Remove extra changeset (#1922)
Add stable Next.js eager and lazy test coverage (#1747)
Enforce per-(run, correlation) uniqueness for entity-creating events in world-postgres (#1878)
fix(world-vercel): add default request timeout to workflow-server HTTP calls (#1807)
Allow disabling step sourcemap with new `sourcemap` option in builders (#1842)
[ci] Enable Vercel-prod e2e for tanstack-start (#1904)
web: configure vercelPreset() for Vercel deployments (#1815)
[core] Combine flow+step bundle and process steps eagerly (#1338)
[world-vercel] Revert stream close control framing (#1891)
[tarballs] Use turbo to build workspace deps before packing (#1908)
# Conflicts:
#	packages/core/src/runtime/step-handler.test.ts
#	packages/core/src/runtime/step-handler.ts
#	packages/core/src/runtime/suspension-handler.ts
#	packages/core/src/step.test.ts
#	packages/world-local/src/storage/events-storage.ts
#	packages/world-postgres/src/drizzle/migrations/meta/_journal.json
pranaygp added a commit that referenced this pull request May 5, 2026
* [e2e] Add step-vs-sleep race tests + dev-tmux skill
Adds two race workflows (sleepWinsRaceWorkflow, stepWinsRaceWorkflow)
that exercise Promise.race between a step function and a sleep call.
The current `sleepWinsRaceWorkflow` test fails — surfacing how the
replay engine resolves a previously-completed step instantly while
sleep still has to elapse.
Also adds a `dev-tmux` skill that documents the 3-pane tmux + portless
setup for testing workflows interactively in a worktree alongside the
observability UI.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [workbench/nextjs-turbopack] Allow *.turbopack.localhost in dev
Adds allowedDevOrigins entries so portless-style worktree-prefixed
.localhost URLs (e.g. https://<branch>.turbopack.localhost) can hit
HMR and dev-only endpoints without Next's cross-origin protection
flooding the logs with warnings.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Drop duplicate race workflows after merging main
PR #1924 added the same sleep/step race workflows directly to main
while this branch was open. The textual concat from `git merge`
left both copies in 99_e2e.ts; this drops the duplicate set so the
file matches origin/main verbatim and the e2e tests pick up the
upstream definitions.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Narrow activation, robust pane IDs, statusline helper
- Tighten activation phrases so the skill only fires for the specific
portless+tmux setup it documents, not the generic "start the dev
server" task. Addresses #1916 review.
- Capture pane IDs at split time (-P -F '#{pane_id}') so the snippet
works under both pane-base-index 0 and 1. Addresses Copilot review.
- Add `statusline.sh` that filters `portless list` to the current
worktree's routes and emits a one-line summary, plus instructions
for wiring it into Claude Code's `statusLine.command`.
- Bump version to 1.1.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Recommend primary-checkout path for statusline
Worktrees get deleted, so wiring the statusline to a worktree path
breaks the moment the worktree is removed. Update the skill and the
script header to recommend pointing `statusLine.command` at the
primary checkout (`$HOME/github/vercel/workflow/...`). The script
itself is already worktree-aware via Claude's `workspace.current_dir`
stdin JSON, so the same invocation surfaces routes for whichever
worktree the session is in.
Bump version to 1.2.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] OSC 8 link statusline + worktree-named tmux session
- Statusline overlay now renders `[dev] · [obs] · tmux:<prefix>`,
with the bracketed labels emitted as OSC 8 hyperlinks (clickable in
any modern terminal) styled cyan + underline so they stand out.
Replaces the old long-URL form that was hard to scan and click.
- Add a tmux-session indicator: shown when a session named exactly the
worktree prefix exists (uses `tmux has-session -t =<prefix>` for
exact matching).
- Change the skill's tmux session naming convention from the fixed
`workflow-dev` to `<worktree-prefix>` (basename of the branch — same
string portless uses as the subdomain prefix). This lets the
statusline locate the session deterministically and lets multiple
worktrees run dev sessions concurrently without manual disambiguation.
- Bump skill to v1.3.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Statusline: print full `tmux attach -t <name>` command
Replaces the abbreviated `tmux:<prefix>` indicator with the full
copy-paste-ready `tmux attach -t <prefix>` invocation. Saves a step
when grabbing the session from another shell.
Bump skill to v1.4.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Brighter statusline + Nerd Font icons
- Drop the dim styling that made the overlay hard to read; use bold
bright cyan + underline for links and bold bright green for the
tmux command.
- Add Nerd Font glyphs: for dev, for obs, for the
tmux copy-paste hint. Falls back to box-drawing if the font lacks
Nerd Font ranges; layout is unaffected.
- Visual differentiation: cyan + underline = clickable hyperlink;
green = copy this command.
Bump skill to v1.5.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/dev-tmux] Restore Nerd Font icons via Unicode escapes
The copy glyph in `emit_tmux` was a literal Nerd Font byte embedded in
the printf string and got stripped during a prior rewrite. Promote all
three icons (rocket / graph / copy) to top-level shell variables that
use \uHHHH-equivalent UTF-8 escapes, so the source survives editor
round-trips that don't preserve Private Use Area code points.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* [skills/internal-dev-workbench] Rename from dev-tmux, set author + reset version
- Rename `skills/dev-tmux/` → `skills/internal-dev-workbench/` to make
the name self-explanatory about the skill's scope (an internal
contributor's local dev workbench, not a generic tmux helper).
- Author: Pranay Prakash. Version: 0.1 (first release of the skill).
- Update internal references in SKILL.md and statusline.sh accordingly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

2 participants

@VaguelySerious@pranaygp