') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); })(); Enable sequential replays by default by VaguelySerious · Pull Request #3229 · vercel/workflow · GitHub
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-botBot 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
NameType
@workflow/world-vercelMinor
@workflow/buildersMinor
@workflow/nitroMinor
@workflow/worldMinor
@workflow/coreMinor
workflowMinor
@workflow/cliPatch
@workflow/webPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/nextPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/vitestPatch
@workflow/nuxtPatch
@workflow/web-sharedPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/world-testingPatch

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

vercelBot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
example-nextjs-workflow-turbopackReadyReadyPreviewJul 30, 2026 10:59pm
example-nextjs-workflow-webpackReadyReadyPreviewJul 30, 2026 10:59pm
example-workflowReadyReadyPreviewJul 30, 2026 10:59pm
workbench-astro-workflowReadyReadyPreviewJul 30, 2026 10:59pm
workbench-express-workflowReadyReadyPreviewJul 30, 2026 10:59pm
workbench-fastify-workflowReadyReadyPreviewJul 30, 2026 10:59pm
workbench-hono-workflowReadyReadyPreviewJul 30, 2026 10:59pm
workbench-nestjs-workflowReadyReadyPreviewJul 30, 2026 10:59pm
workbench-nitro-workflowReadyReadyPreviewJul 30, 2026 10:59pm
workbench-nuxt-workflowReadyReadyPreviewJul 30, 2026 10:59pm
workbench-sveltekit-workflowReadyReadyPreviewJul 30, 2026 10:59pm
workbench-tanstack-start-workflowReadyReadyPreviewJul 30, 2026 10:59pm
workbench-vite-workflowReadyReadyPreviewJul 30, 2026 10:59pm
workflow-docsReadyReadyPreview, v0Jul 30, 2026 10:59pm
workflow-swc-playgroundReadyReadyPreviewJul 30, 2026 10:59pm
workflow-tarballsReadyReadyPreviewJul 30, 2026 10:59pm
workflow-webReadyReadyPreviewJul 30, 2026 10:59pm

@github-actions

github-actionsBot 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

MetricScenarioBest (ms)P75 (ms)P90 (ms)P99 (ms)Samples
TTFSstep1164 (+15%) 🔻1516 🔴 (+34%) 🔻1615 🔴 (+39%) 🔻1668 🔴 (+32%) 🔻30
TTFSstream500 (+144%) 🔻1592 🔴 (+45%) 🔻1652 🔴 (+46%) 🔻1697 🔴 (+4.6%)30
TTFShook + stream942 (-29%) 💚2335 🔴 (+63%) 🔻2423 🔴 (+66%) 🔻3612 🔴 (+120%) 🔻30
STSO1020 steps (inline)165 (-10%)495 (-4.6%)543 (-5.6%)899 (+11%)1019
WO1020 steps414557 (-8.1%)414557 (-8.1%)414557 (-8.1%)414557 (-8.1%)1
SLstream latency97 (-13%)147 🔴 (-11%)187 🔴 (-11%)347 🔴 (-11%)30
SOstream overhead (text)93 (-30%) 💚159 (-44%) 💚173 (-65%) 💚216 (-92%) 💚30
SOstream 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

MetricScenarioBest (ms)P75 (ms)P90 (ms)P99 (ms)Samples
TTFSstep560 (+167%) 🔻1489 🔴 (+41%) 🔻1526 🔴 (+41%) 🔻1575 🔴 (+29%) 🔻30
TTFSstream446 (+66%) 🔻1432 🔴 (+33%) 🔻1448 🔴 (+32%) 🔻1519 🔴 (+29%) 🔻30
TTFShook + stream1339 (+254%) 🔻1752 🔴 (+40%) 🔻1771 🔴 (+37%) 🔻1789 🔴 (+14%)30
STSO1020 steps (inline)188 (+5.6%)466 (-3.1%)514 (-3.9%)704 (+2.9%)1019
WO1020 steps400020 (-3.9%)400020 (-3.9%)400020 (-3.9%)400020 (-3.9%)1
SLstream latency91 (+12%)154 🔴 (+4.8%)211 🔴 (+15%) 🔻3670 🔴 (+922%) 🔻30
SOstream overhead (text)116 (-7.2%)229 (+4.6%)306 (+22%) 🔻371 (-14%)30
SOstream 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-actionsBot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

E2E Test Summary

Summary
PassedFailedSkippedTotal
✅ ▲ Vercel Production145502391694
✅ 💻 Local Development162102271848
✅ 📦 Local Production162102271848
✅ 🐘 Local Postgres162102271848
✅ 🪟 Windows15400154
✅ 📋 Other102002121232
✅ vercel-multi-region270027
Total7519011328651
Details by Category

✅ ▲ Vercel Production

AppPassedFailedSkipped
✅ astro126028
✅ example126028
✅ express126028
✅ fastify126028
✅ hono126028
✅ nextjs-turbopack15103
✅ nextjs-webpack15103
✅ nitro126028
✅ nuxt126028
✅ sveltekit14509
✅ vite126028

✅ 💻 Local Development

AppPassedFailedSkipped
✅ astro-stable128026
✅ express-stable128026
✅ fastify-stable128026
✅ hono-stable128026
✅ nextjs-turbopack-canary135019
✅ nextjs-turbopack-stable15400
✅ nextjs-webpack-canary135019
✅ nextjs-webpack-stable15400
✅ nitro-stable128026
✅ nuxt-stable128026
✅ sveltekit-stable14707
✅ vite-stable128026

✅ 📦 Local Production

AppPassedFailedSkipped
✅ astro-stable128026
✅ express-stable128026
✅ fastify-stable128026
✅ hono-stable128026
✅ nextjs-turbopack-canary135019
✅ nextjs-turbopack-stable15400
✅ nextjs-webpack-canary135019
✅ nextjs-webpack-stable15400
✅ nitro-stable128026
✅ nuxt-stable128026
✅ sveltekit-stable14707
✅ vite-stable128026

✅ 🐘 Local Postgres

AppPassedFailedSkipped
✅ astro-stable128026
✅ express-stable128026
✅ fastify-stable128026
✅ hono-stable128026
✅ nextjs-turbopack-canary135019
✅ nextjs-turbopack-stable15400
✅ nextjs-webpack-canary135019
✅ nextjs-webpack-stable15400
✅ nitro-stable128026
✅ nuxt-stable128026
✅ sveltekit-stable14707
✅ vite-stable128026

✅ 🪟 Windows

AppPassedFailedSkipped
✅ nextjs-turbopack15400

✅ 📋 Other

AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable128026
✅ e2e-local-dev-tanstack-start-128026
✅ e2e-local-postgres-nest-stable128026
✅ e2e-local-postgres-tanstack-start-128026
✅ e2e-local-prod-nest-stable128026
✅ e2e-local-prod-tanstack-start-128026
✅ e2e-vercel-prod-nest126028
✅ e2e-vercel-prod-tanstack-start126028

✅ vercel-multi-region

AppPassedFailedSkipped
✅ nextjs-turbopack2700

📋 View full workflow run

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

github-actionsBot 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

Metric2026-07-30 22:02 UTC #1
logs / deploy
2026-07-30 23:40 UTC #1
logs / deploy
Result632/1400 regressions559/1400 regressions (+94 infra)
Total14001400
completed768747
CORRUPTED_EVENT_LOG627553
USER_ERROR00
RUNTIME_ERROR00
stuck56
other00
infra094
Config1400 runs / step-storm 600, hook-storm 600, hook-sleep 200 / c40 / 6x81400 runs / step-storm 600, hook-storm 600, hook-sleep 200 / c40 / 6x8
Timingwatchdog 2500ms / step 2200±250ms / stagger 400ms / poke 750ms / timeout 240000mswatchdog 2500ms / step 2200±250ms / stagger 400ms / poke 750ms / timeout 240000ms

Latest Scenario Breakdown

ScenarioTotalcompletedCORRUPTED_EVENT_LOGUSER_ERRORRUNTIME_ERRORstuckotherinfra
step-storm60047412600000
hook-storm60073427006094
hook-sleep200200000000

Latest Non-Completed Runs

ScenarioAttemptOutcomeStatusError codeRun
step-storm9CORRUPTED_EVENT_LOGfailedCORRUPTED_EVENT_LOGwrun_41KYTKXGAF0GKYK9780XB7PJG6
step-storm3CORRUPTED_EVENT_LOGfailedCORRUPTED_EVENT_LOGwrun_41KYTKXG9H0GXF0530F0GWXSMX
step-storm6CORRUPTED_EVENT_LOGfailedCORRUPTED_EVENT_LOGwrun_41KYTKXG970GKR1KZ1Q5WNRM2P
step-storm2CORRUPTED_EVENT_LOGfailedCORRUPTED_EVENT_LOGwrun_41KYTKXG730GRP3ZKVWC3GEAH8
step-storm17CORRUPTED_EVENT_LOGfailedCORRUPTED_EVENT_LOGwrun_41KYTKXGD50GVTVGQBRVDBXHG3
step-storm38CORRUPTED_EVENT_LOGfailedCORRUPTED_EVENT_LOGwrun_41KYTKXGRH0GRTQT446GJMRA3S
step-storm1CORRUPTED_EVENT_LOGfailedCORRUPTED_EVENT_LOGwrun_41KYTKXG710GVS0SWHMNTD9AFV
step-storm7CORRUPTED_EVENT_LOGfailedCORRUPTED_EVENT_LOGwrun_41KYTKXG8V0GW9AWT31H26V2V6
step-storm54CORRUPTED_EVENT_LOGfailedCORRUPTED_EVENT_LOGwrun_41KYTM04500GWRRKWCPR8BQ40A
step-storm46CORRUPTED_EVENT_LOGfailedCORRUPTED_EVENT_LOGwrun_41KYTKZESX0GKF4DEAW8MXYTP0
step-storm49CORRUPTED_EVENT_LOGfailedCORRUPTED_EVENT_LOGwrun_41KYTM020W0GWJFCVD7HYJN5FZ
step-storm76CORRUPTED_EVENT_LOGfailedCORRUPTED_EVENT_LOGwrun_41KYTM0H940GH0ZG2QVTABES9Q
step-storm79CORRUPTED_EVENT_LOGfailedCORRUPTED_EVENT_LOGwrun_41KYTM0MHY0GTWATK5PQ4CCGEK
step-storm58CORRUPTED_EVENT_LOGfailedCORRUPTED_EVENT_LOGwrun_41KYTM06NK0GN8FBP9B6H2AR3F
step-storm64CORRUPTED_EVENT_LOGfailedCORRUPTED_EVENT_LOGwrun_41KYTM0AN00GZ0W65PQ2D381F0
step-storm51CORRUPTED_EVENT_LOGfailedCORRUPTED_EVENT_LOGwrun_41KYTM03TS0GJ3JPXRPTHAQ10A
step-storm65CORRUPTED_EVENT_LOGfailedCORRUPTED_EVENT_LOGwrun_41KYTM0AWK0GVRGAK4YRZ69P85
step-storm66CORRUPTED_EVENT_LOGfailedCORRUPTED_EVENT_LOGwrun_41KYTM0AX30GYK3BGAVYNW4SW1
step-storm74CORRUPTED_EVENT_LOGfailedCORRUPTED_EVENT_LOGwrun_41KYTM0F9R0GZEQGE8DC5D5PA2
step-storm95CORRUPTED_EVENT_LOGfailedCORRUPTED_EVENT_LOGwrun_41KYTM2GBB0GM3CR9B4MBQH9BD

Showing 20 of 653 non-completed runs.

@vercelvercelBot 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 threadpackages/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 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.

1 participant

@VaguelySerious