Skip to content

Override timeout functions in workflow VM context to throw helpful errors - #505

Merged
TooTallNate merged 6 commits into
mainfrom
copilot/override-timeout-functions-error
Dec 13, 2025
Merged

Override timeout functions in workflow VM context to throw helpful errors#505
TooTallNate merged 6 commits into
mainfrom
copilot/override-timeout-functions-error

Conversation

CopilotAI commented Dec 2, 2025

Copy link
Copy Markdown
Contributor
  • Add new error slug TIMEOUT_FUNCTIONS_IN_WORKFLOW to @workflow/errors package
  • Override setTimeout, setInterval, clearTimeout, clearInterval, setImmediate, and clearImmediate in the workflow VM context (packages/core/src/workflow.ts)
  • Each override throws a helpful error suggesting to use sleep() for timing needs
  • Add unit tests for the new overrides in packages/core/src/workflow.test.ts
  • Build and test changes
  • Create changeset
  • Run code review (1 nitpick about test duplication - kept to match existing style)
  • Run CodeQL security check (no issues found)
  • Use WorkflowRuntimeError class instead of vmGlobalThis.Error for proper logging (per PR feedback)
  • Add documentation page for timeout-in-workflow error (per PR feedback)
  • Merge latest main into PR (per PR feedback)
  • Reorder unavailable functions list in docs (per PR feedback)

View original Slack conversation


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

CopilotAI self-assigned this Dec 2, 2025
@changeset-bot

changeset-botBot commented Dec 2, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 68d3ba5

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

This PR includes changesets to release 16 packages
NameType
@workflow/errorsPatch
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/world-vercelPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/astroPatch
@workflow/sveltekitPatch
@workflow/world-testingPatch
@workflow/aiPatch
@workflow/nuxtPatch

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 Dec 2, 2025

Copy link
Copy Markdown
Contributor

@TooTallNateSlack

Copy link
Copy Markdown
Member

@copilot yeah i thought about this while back. we could provide a helpful message to suggest using sleep as well^
I really want to bring back the interleaved thinking/reasoning here. maybe it's not supported with gpt 5.1? demo looks way nicer with those thinking tokens in the UI instead of back to back tool calls
lemme see if i can add this rn
Detect usage of the global timeout functions (setTimeout(), etc.) when used in a workflow function context at build time (in the esbuild plugin?) and cause that to fail the build, similar to how we do when Node.js module usage is detected

…rors
Co-authored-by: TooTallNate <71256+TooTallNate@users.noreply.github.com>
@pranaygp
pranaygp marked this pull request as ready for review December 9, 2025 00:07
CopilotAI review requested due to automatic review settings December 9, 2025 00:07
@github-actions

github-actionsBot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.038s (-1.0%)1.014s (~)0.976s101.00x
💻 LocalNext.js (Turbopack)0.040s (+2.3%)1.017s (~)0.978s101.03x
🌐 RedisNext.js (Turbopack)0.041s (~)1.017s (~)0.976s101.06x
💻 LocalExpress0.043s (-4.6%)1.007s (~)0.964s101.13x
💻 LocalNitro0.044s (+51.0% 🔺)1.007s (~)0.963s101.15x
🌐 TursoNext.js (Turbopack)0.055s (-49.4% 🟢)1.014s (~)0.959s101.42x
🌐 MongoDBNext.js (Turbopack)0.070s (-37.2% 🟢)1.014s (~)0.944s101.81x
🐘 PostgresNext.js (Turbopack)0.151s (-5.9% 🟢)1.023s (~)0.872s103.91x
🐘 PostgresExpress0.252s (-29.6% 🟢)1.033s (-0.5%)0.781s106.55x
🐘 PostgresNitro0.306s (+6.3% 🔺)1.012s (~)0.705s107.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.505s (-25.0% 🟢)1.560s (+4.0%)1.054s101.00x
▲ VercelExpress0.545s (-10.0% 🟢)1.441s (-9.3% 🟢)0.896s101.08x
▲ VercelNext.js (Turbopack)0.621s (-15.8% 🟢)1.683s (-4.9%)1.062s101.23x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.094s (+0.5%)2.012s (~)0.918s101.00x
🌐 StarterNext.js (Turbopack)1.095s (+0.5%)2.010s (~)0.915s101.00x
🌐 RedisNext.js (Turbopack)1.100s (~)2.013s (~)0.912s101.01x
💻 LocalExpress1.112s (~)2.007s (~)0.895s101.02x
💻 LocalNitro1.116s (+3.8%)2.007s (~)0.891s101.02x
🌐 MongoDBNext.js (Turbopack)1.265s (-2.8%)2.014s (~)0.749s101.16x
🌐 TursoNext.js (Turbopack)1.278s (-2.0%)2.012s (~)0.734s101.17x
🐘 PostgresNitro2.166s (+1.5%)3.014s (~)0.848s101.98x
🐘 PostgresExpress2.362s (-3.2%)3.015s (~)0.653s102.16x
🐘 PostgresNext.js (Turbopack)2.445s (+23.4% 🔺)3.018s (+36.3% 🔺)0.573s102.24x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.576s (~)3.417s (-6.1% 🟢)0.840s101.00x
▲ VercelNext.js (Turbopack)2.655s (+0.9%)3.736s (+0.6%)1.081s101.03x
▲ VercelExpress3.101s (+19.7% 🔺)4.074s (+15.4% 🔺)0.973s101.20x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.599s (~)11.011s (~)0.412s51.00x
💻 LocalNext.js (Turbopack)10.653s (~)11.019s (~)0.366s51.01x
🌐 RedisNext.js (Turbopack)10.657s (~)11.014s (~)0.357s51.01x
💻 LocalExpress10.780s (~)11.011s (~)0.231s51.02x
💻 LocalNitro10.819s (+2.8%)11.013s (~)0.194s51.02x
🌐 TursoNext.js (Turbopack)12.181s (~)13.024s (~)0.842s51.15x
🌐 MongoDBNext.js (Turbopack)12.208s (~)13.021s (~)0.814s51.15x
🐘 PostgresNext.js (Turbopack)20.257s (+32.7% 🔺)21.044s (+31.3% 🔺)0.787s51.91x
🐘 PostgresExpress20.394s (+0.6%)21.029s (~)0.635s51.92x
🐘 PostgresNitro20.395s (~)21.038s (~)0.643s51.92x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)21.427s (-1.1%)21.956s (-2.4%)0.529s51.00x
▲ VercelNitro21.724s (+3.9%)22.499s (+4.2%)0.775s51.01x
▲ VercelExpress21.826s (+0.8%)22.565s (+0.9%)0.739s51.02x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 10 parallel steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.349s (-1.7%)2.011s (~)0.662s51.00x
🌐 RedisNext.js (Turbopack)1.352s (~)2.011s (~)0.659s51.00x
🌐 StarterNext.js (Turbopack)1.361s (+1.2%)2.009s (~)0.648s51.01x
💻 LocalExpress1.385s (-1.1%)2.007s (~)0.622s51.03x
💻 LocalNitro1.419s (+8.6% 🔺)2.006s (~)0.587s51.05x
🌐 TursoNext.js (Turbopack)2.117s (-4.0%)3.013s (~)0.896s51.57x
🌐 MongoDBNext.js (Turbopack)2.183s (+0.8%)3.012s (~)0.829s51.62x
🐘 PostgresNext.js (Turbopack)2.441s (+28.1% 🔺)3.032s (+36.9% 🔺)0.590s51.81x
🐘 PostgresExpress2.519s (+6.0% 🔺)3.012s (~)0.493s51.87x
🐘 PostgresNitro2.586s (+1.1%)3.012s (~)0.426s51.92x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.900s (-18.8% 🟢)4.789s (-14.3% 🟢)0.889s51.00x
▲ VercelNext.js (Turbopack)3.939s (-2.9%)4.910s (+4.5%)0.971s51.01x
▲ VercelNitro3.972s (+5.4% 🔺)4.820s (+5.3% 🔺)0.848s51.02x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

stress test: Promise.all with 100 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)6.632s (+3.7%)7.091s (+4.9%)0.459s51.00x
🌐 RedisNext.js (Turbopack)8.304s (+4.1%)8.415s (+4.1%)0.111s41.25x
🐘 PostgresNext.js (Turbopack)8.803s (+3.3%)9.209s (+3.5%)0.406s41.33x
🐘 PostgresNitro8.987s (-1.9%)9.310s (-1.8%)0.324s41.36x
🐘 PostgresExpress9.287s (+1.3%)9.614s (~)0.327s41.40x
💻 LocalExpress13.238s (-4.5%)13.338s (-4.6%)0.099s32.00x
💻 LocalNext.js (Turbopack)14.656s (+3.5%)14.755s (+2.4%)0.099s32.21x
💻 LocalNitro15.145s (+24.9% 🔺)15.338s (+25.1% 🔺)0.193s32.28x
🌐 TursoNext.js (Turbopack)19.929s (~)20.546s (~)0.617s23.00x
🌐 MongoDBNext.js (Turbopack)20.044s (+1.3%)20.568s (~)0.525s23.02x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)19.580s (+5.4% 🔺)20.086s (+5.7% 🔺)0.506s21.00x
▲ VercelExpress19.822s (+11.7% 🔺)20.528s (+11.0% 🔺)0.706s21.01x
▲ VercelNitro20.520s (+12.2% 🔺)21.530s (+14.2% 🔺)1.010s21.05x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

stress test: Promise.race with 100 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)6.712s (+0.8%)7.047s (+3.5%)0.335s51.00x
🌐 RedisNext.js (Turbopack)8.624s (~)9.099s (~)0.474s41.28x
🐘 PostgresNext.js (Turbopack)9.548s (-3.1%)9.812s (-4.3%)0.264s41.42x
🐘 PostgresExpress9.715s (+2.0%)10.195s (+4.9%)0.480s31.45x
🐘 PostgresNitro9.835s (+2.7%)10.011s (+3.8%)0.176s41.47x
💻 LocalExpress14.662s (-4.1%)15.066s (-2.5%)0.404s22.18x
💻 LocalNext.js (Turbopack)17.035s (+3.8%)17.384s (+5.4% 🔺)0.349s22.54x
💻 LocalNitro17.367s (+38.2% 🔺)17.610s (+38.8% 🔺)0.243s22.59x
🌐 MongoDBNext.js (Turbopack)19.869s (~)20.532s (~)0.663s22.96x
🌐 TursoNext.js (Turbopack)20.215s (+0.9%)20.782s (+1.1%)0.568s23.01x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.204s (-12.2% 🟢)17.841s (-11.4% 🟢)0.636s21.00x
▲ VercelExpress19.456s (-11.7% 🟢)20.479s (-12.1% 🟢)1.024s21.13x
▲ VercelNext.js (Turbopack)19.765s (-19.3% 🟢)20.512s (-18.5% 🟢)0.747s21.15x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.127s (+2.2%)1.005s (~)0.000s (+Infinity% 🔺)1.011s (~)0.884s101.00x
💻 LocalNext.js (Turbopack)0.136s (~)1.003s (~)0.017s (+3.1%)1.027s (~)0.890s101.07x
🌐 RedisNext.js (Turbopack)0.144s (-1.2%)1.005s (~)0.000s (NaN%)1.013s (~)0.868s101.14x
💻 LocalExpress0.172s (-2.6%)0.993s (~)0.014s (-2.1%)1.021s (~)0.849s101.35x
💻 LocalNitro0.183s (+64.6% 🔺)0.992s (-0.7%)0.015s (+30.1% 🔺)1.021s (~)0.838s101.44x
🌐 TursoNext.js (Turbopack)0.452s (-1.5%)0.998s (+0.6%)0.000s (~)1.012s (~)0.560s103.56x
🌐 MongoDBNext.js (Turbopack)0.486s (-7.7% 🟢)0.962s (+4.3%)0.000s (-100.0% 🟢)1.013s (~)0.526s103.83x
🐘 PostgresNext.js (Turbopack)1.121s (+40.1% 🔺)1.196s (-11.4% 🟢)0.000s (-100.0% 🟢)1.516s (+7.0% 🔺)0.395s108.82x
🐘 PostgresExpress2.159s (-9.0% 🟢)2.885s (+7.9% 🔺)0.000s (-100.0% 🟢)3.016s (~)0.856s1016.99x
🐘 PostgresNitro2.248s (+40.3% 🔺)2.798s (+31.7% 🔺)0.000s (+Infinity% 🔺)3.015s (+30.3% 🔺)0.767s1017.68x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.632s (+2.8%)2.983s (-4.5%)0.451s (+97.6% 🔺)3.854s (+1.4%)1.221s101.00x
▲ VercelNitro2.662s (+0.9%)3.200s (+1.0%)0.292s (+0.6%)3.940s (+2.0%)1.278s101.01x
▲ VercelNext.js (Turbopack)2.778s (+9.9% 🔺)3.280s (+6.8% 🔺)0.176s (-38.6% 🟢)3.932s (+4.6%)1.154s101.06x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)5/7
🐘 PostgresNext.js (Turbopack)6/7
▲ VercelNitro3/7
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local5/7
Next.js (Turbopack)🌐 Starter5/7
Nitro💻 Local5/7
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
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@github-actions

github-actionsBot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production275011286
✅ 💻 Local Development25208260
✅ 📦 Local Production25208260
✅ 🐘 Local Postgres25208260
✅ 🪟 Windows260026
❌ 🌍 Community Worlds105110116
Total116211351208

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

  • addTenWorkflow
  • addTenWorkflow
  • retryAttemptCounterWorkflow
  • crossFileErrorWorkflow - stack traces work across imported modules
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro2501
✅ example2501
✅ express2501
✅ fastify2501
✅ hono2501
✅ nextjs-turbopack2501
✅ nextjs-webpack2501
✅ nitro2501
✅ nuxt2501
✅ sveltekit2501
✅ vite2501
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable2501
✅ express-stable2501
✅ fastify-stable2501
✅ hono-stable2501
✅ nextjs-turbopack-stable2600
✅ nextjs-webpack-stable2600
✅ nitro-stable2501
✅ nuxt-stable2501
✅ sveltekit-stable2501
✅ vite-stable2501
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable2501
✅ express-stable2501
✅ fastify-stable2501
✅ hono-stable2501
✅ nextjs-turbopack-stable2600
✅ nextjs-webpack-stable2600
✅ nitro-stable2501
✅ nuxt-stable2501
✅ sveltekit-stable2501
✅ vite-stable2501
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable2501
✅ express-stable2501
✅ fastify-stable2501
✅ hono-stable2501
✅ nextjs-turbopack-stable2600
✅ nextjs-webpack-stable2600
✅ nitro-stable2501
✅ nuxt-stable2501
✅ sveltekit-stable2501
✅ vite-stable2501
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack2600
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb2510
✅ redis-dev300
❌ redis2510
✅ starter-dev300
❌ starter1880
✅ turso-dev300
❌ turso2510

📋 View full workflow run

@pranaygp

Copy link
Copy Markdown
Contributor

@copilot merge the latest main into this PR

CopilotAI commented Dec 9, 2025

Copy link
Copy Markdown
ContributorAuthor

@copilot merge the latest main into this PR

Merged latest main into this PR in commit 9fa8214. The merge completed successfully with no conflicts.

CopilotAI reviewed Dec 9, 2025

CopilotAI 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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Comment threaddocs/content/docs/errors/timeout-in-workflow.mdx
… functions
Co-authored-by: TooTallNate <71256+TooTallNate@users.noreply.github.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.

5 participants

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

Override timeout functions in workflow VM context to throw helpful errors - #505

Merged
TooTallNate merged 6 commits into
mainfrom
copilot/override-timeout-functions-error
Dec 13, 2025
Merged

Override timeout functions in workflow VM context to throw helpful errors#505
TooTallNate merged 6 commits into
mainfrom
copilot/override-timeout-functions-error

Conversation

CopilotAI commented Dec 2, 2025

Copy link
Copy Markdown
Contributor
  • Add new error slug TIMEOUT_FUNCTIONS_IN_WORKFLOW to @workflow/errors package
  • Override setTimeout, setInterval, clearTimeout, clearInterval, setImmediate, and clearImmediate in the workflow VM context (packages/core/src/workflow.ts)
  • Each override throws a helpful error suggesting to use sleep() for timing needs
  • Add unit tests for the new overrides in packages/core/src/workflow.test.ts
  • Build and test changes
  • Create changeset
  • Run code review (1 nitpick about test duplication - kept to match existing style)
  • Run CodeQL security check (no issues found)
  • Use WorkflowRuntimeError class instead of vmGlobalThis.Error for proper logging (per PR feedback)
  • Add documentation page for timeout-in-workflow error (per PR feedback)
  • Merge latest main into PR (per PR feedback)
  • Reorder unavailable functions list in docs (per PR feedback)

View original Slack conversation


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

CopilotAI self-assigned this Dec 2, 2025
@changeset-bot

changeset-botBot commented Dec 2, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 68d3ba5

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

This PR includes changesets to release 16 packages
NameType
@workflow/errorsPatch
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/world-vercelPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/astroPatch
@workflow/sveltekitPatch
@workflow/world-testingPatch
@workflow/aiPatch
@workflow/nuxtPatch

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 Dec 2, 2025

Copy link
Copy Markdown
Contributor

@TooTallNateSlack

Copy link
Copy Markdown
Member

@copilot yeah i thought about this while back. we could provide a helpful message to suggest using sleep as well^
I really want to bring back the interleaved thinking/reasoning here. maybe it's not supported with gpt 5.1? demo looks way nicer with those thinking tokens in the UI instead of back to back tool calls
lemme see if i can add this rn
Detect usage of the global timeout functions (setTimeout(), etc.) when used in a workflow function context at build time (in the esbuild plugin?) and cause that to fail the build, similar to how we do when Node.js module usage is detected

…rors
Co-authored-by: TooTallNate <71256+TooTallNate@users.noreply.github.com>
@pranaygp
pranaygp marked this pull request as ready for review December 9, 2025 00:07
CopilotAI review requested due to automatic review settings December 9, 2025 00:07
@github-actions

github-actionsBot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.038s (-1.0%)1.014s (~)0.976s101.00x
💻 LocalNext.js (Turbopack)0.040s (+2.3%)1.017s (~)0.978s101.03x
🌐 RedisNext.js (Turbopack)0.041s (~)1.017s (~)0.976s101.06x
💻 LocalExpress0.043s (-4.6%)1.007s (~)0.964s101.13x
💻 LocalNitro0.044s (+51.0% 🔺)1.007s (~)0.963s101.15x
🌐 TursoNext.js (Turbopack)0.055s (-49.4% 🟢)1.014s (~)0.959s101.42x
🌐 MongoDBNext.js (Turbopack)0.070s (-37.2% 🟢)1.014s (~)0.944s101.81x
🐘 PostgresNext.js (Turbopack)0.151s (-5.9% 🟢)1.023s (~)0.872s103.91x
🐘 PostgresExpress0.252s (-29.6% 🟢)1.033s (-0.5%)0.781s106.55x
🐘 PostgresNitro0.306s (+6.3% 🔺)1.012s (~)0.705s107.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.505s (-25.0% 🟢)1.560s (+4.0%)1.054s101.00x
▲ VercelExpress0.545s (-10.0% 🟢)1.441s (-9.3% 🟢)0.896s101.08x
▲ VercelNext.js (Turbopack)0.621s (-15.8% 🟢)1.683s (-4.9%)1.062s101.23x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.094s (+0.5%)2.012s (~)0.918s101.00x
🌐 StarterNext.js (Turbopack)1.095s (+0.5%)2.010s (~)0.915s101.00x
🌐 RedisNext.js (Turbopack)1.100s (~)2.013s (~)0.912s101.01x
💻 LocalExpress1.112s (~)2.007s (~)0.895s101.02x
💻 LocalNitro1.116s (+3.8%)2.007s (~)0.891s101.02x
🌐 MongoDBNext.js (Turbopack)1.265s (-2.8%)2.014s (~)0.749s101.16x
🌐 TursoNext.js (Turbopack)1.278s (-2.0%)2.012s (~)0.734s101.17x
🐘 PostgresNitro2.166s (+1.5%)3.014s (~)0.848s101.98x
🐘 PostgresExpress2.362s (-3.2%)3.015s (~)0.653s102.16x
🐘 PostgresNext.js (Turbopack)2.445s (+23.4% 🔺)3.018s (+36.3% 🔺)0.573s102.24x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.576s (~)3.417s (-6.1% 🟢)0.840s101.00x
▲ VercelNext.js (Turbopack)2.655s (+0.9%)3.736s (+0.6%)1.081s101.03x
▲ VercelExpress3.101s (+19.7% 🔺)4.074s (+15.4% 🔺)0.973s101.20x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.599s (~)11.011s (~)0.412s51.00x
💻 LocalNext.js (Turbopack)10.653s (~)11.019s (~)0.366s51.01x
🌐 RedisNext.js (Turbopack)10.657s (~)11.014s (~)0.357s51.01x
💻 LocalExpress10.780s (~)11.011s (~)0.231s51.02x
💻 LocalNitro10.819s (+2.8%)11.013s (~)0.194s51.02x
🌐 TursoNext.js (Turbopack)12.181s (~)13.024s (~)0.842s51.15x
🌐 MongoDBNext.js (Turbopack)12.208s (~)13.021s (~)0.814s51.15x
🐘 PostgresNext.js (Turbopack)20.257s (+32.7% 🔺)21.044s (+31.3% 🔺)0.787s51.91x
🐘 PostgresExpress20.394s (+0.6%)21.029s (~)0.635s51.92x
🐘 PostgresNitro20.395s (~)21.038s (~)0.643s51.92x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)21.427s (-1.1%)21.956s (-2.4%)0.529s51.00x
▲ VercelNitro21.724s (+3.9%)22.499s (+4.2%)0.775s51.01x
▲ VercelExpress21.826s (+0.8%)22.565s (+0.9%)0.739s51.02x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 10 parallel steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.349s (-1.7%)2.011s (~)0.662s51.00x
🌐 RedisNext.js (Turbopack)1.352s (~)2.011s (~)0.659s51.00x
🌐 StarterNext.js (Turbopack)1.361s (+1.2%)2.009s (~)0.648s51.01x
💻 LocalExpress1.385s (-1.1%)2.007s (~)0.622s51.03x
💻 LocalNitro1.419s (+8.6% 🔺)2.006s (~)0.587s51.05x
🌐 TursoNext.js (Turbopack)2.117s (-4.0%)3.013s (~)0.896s51.57x
🌐 MongoDBNext.js (Turbopack)2.183s (+0.8%)3.012s (~)0.829s51.62x
🐘 PostgresNext.js (Turbopack)2.441s (+28.1% 🔺)3.032s (+36.9% 🔺)0.590s51.81x
🐘 PostgresExpress2.519s (+6.0% 🔺)3.012s (~)0.493s51.87x
🐘 PostgresNitro2.586s (+1.1%)3.012s (~)0.426s51.92x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.900s (-18.8% 🟢)4.789s (-14.3% 🟢)0.889s51.00x
▲ VercelNext.js (Turbopack)3.939s (-2.9%)4.910s (+4.5%)0.971s51.01x
▲ VercelNitro3.972s (+5.4% 🔺)4.820s (+5.3% 🔺)0.848s51.02x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

stress test: Promise.all with 100 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)6.632s (+3.7%)7.091s (+4.9%)0.459s51.00x
🌐 RedisNext.js (Turbopack)8.304s (+4.1%)8.415s (+4.1%)0.111s41.25x
🐘 PostgresNext.js (Turbopack)8.803s (+3.3%)9.209s (+3.5%)0.406s41.33x
🐘 PostgresNitro8.987s (-1.9%)9.310s (-1.8%)0.324s41.36x
🐘 PostgresExpress9.287s (+1.3%)9.614s (~)0.327s41.40x
💻 LocalExpress13.238s (-4.5%)13.338s (-4.6%)0.099s32.00x
💻 LocalNext.js (Turbopack)14.656s (+3.5%)14.755s (+2.4%)0.099s32.21x
💻 LocalNitro15.145s (+24.9% 🔺)15.338s (+25.1% 🔺)0.193s32.28x
🌐 TursoNext.js (Turbopack)19.929s (~)20.546s (~)0.617s23.00x
🌐 MongoDBNext.js (Turbopack)20.044s (+1.3%)20.568s (~)0.525s23.02x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)19.580s (+5.4% 🔺)20.086s (+5.7% 🔺)0.506s21.00x
▲ VercelExpress19.822s (+11.7% 🔺)20.528s (+11.0% 🔺)0.706s21.01x
▲ VercelNitro20.520s (+12.2% 🔺)21.530s (+14.2% 🔺)1.010s21.05x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

stress test: Promise.race with 100 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)6.712s (+0.8%)7.047s (+3.5%)0.335s51.00x
🌐 RedisNext.js (Turbopack)8.624s (~)9.099s (~)0.474s41.28x
🐘 PostgresNext.js (Turbopack)9.548s (-3.1%)9.812s (-4.3%)0.264s41.42x
🐘 PostgresExpress9.715s (+2.0%)10.195s (+4.9%)0.480s31.45x
🐘 PostgresNitro9.835s (+2.7%)10.011s (+3.8%)0.176s41.47x
💻 LocalExpress14.662s (-4.1%)15.066s (-2.5%)0.404s22.18x
💻 LocalNext.js (Turbopack)17.035s (+3.8%)17.384s (+5.4% 🔺)0.349s22.54x
💻 LocalNitro17.367s (+38.2% 🔺)17.610s (+38.8% 🔺)0.243s22.59x
🌐 MongoDBNext.js (Turbopack)19.869s (~)20.532s (~)0.663s22.96x
🌐 TursoNext.js (Turbopack)20.215s (+0.9%)20.782s (+1.1%)0.568s23.01x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.204s (-12.2% 🟢)17.841s (-11.4% 🟢)0.636s21.00x
▲ VercelExpress19.456s (-11.7% 🟢)20.479s (-12.1% 🟢)1.024s21.13x
▲ VercelNext.js (Turbopack)19.765s (-19.3% 🟢)20.512s (-18.5% 🟢)0.747s21.15x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.127s (+2.2%)1.005s (~)0.000s (+Infinity% 🔺)1.011s (~)0.884s101.00x
💻 LocalNext.js (Turbopack)0.136s (~)1.003s (~)0.017s (+3.1%)1.027s (~)0.890s101.07x
🌐 RedisNext.js (Turbopack)0.144s (-1.2%)1.005s (~)0.000s (NaN%)1.013s (~)0.868s101.14x
💻 LocalExpress0.172s (-2.6%)0.993s (~)0.014s (-2.1%)1.021s (~)0.849s101.35x
💻 LocalNitro0.183s (+64.6% 🔺)0.992s (-0.7%)0.015s (+30.1% 🔺)1.021s (~)0.838s101.44x
🌐 TursoNext.js (Turbopack)0.452s (-1.5%)0.998s (+0.6%)0.000s (~)1.012s (~)0.560s103.56x
🌐 MongoDBNext.js (Turbopack)0.486s (-7.7% 🟢)0.962s (+4.3%)0.000s (-100.0% 🟢)1.013s (~)0.526s103.83x
🐘 PostgresNext.js (Turbopack)1.121s (+40.1% 🔺)1.196s (-11.4% 🟢)0.000s (-100.0% 🟢)1.516s (+7.0% 🔺)0.395s108.82x
🐘 PostgresExpress2.159s (-9.0% 🟢)2.885s (+7.9% 🔺)0.000s (-100.0% 🟢)3.016s (~)0.856s1016.99x
🐘 PostgresNitro2.248s (+40.3% 🔺)2.798s (+31.7% 🔺)0.000s (+Infinity% 🔺)3.015s (+30.3% 🔺)0.767s1017.68x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.632s (+2.8%)2.983s (-4.5%)0.451s (+97.6% 🔺)3.854s (+1.4%)1.221s101.00x
▲ VercelNitro2.662s (+0.9%)3.200s (+1.0%)0.292s (+0.6%)3.940s (+2.0%)1.278s101.01x
▲ VercelNext.js (Turbopack)2.778s (+9.9% 🔺)3.280s (+6.8% 🔺)0.176s (-38.6% 🟢)3.932s (+4.6%)1.154s101.06x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)5/7
🐘 PostgresNext.js (Turbopack)6/7
▲ VercelNitro3/7
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local5/7
Next.js (Turbopack)🌐 Starter5/7
Nitro💻 Local5/7
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
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@github-actions

github-actionsBot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production275011286
✅ 💻 Local Development25208260
✅ 📦 Local Production25208260
✅ 🐘 Local Postgres25208260
✅ 🪟 Windows260026
❌ 🌍 Community Worlds105110116
Total116211351208

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

  • addTenWorkflow
  • addTenWorkflow
  • retryAttemptCounterWorkflow
  • crossFileErrorWorkflow - stack traces work across imported modules
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro2501
✅ example2501
✅ express2501
✅ fastify2501
✅ hono2501
✅ nextjs-turbopack2501
✅ nextjs-webpack2501
✅ nitro2501
✅ nuxt2501
✅ sveltekit2501
✅ vite2501
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable2501
✅ express-stable2501
✅ fastify-stable2501
✅ hono-stable2501
✅ nextjs-turbopack-stable2600
✅ nextjs-webpack-stable2600
✅ nitro-stable2501
✅ nuxt-stable2501
✅ sveltekit-stable2501
✅ vite-stable2501
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable2501
✅ express-stable2501
✅ fastify-stable2501
✅ hono-stable2501
✅ nextjs-turbopack-stable2600
✅ nextjs-webpack-stable2600
✅ nitro-stable2501
✅ nuxt-stable2501
✅ sveltekit-stable2501
✅ vite-stable2501
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable2501
✅ express-stable2501
✅ fastify-stable2501
✅ hono-stable2501
✅ nextjs-turbopack-stable2600
✅ nextjs-webpack-stable2600
✅ nitro-stable2501
✅ nuxt-stable2501
✅ sveltekit-stable2501
✅ vite-stable2501
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack2600
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb2510
✅ redis-dev300
❌ redis2510
✅ starter-dev300
❌ starter1880
✅ turso-dev300
❌ turso2510

📋 View full workflow run

@pranaygp

Copy link
Copy Markdown
Contributor

@copilot merge the latest main into this PR

CopilotAI commented Dec 9, 2025

Copy link
Copy Markdown
ContributorAuthor

@copilot merge the latest main into this PR

Merged latest main into this PR in commit 9fa8214. The merge completed successfully with no conflicts.

CopilotAI reviewed Dec 9, 2025

CopilotAI 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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Comment threaddocs/content/docs/errors/timeout-in-workflow.mdx
… functions
Co-authored-by: TooTallNate <71256+TooTallNate@users.noreply.github.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.

5 participants

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

Override timeout functions in workflow VM context to throw helpful errors - #505

Merged
TooTallNate merged 6 commits into
mainfrom
copilot/override-timeout-functions-error
Dec 13, 2025
Merged

Override timeout functions in workflow VM context to throw helpful errors#505
TooTallNate merged 6 commits into
mainfrom
copilot/override-timeout-functions-error

Conversation

CopilotAI commented Dec 2, 2025

Copy link
Copy Markdown
Contributor
  • Add new error slug TIMEOUT_FUNCTIONS_IN_WORKFLOW to @workflow/errors package
  • Override setTimeout, setInterval, clearTimeout, clearInterval, setImmediate, and clearImmediate in the workflow VM context (packages/core/src/workflow.ts)
  • Each override throws a helpful error suggesting to use sleep() for timing needs
  • Add unit tests for the new overrides in packages/core/src/workflow.test.ts
  • Build and test changes
  • Create changeset
  • Run code review (1 nitpick about test duplication - kept to match existing style)
  • Run CodeQL security check (no issues found)
  • Use WorkflowRuntimeError class instead of vmGlobalThis.Error for proper logging (per PR feedback)
  • Add documentation page for timeout-in-workflow error (per PR feedback)
  • Merge latest main into PR (per PR feedback)
  • Reorder unavailable functions list in docs (per PR feedback)

View original Slack conversation


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

CopilotAI self-assigned this Dec 2, 2025
@changeset-bot

changeset-botBot commented Dec 2, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 68d3ba5

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

This PR includes changesets to release 16 packages
NameType
@workflow/errorsPatch
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/world-vercelPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/astroPatch
@workflow/sveltekitPatch
@workflow/world-testingPatch
@workflow/aiPatch
@workflow/nuxtPatch

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 Dec 2, 2025

Copy link
Copy Markdown
Contributor

@TooTallNateSlack

Copy link
Copy Markdown
Member

@copilot yeah i thought about this while back. we could provide a helpful message to suggest using sleep as well^
I really want to bring back the interleaved thinking/reasoning here. maybe it's not supported with gpt 5.1? demo looks way nicer with those thinking tokens in the UI instead of back to back tool calls
lemme see if i can add this rn
Detect usage of the global timeout functions (setTimeout(), etc.) when used in a workflow function context at build time (in the esbuild plugin?) and cause that to fail the build, similar to how we do when Node.js module usage is detected

…rors
Co-authored-by: TooTallNate <71256+TooTallNate@users.noreply.github.com>
@pranaygp
pranaygp marked this pull request as ready for review December 9, 2025 00:07
CopilotAI review requested due to automatic review settings December 9, 2025 00:07
@github-actions

github-actionsBot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.038s (-1.0%)1.014s (~)0.976s101.00x
💻 LocalNext.js (Turbopack)0.040s (+2.3%)1.017s (~)0.978s101.03x
🌐 RedisNext.js (Turbopack)0.041s (~)1.017s (~)0.976s101.06x
💻 LocalExpress0.043s (-4.6%)1.007s (~)0.964s101.13x
💻 LocalNitro0.044s (+51.0% 🔺)1.007s (~)0.963s101.15x
🌐 TursoNext.js (Turbopack)0.055s (-49.4% 🟢)1.014s (~)0.959s101.42x
🌐 MongoDBNext.js (Turbopack)0.070s (-37.2% 🟢)1.014s (~)0.944s101.81x
🐘 PostgresNext.js (Turbopack)0.151s (-5.9% 🟢)1.023s (~)0.872s103.91x
🐘 PostgresExpress0.252s (-29.6% 🟢)1.033s (-0.5%)0.781s106.55x
🐘 PostgresNitro0.306s (+6.3% 🔺)1.012s (~)0.705s107.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.505s (-25.0% 🟢)1.560s (+4.0%)1.054s101.00x
▲ VercelExpress0.545s (-10.0% 🟢)1.441s (-9.3% 🟢)0.896s101.08x
▲ VercelNext.js (Turbopack)0.621s (-15.8% 🟢)1.683s (-4.9%)1.062s101.23x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.094s (+0.5%)2.012s (~)0.918s101.00x
🌐 StarterNext.js (Turbopack)1.095s (+0.5%)2.010s (~)0.915s101.00x
🌐 RedisNext.js (Turbopack)1.100s (~)2.013s (~)0.912s101.01x
💻 LocalExpress1.112s (~)2.007s (~)0.895s101.02x
💻 LocalNitro1.116s (+3.8%)2.007s (~)0.891s101.02x
🌐 MongoDBNext.js (Turbopack)1.265s (-2.8%)2.014s (~)0.749s101.16x
🌐 TursoNext.js (Turbopack)1.278s (-2.0%)2.012s (~)0.734s101.17x
🐘 PostgresNitro2.166s (+1.5%)3.014s (~)0.848s101.98x
🐘 PostgresExpress2.362s (-3.2%)3.015s (~)0.653s102.16x
🐘 PostgresNext.js (Turbopack)2.445s (+23.4% 🔺)3.018s (+36.3% 🔺)0.573s102.24x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.576s (~)3.417s (-6.1% 🟢)0.840s101.00x
▲ VercelNext.js (Turbopack)2.655s (+0.9%)3.736s (+0.6%)1.081s101.03x
▲ VercelExpress3.101s (+19.7% 🔺)4.074s (+15.4% 🔺)0.973s101.20x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.599s (~)11.011s (~)0.412s51.00x
💻 LocalNext.js (Turbopack)10.653s (~)11.019s (~)0.366s51.01x
🌐 RedisNext.js (Turbopack)10.657s (~)11.014s (~)0.357s51.01x
💻 LocalExpress10.780s (~)11.011s (~)0.231s51.02x
💻 LocalNitro10.819s (+2.8%)11.013s (~)0.194s51.02x
🌐 TursoNext.js (Turbopack)12.181s (~)13.024s (~)0.842s51.15x
🌐 MongoDBNext.js (Turbopack)12.208s (~)13.021s (~)0.814s51.15x
🐘 PostgresNext.js (Turbopack)20.257s (+32.7% 🔺)21.044s (+31.3% 🔺)0.787s51.91x
🐘 PostgresExpress20.394s (+0.6%)21.029s (~)0.635s51.92x
🐘 PostgresNitro20.395s (~)21.038s (~)0.643s51.92x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)21.427s (-1.1%)21.956s (-2.4%)0.529s51.00x
▲ VercelNitro21.724s (+3.9%)22.499s (+4.2%)0.775s51.01x
▲ VercelExpress21.826s (+0.8%)22.565s (+0.9%)0.739s51.02x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 10 parallel steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.349s (-1.7%)2.011s (~)0.662s51.00x
🌐 RedisNext.js (Turbopack)1.352s (~)2.011s (~)0.659s51.00x
🌐 StarterNext.js (Turbopack)1.361s (+1.2%)2.009s (~)0.648s51.01x
💻 LocalExpress1.385s (-1.1%)2.007s (~)0.622s51.03x
💻 LocalNitro1.419s (+8.6% 🔺)2.006s (~)0.587s51.05x
🌐 TursoNext.js (Turbopack)2.117s (-4.0%)3.013s (~)0.896s51.57x
🌐 MongoDBNext.js (Turbopack)2.183s (+0.8%)3.012s (~)0.829s51.62x
🐘 PostgresNext.js (Turbopack)2.441s (+28.1% 🔺)3.032s (+36.9% 🔺)0.590s51.81x
🐘 PostgresExpress2.519s (+6.0% 🔺)3.012s (~)0.493s51.87x
🐘 PostgresNitro2.586s (+1.1%)3.012s (~)0.426s51.92x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.900s (-18.8% 🟢)4.789s (-14.3% 🟢)0.889s51.00x
▲ VercelNext.js (Turbopack)3.939s (-2.9%)4.910s (+4.5%)0.971s51.01x
▲ VercelNitro3.972s (+5.4% 🔺)4.820s (+5.3% 🔺)0.848s51.02x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

stress test: Promise.all with 100 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)6.632s (+3.7%)7.091s (+4.9%)0.459s51.00x
🌐 RedisNext.js (Turbopack)8.304s (+4.1%)8.415s (+4.1%)0.111s41.25x
🐘 PostgresNext.js (Turbopack)8.803s (+3.3%)9.209s (+3.5%)0.406s41.33x
🐘 PostgresNitro8.987s (-1.9%)9.310s (-1.8%)0.324s41.36x
🐘 PostgresExpress9.287s (+1.3%)9.614s (~)0.327s41.40x
💻 LocalExpress13.238s (-4.5%)13.338s (-4.6%)0.099s32.00x
💻 LocalNext.js (Turbopack)14.656s (+3.5%)14.755s (+2.4%)0.099s32.21x
💻 LocalNitro15.145s (+24.9% 🔺)15.338s (+25.1% 🔺)0.193s32.28x
🌐 TursoNext.js (Turbopack)19.929s (~)20.546s (~)0.617s23.00x
🌐 MongoDBNext.js (Turbopack)20.044s (+1.3%)20.568s (~)0.525s23.02x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)19.580s (+5.4% 🔺)20.086s (+5.7% 🔺)0.506s21.00x
▲ VercelExpress19.822s (+11.7% 🔺)20.528s (+11.0% 🔺)0.706s21.01x
▲ VercelNitro20.520s (+12.2% 🔺)21.530s (+14.2% 🔺)1.010s21.05x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

stress test: Promise.race with 100 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)6.712s (+0.8%)7.047s (+3.5%)0.335s51.00x
🌐 RedisNext.js (Turbopack)8.624s (~)9.099s (~)0.474s41.28x
🐘 PostgresNext.js (Turbopack)9.548s (-3.1%)9.812s (-4.3%)0.264s41.42x
🐘 PostgresExpress9.715s (+2.0%)10.195s (+4.9%)0.480s31.45x
🐘 PostgresNitro9.835s (+2.7%)10.011s (+3.8%)0.176s41.47x
💻 LocalExpress14.662s (-4.1%)15.066s (-2.5%)0.404s22.18x
💻 LocalNext.js (Turbopack)17.035s (+3.8%)17.384s (+5.4% 🔺)0.349s22.54x
💻 LocalNitro17.367s (+38.2% 🔺)17.610s (+38.8% 🔺)0.243s22.59x
🌐 MongoDBNext.js (Turbopack)19.869s (~)20.532s (~)0.663s22.96x
🌐 TursoNext.js (Turbopack)20.215s (+0.9%)20.782s (+1.1%)0.568s23.01x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.204s (-12.2% 🟢)17.841s (-11.4% 🟢)0.636s21.00x
▲ VercelExpress19.456s (-11.7% 🟢)20.479s (-12.1% 🟢)1.024s21.13x
▲ VercelNext.js (Turbopack)19.765s (-19.3% 🟢)20.512s (-18.5% 🟢)0.747s21.15x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.127s (+2.2%)1.005s (~)0.000s (+Infinity% 🔺)1.011s (~)0.884s101.00x
💻 LocalNext.js (Turbopack)0.136s (~)1.003s (~)0.017s (+3.1%)1.027s (~)0.890s101.07x
🌐 RedisNext.js (Turbopack)0.144s (-1.2%)1.005s (~)0.000s (NaN%)1.013s (~)0.868s101.14x
💻 LocalExpress0.172s (-2.6%)0.993s (~)0.014s (-2.1%)1.021s (~)0.849s101.35x
💻 LocalNitro0.183s (+64.6% 🔺)0.992s (-0.7%)0.015s (+30.1% 🔺)1.021s (~)0.838s101.44x
🌐 TursoNext.js (Turbopack)0.452s (-1.5%)0.998s (+0.6%)0.000s (~)1.012s (~)0.560s103.56x
🌐 MongoDBNext.js (Turbopack)0.486s (-7.7% 🟢)0.962s (+4.3%)0.000s (-100.0% 🟢)1.013s (~)0.526s103.83x
🐘 PostgresNext.js (Turbopack)1.121s (+40.1% 🔺)1.196s (-11.4% 🟢)0.000s (-100.0% 🟢)1.516s (+7.0% 🔺)0.395s108.82x
🐘 PostgresExpress2.159s (-9.0% 🟢)2.885s (+7.9% 🔺)0.000s (-100.0% 🟢)3.016s (~)0.856s1016.99x
🐘 PostgresNitro2.248s (+40.3% 🔺)2.798s (+31.7% 🔺)0.000s (+Infinity% 🔺)3.015s (+30.3% 🔺)0.767s1017.68x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.632s (+2.8%)2.983s (-4.5%)0.451s (+97.6% 🔺)3.854s (+1.4%)1.221s101.00x
▲ VercelNitro2.662s (+0.9%)3.200s (+1.0%)0.292s (+0.6%)3.940s (+2.0%)1.278s101.01x
▲ VercelNext.js (Turbopack)2.778s (+9.9% 🔺)3.280s (+6.8% 🔺)0.176s (-38.6% 🟢)3.932s (+4.6%)1.154s101.06x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)5/7
🐘 PostgresNext.js (Turbopack)6/7
▲ VercelNitro3/7
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local5/7
Next.js (Turbopack)🌐 Starter5/7
Nitro💻 Local5/7
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
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@github-actions

github-actionsBot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production275011286
✅ 💻 Local Development25208260
✅ 📦 Local Production25208260
✅ 🐘 Local Postgres25208260
✅ 🪟 Windows260026
❌ 🌍 Community Worlds105110116
Total116211351208

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

  • addTenWorkflow
  • addTenWorkflow
  • retryAttemptCounterWorkflow
  • crossFileErrorWorkflow - stack traces work across imported modules
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro2501
✅ example2501
✅ express2501
✅ fastify2501
✅ hono2501
✅ nextjs-turbopack2501
✅ nextjs-webpack2501
✅ nitro2501
✅ nuxt2501
✅ sveltekit2501
✅ vite2501
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable2501
✅ express-stable2501
✅ fastify-stable2501
✅ hono-stable2501
✅ nextjs-turbopack-stable2600
✅ nextjs-webpack-stable2600
✅ nitro-stable2501
✅ nuxt-stable2501
✅ sveltekit-stable2501
✅ vite-stable2501
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable2501
✅ express-stable2501
✅ fastify-stable2501
✅ hono-stable2501
✅ nextjs-turbopack-stable2600
✅ nextjs-webpack-stable2600
✅ nitro-stable2501
✅ nuxt-stable2501
✅ sveltekit-stable2501
✅ vite-stable2501
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable2501
✅ express-stable2501
✅ fastify-stable2501
✅ hono-stable2501
✅ nextjs-turbopack-stable2600
✅ nextjs-webpack-stable2600
✅ nitro-stable2501
✅ nuxt-stable2501
✅ sveltekit-stable2501
✅ vite-stable2501
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack2600
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb2510
✅ redis-dev300
❌ redis2510
✅ starter-dev300
❌ starter1880
✅ turso-dev300
❌ turso2510

📋 View full workflow run

@pranaygp

Copy link
Copy Markdown
Contributor

@copilot merge the latest main into this PR

CopilotAI commented Dec 9, 2025

Copy link
Copy Markdown
ContributorAuthor

@copilot merge the latest main into this PR

Merged latest main into this PR in commit 9fa8214. The merge completed successfully with no conflicts.

CopilotAI reviewed Dec 9, 2025

CopilotAI 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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Comment threaddocs/content/docs/errors/timeout-in-workflow.mdx
… functions
Co-authored-by: TooTallNate <71256+TooTallNate@users.noreply.github.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.

5 participants

@TooTallNate@pranaygp@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', '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('^' + ".*" + ' Override timeout functions in workflow VM context to throw helpful errors by Copilot · Pull Request #505 · vercel/workflow · GitHub
Skip to content

Override timeout functions in workflow VM context to throw helpful errors - #505

Merged
TooTallNate merged 6 commits into
mainfrom
copilot/override-timeout-functions-error
Dec 13, 2025
Merged

Override timeout functions in workflow VM context to throw helpful errors#505
TooTallNate merged 6 commits into
mainfrom
copilot/override-timeout-functions-error

Conversation

CopilotAI commented Dec 2, 2025

Copy link
Copy Markdown
Contributor
  • Add new error slug TIMEOUT_FUNCTIONS_IN_WORKFLOW to @workflow/errors package
  • Override setTimeout, setInterval, clearTimeout, clearInterval, setImmediate, and clearImmediate in the workflow VM context (packages/core/src/workflow.ts)
  • Each override throws a helpful error suggesting to use sleep() for timing needs
  • Add unit tests for the new overrides in packages/core/src/workflow.test.ts
  • Build and test changes
  • Create changeset
  • Run code review (1 nitpick about test duplication - kept to match existing style)
  • Run CodeQL security check (no issues found)
  • Use WorkflowRuntimeError class instead of vmGlobalThis.Error for proper logging (per PR feedback)
  • Add documentation page for timeout-in-workflow error (per PR feedback)
  • Merge latest main into PR (per PR feedback)
  • Reorder unavailable functions list in docs (per PR feedback)

View original Slack conversation


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

CopilotAI self-assigned this Dec 2, 2025
@changeset-bot

changeset-botBot commented Dec 2, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 68d3ba5

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

This PR includes changesets to release 16 packages
NameType
@workflow/errorsPatch
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/world-vercelPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/astroPatch
@workflow/sveltekitPatch
@workflow/world-testingPatch
@workflow/aiPatch
@workflow/nuxtPatch

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 Dec 2, 2025

Copy link
Copy Markdown
Contributor

@TooTallNateSlack

Copy link
Copy Markdown
Member

@copilot yeah i thought about this while back. we could provide a helpful message to suggest using sleep as well^
I really want to bring back the interleaved thinking/reasoning here. maybe it's not supported with gpt 5.1? demo looks way nicer with those thinking tokens in the UI instead of back to back tool calls
lemme see if i can add this rn
Detect usage of the global timeout functions (setTimeout(), etc.) when used in a workflow function context at build time (in the esbuild plugin?) and cause that to fail the build, similar to how we do when Node.js module usage is detected

…rors
Co-authored-by: TooTallNate <71256+TooTallNate@users.noreply.github.com>
@pranaygp
pranaygp marked this pull request as ready for review December 9, 2025 00:07
CopilotAI review requested due to automatic review settings December 9, 2025 00:07
@github-actions

github-actionsBot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.038s (-1.0%)1.014s (~)0.976s101.00x
💻 LocalNext.js (Turbopack)0.040s (+2.3%)1.017s (~)0.978s101.03x
🌐 RedisNext.js (Turbopack)0.041s (~)1.017s (~)0.976s101.06x
💻 LocalExpress0.043s (-4.6%)1.007s (~)0.964s101.13x
💻 LocalNitro0.044s (+51.0% 🔺)1.007s (~)0.963s101.15x
🌐 TursoNext.js (Turbopack)0.055s (-49.4% 🟢)1.014s (~)0.959s101.42x
🌐 MongoDBNext.js (Turbopack)0.070s (-37.2% 🟢)1.014s (~)0.944s101.81x
🐘 PostgresNext.js (Turbopack)0.151s (-5.9% 🟢)1.023s (~)0.872s103.91x
🐘 PostgresExpress0.252s (-29.6% 🟢)1.033s (-0.5%)0.781s106.55x
🐘 PostgresNitro0.306s (+6.3% 🔺)1.012s (~)0.705s107.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.505s (-25.0% 🟢)1.560s (+4.0%)1.054s101.00x
▲ VercelExpress0.545s (-10.0% 🟢)1.441s (-9.3% 🟢)0.896s101.08x
▲ VercelNext.js (Turbopack)0.621s (-15.8% 🟢)1.683s (-4.9%)1.062s101.23x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.094s (+0.5%)2.012s (~)0.918s101.00x
🌐 StarterNext.js (Turbopack)1.095s (+0.5%)2.010s (~)0.915s101.00x
🌐 RedisNext.js (Turbopack)1.100s (~)2.013s (~)0.912s101.01x
💻 LocalExpress1.112s (~)2.007s (~)0.895s101.02x
💻 LocalNitro1.116s (+3.8%)2.007s (~)0.891s101.02x
🌐 MongoDBNext.js (Turbopack)1.265s (-2.8%)2.014s (~)0.749s101.16x
🌐 TursoNext.js (Turbopack)1.278s (-2.0%)2.012s (~)0.734s101.17x
🐘 PostgresNitro2.166s (+1.5%)3.014s (~)0.848s101.98x
🐘 PostgresExpress2.362s (-3.2%)3.015s (~)0.653s102.16x
🐘 PostgresNext.js (Turbopack)2.445s (+23.4% 🔺)3.018s (+36.3% 🔺)0.573s102.24x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.576s (~)3.417s (-6.1% 🟢)0.840s101.00x
▲ VercelNext.js (Turbopack)2.655s (+0.9%)3.736s (+0.6%)1.081s101.03x
▲ VercelExpress3.101s (+19.7% 🔺)4.074s (+15.4% 🔺)0.973s101.20x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.599s (~)11.011s (~)0.412s51.00x
💻 LocalNext.js (Turbopack)10.653s (~)11.019s (~)0.366s51.01x
🌐 RedisNext.js (Turbopack)10.657s (~)11.014s (~)0.357s51.01x
💻 LocalExpress10.780s (~)11.011s (~)0.231s51.02x
💻 LocalNitro10.819s (+2.8%)11.013s (~)0.194s51.02x
🌐 TursoNext.js (Turbopack)12.181s (~)13.024s (~)0.842s51.15x
🌐 MongoDBNext.js (Turbopack)12.208s (~)13.021s (~)0.814s51.15x
🐘 PostgresNext.js (Turbopack)20.257s (+32.7% 🔺)21.044s (+31.3% 🔺)0.787s51.91x
🐘 PostgresExpress20.394s (+0.6%)21.029s (~)0.635s51.92x
🐘 PostgresNitro20.395s (~)21.038s (~)0.643s51.92x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)21.427s (-1.1%)21.956s (-2.4%)0.529s51.00x
▲ VercelNitro21.724s (+3.9%)22.499s (+4.2%)0.775s51.01x
▲ VercelExpress21.826s (+0.8%)22.565s (+0.9%)0.739s51.02x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 10 parallel steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.349s (-1.7%)2.011s (~)0.662s51.00x
🌐 RedisNext.js (Turbopack)1.352s (~)2.011s (~)0.659s51.00x
🌐 StarterNext.js (Turbopack)1.361s (+1.2%)2.009s (~)0.648s51.01x
💻 LocalExpress1.385s (-1.1%)2.007s (~)0.622s51.03x
💻 LocalNitro1.419s (+8.6% 🔺)2.006s (~)0.587s51.05x
🌐 TursoNext.js (Turbopack)2.117s (-4.0%)3.013s (~)0.896s51.57x
🌐 MongoDBNext.js (Turbopack)2.183s (+0.8%)3.012s (~)0.829s51.62x
🐘 PostgresNext.js (Turbopack)2.441s (+28.1% 🔺)3.032s (+36.9% 🔺)0.590s51.81x
🐘 PostgresExpress2.519s (+6.0% 🔺)3.012s (~)0.493s51.87x
🐘 PostgresNitro2.586s (+1.1%)3.012s (~)0.426s51.92x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.900s (-18.8% 🟢)4.789s (-14.3% 🟢)0.889s51.00x
▲ VercelNext.js (Turbopack)3.939s (-2.9%)4.910s (+4.5%)0.971s51.01x
▲ VercelNitro3.972s (+5.4% 🔺)4.820s (+5.3% 🔺)0.848s51.02x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

stress test: Promise.all with 100 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)6.632s (+3.7%)7.091s (+4.9%)0.459s51.00x
🌐 RedisNext.js (Turbopack)8.304s (+4.1%)8.415s (+4.1%)0.111s41.25x
🐘 PostgresNext.js (Turbopack)8.803s (+3.3%)9.209s (+3.5%)0.406s41.33x
🐘 PostgresNitro8.987s (-1.9%)9.310s (-1.8%)0.324s41.36x
🐘 PostgresExpress9.287s (+1.3%)9.614s (~)0.327s41.40x
💻 LocalExpress13.238s (-4.5%)13.338s (-4.6%)0.099s32.00x
💻 LocalNext.js (Turbopack)14.656s (+3.5%)14.755s (+2.4%)0.099s32.21x
💻 LocalNitro15.145s (+24.9% 🔺)15.338s (+25.1% 🔺)0.193s32.28x
🌐 TursoNext.js (Turbopack)19.929s (~)20.546s (~)0.617s23.00x
🌐 MongoDBNext.js (Turbopack)20.044s (+1.3%)20.568s (~)0.525s23.02x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)19.580s (+5.4% 🔺)20.086s (+5.7% 🔺)0.506s21.00x
▲ VercelExpress19.822s (+11.7% 🔺)20.528s (+11.0% 🔺)0.706s21.01x
▲ VercelNitro20.520s (+12.2% 🔺)21.530s (+14.2% 🔺)1.010s21.05x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

stress test: Promise.race with 100 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)6.712s (+0.8%)7.047s (+3.5%)0.335s51.00x
🌐 RedisNext.js (Turbopack)8.624s (~)9.099s (~)0.474s41.28x
🐘 PostgresNext.js (Turbopack)9.548s (-3.1%)9.812s (-4.3%)0.264s41.42x
🐘 PostgresExpress9.715s (+2.0%)10.195s (+4.9%)0.480s31.45x
🐘 PostgresNitro9.835s (+2.7%)10.011s (+3.8%)0.176s41.47x
💻 LocalExpress14.662s (-4.1%)15.066s (-2.5%)0.404s22.18x
💻 LocalNext.js (Turbopack)17.035s (+3.8%)17.384s (+5.4% 🔺)0.349s22.54x
💻 LocalNitro17.367s (+38.2% 🔺)17.610s (+38.8% 🔺)0.243s22.59x
🌐 MongoDBNext.js (Turbopack)19.869s (~)20.532s (~)0.663s22.96x
🌐 TursoNext.js (Turbopack)20.215s (+0.9%)20.782s (+1.1%)0.568s23.01x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.204s (-12.2% 🟢)17.841s (-11.4% 🟢)0.636s21.00x
▲ VercelExpress19.456s (-11.7% 🟢)20.479s (-12.1% 🟢)1.024s21.13x
▲ VercelNext.js (Turbopack)19.765s (-19.3% 🟢)20.512s (-18.5% 🟢)0.747s21.15x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.127s (+2.2%)1.005s (~)0.000s (+Infinity% 🔺)1.011s (~)0.884s101.00x
💻 LocalNext.js (Turbopack)0.136s (~)1.003s (~)0.017s (+3.1%)1.027s (~)0.890s101.07x
🌐 RedisNext.js (Turbopack)0.144s (-1.2%)1.005s (~)0.000s (NaN%)1.013s (~)0.868s101.14x
💻 LocalExpress0.172s (-2.6%)0.993s (~)0.014s (-2.1%)1.021s (~)0.849s101.35x
💻 LocalNitro0.183s (+64.6% 🔺)0.992s (-0.7%)0.015s (+30.1% 🔺)1.021s (~)0.838s101.44x
🌐 TursoNext.js (Turbopack)0.452s (-1.5%)0.998s (+0.6%)0.000s (~)1.012s (~)0.560s103.56x
🌐 MongoDBNext.js (Turbopack)0.486s (-7.7% 🟢)0.962s (+4.3%)0.000s (-100.0% 🟢)1.013s (~)0.526s103.83x
🐘 PostgresNext.js (Turbopack)1.121s (+40.1% 🔺)1.196s (-11.4% 🟢)0.000s (-100.0% 🟢)1.516s (+7.0% 🔺)0.395s108.82x
🐘 PostgresExpress2.159s (-9.0% 🟢)2.885s (+7.9% 🔺)0.000s (-100.0% 🟢)3.016s (~)0.856s1016.99x
🐘 PostgresNitro2.248s (+40.3% 🔺)2.798s (+31.7% 🔺)0.000s (+Infinity% 🔺)3.015s (+30.3% 🔺)0.767s1017.68x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.632s (+2.8%)2.983s (-4.5%)0.451s (+97.6% 🔺)3.854s (+1.4%)1.221s101.00x
▲ VercelNitro2.662s (+0.9%)3.200s (+1.0%)0.292s (+0.6%)3.940s (+2.0%)1.278s101.01x
▲ VercelNext.js (Turbopack)2.778s (+9.9% 🔺)3.280s (+6.8% 🔺)0.176s (-38.6% 🟢)3.932s (+4.6%)1.154s101.06x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)5/7
🐘 PostgresNext.js (Turbopack)6/7
▲ VercelNitro3/7
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local5/7
Next.js (Turbopack)🌐 Starter5/7
Nitro💻 Local5/7
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
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@github-actions

github-actionsBot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production275011286
✅ 💻 Local Development25208260
✅ 📦 Local Production25208260
✅ 🐘 Local Postgres25208260
✅ 🪟 Windows260026
❌ 🌍 Community Worlds105110116
Total116211351208

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

  • addTenWorkflow
  • addTenWorkflow
  • retryAttemptCounterWorkflow
  • crossFileErrorWorkflow - stack traces work across imported modules
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro2501
✅ example2501
✅ express2501
✅ fastify2501
✅ hono2501
✅ nextjs-turbopack2501
✅ nextjs-webpack2501
✅ nitro2501
✅ nuxt2501
✅ sveltekit2501
✅ vite2501
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable2501
✅ express-stable2501
✅ fastify-stable2501
✅ hono-stable2501
✅ nextjs-turbopack-stable2600
✅ nextjs-webpack-stable2600
✅ nitro-stable2501
✅ nuxt-stable2501
✅ sveltekit-stable2501
✅ vite-stable2501
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable2501
✅ express-stable2501
✅ fastify-stable2501
✅ hono-stable2501
✅ nextjs-turbopack-stable2600
✅ nextjs-webpack-stable2600
✅ nitro-stable2501
✅ nuxt-stable2501
✅ sveltekit-stable2501
✅ vite-stable2501
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable2501
✅ express-stable2501
✅ fastify-stable2501
✅ hono-stable2501
✅ nextjs-turbopack-stable2600
✅ nextjs-webpack-stable2600
✅ nitro-stable2501
✅ nuxt-stable2501
✅ sveltekit-stable2501
✅ vite-stable2501
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack2600
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb2510
✅ redis-dev300
❌ redis2510
✅ starter-dev300
❌ starter1880
✅ turso-dev300
❌ turso2510

📋 View full workflow run

@pranaygp

Copy link
Copy Markdown
Contributor

@copilot merge the latest main into this PR

CopilotAI commented Dec 9, 2025

Copy link
Copy Markdown
ContributorAuthor

@copilot merge the latest main into this PR

Merged latest main into this PR in commit 9fa8214. The merge completed successfully with no conflicts.

CopilotAI reviewed Dec 9, 2025

CopilotAI 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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Comment threaddocs/content/docs/errors/timeout-in-workflow.mdx
… functions
Co-authored-by: TooTallNate <71256+TooTallNate@users.noreply.github.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.

5 participants

@TooTallNate@pranaygp@VaguelySerious
, '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" + ' Override timeout functions in workflow VM context to throw helpful errors by Copilot · Pull Request #505 · vercel/workflow · GitHub
Skip to content

Override timeout functions in workflow VM context to throw helpful errors - #505

Merged
TooTallNate merged 6 commits into
mainfrom
copilot/override-timeout-functions-error
Dec 13, 2025
Merged

Override timeout functions in workflow VM context to throw helpful errors#505
TooTallNate merged 6 commits into
mainfrom
copilot/override-timeout-functions-error

Conversation

CopilotAI commented Dec 2, 2025

Copy link
Copy Markdown
Contributor
  • Add new error slug TIMEOUT_FUNCTIONS_IN_WORKFLOW to @workflow/errors package
  • Override setTimeout, setInterval, clearTimeout, clearInterval, setImmediate, and clearImmediate in the workflow VM context (packages/core/src/workflow.ts)
  • Each override throws a helpful error suggesting to use sleep() for timing needs
  • Add unit tests for the new overrides in packages/core/src/workflow.test.ts
  • Build and test changes
  • Create changeset
  • Run code review (1 nitpick about test duplication - kept to match existing style)
  • Run CodeQL security check (no issues found)
  • Use WorkflowRuntimeError class instead of vmGlobalThis.Error for proper logging (per PR feedback)
  • Add documentation page for timeout-in-workflow error (per PR feedback)
  • Merge latest main into PR (per PR feedback)
  • Reorder unavailable functions list in docs (per PR feedback)

View original Slack conversation


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

CopilotAI self-assigned this Dec 2, 2025
@changeset-bot

changeset-botBot commented Dec 2, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 68d3ba5

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

This PR includes changesets to release 16 packages
NameType
@workflow/errorsPatch
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/world-vercelPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/astroPatch
@workflow/sveltekitPatch
@workflow/world-testingPatch
@workflow/aiPatch
@workflow/nuxtPatch

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 Dec 2, 2025

Copy link
Copy Markdown
Contributor

@TooTallNateSlack

Copy link
Copy Markdown
Member

@copilot yeah i thought about this while back. we could provide a helpful message to suggest using sleep as well^
I really want to bring back the interleaved thinking/reasoning here. maybe it's not supported with gpt 5.1? demo looks way nicer with those thinking tokens in the UI instead of back to back tool calls
lemme see if i can add this rn
Detect usage of the global timeout functions (setTimeout(), etc.) when used in a workflow function context at build time (in the esbuild plugin?) and cause that to fail the build, similar to how we do when Node.js module usage is detected

…rors
Co-authored-by: TooTallNate <71256+TooTallNate@users.noreply.github.com>
@pranaygp
pranaygp marked this pull request as ready for review December 9, 2025 00:07
CopilotAI review requested due to automatic review settings December 9, 2025 00:07
@github-actions

github-actionsBot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.038s (-1.0%)1.014s (~)0.976s101.00x
💻 LocalNext.js (Turbopack)0.040s (+2.3%)1.017s (~)0.978s101.03x
🌐 RedisNext.js (Turbopack)0.041s (~)1.017s (~)0.976s101.06x
💻 LocalExpress0.043s (-4.6%)1.007s (~)0.964s101.13x
💻 LocalNitro0.044s (+51.0% 🔺)1.007s (~)0.963s101.15x
🌐 TursoNext.js (Turbopack)0.055s (-49.4% 🟢)1.014s (~)0.959s101.42x
🌐 MongoDBNext.js (Turbopack)0.070s (-37.2% 🟢)1.014s (~)0.944s101.81x
🐘 PostgresNext.js (Turbopack)0.151s (-5.9% 🟢)1.023s (~)0.872s103.91x
🐘 PostgresExpress0.252s (-29.6% 🟢)1.033s (-0.5%)0.781s106.55x
🐘 PostgresNitro0.306s (+6.3% 🔺)1.012s (~)0.705s107.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.505s (-25.0% 🟢)1.560s (+4.0%)1.054s101.00x
▲ VercelExpress0.545s (-10.0% 🟢)1.441s (-9.3% 🟢)0.896s101.08x
▲ VercelNext.js (Turbopack)0.621s (-15.8% 🟢)1.683s (-4.9%)1.062s101.23x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.094s (+0.5%)2.012s (~)0.918s101.00x
🌐 StarterNext.js (Turbopack)1.095s (+0.5%)2.010s (~)0.915s101.00x
🌐 RedisNext.js (Turbopack)1.100s (~)2.013s (~)0.912s101.01x
💻 LocalExpress1.112s (~)2.007s (~)0.895s101.02x
💻 LocalNitro1.116s (+3.8%)2.007s (~)0.891s101.02x
🌐 MongoDBNext.js (Turbopack)1.265s (-2.8%)2.014s (~)0.749s101.16x
🌐 TursoNext.js (Turbopack)1.278s (-2.0%)2.012s (~)0.734s101.17x
🐘 PostgresNitro2.166s (+1.5%)3.014s (~)0.848s101.98x
🐘 PostgresExpress2.362s (-3.2%)3.015s (~)0.653s102.16x
🐘 PostgresNext.js (Turbopack)2.445s (+23.4% 🔺)3.018s (+36.3% 🔺)0.573s102.24x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.576s (~)3.417s (-6.1% 🟢)0.840s101.00x
▲ VercelNext.js (Turbopack)2.655s (+0.9%)3.736s (+0.6%)1.081s101.03x
▲ VercelExpress3.101s (+19.7% 🔺)4.074s (+15.4% 🔺)0.973s101.20x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.599s (~)11.011s (~)0.412s51.00x
💻 LocalNext.js (Turbopack)10.653s (~)11.019s (~)0.366s51.01x
🌐 RedisNext.js (Turbopack)10.657s (~)11.014s (~)0.357s51.01x
💻 LocalExpress10.780s (~)11.011s (~)0.231s51.02x
💻 LocalNitro10.819s (+2.8%)11.013s (~)0.194s51.02x
🌐 TursoNext.js (Turbopack)12.181s (~)13.024s (~)0.842s51.15x
🌐 MongoDBNext.js (Turbopack)12.208s (~)13.021s (~)0.814s51.15x
🐘 PostgresNext.js (Turbopack)20.257s (+32.7% 🔺)21.044s (+31.3% 🔺)0.787s51.91x
🐘 PostgresExpress20.394s (+0.6%)21.029s (~)0.635s51.92x
🐘 PostgresNitro20.395s (~)21.038s (~)0.643s51.92x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)21.427s (-1.1%)21.956s (-2.4%)0.529s51.00x
▲ VercelNitro21.724s (+3.9%)22.499s (+4.2%)0.775s51.01x
▲ VercelExpress21.826s (+0.8%)22.565s (+0.9%)0.739s51.02x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 10 parallel steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.349s (-1.7%)2.011s (~)0.662s51.00x
🌐 RedisNext.js (Turbopack)1.352s (~)2.011s (~)0.659s51.00x
🌐 StarterNext.js (Turbopack)1.361s (+1.2%)2.009s (~)0.648s51.01x
💻 LocalExpress1.385s (-1.1%)2.007s (~)0.622s51.03x
💻 LocalNitro1.419s (+8.6% 🔺)2.006s (~)0.587s51.05x
🌐 TursoNext.js (Turbopack)2.117s (-4.0%)3.013s (~)0.896s51.57x
🌐 MongoDBNext.js (Turbopack)2.183s (+0.8%)3.012s (~)0.829s51.62x
🐘 PostgresNext.js (Turbopack)2.441s (+28.1% 🔺)3.032s (+36.9% 🔺)0.590s51.81x
🐘 PostgresExpress2.519s (+6.0% 🔺)3.012s (~)0.493s51.87x
🐘 PostgresNitro2.586s (+1.1%)3.012s (~)0.426s51.92x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.900s (-18.8% 🟢)4.789s (-14.3% 🟢)0.889s51.00x
▲ VercelNext.js (Turbopack)3.939s (-2.9%)4.910s (+4.5%)0.971s51.01x
▲ VercelNitro3.972s (+5.4% 🔺)4.820s (+5.3% 🔺)0.848s51.02x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

stress test: Promise.all with 100 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)6.632s (+3.7%)7.091s (+4.9%)0.459s51.00x
🌐 RedisNext.js (Turbopack)8.304s (+4.1%)8.415s (+4.1%)0.111s41.25x
🐘 PostgresNext.js (Turbopack)8.803s (+3.3%)9.209s (+3.5%)0.406s41.33x
🐘 PostgresNitro8.987s (-1.9%)9.310s (-1.8%)0.324s41.36x
🐘 PostgresExpress9.287s (+1.3%)9.614s (~)0.327s41.40x
💻 LocalExpress13.238s (-4.5%)13.338s (-4.6%)0.099s32.00x
💻 LocalNext.js (Turbopack)14.656s (+3.5%)14.755s (+2.4%)0.099s32.21x
💻 LocalNitro15.145s (+24.9% 🔺)15.338s (+25.1% 🔺)0.193s32.28x
🌐 TursoNext.js (Turbopack)19.929s (~)20.546s (~)0.617s23.00x
🌐 MongoDBNext.js (Turbopack)20.044s (+1.3%)20.568s (~)0.525s23.02x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)19.580s (+5.4% 🔺)20.086s (+5.7% 🔺)0.506s21.00x
▲ VercelExpress19.822s (+11.7% 🔺)20.528s (+11.0% 🔺)0.706s21.01x
▲ VercelNitro20.520s (+12.2% 🔺)21.530s (+14.2% 🔺)1.010s21.05x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

stress test: Promise.race with 100 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)6.712s (+0.8%)7.047s (+3.5%)0.335s51.00x
🌐 RedisNext.js (Turbopack)8.624s (~)9.099s (~)0.474s41.28x
🐘 PostgresNext.js (Turbopack)9.548s (-3.1%)9.812s (-4.3%)0.264s41.42x
🐘 PostgresExpress9.715s (+2.0%)10.195s (+4.9%)0.480s31.45x
🐘 PostgresNitro9.835s (+2.7%)10.011s (+3.8%)0.176s41.47x
💻 LocalExpress14.662s (-4.1%)15.066s (-2.5%)0.404s22.18x
💻 LocalNext.js (Turbopack)17.035s (+3.8%)17.384s (+5.4% 🔺)0.349s22.54x
💻 LocalNitro17.367s (+38.2% 🔺)17.610s (+38.8% 🔺)0.243s22.59x
🌐 MongoDBNext.js (Turbopack)19.869s (~)20.532s (~)0.663s22.96x
🌐 TursoNext.js (Turbopack)20.215s (+0.9%)20.782s (+1.1%)0.568s23.01x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.204s (-12.2% 🟢)17.841s (-11.4% 🟢)0.636s21.00x
▲ VercelExpress19.456s (-11.7% 🟢)20.479s (-12.1% 🟢)1.024s21.13x
▲ VercelNext.js (Turbopack)19.765s (-19.3% 🟢)20.512s (-18.5% 🟢)0.747s21.15x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.127s (+2.2%)1.005s (~)0.000s (+Infinity% 🔺)1.011s (~)0.884s101.00x
💻 LocalNext.js (Turbopack)0.136s (~)1.003s (~)0.017s (+3.1%)1.027s (~)0.890s101.07x
🌐 RedisNext.js (Turbopack)0.144s (-1.2%)1.005s (~)0.000s (NaN%)1.013s (~)0.868s101.14x
💻 LocalExpress0.172s (-2.6%)0.993s (~)0.014s (-2.1%)1.021s (~)0.849s101.35x
💻 LocalNitro0.183s (+64.6% 🔺)0.992s (-0.7%)0.015s (+30.1% 🔺)1.021s (~)0.838s101.44x
🌐 TursoNext.js (Turbopack)0.452s (-1.5%)0.998s (+0.6%)0.000s (~)1.012s (~)0.560s103.56x
🌐 MongoDBNext.js (Turbopack)0.486s (-7.7% 🟢)0.962s (+4.3%)0.000s (-100.0% 🟢)1.013s (~)0.526s103.83x
🐘 PostgresNext.js (Turbopack)1.121s (+40.1% 🔺)1.196s (-11.4% 🟢)0.000s (-100.0% 🟢)1.516s (+7.0% 🔺)0.395s108.82x
🐘 PostgresExpress2.159s (-9.0% 🟢)2.885s (+7.9% 🔺)0.000s (-100.0% 🟢)3.016s (~)0.856s1016.99x
🐘 PostgresNitro2.248s (+40.3% 🔺)2.798s (+31.7% 🔺)0.000s (+Infinity% 🔺)3.015s (+30.3% 🔺)0.767s1017.68x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.632s (+2.8%)2.983s (-4.5%)0.451s (+97.6% 🔺)3.854s (+1.4%)1.221s101.00x
▲ VercelNitro2.662s (+0.9%)3.200s (+1.0%)0.292s (+0.6%)3.940s (+2.0%)1.278s101.01x
▲ VercelNext.js (Turbopack)2.778s (+9.9% 🔺)3.280s (+6.8% 🔺)0.176s (-38.6% 🟢)3.932s (+4.6%)1.154s101.06x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)5/7
🐘 PostgresNext.js (Turbopack)6/7
▲ VercelNitro3/7
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local5/7
Next.js (Turbopack)🌐 Starter5/7
Nitro💻 Local5/7
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
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@github-actions

github-actionsBot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production275011286
✅ 💻 Local Development25208260
✅ 📦 Local Production25208260
✅ 🐘 Local Postgres25208260
✅ 🪟 Windows260026
❌ 🌍 Community Worlds105110116
Total116211351208

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

  • addTenWorkflow
  • addTenWorkflow
  • retryAttemptCounterWorkflow
  • crossFileErrorWorkflow - stack traces work across imported modules
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro2501
✅ example2501
✅ express2501
✅ fastify2501
✅ hono2501
✅ nextjs-turbopack2501
✅ nextjs-webpack2501
✅ nitro2501
✅ nuxt2501
✅ sveltekit2501
✅ vite2501
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable2501
✅ express-stable2501
✅ fastify-stable2501
✅ hono-stable2501
✅ nextjs-turbopack-stable2600
✅ nextjs-webpack-stable2600
✅ nitro-stable2501
✅ nuxt-stable2501
✅ sveltekit-stable2501
✅ vite-stable2501
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable2501
✅ express-stable2501
✅ fastify-stable2501
✅ hono-stable2501
✅ nextjs-turbopack-stable2600
✅ nextjs-webpack-stable2600
✅ nitro-stable2501
✅ nuxt-stable2501
✅ sveltekit-stable2501
✅ vite-stable2501
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable2501
✅ express-stable2501
✅ fastify-stable2501
✅ hono-stable2501
✅ nextjs-turbopack-stable2600
✅ nextjs-webpack-stable2600
✅ nitro-stable2501
✅ nuxt-stable2501
✅ sveltekit-stable2501
✅ vite-stable2501
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack2600
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb2510
✅ redis-dev300
❌ redis2510
✅ starter-dev300
❌ starter1880
✅ turso-dev300
❌ turso2510

📋 View full workflow run

@pranaygp

Copy link
Copy Markdown
Contributor

@copilot merge the latest main into this PR

CopilotAI commented Dec 9, 2025

Copy link
Copy Markdown
ContributorAuthor

@copilot merge the latest main into this PR

Merged latest main into this PR in commit 9fa8214. The merge completed successfully with no conflicts.

CopilotAI reviewed Dec 9, 2025

CopilotAI 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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Comment threaddocs/content/docs/errors/timeout-in-workflow.mdx
… functions
Co-authored-by: TooTallNate <71256+TooTallNate@users.noreply.github.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.

5 participants

@TooTallNate@pranaygp@VaguelySerious
, '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('^' + ".*" + ' Override timeout functions in workflow VM context to throw helpful errors by Copilot · Pull Request #505 · vercel/workflow · GitHub
Skip to content

Override timeout functions in workflow VM context to throw helpful errors - #505

Merged
TooTallNate merged 6 commits into
mainfrom
copilot/override-timeout-functions-error
Dec 13, 2025
Merged

Override timeout functions in workflow VM context to throw helpful errors#505
TooTallNate merged 6 commits into
mainfrom
copilot/override-timeout-functions-error

Conversation

CopilotAI commented Dec 2, 2025

Copy link
Copy Markdown
Contributor
  • Add new error slug TIMEOUT_FUNCTIONS_IN_WORKFLOW to @workflow/errors package
  • Override setTimeout, setInterval, clearTimeout, clearInterval, setImmediate, and clearImmediate in the workflow VM context (packages/core/src/workflow.ts)
  • Each override throws a helpful error suggesting to use sleep() for timing needs
  • Add unit tests for the new overrides in packages/core/src/workflow.test.ts
  • Build and test changes
  • Create changeset
  • Run code review (1 nitpick about test duplication - kept to match existing style)
  • Run CodeQL security check (no issues found)
  • Use WorkflowRuntimeError class instead of vmGlobalThis.Error for proper logging (per PR feedback)
  • Add documentation page for timeout-in-workflow error (per PR feedback)
  • Merge latest main into PR (per PR feedback)
  • Reorder unavailable functions list in docs (per PR feedback)

View original Slack conversation


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

CopilotAI self-assigned this Dec 2, 2025
@changeset-bot

changeset-botBot commented Dec 2, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 68d3ba5

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

This PR includes changesets to release 16 packages
NameType
@workflow/errorsPatch
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/world-vercelPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/astroPatch
@workflow/sveltekitPatch
@workflow/world-testingPatch
@workflow/aiPatch
@workflow/nuxtPatch

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 Dec 2, 2025

Copy link
Copy Markdown
Contributor

@TooTallNateSlack

Copy link
Copy Markdown
Member

@copilot yeah i thought about this while back. we could provide a helpful message to suggest using sleep as well^
I really want to bring back the interleaved thinking/reasoning here. maybe it's not supported with gpt 5.1? demo looks way nicer with those thinking tokens in the UI instead of back to back tool calls
lemme see if i can add this rn
Detect usage of the global timeout functions (setTimeout(), etc.) when used in a workflow function context at build time (in the esbuild plugin?) and cause that to fail the build, similar to how we do when Node.js module usage is detected

…rors
Co-authored-by: TooTallNate <71256+TooTallNate@users.noreply.github.com>
@pranaygp
pranaygp marked this pull request as ready for review December 9, 2025 00:07
CopilotAI review requested due to automatic review settings December 9, 2025 00:07
@github-actions

github-actionsBot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.038s (-1.0%)1.014s (~)0.976s101.00x
💻 LocalNext.js (Turbopack)0.040s (+2.3%)1.017s (~)0.978s101.03x
🌐 RedisNext.js (Turbopack)0.041s (~)1.017s (~)0.976s101.06x
💻 LocalExpress0.043s (-4.6%)1.007s (~)0.964s101.13x
💻 LocalNitro0.044s (+51.0% 🔺)1.007s (~)0.963s101.15x
🌐 TursoNext.js (Turbopack)0.055s (-49.4% 🟢)1.014s (~)0.959s101.42x
🌐 MongoDBNext.js (Turbopack)0.070s (-37.2% 🟢)1.014s (~)0.944s101.81x
🐘 PostgresNext.js (Turbopack)0.151s (-5.9% 🟢)1.023s (~)0.872s103.91x
🐘 PostgresExpress0.252s (-29.6% 🟢)1.033s (-0.5%)0.781s106.55x
🐘 PostgresNitro0.306s (+6.3% 🔺)1.012s (~)0.705s107.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.505s (-25.0% 🟢)1.560s (+4.0%)1.054s101.00x
▲ VercelExpress0.545s (-10.0% 🟢)1.441s (-9.3% 🟢)0.896s101.08x
▲ VercelNext.js (Turbopack)0.621s (-15.8% 🟢)1.683s (-4.9%)1.062s101.23x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.094s (+0.5%)2.012s (~)0.918s101.00x
🌐 StarterNext.js (Turbopack)1.095s (+0.5%)2.010s (~)0.915s101.00x
🌐 RedisNext.js (Turbopack)1.100s (~)2.013s (~)0.912s101.01x
💻 LocalExpress1.112s (~)2.007s (~)0.895s101.02x
💻 LocalNitro1.116s (+3.8%)2.007s (~)0.891s101.02x
🌐 MongoDBNext.js (Turbopack)1.265s (-2.8%)2.014s (~)0.749s101.16x
🌐 TursoNext.js (Turbopack)1.278s (-2.0%)2.012s (~)0.734s101.17x
🐘 PostgresNitro2.166s (+1.5%)3.014s (~)0.848s101.98x
🐘 PostgresExpress2.362s (-3.2%)3.015s (~)0.653s102.16x
🐘 PostgresNext.js (Turbopack)2.445s (+23.4% 🔺)3.018s (+36.3% 🔺)0.573s102.24x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.576s (~)3.417s (-6.1% 🟢)0.840s101.00x
▲ VercelNext.js (Turbopack)2.655s (+0.9%)3.736s (+0.6%)1.081s101.03x
▲ VercelExpress3.101s (+19.7% 🔺)4.074s (+15.4% 🔺)0.973s101.20x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.599s (~)11.011s (~)0.412s51.00x
💻 LocalNext.js (Turbopack)10.653s (~)11.019s (~)0.366s51.01x
🌐 RedisNext.js (Turbopack)10.657s (~)11.014s (~)0.357s51.01x
💻 LocalExpress10.780s (~)11.011s (~)0.231s51.02x
💻 LocalNitro10.819s (+2.8%)11.013s (~)0.194s51.02x
🌐 TursoNext.js (Turbopack)12.181s (~)13.024s (~)0.842s51.15x
🌐 MongoDBNext.js (Turbopack)12.208s (~)13.021s (~)0.814s51.15x
🐘 PostgresNext.js (Turbopack)20.257s (+32.7% 🔺)21.044s (+31.3% 🔺)0.787s51.91x
🐘 PostgresExpress20.394s (+0.6%)21.029s (~)0.635s51.92x
🐘 PostgresNitro20.395s (~)21.038s (~)0.643s51.92x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)21.427s (-1.1%)21.956s (-2.4%)0.529s51.00x
▲ VercelNitro21.724s (+3.9%)22.499s (+4.2%)0.775s51.01x
▲ VercelExpress21.826s (+0.8%)22.565s (+0.9%)0.739s51.02x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 10 parallel steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.349s (-1.7%)2.011s (~)0.662s51.00x
🌐 RedisNext.js (Turbopack)1.352s (~)2.011s (~)0.659s51.00x
🌐 StarterNext.js (Turbopack)1.361s (+1.2%)2.009s (~)0.648s51.01x
💻 LocalExpress1.385s (-1.1%)2.007s (~)0.622s51.03x
💻 LocalNitro1.419s (+8.6% 🔺)2.006s (~)0.587s51.05x
🌐 TursoNext.js (Turbopack)2.117s (-4.0%)3.013s (~)0.896s51.57x
🌐 MongoDBNext.js (Turbopack)2.183s (+0.8%)3.012s (~)0.829s51.62x
🐘 PostgresNext.js (Turbopack)2.441s (+28.1% 🔺)3.032s (+36.9% 🔺)0.590s51.81x
🐘 PostgresExpress2.519s (+6.0% 🔺)3.012s (~)0.493s51.87x
🐘 PostgresNitro2.586s (+1.1%)3.012s (~)0.426s51.92x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.900s (-18.8% 🟢)4.789s (-14.3% 🟢)0.889s51.00x
▲ VercelNext.js (Turbopack)3.939s (-2.9%)4.910s (+4.5%)0.971s51.01x
▲ VercelNitro3.972s (+5.4% 🔺)4.820s (+5.3% 🔺)0.848s51.02x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

stress test: Promise.all with 100 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)6.632s (+3.7%)7.091s (+4.9%)0.459s51.00x
🌐 RedisNext.js (Turbopack)8.304s (+4.1%)8.415s (+4.1%)0.111s41.25x
🐘 PostgresNext.js (Turbopack)8.803s (+3.3%)9.209s (+3.5%)0.406s41.33x
🐘 PostgresNitro8.987s (-1.9%)9.310s (-1.8%)0.324s41.36x
🐘 PostgresExpress9.287s (+1.3%)9.614s (~)0.327s41.40x
💻 LocalExpress13.238s (-4.5%)13.338s (-4.6%)0.099s32.00x
💻 LocalNext.js (Turbopack)14.656s (+3.5%)14.755s (+2.4%)0.099s32.21x
💻 LocalNitro15.145s (+24.9% 🔺)15.338s (+25.1% 🔺)0.193s32.28x
🌐 TursoNext.js (Turbopack)19.929s (~)20.546s (~)0.617s23.00x
🌐 MongoDBNext.js (Turbopack)20.044s (+1.3%)20.568s (~)0.525s23.02x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)19.580s (+5.4% 🔺)20.086s (+5.7% 🔺)0.506s21.00x
▲ VercelExpress19.822s (+11.7% 🔺)20.528s (+11.0% 🔺)0.706s21.01x
▲ VercelNitro20.520s (+12.2% 🔺)21.530s (+14.2% 🔺)1.010s21.05x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

stress test: Promise.race with 100 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)6.712s (+0.8%)7.047s (+3.5%)0.335s51.00x
🌐 RedisNext.js (Turbopack)8.624s (~)9.099s (~)0.474s41.28x
🐘 PostgresNext.js (Turbopack)9.548s (-3.1%)9.812s (-4.3%)0.264s41.42x
🐘 PostgresExpress9.715s (+2.0%)10.195s (+4.9%)0.480s31.45x
🐘 PostgresNitro9.835s (+2.7%)10.011s (+3.8%)0.176s41.47x
💻 LocalExpress14.662s (-4.1%)15.066s (-2.5%)0.404s22.18x
💻 LocalNext.js (Turbopack)17.035s (+3.8%)17.384s (+5.4% 🔺)0.349s22.54x
💻 LocalNitro17.367s (+38.2% 🔺)17.610s (+38.8% 🔺)0.243s22.59x
🌐 MongoDBNext.js (Turbopack)19.869s (~)20.532s (~)0.663s22.96x
🌐 TursoNext.js (Turbopack)20.215s (+0.9%)20.782s (+1.1%)0.568s23.01x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.204s (-12.2% 🟢)17.841s (-11.4% 🟢)0.636s21.00x
▲ VercelExpress19.456s (-11.7% 🟢)20.479s (-12.1% 🟢)1.024s21.13x
▲ VercelNext.js (Turbopack)19.765s (-19.3% 🟢)20.512s (-18.5% 🟢)0.747s21.15x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.127s (+2.2%)1.005s (~)0.000s (+Infinity% 🔺)1.011s (~)0.884s101.00x
💻 LocalNext.js (Turbopack)0.136s (~)1.003s (~)0.017s (+3.1%)1.027s (~)0.890s101.07x
🌐 RedisNext.js (Turbopack)0.144s (-1.2%)1.005s (~)0.000s (NaN%)1.013s (~)0.868s101.14x
💻 LocalExpress0.172s (-2.6%)0.993s (~)0.014s (-2.1%)1.021s (~)0.849s101.35x
💻 LocalNitro0.183s (+64.6% 🔺)0.992s (-0.7%)0.015s (+30.1% 🔺)1.021s (~)0.838s101.44x
🌐 TursoNext.js (Turbopack)0.452s (-1.5%)0.998s (+0.6%)0.000s (~)1.012s (~)0.560s103.56x
🌐 MongoDBNext.js (Turbopack)0.486s (-7.7% 🟢)0.962s (+4.3%)0.000s (-100.0% 🟢)1.013s (~)0.526s103.83x
🐘 PostgresNext.js (Turbopack)1.121s (+40.1% 🔺)1.196s (-11.4% 🟢)0.000s (-100.0% 🟢)1.516s (+7.0% 🔺)0.395s108.82x
🐘 PostgresExpress2.159s (-9.0% 🟢)2.885s (+7.9% 🔺)0.000s (-100.0% 🟢)3.016s (~)0.856s1016.99x
🐘 PostgresNitro2.248s (+40.3% 🔺)2.798s (+31.7% 🔺)0.000s (+Infinity% 🔺)3.015s (+30.3% 🔺)0.767s1017.68x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.632s (+2.8%)2.983s (-4.5%)0.451s (+97.6% 🔺)3.854s (+1.4%)1.221s101.00x
▲ VercelNitro2.662s (+0.9%)3.200s (+1.0%)0.292s (+0.6%)3.940s (+2.0%)1.278s101.01x
▲ VercelNext.js (Turbopack)2.778s (+9.9% 🔺)3.280s (+6.8% 🔺)0.176s (-38.6% 🟢)3.932s (+4.6%)1.154s101.06x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)5/7
🐘 PostgresNext.js (Turbopack)6/7
▲ VercelNitro3/7
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local5/7
Next.js (Turbopack)🌐 Starter5/7
Nitro💻 Local5/7
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
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@github-actions

github-actionsBot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production275011286
✅ 💻 Local Development25208260
✅ 📦 Local Production25208260
✅ 🐘 Local Postgres25208260
✅ 🪟 Windows260026
❌ 🌍 Community Worlds105110116
Total116211351208

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

  • addTenWorkflow
  • addTenWorkflow
  • retryAttemptCounterWorkflow
  • crossFileErrorWorkflow - stack traces work across imported modules
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro2501
✅ example2501
✅ express2501
✅ fastify2501
✅ hono2501
✅ nextjs-turbopack2501
✅ nextjs-webpack2501
✅ nitro2501
✅ nuxt2501
✅ sveltekit2501
✅ vite2501
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable2501
✅ express-stable2501
✅ fastify-stable2501
✅ hono-stable2501
✅ nextjs-turbopack-stable2600
✅ nextjs-webpack-stable2600
✅ nitro-stable2501
✅ nuxt-stable2501
✅ sveltekit-stable2501
✅ vite-stable2501
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable2501
✅ express-stable2501
✅ fastify-stable2501
✅ hono-stable2501
✅ nextjs-turbopack-stable2600
✅ nextjs-webpack-stable2600
✅ nitro-stable2501
✅ nuxt-stable2501
✅ sveltekit-stable2501
✅ vite-stable2501
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable2501
✅ express-stable2501
✅ fastify-stable2501
✅ hono-stable2501
✅ nextjs-turbopack-stable2600
✅ nextjs-webpack-stable2600
✅ nitro-stable2501
✅ nuxt-stable2501
✅ sveltekit-stable2501
✅ vite-stable2501
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack2600
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb2510
✅ redis-dev300
❌ redis2510
✅ starter-dev300
❌ starter1880
✅ turso-dev300
❌ turso2510

📋 View full workflow run

@pranaygp

Copy link
Copy Markdown
Contributor

@copilot merge the latest main into this PR

CopilotAI commented Dec 9, 2025

Copy link
Copy Markdown
ContributorAuthor

@copilot merge the latest main into this PR

Merged latest main into this PR in commit 9fa8214. The merge completed successfully with no conflicts.

CopilotAI reviewed Dec 9, 2025

CopilotAI 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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Comment threaddocs/content/docs/errors/timeout-in-workflow.mdx
… functions
Co-authored-by: TooTallNate <71256+TooTallNate@users.noreply.github.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.

5 participants

@TooTallNate@pranaygp@VaguelySerious
, '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); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Override timeout functions in workflow VM context to throw helpful errors by Copilot · Pull Request #505 · vercel/workflow · GitHub
Skip to content

Override timeout functions in workflow VM context to throw helpful errors - #505

Merged
TooTallNate merged 6 commits into
mainfrom
copilot/override-timeout-functions-error
Dec 13, 2025
Merged

Override timeout functions in workflow VM context to throw helpful errors#505
TooTallNate merged 6 commits into
mainfrom
copilot/override-timeout-functions-error

Conversation

CopilotAI commented Dec 2, 2025

Copy link
Copy Markdown
Contributor
  • Add new error slug TIMEOUT_FUNCTIONS_IN_WORKFLOW to @workflow/errors package
  • Override setTimeout, setInterval, clearTimeout, clearInterval, setImmediate, and clearImmediate in the workflow VM context (packages/core/src/workflow.ts)
  • Each override throws a helpful error suggesting to use sleep() for timing needs
  • Add unit tests for the new overrides in packages/core/src/workflow.test.ts
  • Build and test changes
  • Create changeset
  • Run code review (1 nitpick about test duplication - kept to match existing style)
  • Run CodeQL security check (no issues found)
  • Use WorkflowRuntimeError class instead of vmGlobalThis.Error for proper logging (per PR feedback)
  • Add documentation page for timeout-in-workflow error (per PR feedback)
  • Merge latest main into PR (per PR feedback)
  • Reorder unavailable functions list in docs (per PR feedback)

View original Slack conversation


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

CopilotAI self-assigned this Dec 2, 2025
@changeset-bot

changeset-botBot commented Dec 2, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 68d3ba5

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

This PR includes changesets to release 16 packages
NameType
@workflow/errorsPatch
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/world-vercelPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/astroPatch
@workflow/sveltekitPatch
@workflow/world-testingPatch
@workflow/aiPatch
@workflow/nuxtPatch

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 Dec 2, 2025

Copy link
Copy Markdown
Contributor

@TooTallNateSlack

Copy link
Copy Markdown
Member

@copilot yeah i thought about this while back. we could provide a helpful message to suggest using sleep as well^
I really want to bring back the interleaved thinking/reasoning here. maybe it's not supported with gpt 5.1? demo looks way nicer with those thinking tokens in the UI instead of back to back tool calls
lemme see if i can add this rn
Detect usage of the global timeout functions (setTimeout(), etc.) when used in a workflow function context at build time (in the esbuild plugin?) and cause that to fail the build, similar to how we do when Node.js module usage is detected

…rors
Co-authored-by: TooTallNate <71256+TooTallNate@users.noreply.github.com>
@pranaygp
pranaygp marked this pull request as ready for review December 9, 2025 00:07
CopilotAI review requested due to automatic review settings December 9, 2025 00:07
@github-actions

github-actionsBot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.038s (-1.0%)1.014s (~)0.976s101.00x
💻 LocalNext.js (Turbopack)0.040s (+2.3%)1.017s (~)0.978s101.03x
🌐 RedisNext.js (Turbopack)0.041s (~)1.017s (~)0.976s101.06x
💻 LocalExpress0.043s (-4.6%)1.007s (~)0.964s101.13x
💻 LocalNitro0.044s (+51.0% 🔺)1.007s (~)0.963s101.15x
🌐 TursoNext.js (Turbopack)0.055s (-49.4% 🟢)1.014s (~)0.959s101.42x
🌐 MongoDBNext.js (Turbopack)0.070s (-37.2% 🟢)1.014s (~)0.944s101.81x
🐘 PostgresNext.js (Turbopack)0.151s (-5.9% 🟢)1.023s (~)0.872s103.91x
🐘 PostgresExpress0.252s (-29.6% 🟢)1.033s (-0.5%)0.781s106.55x
🐘 PostgresNitro0.306s (+6.3% 🔺)1.012s (~)0.705s107.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.505s (-25.0% 🟢)1.560s (+4.0%)1.054s101.00x
▲ VercelExpress0.545s (-10.0% 🟢)1.441s (-9.3% 🟢)0.896s101.08x
▲ VercelNext.js (Turbopack)0.621s (-15.8% 🟢)1.683s (-4.9%)1.062s101.23x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.094s (+0.5%)2.012s (~)0.918s101.00x
🌐 StarterNext.js (Turbopack)1.095s (+0.5%)2.010s (~)0.915s101.00x
🌐 RedisNext.js (Turbopack)1.100s (~)2.013s (~)0.912s101.01x
💻 LocalExpress1.112s (~)2.007s (~)0.895s101.02x
💻 LocalNitro1.116s (+3.8%)2.007s (~)0.891s101.02x
🌐 MongoDBNext.js (Turbopack)1.265s (-2.8%)2.014s (~)0.749s101.16x
🌐 TursoNext.js (Turbopack)1.278s (-2.0%)2.012s (~)0.734s101.17x
🐘 PostgresNitro2.166s (+1.5%)3.014s (~)0.848s101.98x
🐘 PostgresExpress2.362s (-3.2%)3.015s (~)0.653s102.16x
🐘 PostgresNext.js (Turbopack)2.445s (+23.4% 🔺)3.018s (+36.3% 🔺)0.573s102.24x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.576s (~)3.417s (-6.1% 🟢)0.840s101.00x
▲ VercelNext.js (Turbopack)2.655s (+0.9%)3.736s (+0.6%)1.081s101.03x
▲ VercelExpress3.101s (+19.7% 🔺)4.074s (+15.4% 🔺)0.973s101.20x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.599s (~)11.011s (~)0.412s51.00x
💻 LocalNext.js (Turbopack)10.653s (~)11.019s (~)0.366s51.01x
🌐 RedisNext.js (Turbopack)10.657s (~)11.014s (~)0.357s51.01x
💻 LocalExpress10.780s (~)11.011s (~)0.231s51.02x
💻 LocalNitro10.819s (+2.8%)11.013s (~)0.194s51.02x
🌐 TursoNext.js (Turbopack)12.181s (~)13.024s (~)0.842s51.15x
🌐 MongoDBNext.js (Turbopack)12.208s (~)13.021s (~)0.814s51.15x
🐘 PostgresNext.js (Turbopack)20.257s (+32.7% 🔺)21.044s (+31.3% 🔺)0.787s51.91x
🐘 PostgresExpress20.394s (+0.6%)21.029s (~)0.635s51.92x
🐘 PostgresNitro20.395s (~)21.038s (~)0.643s51.92x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)21.427s (-1.1%)21.956s (-2.4%)0.529s51.00x
▲ VercelNitro21.724s (+3.9%)22.499s (+4.2%)0.775s51.01x
▲ VercelExpress21.826s (+0.8%)22.565s (+0.9%)0.739s51.02x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 10 parallel steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.349s (-1.7%)2.011s (~)0.662s51.00x
🌐 RedisNext.js (Turbopack)1.352s (~)2.011s (~)0.659s51.00x
🌐 StarterNext.js (Turbopack)1.361s (+1.2%)2.009s (~)0.648s51.01x
💻 LocalExpress1.385s (-1.1%)2.007s (~)0.622s51.03x
💻 LocalNitro1.419s (+8.6% 🔺)2.006s (~)0.587s51.05x
🌐 TursoNext.js (Turbopack)2.117s (-4.0%)3.013s (~)0.896s51.57x
🌐 MongoDBNext.js (Turbopack)2.183s (+0.8%)3.012s (~)0.829s51.62x
🐘 PostgresNext.js (Turbopack)2.441s (+28.1% 🔺)3.032s (+36.9% 🔺)0.590s51.81x
🐘 PostgresExpress2.519s (+6.0% 🔺)3.012s (~)0.493s51.87x
🐘 PostgresNitro2.586s (+1.1%)3.012s (~)0.426s51.92x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.900s (-18.8% 🟢)4.789s (-14.3% 🟢)0.889s51.00x
▲ VercelNext.js (Turbopack)3.939s (-2.9%)4.910s (+4.5%)0.971s51.01x
▲ VercelNitro3.972s (+5.4% 🔺)4.820s (+5.3% 🔺)0.848s51.02x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

stress test: Promise.all with 100 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)6.632s (+3.7%)7.091s (+4.9%)0.459s51.00x
🌐 RedisNext.js (Turbopack)8.304s (+4.1%)8.415s (+4.1%)0.111s41.25x
🐘 PostgresNext.js (Turbopack)8.803s (+3.3%)9.209s (+3.5%)0.406s41.33x
🐘 PostgresNitro8.987s (-1.9%)9.310s (-1.8%)0.324s41.36x
🐘 PostgresExpress9.287s (+1.3%)9.614s (~)0.327s41.40x
💻 LocalExpress13.238s (-4.5%)13.338s (-4.6%)0.099s32.00x
💻 LocalNext.js (Turbopack)14.656s (+3.5%)14.755s (+2.4%)0.099s32.21x
💻 LocalNitro15.145s (+24.9% 🔺)15.338s (+25.1% 🔺)0.193s32.28x
🌐 TursoNext.js (Turbopack)19.929s (~)20.546s (~)0.617s23.00x
🌐 MongoDBNext.js (Turbopack)20.044s (+1.3%)20.568s (~)0.525s23.02x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)19.580s (+5.4% 🔺)20.086s (+5.7% 🔺)0.506s21.00x
▲ VercelExpress19.822s (+11.7% 🔺)20.528s (+11.0% 🔺)0.706s21.01x
▲ VercelNitro20.520s (+12.2% 🔺)21.530s (+14.2% 🔺)1.010s21.05x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

stress test: Promise.race with 100 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)6.712s (+0.8%)7.047s (+3.5%)0.335s51.00x
🌐 RedisNext.js (Turbopack)8.624s (~)9.099s (~)0.474s41.28x
🐘 PostgresNext.js (Turbopack)9.548s (-3.1%)9.812s (-4.3%)0.264s41.42x
🐘 PostgresExpress9.715s (+2.0%)10.195s (+4.9%)0.480s31.45x
🐘 PostgresNitro9.835s (+2.7%)10.011s (+3.8%)0.176s41.47x
💻 LocalExpress14.662s (-4.1%)15.066s (-2.5%)0.404s22.18x
💻 LocalNext.js (Turbopack)17.035s (+3.8%)17.384s (+5.4% 🔺)0.349s22.54x
💻 LocalNitro17.367s (+38.2% 🔺)17.610s (+38.8% 🔺)0.243s22.59x
🌐 MongoDBNext.js (Turbopack)19.869s (~)20.532s (~)0.663s22.96x
🌐 TursoNext.js (Turbopack)20.215s (+0.9%)20.782s (+1.1%)0.568s23.01x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.204s (-12.2% 🟢)17.841s (-11.4% 🟢)0.636s21.00x
▲ VercelExpress19.456s (-11.7% 🟢)20.479s (-12.1% 🟢)1.024s21.13x
▲ VercelNext.js (Turbopack)19.765s (-19.3% 🟢)20.512s (-18.5% 🟢)0.747s21.15x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.127s (+2.2%)1.005s (~)0.000s (+Infinity% 🔺)1.011s (~)0.884s101.00x
💻 LocalNext.js (Turbopack)0.136s (~)1.003s (~)0.017s (+3.1%)1.027s (~)0.890s101.07x
🌐 RedisNext.js (Turbopack)0.144s (-1.2%)1.005s (~)0.000s (NaN%)1.013s (~)0.868s101.14x
💻 LocalExpress0.172s (-2.6%)0.993s (~)0.014s (-2.1%)1.021s (~)0.849s101.35x
💻 LocalNitro0.183s (+64.6% 🔺)0.992s (-0.7%)0.015s (+30.1% 🔺)1.021s (~)0.838s101.44x
🌐 TursoNext.js (Turbopack)0.452s (-1.5%)0.998s (+0.6%)0.000s (~)1.012s (~)0.560s103.56x
🌐 MongoDBNext.js (Turbopack)0.486s (-7.7% 🟢)0.962s (+4.3%)0.000s (-100.0% 🟢)1.013s (~)0.526s103.83x
🐘 PostgresNext.js (Turbopack)1.121s (+40.1% 🔺)1.196s (-11.4% 🟢)0.000s (-100.0% 🟢)1.516s (+7.0% 🔺)0.395s108.82x
🐘 PostgresExpress2.159s (-9.0% 🟢)2.885s (+7.9% 🔺)0.000s (-100.0% 🟢)3.016s (~)0.856s1016.99x
🐘 PostgresNitro2.248s (+40.3% 🔺)2.798s (+31.7% 🔺)0.000s (+Infinity% 🔺)3.015s (+30.3% 🔺)0.767s1017.68x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.632s (+2.8%)2.983s (-4.5%)0.451s (+97.6% 🔺)3.854s (+1.4%)1.221s101.00x
▲ VercelNitro2.662s (+0.9%)3.200s (+1.0%)0.292s (+0.6%)3.940s (+2.0%)1.278s101.01x
▲ VercelNext.js (Turbopack)2.778s (+9.9% 🔺)3.280s (+6.8% 🔺)0.176s (-38.6% 🟢)3.932s (+4.6%)1.154s101.06x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)5/7
🐘 PostgresNext.js (Turbopack)6/7
▲ VercelNitro3/7
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local5/7
Next.js (Turbopack)🌐 Starter5/7
Nitro💻 Local5/7
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
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@github-actions

github-actionsBot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production275011286
✅ 💻 Local Development25208260
✅ 📦 Local Production25208260
✅ 🐘 Local Postgres25208260
✅ 🪟 Windows260026
❌ 🌍 Community Worlds105110116
Total116211351208

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

  • addTenWorkflow
  • addTenWorkflow
  • retryAttemptCounterWorkflow
  • crossFileErrorWorkflow - stack traces work across imported modules
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro2501
✅ example2501
✅ express2501
✅ fastify2501
✅ hono2501
✅ nextjs-turbopack2501
✅ nextjs-webpack2501
✅ nitro2501
✅ nuxt2501
✅ sveltekit2501
✅ vite2501
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable2501
✅ express-stable2501
✅ fastify-stable2501
✅ hono-stable2501
✅ nextjs-turbopack-stable2600
✅ nextjs-webpack-stable2600
✅ nitro-stable2501
✅ nuxt-stable2501
✅ sveltekit-stable2501
✅ vite-stable2501
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable2501
✅ express-stable2501
✅ fastify-stable2501
✅ hono-stable2501
✅ nextjs-turbopack-stable2600
✅ nextjs-webpack-stable2600
✅ nitro-stable2501
✅ nuxt-stable2501
✅ sveltekit-stable2501
✅ vite-stable2501
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable2501
✅ express-stable2501
✅ fastify-stable2501
✅ hono-stable2501
✅ nextjs-turbopack-stable2600
✅ nextjs-webpack-stable2600
✅ nitro-stable2501
✅ nuxt-stable2501
✅ sveltekit-stable2501
✅ vite-stable2501
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack2600
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb2510
✅ redis-dev300
❌ redis2510
✅ starter-dev300
❌ starter1880
✅ turso-dev300
❌ turso2510

📋 View full workflow run

@pranaygp

Copy link
Copy Markdown
Contributor

@copilot merge the latest main into this PR

CopilotAI commented Dec 9, 2025

Copy link
Copy Markdown
ContributorAuthor

@copilot merge the latest main into this PR

Merged latest main into this PR in commit 9fa8214. The merge completed successfully with no conflicts.

CopilotAI reviewed Dec 9, 2025

CopilotAI 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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Comment threaddocs/content/docs/errors/timeout-in-workflow.mdx
… functions
Co-authored-by: TooTallNate <71256+TooTallNate@users.noreply.github.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.

5 participants

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

Override timeout functions in workflow VM context to throw helpful errors - #505

Merged
TooTallNate merged 6 commits into
mainfrom
copilot/override-timeout-functions-error
Dec 13, 2025
Merged

Override timeout functions in workflow VM context to throw helpful errors#505
TooTallNate merged 6 commits into
mainfrom
copilot/override-timeout-functions-error

Conversation

CopilotAI commented Dec 2, 2025

Copy link
Copy Markdown
Contributor
  • Add new error slug TIMEOUT_FUNCTIONS_IN_WORKFLOW to @workflow/errors package
  • Override setTimeout, setInterval, clearTimeout, clearInterval, setImmediate, and clearImmediate in the workflow VM context (packages/core/src/workflow.ts)
  • Each override throws a helpful error suggesting to use sleep() for timing needs
  • Add unit tests for the new overrides in packages/core/src/workflow.test.ts
  • Build and test changes
  • Create changeset
  • Run code review (1 nitpick about test duplication - kept to match existing style)
  • Run CodeQL security check (no issues found)
  • Use WorkflowRuntimeError class instead of vmGlobalThis.Error for proper logging (per PR feedback)
  • Add documentation page for timeout-in-workflow error (per PR feedback)
  • Merge latest main into PR (per PR feedback)
  • Reorder unavailable functions list in docs (per PR feedback)

View original Slack conversation


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

CopilotAI self-assigned this Dec 2, 2025
@changeset-bot

changeset-botBot commented Dec 2, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 68d3ba5

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

This PR includes changesets to release 16 packages
NameType
@workflow/errorsPatch
@workflow/corePatch
@workflow/buildersPatch
@workflow/cliPatch
@workflow/web-sharedPatch
workflowPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/world-vercelPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/astroPatch
@workflow/sveltekitPatch
@workflow/world-testingPatch
@workflow/aiPatch
@workflow/nuxtPatch

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 Dec 2, 2025

Copy link
Copy Markdown
Contributor

@TooTallNateSlack

Copy link
Copy Markdown
Member

@copilot yeah i thought about this while back. we could provide a helpful message to suggest using sleep as well^
I really want to bring back the interleaved thinking/reasoning here. maybe it's not supported with gpt 5.1? demo looks way nicer with those thinking tokens in the UI instead of back to back tool calls
lemme see if i can add this rn
Detect usage of the global timeout functions (setTimeout(), etc.) when used in a workflow function context at build time (in the esbuild plugin?) and cause that to fail the build, similar to how we do when Node.js module usage is detected

…rors
Co-authored-by: TooTallNate <71256+TooTallNate@users.noreply.github.com>
@pranaygp
pranaygp marked this pull request as ready for review December 9, 2025 00:07
CopilotAI review requested due to automatic review settings December 9, 2025 00:07
@github-actions

github-actionsBot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.038s (-1.0%)1.014s (~)0.976s101.00x
💻 LocalNext.js (Turbopack)0.040s (+2.3%)1.017s (~)0.978s101.03x
🌐 RedisNext.js (Turbopack)0.041s (~)1.017s (~)0.976s101.06x
💻 LocalExpress0.043s (-4.6%)1.007s (~)0.964s101.13x
💻 LocalNitro0.044s (+51.0% 🔺)1.007s (~)0.963s101.15x
🌐 TursoNext.js (Turbopack)0.055s (-49.4% 🟢)1.014s (~)0.959s101.42x
🌐 MongoDBNext.js (Turbopack)0.070s (-37.2% 🟢)1.014s (~)0.944s101.81x
🐘 PostgresNext.js (Turbopack)0.151s (-5.9% 🟢)1.023s (~)0.872s103.91x
🐘 PostgresExpress0.252s (-29.6% 🟢)1.033s (-0.5%)0.781s106.55x
🐘 PostgresNitro0.306s (+6.3% 🔺)1.012s (~)0.705s107.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.505s (-25.0% 🟢)1.560s (+4.0%)1.054s101.00x
▲ VercelExpress0.545s (-10.0% 🟢)1.441s (-9.3% 🟢)0.896s101.08x
▲ VercelNext.js (Turbopack)0.621s (-15.8% 🟢)1.683s (-4.9%)1.062s101.23x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.094s (+0.5%)2.012s (~)0.918s101.00x
🌐 StarterNext.js (Turbopack)1.095s (+0.5%)2.010s (~)0.915s101.00x
🌐 RedisNext.js (Turbopack)1.100s (~)2.013s (~)0.912s101.01x
💻 LocalExpress1.112s (~)2.007s (~)0.895s101.02x
💻 LocalNitro1.116s (+3.8%)2.007s (~)0.891s101.02x
🌐 MongoDBNext.js (Turbopack)1.265s (-2.8%)2.014s (~)0.749s101.16x
🌐 TursoNext.js (Turbopack)1.278s (-2.0%)2.012s (~)0.734s101.17x
🐘 PostgresNitro2.166s (+1.5%)3.014s (~)0.848s101.98x
🐘 PostgresExpress2.362s (-3.2%)3.015s (~)0.653s102.16x
🐘 PostgresNext.js (Turbopack)2.445s (+23.4% 🔺)3.018s (+36.3% 🔺)0.573s102.24x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.576s (~)3.417s (-6.1% 🟢)0.840s101.00x
▲ VercelNext.js (Turbopack)2.655s (+0.9%)3.736s (+0.6%)1.081s101.03x
▲ VercelExpress3.101s (+19.7% 🔺)4.074s (+15.4% 🔺)0.973s101.20x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.599s (~)11.011s (~)0.412s51.00x
💻 LocalNext.js (Turbopack)10.653s (~)11.019s (~)0.366s51.01x
🌐 RedisNext.js (Turbopack)10.657s (~)11.014s (~)0.357s51.01x
💻 LocalExpress10.780s (~)11.011s (~)0.231s51.02x
💻 LocalNitro10.819s (+2.8%)11.013s (~)0.194s51.02x
🌐 TursoNext.js (Turbopack)12.181s (~)13.024s (~)0.842s51.15x
🌐 MongoDBNext.js (Turbopack)12.208s (~)13.021s (~)0.814s51.15x
🐘 PostgresNext.js (Turbopack)20.257s (+32.7% 🔺)21.044s (+31.3% 🔺)0.787s51.91x
🐘 PostgresExpress20.394s (+0.6%)21.029s (~)0.635s51.92x
🐘 PostgresNitro20.395s (~)21.038s (~)0.643s51.92x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)21.427s (-1.1%)21.956s (-2.4%)0.529s51.00x
▲ VercelNitro21.724s (+3.9%)22.499s (+4.2%)0.775s51.01x
▲ VercelExpress21.826s (+0.8%)22.565s (+0.9%)0.739s51.02x

🔍 Observability: Next.js (Turbopack) | Nitro | Express

workflow with 10 parallel steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.349s (-1.7%)2.011s (~)0.662s51.00x
🌐 RedisNext.js (Turbopack)1.352s (~)2.011s (~)0.659s51.00x
🌐 StarterNext.js (Turbopack)1.361s (+1.2%)2.009s (~)0.648s51.01x
💻 LocalExpress1.385s (-1.1%)2.007s (~)0.622s51.03x
💻 LocalNitro1.419s (+8.6% 🔺)2.006s (~)0.587s51.05x
🌐 TursoNext.js (Turbopack)2.117s (-4.0%)3.013s (~)0.896s51.57x
🌐 MongoDBNext.js (Turbopack)2.183s (+0.8%)3.012s (~)0.829s51.62x
🐘 PostgresNext.js (Turbopack)2.441s (+28.1% 🔺)3.032s (+36.9% 🔺)0.590s51.81x
🐘 PostgresExpress2.519s (+6.0% 🔺)3.012s (~)0.493s51.87x
🐘 PostgresNitro2.586s (+1.1%)3.012s (~)0.426s51.92x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.900s (-18.8% 🟢)4.789s (-14.3% 🟢)0.889s51.00x
▲ VercelNext.js (Turbopack)3.939s (-2.9%)4.910s (+4.5%)0.971s51.01x
▲ VercelNitro3.972s (+5.4% 🔺)4.820s (+5.3% 🔺)0.848s51.02x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

stress test: Promise.all with 100 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)6.632s (+3.7%)7.091s (+4.9%)0.459s51.00x
🌐 RedisNext.js (Turbopack)8.304s (+4.1%)8.415s (+4.1%)0.111s41.25x
🐘 PostgresNext.js (Turbopack)8.803s (+3.3%)9.209s (+3.5%)0.406s41.33x
🐘 PostgresNitro8.987s (-1.9%)9.310s (-1.8%)0.324s41.36x
🐘 PostgresExpress9.287s (+1.3%)9.614s (~)0.327s41.40x
💻 LocalExpress13.238s (-4.5%)13.338s (-4.6%)0.099s32.00x
💻 LocalNext.js (Turbopack)14.656s (+3.5%)14.755s (+2.4%)0.099s32.21x
💻 LocalNitro15.145s (+24.9% 🔺)15.338s (+25.1% 🔺)0.193s32.28x
🌐 TursoNext.js (Turbopack)19.929s (~)20.546s (~)0.617s23.00x
🌐 MongoDBNext.js (Turbopack)20.044s (+1.3%)20.568s (~)0.525s23.02x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)19.580s (+5.4% 🔺)20.086s (+5.7% 🔺)0.506s21.00x
▲ VercelExpress19.822s (+11.7% 🔺)20.528s (+11.0% 🔺)0.706s21.01x
▲ VercelNitro20.520s (+12.2% 🔺)21.530s (+14.2% 🔺)1.010s21.05x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

stress test: Promise.race with 100 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)6.712s (+0.8%)7.047s (+3.5%)0.335s51.00x
🌐 RedisNext.js (Turbopack)8.624s (~)9.099s (~)0.474s41.28x
🐘 PostgresNext.js (Turbopack)9.548s (-3.1%)9.812s (-4.3%)0.264s41.42x
🐘 PostgresExpress9.715s (+2.0%)10.195s (+4.9%)0.480s31.45x
🐘 PostgresNitro9.835s (+2.7%)10.011s (+3.8%)0.176s41.47x
💻 LocalExpress14.662s (-4.1%)15.066s (-2.5%)0.404s22.18x
💻 LocalNext.js (Turbopack)17.035s (+3.8%)17.384s (+5.4% 🔺)0.349s22.54x
💻 LocalNitro17.367s (+38.2% 🔺)17.610s (+38.8% 🔺)0.243s22.59x
🌐 MongoDBNext.js (Turbopack)19.869s (~)20.532s (~)0.663s22.96x
🌐 TursoNext.js (Turbopack)20.215s (+0.9%)20.782s (+1.1%)0.568s23.01x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro17.204s (-12.2% 🟢)17.841s (-11.4% 🟢)0.636s21.00x
▲ VercelExpress19.456s (-11.7% 🟢)20.479s (-12.1% 🟢)1.024s21.13x
▲ VercelNext.js (Turbopack)19.765s (-19.3% 🟢)20.512s (-18.5% 🟢)0.747s21.15x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.127s (+2.2%)1.005s (~)0.000s (+Infinity% 🔺)1.011s (~)0.884s101.00x
💻 LocalNext.js (Turbopack)0.136s (~)1.003s (~)0.017s (+3.1%)1.027s (~)0.890s101.07x
🌐 RedisNext.js (Turbopack)0.144s (-1.2%)1.005s (~)0.000s (NaN%)1.013s (~)0.868s101.14x
💻 LocalExpress0.172s (-2.6%)0.993s (~)0.014s (-2.1%)1.021s (~)0.849s101.35x
💻 LocalNitro0.183s (+64.6% 🔺)0.992s (-0.7%)0.015s (+30.1% 🔺)1.021s (~)0.838s101.44x
🌐 TursoNext.js (Turbopack)0.452s (-1.5%)0.998s (+0.6%)0.000s (~)1.012s (~)0.560s103.56x
🌐 MongoDBNext.js (Turbopack)0.486s (-7.7% 🟢)0.962s (+4.3%)0.000s (-100.0% 🟢)1.013s (~)0.526s103.83x
🐘 PostgresNext.js (Turbopack)1.121s (+40.1% 🔺)1.196s (-11.4% 🟢)0.000s (-100.0% 🟢)1.516s (+7.0% 🔺)0.395s108.82x
🐘 PostgresExpress2.159s (-9.0% 🟢)2.885s (+7.9% 🔺)0.000s (-100.0% 🟢)3.016s (~)0.856s1016.99x
🐘 PostgresNitro2.248s (+40.3% 🔺)2.798s (+31.7% 🔺)0.000s (+Infinity% 🔺)3.015s (+30.3% 🔺)0.767s1017.68x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.632s (+2.8%)2.983s (-4.5%)0.451s (+97.6% 🔺)3.854s (+1.4%)1.221s101.00x
▲ VercelNitro2.662s (+0.9%)3.200s (+1.0%)0.292s (+0.6%)3.940s (+2.0%)1.278s101.01x
▲ VercelNext.js (Turbopack)2.778s (+9.9% 🔺)3.280s (+6.8% 🔺)0.176s (-38.6% 🟢)3.932s (+4.6%)1.154s101.06x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)5/7
🐘 PostgresNext.js (Turbopack)6/7
▲ VercelNitro3/7
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local5/7
Next.js (Turbopack)🌐 Starter5/7
Nitro💻 Local5/7
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
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@github-actions

github-actionsBot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production275011286
✅ 💻 Local Development25208260
✅ 📦 Local Production25208260
✅ 🐘 Local Postgres25208260
✅ 🪟 Windows260026
❌ 🌍 Community Worlds105110116
Total116211351208

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

  • addTenWorkflow
  • addTenWorkflow
  • retryAttemptCounterWorkflow
  • crossFileErrorWorkflow - stack traces work across imported modules
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro2501
✅ example2501
✅ express2501
✅ fastify2501
✅ hono2501
✅ nextjs-turbopack2501
✅ nextjs-webpack2501
✅ nitro2501
✅ nuxt2501
✅ sveltekit2501
✅ vite2501
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable2501
✅ express-stable2501
✅ fastify-stable2501
✅ hono-stable2501
✅ nextjs-turbopack-stable2600
✅ nextjs-webpack-stable2600
✅ nitro-stable2501
✅ nuxt-stable2501
✅ sveltekit-stable2501
✅ vite-stable2501
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable2501
✅ express-stable2501
✅ fastify-stable2501
✅ hono-stable2501
✅ nextjs-turbopack-stable2600
✅ nextjs-webpack-stable2600
✅ nitro-stable2501
✅ nuxt-stable2501
✅ sveltekit-stable2501
✅ vite-stable2501
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable2501
✅ express-stable2501
✅ fastify-stable2501
✅ hono-stable2501
✅ nextjs-turbopack-stable2600
✅ nextjs-webpack-stable2600
✅ nitro-stable2501
✅ nuxt-stable2501
✅ sveltekit-stable2501
✅ vite-stable2501
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack2600
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb2510
✅ redis-dev300
❌ redis2510
✅ starter-dev300
❌ starter1880
✅ turso-dev300
❌ turso2510

📋 View full workflow run

@pranaygp

Copy link
Copy Markdown
Contributor

@copilot merge the latest main into this PR

CopilotAI commented Dec 9, 2025

Copy link
Copy Markdown
ContributorAuthor

@copilot merge the latest main into this PR

Merged latest main into this PR in commit 9fa8214. The merge completed successfully with no conflicts.

CopilotAI reviewed Dec 9, 2025

CopilotAI 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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Comment threaddocs/content/docs/errors/timeout-in-workflow.mdx
… functions
Co-authored-by: TooTallNate <71256+TooTallNate@users.noreply.github.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.

5 participants

@TooTallNate@pranaygp@VaguelySerious