Skip to content

[core] Prune schema modules from workflow bundles - #3550

Open
NathanColosimo wants to merge 6 commits into
mainfrom
codex/replay-prune-runtime-graph
Open

[core] Prune schema modules from workflow bundles#3550
NathanColosimo wants to merge 6 commits into
mainfrom
codex/replay-prune-runtime-graph

Conversation

@NathanColosimo

@NathanColosimo NathanColosimo commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • move runtime-only event metadata and attribute validation onto schema-free @workflow/world subpaths
  • keep the public Zod schemas available to hosts without pulling them into the sandbox
  • add a regression test that builds a real workflow and asserts that Zod is absent

Result

For the 97-step benchmark workflow:

  • VM bundle: 612,980 B → 26,831 B (-95.6%)
  • fresh-context evaluation p50: 10.536 ms → 0.121 ms (-98.9%)
  • Zod modules in the VM bundle: 77 → 0

Review scope

This changes dependency boundaries only; workflow behavior and serialized formats are unchanged.

Validation

  • builders/core/world package typechecks and builds
  • focused builder/runtime tests
  • Next/Turbopack and Vite production builds

@changeset-bot

changeset-bot Bot commented Aug 14, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b035250

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

This PR includes changesets to release 20 packages
Name Type
@workflow/builders Patch
@workflow/core Patch
@workflow/world Patch
@workflow/astro Patch
@workflow/cli Patch
@workflow/nest Patch
@workflow/next Patch
@workflow/nitro Patch
@workflow/rollup Patch
@workflow/sveltekit Patch
@workflow/vite Patch
@workflow/vitest Patch
@workflow/web-shared Patch
@workflow/web Patch
workflow Patch
@workflow/world-testing Patch
@workflow/world-local Patch
@workflow/world-postgres Patch
@workflow/world-vercel 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

vercel Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview, v0 Aug 21, 2026 10:06pm
example-nextjs-workflow-webpack Ready Ready Preview, v0 Aug 21, 2026 10:06pm
example-workflow Ready Ready Preview, v0 Aug 21, 2026 10:06pm
workbench-astro-workflow Ready Ready Preview, v0 Aug 21, 2026 10:06pm
workbench-express-workflow Ready Ready Preview, v0 Aug 21, 2026 10:06pm
workbench-fastify-workflow Ready Ready Preview, v0 Aug 21, 2026 10:06pm
workbench-hono-workflow Ready Ready Preview, v0 Aug 21, 2026 10:06pm
workbench-nestjs-workflow Ready Ready Preview, v0 Aug 21, 2026 10:06pm
workbench-nitro-workflow Ready Ready Preview, v0 Aug 21, 2026 10:06pm
workbench-nuxt-workflow Ready Ready Preview, v0 Aug 21, 2026 10:06pm
workbench-python-workflow Ready Ready Preview, v0 Aug 21, 2026 10:06pm
workbench-sveltekit-workflow Ready Ready Preview, v0 Aug 21, 2026 10:06pm
workbench-tanstack-start-workflow Ready Ready Preview, v0 Aug 21, 2026 10:06pm
workbench-vite-workflow Ready Ready Preview, v0 Aug 21, 2026 10:06pm
workflow-docs Ready Ready Preview, v0 Aug 21, 2026 10:06pm
workflow-swc-playground Building Building Preview, v0 Aug 21, 2026 10:06pm
workflow-tarballs Ready Ready Preview, v0 Aug 21, 2026 10:06pm
workflow-web Ready Ready Preview, v0 Aug 21, 2026 10:06pm

@NathanColosimo
NathanColosimo force-pushed the codex/replay-prune-runtime-graph branch from 7f68db4 to 4a2cc23 Compare August 14, 2026 08:08
@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

❌ Failed E2E Tests

▲ Vercel Production (31 failed)

express-node (1 failed):

  • hookAdoptOwnerResultWorkflow - duplicate adopts the owner result via conflict.returnValue | wrun_41M0K6152K0GHVBBAPTPFEG7TX | 🔍 observability

express-quickjs (1 failed):

  • AbortController abortFromStepWorkflow: step abort cancels an in-flight sibling step

hono-quickjs (2 failed):

  • AbortController abortListenerWorkflow: signal.addEventListener fires on the deserialized step signal
  • AbortController abortThrowIfAbortedMidFlightWorkflow: throwIfAborted in a polling loop bails when abort fires

nest-quickjs (2 failed):

  • AbortController abortFromStepWorkflow: step abort cancels an in-flight sibling step
  • AbortController abortAnyInStepWorkflow: AbortSignal.any inside a step composes deserialized signals

nextjs-webpack-quickjs (2 failed):

  • AbortController abortAnyInStepWorkflow: AbortSignal.any inside a step composes deserialized signals
  • AbortController abortListenerWorkflow: signal.addEventListener fires on the deserialized step signal

nitro-node (2 failed):

  • resume-or-start route pattern - resumeHook retried after start() reaches the new run | wrun_41M0K5X59G0GGDAE66F3MVFV2M | 🔍 observability
  • distributedAbortController - reconnect to existing controller | wrun_41M0K624YB0GHF6225QJJVN8A1 | 🔍 observability

nitro-quickjs (4 failed):

  • AbortController abortFromStepWorkflow: step abort cancels an in-flight sibling step
  • AbortController abortAnyInStepWorkflow: AbortSignal.any inside a step composes deserialized signals
  • AbortController abortListenerWorkflow: signal.addEventListener fires on the deserialized step signal
  • AbortController abortThrowIfAbortedMidFlightWorkflow: throwIfAborted in a polling loop bails when abort fires

nuxt-quickjs (2 failed):

  • AbortController abortFromStepWorkflow: step abort cancels an in-flight sibling step
  • AbortController abortAnyInStepWorkflow: AbortSignal.any inside a step composes deserialized signals

python-node (8 failed):

  • promiseAllWorkflow | wrun_41M0K5S64G0GR7K3S3FCZ5JRTT | 🔍 observability
  • sleepingWorkflow | wrun_41M0K5SVQQ0GVCRHDNE2TCX9KH | 🔍 observability
  • parallelSleepWorkflow | wrun_41M0K5SWQH0GR8N6KG6T8JZJCR | 🔍 observability
  • nullByteWorkflow | wrun_41M0K5T3EJ0GJ0BMHAEG8N053G | 🔍 observability
  • cancelRun - cancelling a running workflow | wrun_41M0K5YRGE0GGHFE95QHRRAAPD | 🔍 observability
  • cancelRun via CLI - cancelling a running workflow | wrun_41M0K5YYYW0GJJ4WSJSS7HD7JM | 🔍 observability
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_41M0K5Z1XA0GMTP0QK0J33Z55G | 🔍 observability
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_41M0K5ZNX80GGFXZ7QS6VV0G04 | 🔍 observability

sveltekit-quickjs (2 failed):

  • AbortController abortFromStepWorkflow: step abort cancels an in-flight sibling step
  • AbortController abortDeterministicBranchFromStepWorkflow: branches stay consistent when abort comes from a step

tanstack-start-quickjs (2 failed):

  • AbortController abortFromStepWorkflow: step abort cancels an in-flight sibling step
  • AbortController abortAnyInStepWorkflow: AbortSignal.any inside a step composes deserialized signals

vite-quickjs (3 failed):

  • AbortController abortFromStepWorkflow: step abort cancels an in-flight sibling step
  • AbortController abortListenerWorkflow: signal.addEventListener fires on the deserialized step signal
  • AbortController abortThrowIfAbortedMidFlightWorkflow: throwIfAborted in a polling loop bails when abort fires

🌐 Cross-language Conformance (9 failed)

python (9 failed):

  • deploymentId: 'latest' is a no-op in non-Vercel worlds | wrun_01M0K7Q208G0HQNNVF9SQRGRGE
  • promiseAllWorkflow | wrun_41M0K5S64G0GR7K3S3FCZ5JRTT
  • sleepingWorkflow | wrun_41M0K5SVQQ0GVCRHDNE2TCX9KH
  • parallelSleepWorkflow | wrun_41M0K5SWQH0GR8N6KG6T8JZJCR
  • nullByteWorkflow | wrun_41M0K5T3EJ0GJ0BMHAEG8N053G
  • cancelRun - cancelling a running workflow | wrun_41M0K5YRGE0GGHFE95QHRRAAPD
  • cancelRun via CLI - cancelling a running workflow | wrun_41M0K5YYYW0GJJ4WSJSS7HD7JM
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_41M0K5Z1XA0GMTP0QK0J33Z55G
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_41M0K5ZNX80GGFXZ7QS6VV0G04

⚠️ Flaky E2E Tests (passed on retry)

These tests failed at least once and passed on a retry. A recurring entry here is a real race worth investigating.

30 flaky tests
  • abortAnyInStepWorkflow: AbortSignal.any inside a step composes deserialized signals (fastify)
  • abortAnyInStepWorkflow: AbortSignal.any inside a step composes deserialized signals (nextjs-turbopack)
  • abortDeterministicBranchFromStepWorkflow: branches stay consistent when abort comes from a step (fastify)
  • abortDeterministicBranchFromStepWorkflow: branches stay consistent when abort comes from a step (nextjs-turbopack)
  • abortDeterministicBranchFromStepWorkflow: branches stay consistent when abort comes from a step (vite)
  • abortHookOrderingWorkflow [hook-first-abort-first]: hook.then → addEventListener → abort() → resumeHook (sveltekit)
  • abortHookOrderingWorkflow [hook-first-hook-first]: hook.then → addEventListener → resumeHook → abort() (nitro)
  • abortHookOrderingWorkflow [listener-first-hook-first]: addEventListener → hook.then → resumeHook → abort() (nextjs-turbopack)
  • abortListenerWorkflow: signal.addEventListener fires on the deserialized step signal (nextjs-turbopack)
  • abortReasonWorkflow: abort reason preserved across boundaries (nextjs-turbopack)
  • abortThrowIfAbortedMidFlightWorkflow: throwIfAborted in a polling loop bails when abort fires (nextjs-turbopack)
  • cancelRun via CLI - cancelling a running workflow (nextjs-turbopack)
  • distributedAbortController - manual abort triggers signal (express)
  • distributedAbortController - reconnect to existing controller (example)
  • distributedAbortController - reconnect to existing controller (express)
  • distributedAbortController - reconnect to existing controller (nuxt)
  • distributedAbortController - reconnect to existing controller (tanstack-start)
  • hookAdoptOwnerResultWorkflow - duplicate adopts the owner result via conflict.returnValue (astro)
  • hookAdoptOwnerResultWorkflow - duplicate adopts the owner result via conflict.returnValue (example)
  • hookAdoptOwnerResultWorkflow - duplicate adopts the owner result via conflict.returnValue (hono)
  • hookAdoptOwnerResultWorkflow - duplicate adopts the owner result via conflict.returnValue (nest)
  • hookAdoptOwnerResultWorkflow - duplicate adopts the owner result via conflict.returnValue (nextjs-webpack)
  • hookAdoptOwnerResultWorkflow - duplicate adopts the owner result via conflict.returnValue (sveltekit)
  • hookAdoptOwnerResultWorkflow - duplicate adopts the owner result via conflict.returnValue (tanstack-start)
  • hookMinRetentionWorkflow - terminal Hook cannot resume and its token stays unavailable (nitro)
  • hookSupersedeOwnerWorkflow - duplicate cancels the owner and claims the released token (fastify)
  • hookWithSleepFinalStepWorkflow - step only on final payload (nextjs-turbopack)
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep (nextjs-webpack)
  • RetryableError respects custom retryAfter delay (nextjs-turbopack)
  • webhookWorkflow (nitro)

🛠 Infra Events (absorbed by the harness)

Platform anomalies the e2e harness detected and worked around (e.g. a run the queue never picked up, replaced by a fresh run). Clustered timestamps indicate a backend blip; a steady drip indicates a platform issue worth escalating.

32 infra events
  • cold-start-warmup · suite warmup (tanstack-start) · at 22:08:54Z · abandoned wrun_01M0K5WGR7J2FVPSMD0AGEJVCG
  • cold-start-warmup · suite warmup (python) · at 22:39:00Z · abandoned wrun_41M0K7GT1B0GWFB49P28E9DNPV · (+7 more)
  • cold-start-warmup · suite warmup (python) · at 22:39:10Z · abandoned wrun_01M0K7H3JHN0J2QD794NTBVFXP · (+7 more)
  • run-pickup-stall · nullByteWorkflow (python) · at 22:39:16Z · abandoned wrun_41M0K7MF900GNXBVVX4256HYRQ
  • run-pickup-stall · promiseAllWorkflow (python) · at 22:39:16Z · abandoned wrun_41M0K7MF8Q0GWR3EZ0ASA4KEQF
  • run-pickup-stall · sleepingWorkflow (python) · at 22:39:16Z · abandoned wrun_41M0K7MF8W0GGM4F98C80BH6YY
  • run-pickup-stall · parallelSleepWorkflow (python) · at 22:39:16Z · abandoned wrun_41M0K7MF8W0GGM4F98C80BH6YZ
  • run-pickup-stall · cancelRun - cancelling a running workflow (python) · at 22:39:17Z · abandoned wrun_41M0K7MFPT0GNJPDTDMD7V893G
  • run-pickup-stall · nullByteWorkflow (python) · at 22:39:25Z · abandoned wrun_01M0K7MRQQZXCGXKHQEEDJCV0V
  • run-pickup-stall · sleepingWorkflow (python) · at 22:39:25Z · abandoned wrun_01M0K7MRQMG6A9H9ZEM5WT9JF1
  • run-pickup-stall · parallelSleepWorkflow (python) · at 22:39:25Z · abandoned wrun_01M0K7MRQNC8CAP2T7653WHRSG
  • run-pickup-stall · deploymentId: 'latest' is a no-op in non-Vercel worlds (python) · at 22:39:25Z · abandoned wrun_01M0K7MRQFDVEM8PQVJHWGTB81
  • run-pickup-stall · promiseAllWorkflow (python) · at 22:39:25Z · abandoned wrun_01M0K7MRQGWPBJHS84D7Q82HGJ
  • run-pickup-stall · cancelRun - cancelling a running workflow (python) · at 22:39:50Z · abandoned wrun_41M0K7NFN00GS63754GBF8EQC8
  • run-pickup-stall · sleepingWorkflow (python) · at 22:40:17Z · abandoned wrun_41M0K7PATB0GH4FF32TQ6Z31KG
  • run-pickup-stall · parallelSleepWorkflow (python) · at 22:40:17Z · abandoned wrun_41M0K7PAVB0GN58DCZNCZBEP75
  • run-pickup-stall · nullByteWorkflow (python) · at 22:40:17Z · abandoned wrun_41M0K7PAX10GN28E0TFCXG85JW
  • run-pickup-stall · promiseAllWorkflow (python) · at 22:40:17Z · abandoned wrun_41M0K7PAWQ0GZAP7VDWMRNFBEV
  • run-pickup-stall · deploymentId: 'latest' is a no-op in non-Vercel worlds (python) · at 22:40:25Z · abandoned wrun_01M0K7PKB5759R20YRZGHE5RQ7
  • run-pickup-stall · parallelSleepWorkflow (python) · at 22:40:25Z · abandoned wrun_01M0K7PKB9WZ6PN804FA4GAVHX
  • run-pickup-stall · sleepingWorkflow (python) · at 22:40:25Z · abandoned wrun_01M0K7PKB7AGBA5DES3D51N98S
  • run-pickup-stall · promiseAllWorkflow (python) · at 22:40:25Z · abandoned wrun_01M0K7PKB87WJ2K9EN3E6H105G
  • run-pickup-stall · nullByteWorkflow (python) · at 22:40:25Z · abandoned wrun_01M0K7PKBANB16YJ4PWZP537ZR
  • run-pickup-stall · cancelRun - cancelling a running workflow (python) · at 22:41:25Z · abandoned wrun_01M0K7RDYNEEB62AW0D27JAZNH
  • run-pickup-stall · cancelRun via CLI - cancelling a running workflow (python) · at 22:41:25Z · abandoned wrun_01M0K7RDYTTVMTHFPJ6B48PVPJ
  • run-pickup-stall · sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration (python) · at 22:41:25Z · abandoned wrun_01M0K7RDYYFAF2HM200MNXP2QV
  • run-pickup-stall · cancelRun via CLI - cancelling a running workflow (python) · at 22:41:47Z · abandoned wrun_41M0K7PFGA0GGTVAJT6QNQNWZK
  • run-pickup-stall · cancelRun via CLI - cancelling a running workflow (python) · at 22:41:55Z · abandoned wrun_01M0K7SBAHQZKX8916FNN1VDJ4
  • run-pickup-stall · cancelRun - cancelling a running workflow (python) · at 22:41:55Z · abandoned wrun_01M0K7SBAJ341HRK99HP99HV03
  • run-pickup-stall · sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration (python) · at 22:42:25Z · abandoned wrun_01M0K7T8J2Y1140WYNNWB8ZXFC
  • run-pickup-stall · sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration (python) · at 22:42:49Z · abandoned wrun_41M0K7S2PW0GKSEPTRPJ8ANS47
  • run-pickup-stall · cancelRun via CLI - cancelling a running workflow (python) · at 22:42:49Z · abandoned wrun_41M0K7RCM90GR5KQ00QXH3772W

E2E Test Summary

Summary
Passed Failed Skipped Total
❌ ▲ Vercel Production 3547 31 742 4320
✅ 💻 Local Development 3922 0 558 4480
✅ 📦 Local Production 3922 0 558 4480
✅ 🐘 Local Postgres 3922 0 558 4480
✅ 🪟 Windows 320 0 0 320
❌ 🌐 Cross-language Conformance 0 9 132 141
✅ vercel-multi-region 27 0 0 27
Total 15660 40 2548 18248
Details by Category

❌ ▲ Vercel Production

App Passed Failed Skipped
✅ astro-node 132 0 28
✅ astro-quickjs 132 0 28
✅ example-node 132 0 28
✅ example-quickjs 132 0 28
❌ express-node 131 1 28
❌ express-quickjs 131 1 28
✅ fastify-node 132 0 28
✅ fastify-quickjs 132 0 28
✅ hono-node 132 0 28
❌ hono-quickjs 130 2 28
✅ nest-node 132 0 28
❌ nest-quickjs 130 2 28
✅ nextjs-turbopack-node 157 0 3
✅ nextjs-turbopack-quickjs 157 0 3
✅ nextjs-webpack-node 157 0 3
❌ nextjs-webpack-quickjs 155 2 3
❌ nitro-node 130 2 28
❌ nitro-quickjs 128 4 28
✅ nuxt-node 132 0 28
❌ nuxt-quickjs 130 2 28
❌ python-node 0 8 152
✅ sveltekit-node 151 0 9
❌ sveltekit-quickjs 149 2 9
✅ tanstack-start-node 132 0 28
❌ tanstack-start-quickjs 130 2 28
✅ vite-node 132 0 28
❌ vite-quickjs 129 3 28

✅ 💻 Local Development

App Passed Failed Skipped
✅ astro-stable-node 134 0 26
✅ astro-stable-quickjs 134 0 26
✅ express-stable-node 134 0 26
✅ express-stable-quickjs 134 0 26
✅ fastify-stable-node 134 0 26
✅ fastify-stable-quickjs 134 0 26
✅ hono-stable-node 134 0 26
✅ hono-stable-quickjs 134 0 26
✅ nest-stable-node 134 0 26
✅ nest-stable-quickjs 134 0 26
✅ nextjs-turbopack-canary-node 141 0 19
✅ nextjs-turbopack-canary-quickjs 141 0 19
✅ nextjs-turbopack-stable-node 160 0 0
✅ nextjs-turbopack-stable-quickjs 160 0 0
✅ nextjs-webpack-canary-node 141 0 19
✅ nextjs-webpack-canary-quickjs 141 0 19
✅ nextjs-webpack-stable-node 160 0 0
✅ nextjs-webpack-stable-quickjs 160 0 0
✅ nitro-stable-node 134 0 26
✅ nitro-stable-quickjs 134 0 26
✅ nuxt-stable-node 134 0 26
✅ nuxt-stable-quickjs 134 0 26
✅ sveltekit-stable-node 153 0 7
✅ sveltekit-stable-quickjs 153 0 7
✅ tanstack-start-node 134 0 26
✅ tanstack-start-quickjs 134 0 26
✅ vite-stable-node 134 0 26
✅ vite-stable-quickjs 134 0 26

✅ 📦 Local Production

App Passed Failed Skipped
✅ astro-stable-node 134 0 26
✅ astro-stable-quickjs 134 0 26
✅ express-stable-node 134 0 26
✅ express-stable-quickjs 134 0 26
✅ fastify-stable-node 134 0 26
✅ fastify-stable-quickjs 134 0 26
✅ hono-stable-node 134 0 26
✅ hono-stable-quickjs 134 0 26
✅ nest-stable-node 134 0 26
✅ nest-stable-quickjs 134 0 26
✅ nextjs-turbopack-canary-node 141 0 19
✅ nextjs-turbopack-canary-quickjs 141 0 19
✅ nextjs-turbopack-stable-node 160 0 0
✅ nextjs-turbopack-stable-quickjs 160 0 0
✅ nextjs-webpack-canary-node 141 0 19
✅ nextjs-webpack-canary-quickjs 141 0 19
✅ nextjs-webpack-stable-node 160 0 0
✅ nextjs-webpack-stable-quickjs 160 0 0
✅ nitro-stable-node 134 0 26
✅ nitro-stable-quickjs 134 0 26
✅ nuxt-stable-node 134 0 26
✅ nuxt-stable-quickjs 134 0 26
✅ sveltekit-stable-node 153 0 7
✅ sveltekit-stable-quickjs 153 0 7
✅ tanstack-start-node 134 0 26
✅ tanstack-start-quickjs 134 0 26
✅ vite-stable-node 134 0 26
✅ vite-stable-quickjs 134 0 26

✅ 🐘 Local Postgres

App Passed Failed Skipped
✅ astro-stable-node 134 0 26
✅ astro-stable-quickjs 134 0 26
✅ express-stable-node 134 0 26
✅ express-stable-quickjs 134 0 26
✅ fastify-stable-node 134 0 26
✅ fastify-stable-quickjs 134 0 26
✅ hono-stable-node 134 0 26
✅ hono-stable-quickjs 134 0 26
✅ nest-stable-node 134 0 26
✅ nest-stable-quickjs 134 0 26
✅ nextjs-turbopack-canary-node 141 0 19
✅ nextjs-turbopack-canary-quickjs 141 0 19
✅ nextjs-turbopack-stable-node 160 0 0
✅ nextjs-turbopack-stable-quickjs 160 0 0
✅ nextjs-webpack-canary-node 141 0 19
✅ nextjs-webpack-canary-quickjs 141 0 19
✅ nextjs-webpack-stable-node 160 0 0
✅ nextjs-webpack-stable-quickjs 160 0 0
✅ nitro-stable-node 134 0 26
✅ nitro-stable-quickjs 134 0 26
✅ nuxt-stable-node 134 0 26
✅ nuxt-stable-quickjs 134 0 26
✅ sveltekit-stable-node 153 0 7
✅ sveltekit-stable-quickjs 153 0 7
✅ tanstack-start-node 134 0 26
✅ tanstack-start-quickjs 134 0 26
✅ vite-stable-node 134 0 26
✅ vite-stable-quickjs 134 0 26

✅ 🪟 Windows

App Passed Failed Skipped
✅ nextjs-turbopack-node 160 0 0
✅ nextjs-turbopack-quickjs 160 0 0

❌ 🌐 Cross-language Conformance

App Passed Failed Skipped
❌ python 0 9 132

✅ vercel-multi-region

App Passed Failed Skipped
✅ nextjs-turbopack 27 0 0

📋 View full workflow run

@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

📊 Workflow Benchmarks

commit b035250 · Fri, 21 Aug 2026 22:30:00 GMT · run logs

Backend: vercel · app: nextjs-turbopack

Metric Scenario Best (ms) P75 (ms) P90 (ms) P99 (ms) Samples
TTFS step 184 (-81%) 💚 1277 🔴 (+17%) 🔻 1321 🔴 (+20%) 🔻 1407 🔴 (+26%) 🔻 30
TTFS stream 170 (-27%) 💚 1282 🔴 (+17%) 🔻 1339 🔴 (+17%) 🔻 1355 🔴 (+5.3%) 30
TTFS hook + stream 471 (-50%) 💚 1604 🔴 (+18%) 🔻 1645 🔴 (+18%) 🔻 1784 🔴 (+24%) 🔻 30
Fan-out TTFS Promise.all(100 steps) 570 (+6.1%) 2019 (+181%) 🔻 2045 (+30%) 🔻 2062 (+13%) 10
Fan-out TTLS Promise.all(100 steps) 2187 (+43%) 🔻 4129 (-1.2%) 4142 (-12%) 4820 (-2.1%) 10
STSO 1020 steps (inline) 146 (+20%) 🔻 191 (+0.5%) 218 (-1.4%) 366 (-18%) 💚 1019
WO 1020 steps 190905 (+4.3%) 190905 (+4.3%) 190905 (+4.3%) 190905 (+4.3%) 1
CRTT first chunk (pooled) 103 (+13%) 165 (+24%) 🔻 285 (+68%) 🔻 335 (+60%) 🔻 28

Streams

Scenario CRTT 1st p75 p90 p99 CDV max iters
paced control (100/s, 60B) 119 (+12%) 158 (+14%) 222 (-19%) 463 (-1%) 178 (+20%) 10
size sweep (100/s, 160B-12KB) 129 (+10%) 198 (+43%) 421 (+11%) 708 (-23%) 141 (+7%) 10
replay gateway-gpt-5.4-nano-2000t (1x) 172 (+20%) 152 (+35%) 204 (+24%) 508 (-34%) 425 (+38%) 3
replay eve-gpt-5.6-sol-2000t (1x) 176 (+18%) 164 (+29%) 230 (+46%) 624 (+129%) 454 (+57%) 2
replay eve-gpt-5.6-sol-2000t (2x) 178 (+55%) 229 (+42%) 352 (+53%) 684 (+15%) 273 (+3%) 3
📈 STSO distribution vs main (inline / queue-hop histograms)

1020 steps (inline)

Cumulative STSO time: main 182882ms → this run 189661ms (Δ +6779ms, +4%)

  100-150 ms  ┃█████                    main 214  this   9  -205
  150-200 ms  ██████████████████░░░░░┃  main 611  this 835  +224
  200-250 ms  ███┃                      main 135  this 129    -6
  250-300 ms  ┃                         main  28  this  23    -5
  300-350 ms  ┃                         main  11  this   8    -3
  350-400 ms  ┃                         main   5  this  11    +6
  400-450 ms  ┃                         main   6  this   2    -4
  450-500 ms  ┃                         main   3  this   0    -3
  500-550 ms  ┃                         main   1  this   0    -1
  550-600 ms  ┃                         main   2  this   1    -1
  600-650 ms  ┃                         main   1  this   0    -1
  650-700 ms  ┃                         main   1  this   0    -1
  700-750 ms  ┃                         main   1  this   0    -1
1200-1250 ms  ┃                         main   0  this   1    +1
📈 CRTT drill-down vs main (RTT distributions & profiles)
variant  RTT 1ms→5s+             avg         p50         p90          p99     n
control  ······▃█▁····  134.3 (+14%)  124 (+18%)  222 (-19%)    463 (-1%)  3000
sweep    ······▃█▂▁···  152.3 (+14%)  122 (+12%)  421 (+11%)   708 (-23%)  3000
gw 1x    ·····▁▃█▂▁···  138.4 (+29%)  123 (+32%)  204 (+24%)   508 (-34%)  5295
eve 1x   ·····▁▃█▂▁▁··    141 (+37%)  125 (+40%)  230 (+46%)  624 (+129%)  5186
eve 2x   ·····▁▂█▄▁···  182.7 (+33%)  163 (+46%)  352 (+53%)   684 (+15%)  7779

RTT over stream progress (avg per tenth of stream, bars scaled min→max):

control  █▅▄▄▂▂▂▁▁▁  118–176ms
sweep    ▇██▆▁▆▆█▄▇  123–164ms
gw 1x    ▃▄▁▆▃▅█▄▆▅  119–160ms
eve 1x   ▁▁▄▂█▄▃▆▃▅  120–172ms
eve 2x   ▄▃▃▂▁▂▅█▇▄  133–255ms

RTT by chunk size (avg per log size bin, ~160B → ~12KB serialized, bars scaled min→max):

sweep  ▂▇█▆▂▂▁  150–155ms

Delivery jitter over stream progress (avg positive CDV per tenth of stream, bars scaled min→max):

control  █▅▅▇▁▄▁▃▄▂  35–46ms
sweep    ▁█▄▄▂▇▆▄▄▆  44–64ms
gw 1x    ▁▅▂▃▄▆█▅▃▅  34–49ms
eve 1x   ▁▄▅▂█▅▃▄▃█  23–36ms
eve 2x   █▇▃▂▃▁▆▁▄▆  24–39ms
ℹ️ Metric definitions & methodology

Streams: first-chunk RTT (the stream-open path, before any buffering/backpressure), CRTT percentiles, and worst delivery stall (CDV max). Cells are medians across iterations; per-run values in the artifacts. No 🔴/🟢 marks until targets attach.

The collapsed STSO distribution section above buckets every step gap, split inline (same warm process — pure framework overhead) vs queue-hop (fresh process — dispatch, reinit, replay). = main, = this run, = fill.

The collapsed CRTT drill-down: per-variant RTT histograms (fixed log bins, · = empty) and mean RTT/positive-CDV profile lines over stream progress and chunk size. Histograms, avgs, and profiles merge exactly across runs; p50–p99 are percentile-of-percentiles. Per-index rows live in the artifacts.

Best/P75/P90/P99 deltas compare against the most recent benchmark run on main at the time of this run. 🔻 flags a delta worse than +15%, 💚 one better than −15%.

Metrics — TTFS: time to first step body (in-deployment start() → first step body) · Fan-out TTFS: fan-out time to first step (in-deployment start() → first of the parallel step bodies to complete) · Fan-out TTLS: fan-out time to last step (in-deployment start() → last of the parallel step bodies to complete, i.e. when the Promise.all resolves) · STSO: step-to-step overhead (gap between consecutive step bodies) · WO: workflow overhead (whole-run time outside step bodies, in-deployment anchored) · CRTT: chunk round-trip time (per-chunk write → read latency, one clock domain: deployment → stream backend → same deployment) · CDV: chunk delay variation / delivery jitter (inter-arrival gap minus inter-write gap per seq-adjacent pair; skew-free; the row is each run's MAX positive value, so one stall moves it)

Scenarios — step: one trivial no-op step, no stream; no hooks, so the run stays in turbo mode (in-process fast path) · stream: one streaming step; no hooks, so the run stays in turbo mode (in-process fast path) · hook + stream: registers a hook before one step, which exits turbo mode (dispatch path) · 1020 steps: 1020 trivial sequential steps; STSO is measured between consecutive steps in the given step ranges, and WO is the whole-run overhead outside step bodies · Promise.all(100 steps): 100 trivial no-op steps started together in a single Promise.all; Fan-out TTFS is the first of them to complete and Fan-out TTLS the last, both from the in-deployment clientStart, so their gap is the spread the runtime adds across the fan-out · paced control (100/s, 60B): the control: 300 tiny (~60B) deltas metronome-paced at 100/s — zero workload structure, so it reads the transport floor and flush cadence, and disambiguates transport-wide vs workload-specific when a replay row moves · size sweep (100/s, 160B-12KB): same pacing as the control with deltas padded in rotation across seven log-spaced sizes (~160B–12KB) — rotation decouples size from stream position, so it isolates whether chunk size causes latency · replay gateway-gpt-5.4-nano-2000t (1x): raw provider SSE cadence captured at the AI gateway boundary (gpt-5.4-nano, the most popular gateway model; per-token deltas p50 208B = the modal production chunk size), replayed exactly as measured — the typical customer's workload; its CDV is the typical customer's real delivery jitter · replay eve-gpt-5.6-sol-2000t (1x): a captured eve turn (gpt-5.6-sol, the most-used demanding eve model; ~2000 output tokens = production p50 turn length) replayed exactly as measured — eve's envelope protocol re-ships the cumulative message so sizes ramp 142B→13KB; the demanding outlier tenant's reality · replay eve-gpt-5.6-sol-2000t (2x): the same eve capture at 2x — the headroom/stress row; real fast-tier models emit the same chunk sizes at proportionally higher rate, so time compression is a faithful speed model · first chunk (pooled): every run's seq-0 RTT pooled across all stream scenarios — the first chunk precedes any workload differentiation, so pooling samples one shared stream-open path with exact percentiles

Replay cadences (semantic sha256) — eve-gpt-5.6-sol-2000t eaf22f5946e7c61f3c65c7006d550df180cfabd4e706254a09f22aec0cfb420d · gateway-gpt-5.4-nano-2000t 6f24ac518b6b83ff1d0e85a5fe78230db192716d66a7fc6b2fe022752001d041

🔴 marks a percentile over its target (within target is left unmarked). Targets (p75/p90/p99, ms) — TTFS 200/300/600

All timestamps are deployment-side; runs are triggered in-deployment, so the CI runner and api.vercel.com sit outside every measured window. TTFS = start() → first step body (includes dispatch + any cold start); Fan-out TTFS/TTLS = first/last step completion of one Promise.all from the same anchor (the gap is the runtime’s fan-out spread); STSO/WO between step bodies; CRTT inside the workflow (excludes the api.vercel.com read path).

Cold starts stay in the numbers (real bursty-workload latency, inflates P75+); Best is the warm floor.

@NathanColosimo
NathanColosimo force-pushed the codex/replay-prune-runtime-graph branch from 8edf496 to 35bea10 Compare August 14, 2026 21:06

@VaguelySerious VaguelySerious left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI review: no blocking issues

}
});

it('does not bundle world schemas into a workflow without schemas', async () => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI Review: Note

The guard builds a workflow with no imports at all, which is the one shape that can't regress for the interesting reason. I built workbench/example on this branch and on the merge base to check the claim against a real app:

marker in the VM bundle base this PR
bundle chars 1,346,292 1,300,002
EventTypeSchema 25 0
SerializedDataSchema 25 0
WorkflowInvokePayloadSchema 2 0
AttributeChangesSchema 2 0
workflowRunIdSchema 1 0
_zod 478 478

So the World-schema pruning does hold on a real app, including one that uses attributes, hooks and steps. But zod itself is unchanged there, because that app's own workflow file pulls it in through an agent/tool schema. Worth saying in the PR body and changeset that "Zod modules in the VM bundle: 77 → 0" applies to workflows that don't import zod themselves; any workflow with a zod tool schema keeps the whole library. The p50 evaluation number will read as universal otherwise.

A second case in this file driving a workflow that imports from workflow (attributes + hook + step) would pin the part that can actually regress: a value import creeping back into a VM-reachable module.

AttributeChangesSchema,
AttributeKeySchema,
AttributeValidationError,
AttributeValueSchema,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI Review: Note

This drops four exported values (validateAttributeKey, validateAttributeValue, EVENT_DATA_PAYLOAD_FIELD_BY_EVENT_TYPE, EVENT_DATA_REF_FIELDS) and two exported types (AttributeValidationContext, AttributeKeyValidationOptions) from a published package under a patch changeset.

I checked and found no consumers: nothing in this repo outside the moved definitions, and nothing in the server, dashboard, API or queue-service repos imports them. So patch is defensible. Flagging it only so the removal is a decision rather than a side effect of the file split.

}
}

function attributeCountDelta(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI Review: Note

attributeCountDelta returns 0 for a null value when existingKeys is undefined. The old code did netDeletes += 1 in that branch, so a delete used to offset an add even when nothing was known to exist. Your new test ("does not let an unknown deletion offset a new attribute") pins the new behavior and I agree it's the correct one.

It is a semantic change to a validation function callers can hit, though, so "This changes dependency boundaries only; workflow behavior and serialized formats are unchanged" in the description isn't quite accurate. A batch of 65 sets plus one delete used to pass without existingKeys and now throws. Worth one line in the changeset.

I convinced myself the read path is safe: AttributeChangesSchema now runs the batch constraints when parsing an attr_set event, but with existingKeys undefined the count check is strictly looser than the write-time one, and the schema deliberately allows reserved $ keys, so $rootRunId / $parentRunId events still parse. Good call keeping the reserved-namespace rule out of the schema.

return event.eventType === 'noop';
}

/** Groups events that are mutually exclusive outcomes for one entity. */

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI Review: Nit

Two things on this move:

  1. The rationale on ENTITY_EVENT_CLASS_BY_TYPE collapsed from ~20 lines to one. The dropped part is the bit that's hard to reconstruct: why hook_received, hook_conflict, attr_set, run_created and the terminal run types are deliberately absent, and specifically that an entry for the terminal run types could never match because no consumer takes them. That is the kind of note someone will otherwise re-derive from an incident. Please carry it over.

  2. getOwnProperty fixes a live bug worth naming in the changeset: EVENT_DATA_REF_FIELDS was built with Object.fromEntries, so getEventDataRefFields('constructor') returned Object rather than falling through to [], and entityEventClass('toString') returned a function. Your new test covers both. That is user-visible for odd eventType values, not just a refactor.

Also packages/world-vercel/src/events.ts:237 still refers readers to "the warning on EVENT_DATA_PAYLOAD_FIELD_BY_EVENT_TYPE", which no longer exists under that name.

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.

2 participants