Skip to content

[world-vercel] Move event ref resolution from server-side to client-side#1189

Merged
VaguelySerious merged 11 commits into
mainfrom
nrajlich/client-side-ref-hydration
Feb 26, 2026
Merged

[world-vercel] Move event ref resolution from server-side to client-side#1189
VaguelySerious merged 11 commits into
mainfrom
nrajlich/client-side-ref-hydration

Conversation

@TooTallNate
Copy link
Copy Markdown
Member

Summary

  • When fetching events with resolveData='all', world-vercel now always sends remoteRefBehavior=lazy to workflow-server and hydrates the returned ref descriptors client-side
  • This moves memory pressure from the server (which was OOMing when resolving all refs for large event lists) to the client
  • For inline refs (dbrf:), data is decoded locally from the descriptor's embedded payload — zero network overhead
  • For S3/Redis refs (s3rf:/kvrf:), parallel requests are made to the new GET /v2/refs endpoint with bounded concurrency (max 10 concurrent)

Files Changed

File Change
packages/world-vercel/src/refs.ts New module: RefDescriptor type, isRefDescriptor() guard, resolveRefDescriptor() (local decode for inline refs, HTTP for remote), resolveRefDescriptors() (bounded-concurrency batch resolver)
packages/world-vercel/src/events.ts Modified getWorkflowRunEvents() to always send lazy, then hydrate refs client-side when resolveData='all'; added EventWithRefsSchema eventData field, eventDataRefFieldMap, collectPendingRefs(), hydrateEventRefs()

Companion PR

The server-side endpoint (GET /api/v2/refs) that this PR depends on is in the companion PR on vercel/workflow-server.

Testing

  • Typecheck: passes
  • Build: succeeds
  • Unit tests: 41/41 pass
  • Lint: pre-commit hooks pass (biome format)

When fetching events with resolveData='all', world-vercel now always
sends remoteRefBehavior=lazy to workflow-server and hydrates the
returned ref descriptors client-side. This moves memory pressure from
the server (which was OOMing when resolving all refs for large event
lists) to the client.

For inline refs (dbrf:), data is decoded locally from the descriptor's
embedded payload with zero network overhead. For S3/Redis refs, parallel
requests are made to the new GET /v2/refs endpoint with bounded
concurrency (max 10 concurrent requests).
Copilot AI review requested due to automatic review settings February 25, 2026 18:27
@TooTallNate TooTallNate requested a review from a team as a code owner February 25, 2026 18:27
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 25, 2026

🦋 Changeset detected

Latest commit: 28d1696

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

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

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

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

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Feb 25, 2026

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

Project Deployment Actions Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview, Comment Feb 26, 2026 9:16pm
example-nextjs-workflow-webpack Ready Ready Preview, Comment Feb 26, 2026 9:16pm
example-workflow Ready Ready Preview, Comment Feb 26, 2026 9:16pm
workbench-astro-workflow Ready Ready Preview, Comment Feb 26, 2026 9:16pm
workbench-express-workflow Ready Ready Preview, Comment Feb 26, 2026 9:16pm
workbench-fastify-workflow Ready Ready Preview, Comment Feb 26, 2026 9:16pm
workbench-hono-workflow Ready Ready Preview, Comment Feb 26, 2026 9:16pm
workbench-nitro-workflow Ready Ready Preview, Comment Feb 26, 2026 9:16pm
workbench-nuxt-workflow Ready Ready Preview, Comment Feb 26, 2026 9:16pm
workbench-sveltekit-workflow Ready Ready Preview, Comment Feb 26, 2026 9:16pm
workbench-vite-workflow Ready Ready Preview, Comment Feb 26, 2026 9:16pm
workflow-nest Ready Ready Preview, Comment Feb 26, 2026 9:16pm
workflow-swc-playground Ready Ready Preview, Comment Feb 26, 2026 9:16pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
workflow-docs Skipped Skipped Feb 26, 2026 9:16pm

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 25, 2026

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 0.033s (+3.1%) 1.006s (~) 0.972s 10 1.00x
💻 Local Nitro 0.034s (+5.5% 🔺) 1.006s (~) 0.971s 10 1.03x
💻 Local Next.js (Turbopack) 0.040s (-10.6% 🟢) 1.005s (~) 0.966s 10 1.19x
🌐 Redis Next.js (Turbopack) 0.046s (+25.5% 🔺) 1.005s (~) 0.958s 10 1.39x
🐘 Postgres Nitro 0.053s (+1.7%) 1.011s (~) 0.958s 10 1.60x
🐘 Postgres Express 0.057s (+8.6% 🔺) 1.012s (~) 0.956s 10 1.71x
🌐 MongoDB Next.js (Turbopack) 0.059s (-27.4% 🟢) 1.007s (~) 0.948s 10 1.79x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 0.405s (-30.5% 🟢) 1.734s (-16.5% 🟢) 1.329s 10 1.00x
▲ Vercel Express 0.613s (+41.5% 🔺) 2.077s (+11.7% 🔺) 1.464s 10 1.51x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

workflow with 1 step

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 1.101s (~) 2.005s (~) 0.904s 10 1.00x
🌐 Redis Next.js (Turbopack) 1.103s (+1.7%) 2.006s (~) 0.903s 10 1.00x
💻 Local Nitro 1.110s (+0.5%) 2.006s (~) 0.895s 10 1.01x
💻 Local Express 1.112s (~) 2.006s (~) 0.895s 10 1.01x
🐘 Postgres Nitro 1.120s (-2.1%) 2.012s (~) 0.892s 10 1.02x
🐘 Postgres Express 1.144s (+1.3%) 2.013s (~) 0.869s 10 1.04x
🌐 MongoDB Next.js (Turbopack) 1.298s (-1.4%) 2.007s (~) 0.709s 10 1.18x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.185s (+9.2% 🔺) 3.373s (-0.7%) 1.188s 10 1.00x
▲ Vercel Express 2.415s (+12.9% 🔺) 3.627s (+14.2% 🔺) 1.212s 10 1.11x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

workflow with 10 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 10.712s (+1.2%) 11.022s (~) 0.310s 3 1.00x
💻 Local Next.js (Turbopack) 10.727s (~) 11.022s (~) 0.295s 3 1.00x
💻 Local Nitro 10.854s (~) 11.022s (~) 0.168s 3 1.01x
🐘 Postgres Nitro 10.857s (~) 11.040s (~) 0.183s 3 1.01x
💻 Local Express 10.859s (~) 11.024s (~) 0.165s 3 1.01x
🐘 Postgres Express 10.949s (+0.8%) 11.046s (~) 0.097s 3 1.02x
🌐 MongoDB Next.js (Turbopack) 12.238s (~) 13.017s (~) 0.779s 3 1.14x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 16.450s (+2.4%) 17.223s (~) 0.774s 2 1.00x
▲ Vercel Express 16.834s (-1.7%) 18.106s (-1.7%) 1.272s 2 1.02x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

workflow with 25 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 26.897s (+1.3%) 27.049s (~) 0.152s 3 1.00x
💻 Local Next.js (Turbopack) 27.212s (~) 28.052s (~) 0.840s 3 1.01x
🐘 Postgres Nitro 27.217s (~) 28.054s (~) 0.837s 3 1.01x
🐘 Postgres Express 27.377s (~) 28.073s (~) 0.696s 3 1.02x
💻 Local Express 27.570s (~) 28.056s (~) 0.486s 3 1.03x
💻 Local Nitro 27.588s (~) 28.052s (~) 0.464s 3 1.03x
🌐 MongoDB Next.js (Turbopack) 30.427s (~) 31.040s (~) 0.613s 2 1.13x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 40.840s (+3.0%) 42.029s (+2.2%) 1.189s 2 1.00x
▲ Vercel Express 41.270s (~) 42.665s (+1.4%) 1.395s 2 1.01x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

workflow with 50 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 54.303s (+1.2%) 55.097s (+1.8%) 0.795s 2 1.00x
🐘 Postgres Nitro 54.889s (-0.7%) 55.080s (-1.8%) 0.190s 2 1.01x
🐘 Postgres Express 55.470s (+0.6%) 56.117s (~) 0.647s 2 1.02x
💻 Local Next.js (Turbopack) 56.793s (~) 57.101s (~) 0.308s 2 1.05x
💻 Local Express 57.523s (~) 58.107s (~) 0.584s 2 1.06x
💻 Local Nitro 57.566s (~) 58.106s (~) 0.541s 2 1.06x
🌐 MongoDB Next.js (Turbopack) 60.926s (~) 61.076s (-0.8%) 0.150s 2 1.12x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 83.261s (-7.7% 🟢) 84.576s (-7.2% 🟢) 1.315s 2 1.00x
▲ Vercel Nitro 88.718s (+4.6%) 89.682s (+3.5%) 0.964s 2 1.07x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

Promise.all with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 1.251s (+5.2% 🔺) 2.006s (~) 0.755s 15 1.00x
🐘 Postgres Nitro 1.360s (-2.2%) 2.009s (~) 0.649s 15 1.09x
🐘 Postgres Express 1.379s (+1.7%) 2.013s (~) 0.634s 15 1.10x
💻 Local Next.js (Turbopack) 1.408s (-0.5%) 2.005s (~) 0.596s 15 1.13x
💻 Local Nitro 1.425s (+1.9%) 2.006s (~) 0.581s 15 1.14x
💻 Local Express 1.458s (+1.1%) 2.006s (~) 0.548s 15 1.17x
🌐 MongoDB Next.js (Turbopack) 2.137s (-1.4%) 3.008s (~) 0.871s 10 1.71x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.151s (-20.3% 🟢) 3.107s (-21.0% 🟢) 0.956s 10 1.00x
▲ Vercel Express 2.431s (+13.0% 🔺) 3.539s (+13.3% 🔺) 1.108s 9 1.13x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

Promise.all with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.972s (-3.6%) 2.511s (-6.4% 🟢) 0.539s 12 1.00x
🐘 Postgres Express 2.053s (-1.1%) 2.682s (+3.3%) 0.629s 12 1.04x
💻 Local Next.js (Turbopack) 2.445s (-4.8%) 3.007s (~) 0.562s 10 1.24x
🌐 Redis Next.js (Turbopack) 2.499s (+5.0% 🔺) 3.008s (~) 0.508s 10 1.27x
💻 Local Express 2.648s (~) 3.007s (~) 0.359s 10 1.34x
💻 Local Nitro 2.697s (+3.5%) 3.008s (~) 0.311s 10 1.37x
🌐 MongoDB Next.js (Turbopack) 4.704s (-1.5%) 5.177s (~) 0.473s 6 2.39x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.846s (+12.7% 🔺) 3.760s (+4.6%) 0.913s 8 1.00x
▲ Vercel Express 3.464s (-0.9%) 4.493s (+4.3%) 1.029s 7 1.22x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

Promise.all with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 2.951s (-26.2% 🟢) 3.689s (-22.4% 🟢) 0.738s 9 1.00x
🐘 Postgres Express 3.565s (-13.2% 🟢) 4.591s (-3.2%) 1.027s 7 1.21x
🌐 Redis Next.js (Turbopack) 4.005s (+3.8%) 4.294s (+7.1% 🔺) 0.290s 7 1.36x
💻 Local Next.js (Turbopack) 6.822s (-8.7% 🟢) 7.414s (-7.6% 🟢) 0.592s 5 2.31x
💻 Local Nitro 7.818s (+5.6% 🔺) 8.270s (+3.1%) 0.452s 4 2.65x
💻 Local Express 8.059s (+5.4% 🔺) 8.522s (+6.3% 🔺) 0.464s 4 2.73x
🌐 MongoDB Next.js (Turbopack) 9.969s (~) 10.350s (~) 0.381s 3 3.38x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 3.658s (-6.3% 🟢) 4.841s (-1.0%) 1.183s 7 1.00x
▲ Vercel Express 3.859s (+4.3%) 4.825s (+6.1% 🔺) 0.966s 7 1.05x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

Promise.race with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 1.230s (+3.5%) 2.006s (~) 0.776s 15 1.00x
🐘 Postgres Nitro 1.371s (~) 2.009s (~) 0.639s 15 1.11x
🐘 Postgres Express 1.405s (+0.6%) 2.011s (~) 0.606s 15 1.14x
💻 Local Next.js (Turbopack) 1.429s (-0.8%) 2.006s (~) 0.576s 15 1.16x
💻 Local Express 1.453s (~) 2.005s (~) 0.553s 15 1.18x
💻 Local Nitro 1.478s (+4.2%) 2.006s (~) 0.528s 15 1.20x
🌐 MongoDB Next.js (Turbopack) 2.160s (-1.2%) 3.008s (~) 0.848s 10 1.76x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.615s (+17.8% 🔺) 3.768s (+21.5% 🔺) 1.153s 8 1.00x
▲ Vercel Nitro 3.164s (+39.3% 🔺) 3.969s (+17.8% 🔺) 0.805s 8 1.21x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

Promise.race with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.960s (-5.5% 🟢) 2.396s (-7.8% 🟢) 0.436s 13 1.00x
🐘 Postgres Express 2.035s (+1.4%) 2.514s (-3.3%) 0.479s 12 1.04x
🌐 Redis Next.js (Turbopack) 2.492s (+3.9%) 3.008s (~) 0.516s 10 1.27x
💻 Local Next.js (Turbopack) 2.729s (-4.5%) 3.007s (-3.2%) 0.278s 10 1.39x
💻 Local Nitro 2.800s (+2.9%) 3.010s (~) 0.210s 10 1.43x
💻 Local Express 2.819s (+2.3%) 3.009s (~) 0.190s 10 1.44x
🌐 MongoDB Next.js (Turbopack) 4.674s (-1.2%) 5.177s (~) 0.503s 6 2.38x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.260s (-32.4% 🟢) 3.305s (-23.3% 🟢) 1.045s 10 1.00x
▲ Vercel Nitro 2.511s (+7.3% 🔺) 3.162s (-11.5% 🟢) 0.651s 10 1.11x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

Promise.race with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 3.482s (-6.9% 🟢) 4.302s (-3.5%) 0.820s 7 1.00x
🐘 Postgres Express 3.702s (~) 4.448s (~) 0.746s 7 1.06x
🌐 Redis Next.js (Turbopack) 4.094s (+6.2% 🔺) 4.582s (+10.8% 🔺) 0.487s 7 1.18x
💻 Local Express 8.408s (-2.7%) 9.020s (~) 0.612s 4 2.41x
💻 Local Next.js (Turbopack) 8.554s (+9.6% 🔺) 8.769s (+2.9%) 0.214s 4 2.46x
💻 Local Nitro 8.723s (+9.2% 🔺) 9.021s (+5.9% 🔺) 0.298s 4 2.51x
🌐 MongoDB Next.js (Turbopack) 9.994s (+1.6%) 10.350s (~) 0.355s 3 2.87x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 4.016s (+28.7% 🔺) 5.265s (+34.1% 🔺) 1.248s 6 1.00x
▲ Vercel Nitro 4.256s (+21.5% 🔺) 5.308s (+9.6% 🔺) 1.052s 6 1.06x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

Stream Benchmarks (includes TTFB metrics)
workflow with stream

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 0.144s (-2.3%) 1.001s (~) 0.011s (+2.7%) 1.017s (~) 0.873s 10 1.00x
🌐 Redis Next.js (Turbopack) 0.146s (+26.0% 🔺) 1.000s (~) 0.001s (+16.7% 🔺) 1.007s (~) 0.860s 10 1.02x
💻 Local Nitro 0.180s (+4.2%) 1.002s (~) 0.012s (+7.2% 🔺) 1.017s (~) 0.838s 10 1.25x
💻 Local Express 0.180s (~) 1.003s (~) 0.011s (+0.9%) 1.017s (~) 0.837s 10 1.25x
🐘 Postgres Nitro 0.189s (-5.9% 🟢) 0.993s (~) 0.001s (~) 1.011s (~) 0.822s 10 1.31x
🐘 Postgres Express 0.216s (+13.7% 🔺) 0.996s (~) 0.001s (-6.7% 🟢) 1.013s (~) 0.796s 10 1.50x
🌐 MongoDB Next.js (Turbopack) 0.508s (+3.9%) 0.943s (-1.7%) 0.002s (+36.4% 🔺) 1.008s (~) 0.501s 10 3.53x
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 1.827s (+19.8% 🔺) 2.480s (+18.1% 🔺) 0.060s (-45.7% 🟢) 2.979s (+14.4% 🔺) 1.152s 10 1.00x
▲ Vercel Nitro 2.342s (+58.5% 🔺) 2.829s (+62.5% 🔺) 0.076s (-14.9% 🟢) 3.295s (+44.4% 🔺) 0.953s 10 1.28x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - - -

🔍 Observability: Express | Nitro

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World 🥇 Fastest Framework Wins
💻 Local Next.js (Turbopack) 10/12
🐘 Postgres Nitro 12/12
▲ Vercel Nitro 7/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework 🥇 Fastest World Wins
Express 🐘 Postgres 8/12
Next.js (Turbopack) 🌐 Redis 8/12
Nitro 🐘 Postgres 8/12
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: success
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 25, 2026

🧪 E2E Test Results

Some tests failed

Summary

Passed Failed Skipped Total
❌ ▲ Vercel Production 522 1 49 572
✅ 💻 Local Development 556 0 68 624
✅ 📦 Local Production 556 0 68 624
✅ 🐘 Local Postgres 556 0 68 624
✅ 🪟 Windows 49 0 3 52
❌ 🌍 Community Worlds 111 45 9 165
✅ 📋 Other 135 0 21 156
Total 2485 46 286 2817

❌ Failed Tests

▲ Vercel Production (1 failed)

astro (1 failed):

  • error handling error propagation step errors cross-file step error preserves message and function names in stack
🌍 Community Worlds (45 failed)

turso (45 failed):

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

Details by Category

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

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: success
  • Windows: success

Check the workflow run for details.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Moves event ref resolution for world-vercel from workflow-server to the @workflow/world-vercel client by always requesting remoteRefBehavior=lazy for event listing, then hydrating ref descriptors locally (inline decode) or via GET /v2/refs (bounded concurrency) to reduce server memory pressure and prevent OOMs.

Changes:

  • Added a new refs.ts module to model/identify RefDescriptors and resolve them locally (inline) or remotely (/v2/refs) with bounded concurrency.
  • Updated getWorkflowRunEvents() to always request lazy refs and (when resolveData='all') hydrate returned events client-side.
  • Extended event list parsing to accept both legacy eventDataRef and v2 eventData (which may contain nested ref descriptors).

Reviewed changes

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

File Description
packages/world-vercel/src/refs.ts Adds ref-descriptor types/guards and single/batch resolution logic (inline decode + server fetch).
packages/world-vercel/src/events.ts Forces lazy ref behavior for event listing and hydrates refs client-side for resolveData='all'.
Comments suppressed due to low confidence (1)

packages/world-vercel/src/events.ts:229

  • In the resolveData === 'none' path, the response items can still include eventDataRef because filterEventData() only strips eventData. Since Event does not include eventDataRef, this leaks internal ref descriptors to callers and breaks the stated intent (“strip eventData and eventDataRef”). Update the filtering to omit eventDataRef as well (or strip it here before returning).
  // resolveData === 'none': strip eventData and eventDataRef
  return {
    ...response,
    data: response.data.map((event: any) =>
      filterEventData(event, resolveData)
    ),

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

Comment thread packages/world-vercel/src/events.ts
Comment thread packages/world-vercel/src/refs.ts
Comment thread packages/world-vercel/src/refs.ts Outdated
Copy link
Copy Markdown
Contributor

@pranaygp pranaygp left a comment

Choose a reason for hiding this comment

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

Good approach — moving ref resolution client-side to avoid server OOMs makes sense. The code is well-structured with clean separation between ref resolution and event hydration. A few issues to address, one bug and some hardening suggestions.

Comment thread packages/world-vercel/src/events.ts
Comment thread packages/world-vercel/src/refs.ts
Comment thread packages/world-vercel/src/refs.ts
Comment thread packages/world-vercel/src/refs.ts Outdated
Comment thread packages/world-vercel/src/events.ts Outdated
Comment thread packages/world-vercel/src/events.ts Outdated
Copy link
Copy Markdown
Contributor

@pranaygp pranaygp left a comment

Choose a reason for hiding this comment

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

Deep-dive review covering performance, error handling, race conditions, and security. See inline comments for details. The 3 HIGH items are all in the error handling category — the N+1 request pattern introduces new failure modes (cascading failures, no retry for 429/5XX, request storms against downed endpoints) that didn't exist with the old single-request approach.

Comment thread packages/world-vercel/src/refs.ts
Comment thread packages/world-vercel/src/refs.ts Outdated
Comment thread packages/world-vercel/src/refs.ts Outdated
Comment thread packages/world-vercel/src/events.ts Outdated
Comment thread packages/world-vercel/src/events.ts Outdated
Comment thread packages/world-vercel/src/refs.ts
Comment thread packages/world-vercel/src/refs.ts Outdated
Comment thread packages/world-vercel/src/events.ts
Comment thread packages/world-vercel/src/refs.ts
Comment thread .changeset/client-side-ref-hydration.md Outdated
Comment thread packages/world-vercel/src/events.ts Outdated
Copy link
Copy Markdown
Contributor

@pranaygp pranaygp left a comment

Choose a reason for hiding this comment

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

OTEL/tracing review — the new multi-request fan-out is invisible in traces. The highest priority fix is adding a parent span (world.refs.hydrate) around hydrateEventRefs to group the /v2/refs HTTP calls and distinguish them from the primary list request.

Comment thread packages/world-vercel/src/events.ts
Comment thread packages/world-vercel/src/refs.ts
Comment thread packages/world-vercel/src/refs.ts Outdated
Comment thread packages/world-vercel/src/events.ts
Comment thread packages/world-vercel/src/events.ts
Update resolveRefDescriptor to include the runId in the endpoint path,
matching the server-side rename from GET /v2/refs to GET /v2/runs/:runId/refs.

Thread runId from events through the dedup map and into resolveRefDescriptors
via a new RefWithRunId interface that pairs each descriptor with its
owning event's runId.
Copy link
Copy Markdown
Contributor

@pranaygp pranaygp left a comment

Choose a reason for hiding this comment

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

Follow-up review on the latest 4 commits. 11 original issues resolved, 5 deferred to follow-ups. 4 new observations, all MEDIUM or LOW — the biggest one is that the switch from makeRequest to direct fetch for remote refs loses OTEL HTTP spans and structured error context. Overall looking good.

Comment thread packages/world-vercel/src/refs.ts Outdated
Comment thread packages/world-vercel/src/refs.ts Outdated
Comment thread packages/world-vercel/src/events.ts
Comment thread packages/world-vercel/src/refs.ts
TooTallNate and others added 3 commits February 25, 2026 16:57
- Wrap direct fetch in resolveRefDescriptor with trace('http GET')
  span matching makeRequest conventions (http.request.method, url.full,
  http.response.status_code, peer.service, error recording)
- Set Accept and X-Request-Time headers that makeRequest normally adds,
  preventing RSC request memoization and enabling content negotiation
- Use WorkflowAPIError instead of plain Error for ref fetch failures,
  preserving structured context (url, status) for future retry logic
- Log warning when EventSchema.safeParse fails during post-hydration
  coercion, making schema mismatches visible in production
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants