Skip to content

Enable sequential replays by default - #3229

Draft
VaguelySerious wants to merge 3 commits into
mainfrom
peter/seq-replay-test
Draft

Enable sequential replays by default#3229
VaguelySerious wants to merge 3 commits into
mainfrom
peter/seq-replay-test

Conversation

@VaguelySerious

Copy link
Copy Markdown
Member

No description provided.

Signed-off-by: Peter Wielander <peter.wielander@vercel.com>
@changeset-bot

changeset-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f39f9be

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

This PR includes changesets to release 20 packages
Name Type
@workflow/world-vercel Minor
@workflow/builders Minor
@workflow/nitro Minor
@workflow/world Minor
@workflow/core Minor
workflow Minor
@workflow/cli Patch
@workflow/web Patch
@workflow/astro Patch
@workflow/nest Patch
@workflow/next Patch
@workflow/rollup Patch
@workflow/sveltekit Patch
@workflow/vite Patch
@workflow/vitest Patch
@workflow/nuxt Patch
@workflow/web-shared Patch
@workflow/world-local Patch
@workflow/world-postgres Patch
@workflow/world-testing 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 Jul 30, 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 Jul 30, 2026 10:59pm
example-nextjs-workflow-webpack Ready Ready Preview Jul 30, 2026 10:59pm
example-workflow Ready Ready Preview Jul 30, 2026 10:59pm
workbench-astro-workflow Ready Ready Preview Jul 30, 2026 10:59pm
workbench-express-workflow Ready Ready Preview Jul 30, 2026 10:59pm
workbench-fastify-workflow Ready Ready Preview Jul 30, 2026 10:59pm
workbench-hono-workflow Ready Ready Preview Jul 30, 2026 10:59pm
workbench-nestjs-workflow Ready Ready Preview Jul 30, 2026 10:59pm
workbench-nitro-workflow Ready Ready Preview Jul 30, 2026 10:59pm
workbench-nuxt-workflow Ready Ready Preview Jul 30, 2026 10:59pm
workbench-sveltekit-workflow Ready Ready Preview Jul 30, 2026 10:59pm
workbench-tanstack-start-workflow Ready Ready Preview Jul 30, 2026 10:59pm
workbench-vite-workflow Ready Ready Preview Jul 30, 2026 10:59pm
workflow-docs Ready Ready Preview, v0 Jul 30, 2026 10:59pm
workflow-swc-playground Ready Ready Preview Jul 30, 2026 10:59pm
workflow-tarballs Ready Ready Preview Jul 30, 2026 10:59pm
workflow-web Ready Ready Preview Jul 30, 2026 10:59pm

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

📊 Workflow Benchmarks

commit f39f9be · Thu, 30 Jul 2026 23:17:53 GMT · run logs

Backend: vercel · app: nextjs-turbopack

Metric Scenario Best (ms) P75 (ms) P90 (ms) P99 (ms) Samples
TTFS step 1164 (+15%) 🔻 1516 🔴 (+34%) 🔻 1615 🔴 (+39%) 🔻 1668 🔴 (+32%) 🔻 30
TTFS stream 500 (+144%) 🔻 1592 🔴 (+45%) 🔻 1652 🔴 (+46%) 🔻 1697 🔴 (+4.6%) 30
TTFS hook + stream 942 (-29%) 💚 2335 🔴 (+63%) 🔻 2423 🔴 (+66%) 🔻 3612 🔴 (+120%) 🔻 30
STSO 1020 steps (inline) 165 (-10%) 495 (-4.6%) 543 (-5.6%) 899 (+11%) 1019
WO 1020 steps 414557 (-8.1%) 414557 (-8.1%) 414557 (-8.1%) 414557 (-8.1%) 1
SL stream latency 97 (-13%) 147 🔴 (-11%) 187 🔴 (-11%) 347 🔴 (-11%) 30
SO stream overhead (text) 93 (-30%) 💚 159 (-44%) 💚 173 (-65%) 💚 216 (-92%) 💚 30
SO stream overhead (structured) 103 (-22%) 💚 150 (-46%) 💚 167 (-57%) 💚 644 (-58%) 💚 30
📈 STSO distribution vs main (inline / queue-hop histograms)

1020 steps (inline)

Cumulative STSO time: main 440353ms → this run 412969ms (Δ -27384ms, -6%)

  150-200 ms  █░┃                       main   2  this  25   +23
  200-250 ms  ████████░░┃               main  63  this  81   +18
  250-300 ms  ███████████████░┃         main 117  this 132   +15
  300-350 ms  █████████████████░░░░░░┃  main 129  this 185   +56
  350-400 ms  ██████████████████░░┃     main 142  this 161   +19
  400-450 ms  ██████████┃█████          main 125  this  88   -37
  450-500 ms  █████████████┃███         main 130  this 106   -24
  500-550 ms  ███████████████████┃█     main 163  this 156    -7
  550-600 ms  ████┃█████                main  74  this  36   -38
  600-650 ms  ██┃█                      main  29  this  21    -8
  650-700 ms  ┃█                        main  14  this   5    -9
  700-750 ms  ┃█                        main  12  this   3    -9
  750-800 ms  ┃                         main   5  this   5    +0
  800-850 ms  ┃                         main   2  this   4    +2
  850-900 ms  ┃                         main   1  this   1    +0
  900-950 ms  ┃                         main   0  this   1    +1
 950-1000 ms  ┃                         main   1  this   0    -1
1000-1050 ms  ┃                         main   0  this   1    +1
1100-1150 ms  ┃                         main   1  this   1    +0
1150-1200 ms  ┃                         main   1  this   1    +0
1200-1250 ms  ┃                         main   1  this   1    +0
1300-1350 ms  ┃                         main   2  this   1    -1
1600-1650 ms  ┃                         main   0  this   1    +1
2000-2050 ms  ┃                         main   0  this   1    +1
2050-2100 ms  ┃                         main   1  this   0    -1
3100-3150 ms  ┃                         main   0  this   1    +1
3450-3500 ms  ┃                         main   0  this   1    +1
3650-3700 ms  ┃                         main   1  this   0    -1
📜 Previous results (1)

ef49836

Thu, 30 Jul 2026 21:40:56 GMT · run logs

vercel / nextjs-turbopack

Metric Scenario Best (ms) P75 (ms) P90 (ms) P99 (ms) Samples
TTFS step 560 (+167%) 🔻 1489 🔴 (+41%) 🔻 1526 🔴 (+41%) 🔻 1575 🔴 (+29%) 🔻 30
TTFS stream 446 (+66%) 🔻 1432 🔴 (+33%) 🔻 1448 🔴 (+32%) 🔻 1519 🔴 (+29%) 🔻 30
TTFS hook + stream 1339 (+254%) 🔻 1752 🔴 (+40%) 🔻 1771 🔴 (+37%) 🔻 1789 🔴 (+14%) 30
STSO 1020 steps (inline) 188 (+5.6%) 466 (-3.1%) 514 (-3.9%) 704 (+2.9%) 1019
WO 1020 steps 400020 (-3.9%) 400020 (-3.9%) 400020 (-3.9%) 400020 (-3.9%) 1
SL stream latency 91 (+12%) 154 🔴 (+4.8%) 211 🔴 (+15%) 🔻 3670 🔴 (+922%) 🔻 30
SO stream overhead (text) 116 (-7.2%) 229 (+4.6%) 306 (+22%) 🔻 371 (-14%) 30
SO stream overhead (structured) 114 (-1.7%) 186 (-19%) 💚 214 (-29%) 💚 3615 🔴 (+872%) 🔻 30
ℹ️ Metric definitions & methodology

The collapsed STSO distribution section above buckets every step gap of the sequential-steps run (not a sampled window), split by whether the step ending the gap ran inline — in the same warm process as the step before it, so the gap is pure framework overhead — or after a queue-hop — the first step of a fresh process, which pays queue dispatch, client reinit and event-log replay. Bars overlay the two runs: is main, marks where this run lands, bridges the gap when this run has more samples in a bucket.

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, deployment clocks) · STSO: step-to-step overhead (gap between consecutive step bodies) · WO: workflow overhead (whole-run time outside step bodies, in-deployment anchored) · SL: stream latency (in-deployment write → read propagation, readAt - writtenAt) · SO: stream overhead (end-to-end write+consume time beyond the modelled generation window)

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 · stream latency: parallel reader/writer steps on a dedicated stream; SL is the in-deployment write->read propagation (readAt - writtenAt) · stream overhead (text): writer streams 300 variable-length text token deltas paced at 100/s for 3s (a haiku-size LLM's token throughput) while a parallel reader drains the whole stream; SO is the end-to-end write+consume time beyond the 3s generation window (overhead/backpressure) · stream overhead (structured): same workload as stream overhead (text), but each delta is an AI-SDK-style structured object ({ type: 'text-delta', id, text }) instead of a raw string, so the SO gap vs the text scenario is the added serialization cost

🔴 marks a percentile over its target (within target is left unmarked). Targets (p75/p90/p99, ms) — TTFS 200/300/600 · SL 50/60/125 · SO 250/500/1000

All metrics are measured from deployment-side timestamps only. Runs are triggered by an in-deployment route that stamps the anchor (clientStart) right before start(), so the CI runner’s request and its path through api.vercel.com sit outside every measured window. TTFS = in-deployment start() → first step body (turbo uses the in-process fast path, non-turbo the dispatch path), and includes the VQS dispatch hop plus any /flow cold start. STSO/WO are measured between step bodies on the deployment. SL is measured inside the workflow (parallel reader/writer steps), so it no longer includes the api.vercel.com read path.

Cold starts are kept in the numbers on purpose — they are part of real bursty-workload latency. The workbench deployment cold-starts the /flow invocation for a large fraction of runs, inflating P75+; the Best column shows the fastest (warm-start) sample for comparison.

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

E2E Test Summary

Summary
Passed Failed Skipped Total
✅ ▲ Vercel Production 1455 0 239 1694
✅ 💻 Local Development 1621 0 227 1848
✅ 📦 Local Production 1621 0 227 1848
✅ 🐘 Local Postgres 1621 0 227 1848
✅ 🪟 Windows 154 0 0 154
✅ 📋 Other 1020 0 212 1232
✅ vercel-multi-region 27 0 0 27
Total 7519 0 1132 8651
Details by Category

✅ ▲ Vercel Production

App Passed Failed Skipped
✅ astro 126 0 28
✅ example 126 0 28
✅ express 126 0 28
✅ fastify 126 0 28
✅ hono 126 0 28
✅ nextjs-turbopack 151 0 3
✅ nextjs-webpack 151 0 3
✅ nitro 126 0 28
✅ nuxt 126 0 28
✅ sveltekit 145 0 9
✅ vite 126 0 28

✅ 💻 Local Development

App Passed Failed Skipped
✅ astro-stable 128 0 26
✅ express-stable 128 0 26
✅ fastify-stable 128 0 26
✅ hono-stable 128 0 26
✅ nextjs-turbopack-canary 135 0 19
✅ nextjs-turbopack-stable 154 0 0
✅ nextjs-webpack-canary 135 0 19
✅ nextjs-webpack-stable 154 0 0
✅ nitro-stable 128 0 26
✅ nuxt-stable 128 0 26
✅ sveltekit-stable 147 0 7
✅ vite-stable 128 0 26

✅ 📦 Local Production

App Passed Failed Skipped
✅ astro-stable 128 0 26
✅ express-stable 128 0 26
✅ fastify-stable 128 0 26
✅ hono-stable 128 0 26
✅ nextjs-turbopack-canary 135 0 19
✅ nextjs-turbopack-stable 154 0 0
✅ nextjs-webpack-canary 135 0 19
✅ nextjs-webpack-stable 154 0 0
✅ nitro-stable 128 0 26
✅ nuxt-stable 128 0 26
✅ sveltekit-stable 147 0 7
✅ vite-stable 128 0 26

✅ 🐘 Local Postgres

App Passed Failed Skipped
✅ astro-stable 128 0 26
✅ express-stable 128 0 26
✅ fastify-stable 128 0 26
✅ hono-stable 128 0 26
✅ nextjs-turbopack-canary 135 0 19
✅ nextjs-turbopack-stable 154 0 0
✅ nextjs-webpack-canary 135 0 19
✅ nextjs-webpack-stable 154 0 0
✅ nitro-stable 128 0 26
✅ nuxt-stable 128 0 26
✅ sveltekit-stable 147 0 7
✅ vite-stable 128 0 26

✅ 🪟 Windows

App Passed Failed Skipped
✅ nextjs-turbopack 154 0 0

✅ 📋 Other

App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 128 0 26
✅ e2e-local-dev-tanstack-start- 128 0 26
✅ e2e-local-postgres-nest-stable 128 0 26
✅ e2e-local-postgres-tanstack-start- 128 0 26
✅ e2e-local-prod-nest-stable 128 0 26
✅ e2e-local-prod-tanstack-start- 128 0 26
✅ e2e-vercel-prod-nest 126 0 28
✅ e2e-vercel-prod-tanstack-start 126 0 28

✅ vercel-multi-region

App Passed Failed Skipped
✅ nextjs-turbopack 27 0 0

📋 View full workflow run

Signed-off-by: Peter Wielander <peter.wielander@vercel.com>
@VaguelySerious VaguelySerious added the event-log-race-repro Run the event log race reproduction job label Jul 30, 2026
@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Event Log Race Repro

559 of 1400 latest repro runs hit event-log regressions. 94 runs hit harness-side infra outcomes (hook-resume timing races / transport errors); these are reported but do not fail the job.

Run History

Metric 2026-07-30 22:02 UTC #1
logs / deploy
2026-07-30 23:40 UTC #1
logs / deploy
Result 632/1400 regressions 559/1400 regressions (+94 infra)
Total 1400 1400
completed 768 747
CORRUPTED_EVENT_LOG 627 553
USER_ERROR 0 0
RUNTIME_ERROR 0 0
stuck 5 6
other 0 0
infra 0 94
Config 1400 runs / step-storm 600, hook-storm 600, hook-sleep 200 / c40 / 6x8 1400 runs / step-storm 600, hook-storm 600, hook-sleep 200 / c40 / 6x8
Timing watchdog 2500ms / step 2200±250ms / stagger 400ms / poke 750ms / timeout 240000ms watchdog 2500ms / step 2200±250ms / stagger 400ms / poke 750ms / timeout 240000ms

Latest Scenario Breakdown

Scenario Total completed CORRUPTED_EVENT_LOG USER_ERROR RUNTIME_ERROR stuck other infra
step-storm 600 474 126 0 0 0 0 0
hook-storm 600 73 427 0 0 6 0 94
hook-sleep 200 200 0 0 0 0 0 0

Latest Non-Completed Runs

Scenario Attempt Outcome Status Error code Run
step-storm 9 CORRUPTED_EVENT_LOG failed CORRUPTED_EVENT_LOG wrun_41KYTKXGAF0GKYK9780XB7PJG6
step-storm 3 CORRUPTED_EVENT_LOG failed CORRUPTED_EVENT_LOG wrun_41KYTKXG9H0GXF0530F0GWXSMX
step-storm 6 CORRUPTED_EVENT_LOG failed CORRUPTED_EVENT_LOG wrun_41KYTKXG970GKR1KZ1Q5WNRM2P
step-storm 2 CORRUPTED_EVENT_LOG failed CORRUPTED_EVENT_LOG wrun_41KYTKXG730GRP3ZKVWC3GEAH8
step-storm 17 CORRUPTED_EVENT_LOG failed CORRUPTED_EVENT_LOG wrun_41KYTKXGD50GVTVGQBRVDBXHG3
step-storm 38 CORRUPTED_EVENT_LOG failed CORRUPTED_EVENT_LOG wrun_41KYTKXGRH0GRTQT446GJMRA3S
step-storm 1 CORRUPTED_EVENT_LOG failed CORRUPTED_EVENT_LOG wrun_41KYTKXG710GVS0SWHMNTD9AFV
step-storm 7 CORRUPTED_EVENT_LOG failed CORRUPTED_EVENT_LOG wrun_41KYTKXG8V0GW9AWT31H26V2V6
step-storm 54 CORRUPTED_EVENT_LOG failed CORRUPTED_EVENT_LOG wrun_41KYTM04500GWRRKWCPR8BQ40A
step-storm 46 CORRUPTED_EVENT_LOG failed CORRUPTED_EVENT_LOG wrun_41KYTKZESX0GKF4DEAW8MXYTP0
step-storm 49 CORRUPTED_EVENT_LOG failed CORRUPTED_EVENT_LOG wrun_41KYTM020W0GWJFCVD7HYJN5FZ
step-storm 76 CORRUPTED_EVENT_LOG failed CORRUPTED_EVENT_LOG wrun_41KYTM0H940GH0ZG2QVTABES9Q
step-storm 79 CORRUPTED_EVENT_LOG failed CORRUPTED_EVENT_LOG wrun_41KYTM0MHY0GTWATK5PQ4CCGEK
step-storm 58 CORRUPTED_EVENT_LOG failed CORRUPTED_EVENT_LOG wrun_41KYTM06NK0GN8FBP9B6H2AR3F
step-storm 64 CORRUPTED_EVENT_LOG failed CORRUPTED_EVENT_LOG wrun_41KYTM0AN00GZ0W65PQ2D381F0
step-storm 51 CORRUPTED_EVENT_LOG failed CORRUPTED_EVENT_LOG wrun_41KYTM03TS0GJ3JPXRPTHAQ10A
step-storm 65 CORRUPTED_EVENT_LOG failed CORRUPTED_EVENT_LOG wrun_41KYTM0AWK0GVRGAK4YRZ69P85
step-storm 66 CORRUPTED_EVENT_LOG failed CORRUPTED_EVENT_LOG wrun_41KYTM0AX30GYK3BGAVYNW4SW1
step-storm 74 CORRUPTED_EVENT_LOG failed CORRUPTED_EVENT_LOG wrun_41KYTM0F9R0GZEQGE8DC5D5PA2
step-storm 95 CORRUPTED_EVENT_LOG failed CORRUPTED_EVENT_LOG wrun_41KYTM2GBB0GM3CR9B4MBQH9BD

Showing 20 of 653 non-completed runs.

@vercel vercel Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Additional Suggestion:

Two tests in packages/builders/src/constants.test.ts assert the old off-by-default maxConcurrency behavior and fail under the new default-on isSequentialReplaysEnabled() semantics.

Fix on Vercel

Comment thread packages/builders/src/constants.ts Outdated
With sequential replays on, a run's continuations share one
`maxConcurrency: 1` topic. An inline step body holds the invocation's
queue message — and therefore the run's only slot — until it finishes,
so a wait continuation, hook resume or `wakeUpRun` for that run cannot
be delivered: a timer can never preempt a step, and
`Promise.race(step, sleep())` always observes the step winning.

Worlds now declare `capabilities.serializedRunContinuations`; when a
run continuation suspends with a wait or hook armed (or one still open
in the log), the runtime passes `allowInlineSteps: false` so every step
gets its eager `step_created` and is queued instead. Pure step chains,
turbo's hot path, and per-step-topic deliveries keep inline execution.

Also point @workflow/nitro at `getWorkflowQueueTrigger()` so its flow
trigger carries the matching `maxConcurrency`.

Signed-off-by: Peter Wielander <peter.wielander@vercel.com>
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.

1 participant