Clamp setTimeout value to 32-bit integer (~25d) for sleep() - #824

Merged
TooTallNate merged 1 commit into
mainfrom
01-21-clamp_settimeout_value_to_32-bit_integer_25d_for_sleep_
Jan 21, 2026
Merged

Clamp setTimeout value to 32-bit integer (~25d) for sleep()#824
TooTallNate merged 1 commit into
mainfrom
01-21-clamp_settimeout_value_to_32-bit_integer_25d_for_sleep_

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Jan 21, 2026

Copy link
Copy Markdown
Member

Fix timeout overflow error in world-local queue implementation by clamping setTimeout values.

Fixes#823.

What changed?

  • Added a MAX_SAFE_TIMEOUT_MS constant (2147483647 ms, ~24.85 days) to prevent Node.js 32-bit integer overflow
  • Modified the setTimeout call in the queue retry logic to clamp timeout values to this maximum

How to test?

  1. Create a workflow with a very long sleep duration (> 25 days)
  2. Run it in local mode
  3. Verify no "TimeoutOverflowWarning" appears in the logs
  4. Confirm the sleep functionality still works correctly with the clamped values

Why make this change?

Node.js setTimeout uses a 32-bit signed integer internally, which means values larger than ~25 days cause overflow warnings. This change prevents those warnings while maintaining the correct behavior by allowing the handler to recalculate remaining time from persistent state when the clamped timeout fires. This is fine (using a value less than what the user requested) because the workflow handler logic will issue another queue call with timeoutSeconds if the desired date has not elapsed when the workflow is re-run.

@changeset-bot

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a33b789

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

This PR includes changesets to release 15 packages
NameType
@workflow/world-localPatch
@workflow/cliPatch
@workflow/corePatch
@workflow/world-postgresPatch
workflowPatch
@workflow/world-testingPatch
@workflow/buildersPatch
@workflow/docs-typecheckPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
@workflow/aiPatch
@workflow/astroPatch
@workflow/sveltekitPatch
@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 Jan 21, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jan 21, 2026

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
💻 Local🥇 Next.js (Turbopack)0.037s (-17.3% 🟢)1.019s (~)0.983s101.00x
🌐 RedisNext.js (Turbopack)0.041s (-1.7%)1.017s (~)0.976s101.10x
🌐 StarterNext.js (Turbopack)0.042s (-0.7%)1.015s (~)0.973s101.15x
💻 LocalNitro0.043s (-6.1% 🟢)1.006s (~)0.963s101.18x
💻 LocalExpress0.044s (-2.6%)1.007s (~)0.963s101.20x
🌐 MongoDBNext.js (Turbopack)0.075s (-21.8% 🟢)1.016s (~)0.940s102.05x
🌐 TursoNext.js (Turbopack)0.085s (-22.5% 🟢)1.013s (~)0.928s102.30x
🐘 PostgresExpress0.189s (-41.9% 🟢)1.014s (~)0.825s105.13x
🐘 PostgresNext.js (Turbopack)0.215s (+39.6% 🔺)1.019s (-0.6%)0.804s105.84x
🐘 PostgresNitro0.256s (+4.4%)1.023s (+0.8%)0.767s106.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.573s (-18.7% 🟢)1.477s (-11.8% 🟢)0.903s101.00x
▲ VercelNitro0.609s (+0.9%)1.568s (-0.7%)0.959s101.06x
▲ VercelNext.js (Turbopack)0.725s (-10.4% 🟢)1.536s (-16.2% 🟢)0.811s101.26x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.076s (-1.3%)2.013s (~)0.937s101.00x
🌐 StarterNext.js (Turbopack)1.093s (~)2.010s (~)0.918s101.02x
🌐 RedisNext.js (Turbopack)1.109s (~)2.012s (~)0.904s101.03x
💻 LocalNitro1.113s (~)2.006s (~)0.893s101.03x
💻 LocalExpress1.113s (~)2.006s (~)0.893s101.04x
🌐 TursoNext.js (Turbopack)1.285s (-0.8%)2.010s (~)0.725s101.19x
🌐 MongoDBNext.js (Turbopack)1.304s (~)2.014s (~)0.710s101.21x
🐘 PostgresNext.js (Turbopack)1.786s (-8.1% 🟢)2.216s (+9.9% 🔺)0.429s101.66x
🐘 PostgresNitro2.278s (+3.6%)3.013s (~)0.735s102.12x
🐘 PostgresExpress2.296s (-5.9% 🟢)3.013s (~)0.717s102.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.700s (-6.8% 🟢)3.605s (-4.4%)0.904s101.00x
▲ VercelNitro2.829s (-1.6%)3.669s (~)0.841s101.05x
▲ VercelExpress3.259s (+17.1% 🔺)4.147s (+14.4% 🔺)0.888s101.21x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.533s (-1.1%)11.019s (~)0.485s51.00x
🌐 StarterNext.js (Turbopack)10.630s (~)11.014s (~)0.384s51.01x
🌐 RedisNext.js (Turbopack)10.681s (~)11.020s (~)0.339s51.01x
💻 LocalNitro10.783s (~)11.013s (~)0.230s51.02x
💻 LocalExpress10.794s (~)11.014s (~)0.221s51.02x
🌐 TursoNext.js (Turbopack)12.176s (~)13.023s (~)0.847s51.16x
🌐 MongoDBNext.js (Turbopack)12.277s (+0.6%)13.032s (~)0.755s51.17x
🐘 PostgresNext.js (Turbopack)15.355s (~)16.032s (~)0.676s51.46x
🐘 PostgresNitro20.401s (~)21.035s (~)0.633s51.94x
🐘 PostgresExpress20.468s (+0.6%)21.029s (~)0.561s51.94x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)23.357s (+1.5%)24.170s (+1.1%)0.813s51.00x
▲ VercelExpress23.420s (+0.9%)24.242s (~)0.822s51.00x
▲ VercelNitro23.486s (+0.5%)24.552s (+2.6%)1.066s51.01x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.353s (~)2.010s (~)0.657s151.00x
💻 LocalNext.js (Turbopack)1.357s (-1.7%)2.014s (~)0.657s151.00x
🌐 StarterNext.js (Turbopack)1.369s (~)2.009s (~)0.640s151.01x
💻 LocalExpress1.409s (~)2.007s (~)0.598s151.04x
💻 LocalNitro1.424s (~)2.006s (~)0.583s151.05x
🐘 PostgresNext.js (Turbopack)1.729s (-9.2% 🟢)2.013s (-3.6%)0.284s151.28x
🌐 MongoDBNext.js (Turbopack)2.144s (~)3.015s (~)0.871s101.59x
🌐 TursoNext.js (Turbopack)2.196s (-1.3%)3.013s (~)0.816s101.62x
🐘 PostgresNitro2.316s (-1.9%)3.014s (~)0.698s101.71x
🐘 PostgresExpress2.346s (-11.5% 🟢)3.012s (~)0.666s101.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.299s (-21.6% 🟢)3.853s (-21.3% 🟢)0.554s81.00x
▲ VercelNitro3.304s (-26.1% 🟢)4.168s (-17.3% 🟢)0.865s81.00x
▲ VercelNext.js (Turbopack)3.939s (+4.4%)4.575s (-3.0%)0.636s71.19x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.959s (-7.3% 🟢)2.741s (-9.8% 🟢)0.782s121.00x
💻 LocalExpress2.202s (-0.7%)3.142s (-0.7%)0.940s101.12x
💻 LocalNitro2.217s (-2.3%)3.187s (-0.6%)0.970s101.13x
🌐 RedisNext.js (Turbopack)2.478s (-0.9%)3.012s (~)0.534s101.26x
🌐 StarterNext.js (Turbopack)2.495s (+1.1%)3.010s (~)0.515s101.27x
🐘 PostgresNext.js (Turbopack)2.641s (+1.8%)3.026s (-3.5%)0.385s101.35x
🐘 PostgresExpress2.740s (-9.1% 🟢)3.023s (-9.9% 🟢)0.283s101.40x
🐘 PostgresNitro3.015s (+1.6%)3.589s (~)0.574s91.54x
🌐 TursoNext.js (Turbopack)4.721s (~)5.182s (~)0.461s62.41x
🌐 MongoDBNext.js (Turbopack)4.755s (-1.3%)5.186s (~)0.431s62.43x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.627s (+1.0%)4.288s (-0.5%)0.661s71.00x
▲ VercelNitro3.662s (-3.8%)4.517s (-4.9%)0.855s71.01x
▲ VercelExpress3.708s (+1.0%)4.655s (+4.3%)0.947s71.02x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.352s (-2.3%)2.010s (~)0.657s151.00x
💻 LocalNext.js (Turbopack)1.353s (-3.5%)2.012s (~)0.660s151.00x
🌐 StarterNext.js (Turbopack)1.358s (-0.9%)2.008s (~)0.650s151.00x
💻 LocalExpress1.420s (~)2.006s (~)0.586s151.05x
💻 LocalNitro1.422s (~)2.007s (~)0.584s151.05x
🐘 PostgresNext.js (Turbopack)1.592s (-12.8% 🟢)2.012s (~)0.421s151.18x
🐘 PostgresNitro1.672s (-11.9% 🟢)2.010s (~)0.338s151.24x
🐘 PostgresExpress2.004s (+19.1% 🔺)2.321s (+15.5% 🔺)0.317s131.48x
🌐 MongoDBNext.js (Turbopack)2.154s (+0.5%)3.014s (~)0.859s101.59x
🌐 TursoNext.js (Turbopack)2.215s (~)3.012s (~)0.797s101.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.700s (-11.8% 🟢)3.629s (-1.5%)0.930s91.00x
▲ VercelNitro2.818s (-10.5% 🟢)3.681s (-6.2% 🟢)0.863s91.04x
▲ VercelNext.js (Turbopack)3.266s (~)4.154s (-0.6%)0.888s81.21x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.040s (-7.5% 🟢)2.836s (-7.6% 🟢)0.796s111.00x
💻 LocalExpress2.216s (~)3.177s (~)0.961s101.09x
💻 LocalNitro2.262s (+1.3%)3.200s (~)0.938s101.11x
🌐 RedisNext.js (Turbopack)2.466s (-0.9%)3.011s (~)0.545s101.21x
🌐 StarterNext.js (Turbopack)2.494s (+0.9%)3.009s (~)0.515s101.22x
🐘 PostgresNitro2.526s (-8.6% 🟢)3.027s (~)0.500s101.24x
🐘 PostgresNext.js (Turbopack)2.560s (~)3.027s (~)0.467s101.25x
🐘 PostgresExpress2.585s (-6.4% 🟢)3.013s (~)0.428s101.27x
🌐 MongoDBNext.js (Turbopack)4.652s (-1.3%)5.186s (~)0.534s62.28x
🌐 TursoNext.js (Turbopack)4.714s (-0.6%)5.181s (~)0.467s62.31x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.164s (+3.9%)3.646s (~)0.481s91.00x
▲ VercelNitro3.220s (-1.0%)3.920s (+1.7%)0.700s81.02x
▲ VercelNext.js (Turbopack)3.349s (+1.2%)3.852s (+0.5%)0.503s91.06x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.110s (-21.2% 🟢)1.003s (~)0.016s (+1.2%)1.029s (~)0.919s101.00x
🌐 StarterNext.js (Turbopack)0.133s (+1.5%)1.006s (~)0.000s (+Infinity% 🔺)1.012s (~)0.878s101.22x
🌐 RedisNext.js (Turbopack)0.143s (~)1.005s (~)0.000s (+Infinity% 🔺)1.013s (~)0.871s101.30x
💻 LocalExpress0.177s (+2.3%)0.992s (~)0.016s (+12.5% 🔺)1.023s (~)0.846s101.62x
💻 LocalNitro0.189s (+1.9%)0.992s (~)0.017s (+6.8% 🔺)1.024s (~)0.836s101.72x
🌐 MongoDBNext.js (Turbopack)0.483s (+6.9% 🔺)0.972s (-2.6%)0.000s (+Infinity% 🔺)1.015s (~)0.532s104.41x
🌐 TursoNext.js (Turbopack)0.521s (-1.0%)0.927s (~)0.000s (-100.0% 🟢)1.013s (~)0.492s104.76x
🐘 PostgresNext.js (Turbopack)1.125s (-10.0% 🟢)1.918s (+6.4% 🔺)0.000s (+Infinity% 🔺)2.017s (~)0.892s1010.27x
🐘 PostgresNitro2.212s (-2.9%)2.826s (+2.1%)0.000s (+Infinity% 🔺)3.015s (~)0.803s1020.21x
🐘 PostgresExpress2.300s (+7.4% 🔺)2.743s (-5.5% 🟢)0.000s (-100.0% 🟢)3.014s (~)0.714s1021.00x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.019s (+7.1% 🔺)3.152s (-2.0%)0.531s (+35.6% 🔺)4.193s (-0.9%)1.174s101.00x
▲ VercelNext.js (Turbopack)3.603s (+1.5%)3.825s (-3.2%)0.752s (+45.1% 🔺)5.054s (+1.3%)1.450s101.19x
▲ VercelExpress3.768s (+26.8% 🔺)4.055s (+25.2% 🔺)0.791s (+12.8% 🔺)5.438s (+22.9% 🔺)1.669s101.25x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)8/8
🐘 PostgresNext.js (Turbopack)6/8
▲ VercelExpress4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)💻 Local6/8
Nitro💻 Local8/8
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 Jan 21, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production435038473
✅ 💻 Local Development398032430
✅ 📦 Local Production398032430
✅ 🐘 Local Postgres398032430
✅ 🪟 Windows430043
❌ 🌍 Community Worlds162220184
Total1834221341990

❌ Failed Tests

🌍 Community Worlds (22 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (19 failed):

  • addTenWorkflow
  • addTenWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • 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
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro3904
✅ example3904
✅ express3904
✅ fastify3904
✅ hono3904
✅ nextjs-turbopack4201
✅ nextjs-webpack4201
✅ nitro3904
✅ nuxt3904
✅ sveltekit3904
✅ vite3904
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable3904
✅ express-stable3904
✅ fastify-stable3904
✅ hono-stable3904
✅ nextjs-turbopack-stable4300
✅ nextjs-webpack-stable4300
✅ nitro-stable3904
✅ nuxt-stable3904
✅ sveltekit-stable3904
✅ vite-stable3904
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable3904
✅ express-stable3904
✅ fastify-stable3904
✅ hono-stable3904
✅ nextjs-turbopack-stable4300
✅ nextjs-webpack-stable4300
✅ nitro-stable3904
✅ nuxt-stable3904
✅ sveltekit-stable3904
✅ vite-stable3904
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable3904
✅ express-stable3904
✅ fastify-stable3904
✅ hono-stable3904
✅ nextjs-turbopack-stable4300
✅ nextjs-webpack-stable4300
✅ nitro-stable3904
✅ nuxt-stable3904
✅ sveltekit-stable3904
✅ vite-stable3904
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4300
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb4210
✅ redis-dev300
❌ redis4210
✅ starter-dev300
❌ starter24190
✅ turso-dev300
❌ turso4210

📋 View full workflow run

@TooTallNateGraphite App

Copy link
Copy Markdown
MemberAuthor

This stack of pull requests is managed by Graphite. Learn more about stacking.

@TooTallNate
TooTallNate marked this pull request as ready for review January 21, 2026 17:37
CopilotAI review requested due to automatic review settings January 21, 2026 17:37
@TooTallNate
TooTallNate removed the request for review from CopilotJanuary 21, 2026 17:37
@TooTallNate
TooTallNate merged commit b05dbd7 into mainJan 21, 2026
94 checks passed
@TooTallNate
TooTallNate deleted the 01-21-clamp_settimeout_value_to_32-bit_integer_25d_for_sleep_ branch January 21, 2026 17:43
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.

Local World: sleep() function cannot be more than ~25 days

2 participants

@TooTallNate@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n 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;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Clamp setTimeout value to 32-bit integer (~25d) for sleep() - #824

Merged
TooTallNate merged 1 commit into
mainfrom
01-21-clamp_settimeout_value_to_32-bit_integer_25d_for_sleep_
Jan 21, 2026
Merged

Clamp setTimeout value to 32-bit integer (~25d) for sleep()#824
TooTallNate merged 1 commit into
mainfrom
01-21-clamp_settimeout_value_to_32-bit_integer_25d_for_sleep_

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Jan 21, 2026

Copy link
Copy Markdown
Member

Fix timeout overflow error in world-local queue implementation by clamping setTimeout values.

Fixes#823.

What changed?

  • Added a MAX_SAFE_TIMEOUT_MS constant (2147483647 ms, ~24.85 days) to prevent Node.js 32-bit integer overflow
  • Modified the setTimeout call in the queue retry logic to clamp timeout values to this maximum

How to test?

  1. Create a workflow with a very long sleep duration (> 25 days)
  2. Run it in local mode
  3. Verify no "TimeoutOverflowWarning" appears in the logs
  4. Confirm the sleep functionality still works correctly with the clamped values

Why make this change?

Node.js setTimeout uses a 32-bit signed integer internally, which means values larger than ~25 days cause overflow warnings. This change prevents those warnings while maintaining the correct behavior by allowing the handler to recalculate remaining time from persistent state when the clamped timeout fires. This is fine (using a value less than what the user requested) because the workflow handler logic will issue another queue call with timeoutSeconds if the desired date has not elapsed when the workflow is re-run.

@changeset-bot

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a33b789

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

This PR includes changesets to release 15 packages
NameType
@workflow/world-localPatch
@workflow/cliPatch
@workflow/corePatch
@workflow/world-postgresPatch
workflowPatch
@workflow/world-testingPatch
@workflow/buildersPatch
@workflow/docs-typecheckPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
@workflow/aiPatch
@workflow/astroPatch
@workflow/sveltekitPatch
@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 Jan 21, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jan 21, 2026

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
💻 Local🥇 Next.js (Turbopack)0.037s (-17.3% 🟢)1.019s (~)0.983s101.00x
🌐 RedisNext.js (Turbopack)0.041s (-1.7%)1.017s (~)0.976s101.10x
🌐 StarterNext.js (Turbopack)0.042s (-0.7%)1.015s (~)0.973s101.15x
💻 LocalNitro0.043s (-6.1% 🟢)1.006s (~)0.963s101.18x
💻 LocalExpress0.044s (-2.6%)1.007s (~)0.963s101.20x
🌐 MongoDBNext.js (Turbopack)0.075s (-21.8% 🟢)1.016s (~)0.940s102.05x
🌐 TursoNext.js (Turbopack)0.085s (-22.5% 🟢)1.013s (~)0.928s102.30x
🐘 PostgresExpress0.189s (-41.9% 🟢)1.014s (~)0.825s105.13x
🐘 PostgresNext.js (Turbopack)0.215s (+39.6% 🔺)1.019s (-0.6%)0.804s105.84x
🐘 PostgresNitro0.256s (+4.4%)1.023s (+0.8%)0.767s106.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.573s (-18.7% 🟢)1.477s (-11.8% 🟢)0.903s101.00x
▲ VercelNitro0.609s (+0.9%)1.568s (-0.7%)0.959s101.06x
▲ VercelNext.js (Turbopack)0.725s (-10.4% 🟢)1.536s (-16.2% 🟢)0.811s101.26x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.076s (-1.3%)2.013s (~)0.937s101.00x
🌐 StarterNext.js (Turbopack)1.093s (~)2.010s (~)0.918s101.02x
🌐 RedisNext.js (Turbopack)1.109s (~)2.012s (~)0.904s101.03x
💻 LocalNitro1.113s (~)2.006s (~)0.893s101.03x
💻 LocalExpress1.113s (~)2.006s (~)0.893s101.04x
🌐 TursoNext.js (Turbopack)1.285s (-0.8%)2.010s (~)0.725s101.19x
🌐 MongoDBNext.js (Turbopack)1.304s (~)2.014s (~)0.710s101.21x
🐘 PostgresNext.js (Turbopack)1.786s (-8.1% 🟢)2.216s (+9.9% 🔺)0.429s101.66x
🐘 PostgresNitro2.278s (+3.6%)3.013s (~)0.735s102.12x
🐘 PostgresExpress2.296s (-5.9% 🟢)3.013s (~)0.717s102.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.700s (-6.8% 🟢)3.605s (-4.4%)0.904s101.00x
▲ VercelNitro2.829s (-1.6%)3.669s (~)0.841s101.05x
▲ VercelExpress3.259s (+17.1% 🔺)4.147s (+14.4% 🔺)0.888s101.21x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.533s (-1.1%)11.019s (~)0.485s51.00x
🌐 StarterNext.js (Turbopack)10.630s (~)11.014s (~)0.384s51.01x
🌐 RedisNext.js (Turbopack)10.681s (~)11.020s (~)0.339s51.01x
💻 LocalNitro10.783s (~)11.013s (~)0.230s51.02x
💻 LocalExpress10.794s (~)11.014s (~)0.221s51.02x
🌐 TursoNext.js (Turbopack)12.176s (~)13.023s (~)0.847s51.16x
🌐 MongoDBNext.js (Turbopack)12.277s (+0.6%)13.032s (~)0.755s51.17x
🐘 PostgresNext.js (Turbopack)15.355s (~)16.032s (~)0.676s51.46x
🐘 PostgresNitro20.401s (~)21.035s (~)0.633s51.94x
🐘 PostgresExpress20.468s (+0.6%)21.029s (~)0.561s51.94x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)23.357s (+1.5%)24.170s (+1.1%)0.813s51.00x
▲ VercelExpress23.420s (+0.9%)24.242s (~)0.822s51.00x
▲ VercelNitro23.486s (+0.5%)24.552s (+2.6%)1.066s51.01x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.353s (~)2.010s (~)0.657s151.00x
💻 LocalNext.js (Turbopack)1.357s (-1.7%)2.014s (~)0.657s151.00x
🌐 StarterNext.js (Turbopack)1.369s (~)2.009s (~)0.640s151.01x
💻 LocalExpress1.409s (~)2.007s (~)0.598s151.04x
💻 LocalNitro1.424s (~)2.006s (~)0.583s151.05x
🐘 PostgresNext.js (Turbopack)1.729s (-9.2% 🟢)2.013s (-3.6%)0.284s151.28x
🌐 MongoDBNext.js (Turbopack)2.144s (~)3.015s (~)0.871s101.59x
🌐 TursoNext.js (Turbopack)2.196s (-1.3%)3.013s (~)0.816s101.62x
🐘 PostgresNitro2.316s (-1.9%)3.014s (~)0.698s101.71x
🐘 PostgresExpress2.346s (-11.5% 🟢)3.012s (~)0.666s101.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.299s (-21.6% 🟢)3.853s (-21.3% 🟢)0.554s81.00x
▲ VercelNitro3.304s (-26.1% 🟢)4.168s (-17.3% 🟢)0.865s81.00x
▲ VercelNext.js (Turbopack)3.939s (+4.4%)4.575s (-3.0%)0.636s71.19x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.959s (-7.3% 🟢)2.741s (-9.8% 🟢)0.782s121.00x
💻 LocalExpress2.202s (-0.7%)3.142s (-0.7%)0.940s101.12x
💻 LocalNitro2.217s (-2.3%)3.187s (-0.6%)0.970s101.13x
🌐 RedisNext.js (Turbopack)2.478s (-0.9%)3.012s (~)0.534s101.26x
🌐 StarterNext.js (Turbopack)2.495s (+1.1%)3.010s (~)0.515s101.27x
🐘 PostgresNext.js (Turbopack)2.641s (+1.8%)3.026s (-3.5%)0.385s101.35x
🐘 PostgresExpress2.740s (-9.1% 🟢)3.023s (-9.9% 🟢)0.283s101.40x
🐘 PostgresNitro3.015s (+1.6%)3.589s (~)0.574s91.54x
🌐 TursoNext.js (Turbopack)4.721s (~)5.182s (~)0.461s62.41x
🌐 MongoDBNext.js (Turbopack)4.755s (-1.3%)5.186s (~)0.431s62.43x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.627s (+1.0%)4.288s (-0.5%)0.661s71.00x
▲ VercelNitro3.662s (-3.8%)4.517s (-4.9%)0.855s71.01x
▲ VercelExpress3.708s (+1.0%)4.655s (+4.3%)0.947s71.02x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.352s (-2.3%)2.010s (~)0.657s151.00x
💻 LocalNext.js (Turbopack)1.353s (-3.5%)2.012s (~)0.660s151.00x
🌐 StarterNext.js (Turbopack)1.358s (-0.9%)2.008s (~)0.650s151.00x
💻 LocalExpress1.420s (~)2.006s (~)0.586s151.05x
💻 LocalNitro1.422s (~)2.007s (~)0.584s151.05x
🐘 PostgresNext.js (Turbopack)1.592s (-12.8% 🟢)2.012s (~)0.421s151.18x
🐘 PostgresNitro1.672s (-11.9% 🟢)2.010s (~)0.338s151.24x
🐘 PostgresExpress2.004s (+19.1% 🔺)2.321s (+15.5% 🔺)0.317s131.48x
🌐 MongoDBNext.js (Turbopack)2.154s (+0.5%)3.014s (~)0.859s101.59x
🌐 TursoNext.js (Turbopack)2.215s (~)3.012s (~)0.797s101.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.700s (-11.8% 🟢)3.629s (-1.5%)0.930s91.00x
▲ VercelNitro2.818s (-10.5% 🟢)3.681s (-6.2% 🟢)0.863s91.04x
▲ VercelNext.js (Turbopack)3.266s (~)4.154s (-0.6%)0.888s81.21x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.040s (-7.5% 🟢)2.836s (-7.6% 🟢)0.796s111.00x
💻 LocalExpress2.216s (~)3.177s (~)0.961s101.09x
💻 LocalNitro2.262s (+1.3%)3.200s (~)0.938s101.11x
🌐 RedisNext.js (Turbopack)2.466s (-0.9%)3.011s (~)0.545s101.21x
🌐 StarterNext.js (Turbopack)2.494s (+0.9%)3.009s (~)0.515s101.22x
🐘 PostgresNitro2.526s (-8.6% 🟢)3.027s (~)0.500s101.24x
🐘 PostgresNext.js (Turbopack)2.560s (~)3.027s (~)0.467s101.25x
🐘 PostgresExpress2.585s (-6.4% 🟢)3.013s (~)0.428s101.27x
🌐 MongoDBNext.js (Turbopack)4.652s (-1.3%)5.186s (~)0.534s62.28x
🌐 TursoNext.js (Turbopack)4.714s (-0.6%)5.181s (~)0.467s62.31x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.164s (+3.9%)3.646s (~)0.481s91.00x
▲ VercelNitro3.220s (-1.0%)3.920s (+1.7%)0.700s81.02x
▲ VercelNext.js (Turbopack)3.349s (+1.2%)3.852s (+0.5%)0.503s91.06x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.110s (-21.2% 🟢)1.003s (~)0.016s (+1.2%)1.029s (~)0.919s101.00x
🌐 StarterNext.js (Turbopack)0.133s (+1.5%)1.006s (~)0.000s (+Infinity% 🔺)1.012s (~)0.878s101.22x
🌐 RedisNext.js (Turbopack)0.143s (~)1.005s (~)0.000s (+Infinity% 🔺)1.013s (~)0.871s101.30x
💻 LocalExpress0.177s (+2.3%)0.992s (~)0.016s (+12.5% 🔺)1.023s (~)0.846s101.62x
💻 LocalNitro0.189s (+1.9%)0.992s (~)0.017s (+6.8% 🔺)1.024s (~)0.836s101.72x
🌐 MongoDBNext.js (Turbopack)0.483s (+6.9% 🔺)0.972s (-2.6%)0.000s (+Infinity% 🔺)1.015s (~)0.532s104.41x
🌐 TursoNext.js (Turbopack)0.521s (-1.0%)0.927s (~)0.000s (-100.0% 🟢)1.013s (~)0.492s104.76x
🐘 PostgresNext.js (Turbopack)1.125s (-10.0% 🟢)1.918s (+6.4% 🔺)0.000s (+Infinity% 🔺)2.017s (~)0.892s1010.27x
🐘 PostgresNitro2.212s (-2.9%)2.826s (+2.1%)0.000s (+Infinity% 🔺)3.015s (~)0.803s1020.21x
🐘 PostgresExpress2.300s (+7.4% 🔺)2.743s (-5.5% 🟢)0.000s (-100.0% 🟢)3.014s (~)0.714s1021.00x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.019s (+7.1% 🔺)3.152s (-2.0%)0.531s (+35.6% 🔺)4.193s (-0.9%)1.174s101.00x
▲ VercelNext.js (Turbopack)3.603s (+1.5%)3.825s (-3.2%)0.752s (+45.1% 🔺)5.054s (+1.3%)1.450s101.19x
▲ VercelExpress3.768s (+26.8% 🔺)4.055s (+25.2% 🔺)0.791s (+12.8% 🔺)5.438s (+22.9% 🔺)1.669s101.25x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)8/8
🐘 PostgresNext.js (Turbopack)6/8
▲ VercelExpress4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)💻 Local6/8
Nitro💻 Local8/8
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 Jan 21, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production435038473
✅ 💻 Local Development398032430
✅ 📦 Local Production398032430
✅ 🐘 Local Postgres398032430
✅ 🪟 Windows430043
❌ 🌍 Community Worlds162220184
Total1834221341990

❌ Failed Tests

🌍 Community Worlds (22 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (19 failed):

  • addTenWorkflow
  • addTenWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • 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
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro3904
✅ example3904
✅ express3904
✅ fastify3904
✅ hono3904
✅ nextjs-turbopack4201
✅ nextjs-webpack4201
✅ nitro3904
✅ nuxt3904
✅ sveltekit3904
✅ vite3904
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable3904
✅ express-stable3904
✅ fastify-stable3904
✅ hono-stable3904
✅ nextjs-turbopack-stable4300
✅ nextjs-webpack-stable4300
✅ nitro-stable3904
✅ nuxt-stable3904
✅ sveltekit-stable3904
✅ vite-stable3904
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable3904
✅ express-stable3904
✅ fastify-stable3904
✅ hono-stable3904
✅ nextjs-turbopack-stable4300
✅ nextjs-webpack-stable4300
✅ nitro-stable3904
✅ nuxt-stable3904
✅ sveltekit-stable3904
✅ vite-stable3904
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable3904
✅ express-stable3904
✅ fastify-stable3904
✅ hono-stable3904
✅ nextjs-turbopack-stable4300
✅ nextjs-webpack-stable4300
✅ nitro-stable3904
✅ nuxt-stable3904
✅ sveltekit-stable3904
✅ vite-stable3904
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4300
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb4210
✅ redis-dev300
❌ redis4210
✅ starter-dev300
❌ starter24190
✅ turso-dev300
❌ turso4210

📋 View full workflow run

@TooTallNateGraphite App

Copy link
Copy Markdown
MemberAuthor

This stack of pull requests is managed by Graphite. Learn more about stacking.

@TooTallNate
TooTallNate marked this pull request as ready for review January 21, 2026 17:37
CopilotAI review requested due to automatic review settings January 21, 2026 17:37
@TooTallNate
TooTallNate removed the request for review from CopilotJanuary 21, 2026 17:37
@TooTallNate
TooTallNate merged commit b05dbd7 into mainJan 21, 2026
94 checks passed
@TooTallNate
TooTallNate deleted the 01-21-clamp_settimeout_value_to_32-bit_integer_25d_for_sleep_ branch January 21, 2026 17:43
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.

Local World: sleep() function cannot be more than ~25 days

2 participants

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

Clamp setTimeout value to 32-bit integer (~25d) for sleep() - #824

Merged
TooTallNate merged 1 commit into
mainfrom
01-21-clamp_settimeout_value_to_32-bit_integer_25d_for_sleep_
Jan 21, 2026
Merged

Clamp setTimeout value to 32-bit integer (~25d) for sleep()#824
TooTallNate merged 1 commit into
mainfrom
01-21-clamp_settimeout_value_to_32-bit_integer_25d_for_sleep_

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Jan 21, 2026

Copy link
Copy Markdown
Member

Fix timeout overflow error in world-local queue implementation by clamping setTimeout values.

Fixes#823.

What changed?

  • Added a MAX_SAFE_TIMEOUT_MS constant (2147483647 ms, ~24.85 days) to prevent Node.js 32-bit integer overflow
  • Modified the setTimeout call in the queue retry logic to clamp timeout values to this maximum

How to test?

  1. Create a workflow with a very long sleep duration (> 25 days)
  2. Run it in local mode
  3. Verify no "TimeoutOverflowWarning" appears in the logs
  4. Confirm the sleep functionality still works correctly with the clamped values

Why make this change?

Node.js setTimeout uses a 32-bit signed integer internally, which means values larger than ~25 days cause overflow warnings. This change prevents those warnings while maintaining the correct behavior by allowing the handler to recalculate remaining time from persistent state when the clamped timeout fires. This is fine (using a value less than what the user requested) because the workflow handler logic will issue another queue call with timeoutSeconds if the desired date has not elapsed when the workflow is re-run.

@changeset-bot

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a33b789

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

This PR includes changesets to release 15 packages
NameType
@workflow/world-localPatch
@workflow/cliPatch
@workflow/corePatch
@workflow/world-postgresPatch
workflowPatch
@workflow/world-testingPatch
@workflow/buildersPatch
@workflow/docs-typecheckPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
@workflow/aiPatch
@workflow/astroPatch
@workflow/sveltekitPatch
@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 Jan 21, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jan 21, 2026

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
💻 Local🥇 Next.js (Turbopack)0.037s (-17.3% 🟢)1.019s (~)0.983s101.00x
🌐 RedisNext.js (Turbopack)0.041s (-1.7%)1.017s (~)0.976s101.10x
🌐 StarterNext.js (Turbopack)0.042s (-0.7%)1.015s (~)0.973s101.15x
💻 LocalNitro0.043s (-6.1% 🟢)1.006s (~)0.963s101.18x
💻 LocalExpress0.044s (-2.6%)1.007s (~)0.963s101.20x
🌐 MongoDBNext.js (Turbopack)0.075s (-21.8% 🟢)1.016s (~)0.940s102.05x
🌐 TursoNext.js (Turbopack)0.085s (-22.5% 🟢)1.013s (~)0.928s102.30x
🐘 PostgresExpress0.189s (-41.9% 🟢)1.014s (~)0.825s105.13x
🐘 PostgresNext.js (Turbopack)0.215s (+39.6% 🔺)1.019s (-0.6%)0.804s105.84x
🐘 PostgresNitro0.256s (+4.4%)1.023s (+0.8%)0.767s106.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.573s (-18.7% 🟢)1.477s (-11.8% 🟢)0.903s101.00x
▲ VercelNitro0.609s (+0.9%)1.568s (-0.7%)0.959s101.06x
▲ VercelNext.js (Turbopack)0.725s (-10.4% 🟢)1.536s (-16.2% 🟢)0.811s101.26x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.076s (-1.3%)2.013s (~)0.937s101.00x
🌐 StarterNext.js (Turbopack)1.093s (~)2.010s (~)0.918s101.02x
🌐 RedisNext.js (Turbopack)1.109s (~)2.012s (~)0.904s101.03x
💻 LocalNitro1.113s (~)2.006s (~)0.893s101.03x
💻 LocalExpress1.113s (~)2.006s (~)0.893s101.04x
🌐 TursoNext.js (Turbopack)1.285s (-0.8%)2.010s (~)0.725s101.19x
🌐 MongoDBNext.js (Turbopack)1.304s (~)2.014s (~)0.710s101.21x
🐘 PostgresNext.js (Turbopack)1.786s (-8.1% 🟢)2.216s (+9.9% 🔺)0.429s101.66x
🐘 PostgresNitro2.278s (+3.6%)3.013s (~)0.735s102.12x
🐘 PostgresExpress2.296s (-5.9% 🟢)3.013s (~)0.717s102.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.700s (-6.8% 🟢)3.605s (-4.4%)0.904s101.00x
▲ VercelNitro2.829s (-1.6%)3.669s (~)0.841s101.05x
▲ VercelExpress3.259s (+17.1% 🔺)4.147s (+14.4% 🔺)0.888s101.21x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.533s (-1.1%)11.019s (~)0.485s51.00x
🌐 StarterNext.js (Turbopack)10.630s (~)11.014s (~)0.384s51.01x
🌐 RedisNext.js (Turbopack)10.681s (~)11.020s (~)0.339s51.01x
💻 LocalNitro10.783s (~)11.013s (~)0.230s51.02x
💻 LocalExpress10.794s (~)11.014s (~)0.221s51.02x
🌐 TursoNext.js (Turbopack)12.176s (~)13.023s (~)0.847s51.16x
🌐 MongoDBNext.js (Turbopack)12.277s (+0.6%)13.032s (~)0.755s51.17x
🐘 PostgresNext.js (Turbopack)15.355s (~)16.032s (~)0.676s51.46x
🐘 PostgresNitro20.401s (~)21.035s (~)0.633s51.94x
🐘 PostgresExpress20.468s (+0.6%)21.029s (~)0.561s51.94x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)23.357s (+1.5%)24.170s (+1.1%)0.813s51.00x
▲ VercelExpress23.420s (+0.9%)24.242s (~)0.822s51.00x
▲ VercelNitro23.486s (+0.5%)24.552s (+2.6%)1.066s51.01x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.353s (~)2.010s (~)0.657s151.00x
💻 LocalNext.js (Turbopack)1.357s (-1.7%)2.014s (~)0.657s151.00x
🌐 StarterNext.js (Turbopack)1.369s (~)2.009s (~)0.640s151.01x
💻 LocalExpress1.409s (~)2.007s (~)0.598s151.04x
💻 LocalNitro1.424s (~)2.006s (~)0.583s151.05x
🐘 PostgresNext.js (Turbopack)1.729s (-9.2% 🟢)2.013s (-3.6%)0.284s151.28x
🌐 MongoDBNext.js (Turbopack)2.144s (~)3.015s (~)0.871s101.59x
🌐 TursoNext.js (Turbopack)2.196s (-1.3%)3.013s (~)0.816s101.62x
🐘 PostgresNitro2.316s (-1.9%)3.014s (~)0.698s101.71x
🐘 PostgresExpress2.346s (-11.5% 🟢)3.012s (~)0.666s101.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.299s (-21.6% 🟢)3.853s (-21.3% 🟢)0.554s81.00x
▲ VercelNitro3.304s (-26.1% 🟢)4.168s (-17.3% 🟢)0.865s81.00x
▲ VercelNext.js (Turbopack)3.939s (+4.4%)4.575s (-3.0%)0.636s71.19x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.959s (-7.3% 🟢)2.741s (-9.8% 🟢)0.782s121.00x
💻 LocalExpress2.202s (-0.7%)3.142s (-0.7%)0.940s101.12x
💻 LocalNitro2.217s (-2.3%)3.187s (-0.6%)0.970s101.13x
🌐 RedisNext.js (Turbopack)2.478s (-0.9%)3.012s (~)0.534s101.26x
🌐 StarterNext.js (Turbopack)2.495s (+1.1%)3.010s (~)0.515s101.27x
🐘 PostgresNext.js (Turbopack)2.641s (+1.8%)3.026s (-3.5%)0.385s101.35x
🐘 PostgresExpress2.740s (-9.1% 🟢)3.023s (-9.9% 🟢)0.283s101.40x
🐘 PostgresNitro3.015s (+1.6%)3.589s (~)0.574s91.54x
🌐 TursoNext.js (Turbopack)4.721s (~)5.182s (~)0.461s62.41x
🌐 MongoDBNext.js (Turbopack)4.755s (-1.3%)5.186s (~)0.431s62.43x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.627s (+1.0%)4.288s (-0.5%)0.661s71.00x
▲ VercelNitro3.662s (-3.8%)4.517s (-4.9%)0.855s71.01x
▲ VercelExpress3.708s (+1.0%)4.655s (+4.3%)0.947s71.02x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.352s (-2.3%)2.010s (~)0.657s151.00x
💻 LocalNext.js (Turbopack)1.353s (-3.5%)2.012s (~)0.660s151.00x
🌐 StarterNext.js (Turbopack)1.358s (-0.9%)2.008s (~)0.650s151.00x
💻 LocalExpress1.420s (~)2.006s (~)0.586s151.05x
💻 LocalNitro1.422s (~)2.007s (~)0.584s151.05x
🐘 PostgresNext.js (Turbopack)1.592s (-12.8% 🟢)2.012s (~)0.421s151.18x
🐘 PostgresNitro1.672s (-11.9% 🟢)2.010s (~)0.338s151.24x
🐘 PostgresExpress2.004s (+19.1% 🔺)2.321s (+15.5% 🔺)0.317s131.48x
🌐 MongoDBNext.js (Turbopack)2.154s (+0.5%)3.014s (~)0.859s101.59x
🌐 TursoNext.js (Turbopack)2.215s (~)3.012s (~)0.797s101.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.700s (-11.8% 🟢)3.629s (-1.5%)0.930s91.00x
▲ VercelNitro2.818s (-10.5% 🟢)3.681s (-6.2% 🟢)0.863s91.04x
▲ VercelNext.js (Turbopack)3.266s (~)4.154s (-0.6%)0.888s81.21x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.040s (-7.5% 🟢)2.836s (-7.6% 🟢)0.796s111.00x
💻 LocalExpress2.216s (~)3.177s (~)0.961s101.09x
💻 LocalNitro2.262s (+1.3%)3.200s (~)0.938s101.11x
🌐 RedisNext.js (Turbopack)2.466s (-0.9%)3.011s (~)0.545s101.21x
🌐 StarterNext.js (Turbopack)2.494s (+0.9%)3.009s (~)0.515s101.22x
🐘 PostgresNitro2.526s (-8.6% 🟢)3.027s (~)0.500s101.24x
🐘 PostgresNext.js (Turbopack)2.560s (~)3.027s (~)0.467s101.25x
🐘 PostgresExpress2.585s (-6.4% 🟢)3.013s (~)0.428s101.27x
🌐 MongoDBNext.js (Turbopack)4.652s (-1.3%)5.186s (~)0.534s62.28x
🌐 TursoNext.js (Turbopack)4.714s (-0.6%)5.181s (~)0.467s62.31x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.164s (+3.9%)3.646s (~)0.481s91.00x
▲ VercelNitro3.220s (-1.0%)3.920s (+1.7%)0.700s81.02x
▲ VercelNext.js (Turbopack)3.349s (+1.2%)3.852s (+0.5%)0.503s91.06x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.110s (-21.2% 🟢)1.003s (~)0.016s (+1.2%)1.029s (~)0.919s101.00x
🌐 StarterNext.js (Turbopack)0.133s (+1.5%)1.006s (~)0.000s (+Infinity% 🔺)1.012s (~)0.878s101.22x
🌐 RedisNext.js (Turbopack)0.143s (~)1.005s (~)0.000s (+Infinity% 🔺)1.013s (~)0.871s101.30x
💻 LocalExpress0.177s (+2.3%)0.992s (~)0.016s (+12.5% 🔺)1.023s (~)0.846s101.62x
💻 LocalNitro0.189s (+1.9%)0.992s (~)0.017s (+6.8% 🔺)1.024s (~)0.836s101.72x
🌐 MongoDBNext.js (Turbopack)0.483s (+6.9% 🔺)0.972s (-2.6%)0.000s (+Infinity% 🔺)1.015s (~)0.532s104.41x
🌐 TursoNext.js (Turbopack)0.521s (-1.0%)0.927s (~)0.000s (-100.0% 🟢)1.013s (~)0.492s104.76x
🐘 PostgresNext.js (Turbopack)1.125s (-10.0% 🟢)1.918s (+6.4% 🔺)0.000s (+Infinity% 🔺)2.017s (~)0.892s1010.27x
🐘 PostgresNitro2.212s (-2.9%)2.826s (+2.1%)0.000s (+Infinity% 🔺)3.015s (~)0.803s1020.21x
🐘 PostgresExpress2.300s (+7.4% 🔺)2.743s (-5.5% 🟢)0.000s (-100.0% 🟢)3.014s (~)0.714s1021.00x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.019s (+7.1% 🔺)3.152s (-2.0%)0.531s (+35.6% 🔺)4.193s (-0.9%)1.174s101.00x
▲ VercelNext.js (Turbopack)3.603s (+1.5%)3.825s (-3.2%)0.752s (+45.1% 🔺)5.054s (+1.3%)1.450s101.19x
▲ VercelExpress3.768s (+26.8% 🔺)4.055s (+25.2% 🔺)0.791s (+12.8% 🔺)5.438s (+22.9% 🔺)1.669s101.25x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)8/8
🐘 PostgresNext.js (Turbopack)6/8
▲ VercelExpress4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)💻 Local6/8
Nitro💻 Local8/8
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 Jan 21, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production435038473
✅ 💻 Local Development398032430
✅ 📦 Local Production398032430
✅ 🐘 Local Postgres398032430
✅ 🪟 Windows430043
❌ 🌍 Community Worlds162220184
Total1834221341990

❌ Failed Tests

🌍 Community Worlds (22 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (19 failed):

  • addTenWorkflow
  • addTenWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • 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
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro3904
✅ example3904
✅ express3904
✅ fastify3904
✅ hono3904
✅ nextjs-turbopack4201
✅ nextjs-webpack4201
✅ nitro3904
✅ nuxt3904
✅ sveltekit3904
✅ vite3904
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable3904
✅ express-stable3904
✅ fastify-stable3904
✅ hono-stable3904
✅ nextjs-turbopack-stable4300
✅ nextjs-webpack-stable4300
✅ nitro-stable3904
✅ nuxt-stable3904
✅ sveltekit-stable3904
✅ vite-stable3904
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable3904
✅ express-stable3904
✅ fastify-stable3904
✅ hono-stable3904
✅ nextjs-turbopack-stable4300
✅ nextjs-webpack-stable4300
✅ nitro-stable3904
✅ nuxt-stable3904
✅ sveltekit-stable3904
✅ vite-stable3904
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable3904
✅ express-stable3904
✅ fastify-stable3904
✅ hono-stable3904
✅ nextjs-turbopack-stable4300
✅ nextjs-webpack-stable4300
✅ nitro-stable3904
✅ nuxt-stable3904
✅ sveltekit-stable3904
✅ vite-stable3904
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4300
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb4210
✅ redis-dev300
❌ redis4210
✅ starter-dev300
❌ starter24190
✅ turso-dev300
❌ turso4210

📋 View full workflow run

@TooTallNateGraphite App

Copy link
Copy Markdown
MemberAuthor

This stack of pull requests is managed by Graphite. Learn more about stacking.

@TooTallNate
TooTallNate marked this pull request as ready for review January 21, 2026 17:37
CopilotAI review requested due to automatic review settings January 21, 2026 17:37
@TooTallNate
TooTallNate removed the request for review from CopilotJanuary 21, 2026 17:37
@TooTallNate
TooTallNate merged commit b05dbd7 into mainJan 21, 2026
94 checks passed
@TooTallNate
TooTallNate deleted the 01-21-clamp_settimeout_value_to_32-bit_integer_25d_for_sleep_ branch January 21, 2026 17:43
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.

Local World: sleep() function cannot be more than ~25 days

2 participants

@TooTallNate@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Clamp setTimeout value to 32-bit integer (~25d) for sleep() - #824

Merged
TooTallNate merged 1 commit into
mainfrom
01-21-clamp_settimeout_value_to_32-bit_integer_25d_for_sleep_
Jan 21, 2026
Merged

Clamp setTimeout value to 32-bit integer (~25d) for sleep()#824
TooTallNate merged 1 commit into
mainfrom
01-21-clamp_settimeout_value_to_32-bit_integer_25d_for_sleep_

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Jan 21, 2026

Copy link
Copy Markdown
Member

Fix timeout overflow error in world-local queue implementation by clamping setTimeout values.

Fixes#823.

What changed?

  • Added a MAX_SAFE_TIMEOUT_MS constant (2147483647 ms, ~24.85 days) to prevent Node.js 32-bit integer overflow
  • Modified the setTimeout call in the queue retry logic to clamp timeout values to this maximum

How to test?

  1. Create a workflow with a very long sleep duration (> 25 days)
  2. Run it in local mode
  3. Verify no "TimeoutOverflowWarning" appears in the logs
  4. Confirm the sleep functionality still works correctly with the clamped values

Why make this change?

Node.js setTimeout uses a 32-bit signed integer internally, which means values larger than ~25 days cause overflow warnings. This change prevents those warnings while maintaining the correct behavior by allowing the handler to recalculate remaining time from persistent state when the clamped timeout fires. This is fine (using a value less than what the user requested) because the workflow handler logic will issue another queue call with timeoutSeconds if the desired date has not elapsed when the workflow is re-run.

@changeset-bot

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a33b789

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

This PR includes changesets to release 15 packages
NameType
@workflow/world-localPatch
@workflow/cliPatch
@workflow/corePatch
@workflow/world-postgresPatch
workflowPatch
@workflow/world-testingPatch
@workflow/buildersPatch
@workflow/docs-typecheckPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
@workflow/aiPatch
@workflow/astroPatch
@workflow/sveltekitPatch
@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 Jan 21, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jan 21, 2026

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
💻 Local🥇 Next.js (Turbopack)0.037s (-17.3% 🟢)1.019s (~)0.983s101.00x
🌐 RedisNext.js (Turbopack)0.041s (-1.7%)1.017s (~)0.976s101.10x
🌐 StarterNext.js (Turbopack)0.042s (-0.7%)1.015s (~)0.973s101.15x
💻 LocalNitro0.043s (-6.1% 🟢)1.006s (~)0.963s101.18x
💻 LocalExpress0.044s (-2.6%)1.007s (~)0.963s101.20x
🌐 MongoDBNext.js (Turbopack)0.075s (-21.8% 🟢)1.016s (~)0.940s102.05x
🌐 TursoNext.js (Turbopack)0.085s (-22.5% 🟢)1.013s (~)0.928s102.30x
🐘 PostgresExpress0.189s (-41.9% 🟢)1.014s (~)0.825s105.13x
🐘 PostgresNext.js (Turbopack)0.215s (+39.6% 🔺)1.019s (-0.6%)0.804s105.84x
🐘 PostgresNitro0.256s (+4.4%)1.023s (+0.8%)0.767s106.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.573s (-18.7% 🟢)1.477s (-11.8% 🟢)0.903s101.00x
▲ VercelNitro0.609s (+0.9%)1.568s (-0.7%)0.959s101.06x
▲ VercelNext.js (Turbopack)0.725s (-10.4% 🟢)1.536s (-16.2% 🟢)0.811s101.26x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.076s (-1.3%)2.013s (~)0.937s101.00x
🌐 StarterNext.js (Turbopack)1.093s (~)2.010s (~)0.918s101.02x
🌐 RedisNext.js (Turbopack)1.109s (~)2.012s (~)0.904s101.03x
💻 LocalNitro1.113s (~)2.006s (~)0.893s101.03x
💻 LocalExpress1.113s (~)2.006s (~)0.893s101.04x
🌐 TursoNext.js (Turbopack)1.285s (-0.8%)2.010s (~)0.725s101.19x
🌐 MongoDBNext.js (Turbopack)1.304s (~)2.014s (~)0.710s101.21x
🐘 PostgresNext.js (Turbopack)1.786s (-8.1% 🟢)2.216s (+9.9% 🔺)0.429s101.66x
🐘 PostgresNitro2.278s (+3.6%)3.013s (~)0.735s102.12x
🐘 PostgresExpress2.296s (-5.9% 🟢)3.013s (~)0.717s102.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.700s (-6.8% 🟢)3.605s (-4.4%)0.904s101.00x
▲ VercelNitro2.829s (-1.6%)3.669s (~)0.841s101.05x
▲ VercelExpress3.259s (+17.1% 🔺)4.147s (+14.4% 🔺)0.888s101.21x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.533s (-1.1%)11.019s (~)0.485s51.00x
🌐 StarterNext.js (Turbopack)10.630s (~)11.014s (~)0.384s51.01x
🌐 RedisNext.js (Turbopack)10.681s (~)11.020s (~)0.339s51.01x
💻 LocalNitro10.783s (~)11.013s (~)0.230s51.02x
💻 LocalExpress10.794s (~)11.014s (~)0.221s51.02x
🌐 TursoNext.js (Turbopack)12.176s (~)13.023s (~)0.847s51.16x
🌐 MongoDBNext.js (Turbopack)12.277s (+0.6%)13.032s (~)0.755s51.17x
🐘 PostgresNext.js (Turbopack)15.355s (~)16.032s (~)0.676s51.46x
🐘 PostgresNitro20.401s (~)21.035s (~)0.633s51.94x
🐘 PostgresExpress20.468s (+0.6%)21.029s (~)0.561s51.94x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)23.357s (+1.5%)24.170s (+1.1%)0.813s51.00x
▲ VercelExpress23.420s (+0.9%)24.242s (~)0.822s51.00x
▲ VercelNitro23.486s (+0.5%)24.552s (+2.6%)1.066s51.01x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.353s (~)2.010s (~)0.657s151.00x
💻 LocalNext.js (Turbopack)1.357s (-1.7%)2.014s (~)0.657s151.00x
🌐 StarterNext.js (Turbopack)1.369s (~)2.009s (~)0.640s151.01x
💻 LocalExpress1.409s (~)2.007s (~)0.598s151.04x
💻 LocalNitro1.424s (~)2.006s (~)0.583s151.05x
🐘 PostgresNext.js (Turbopack)1.729s (-9.2% 🟢)2.013s (-3.6%)0.284s151.28x
🌐 MongoDBNext.js (Turbopack)2.144s (~)3.015s (~)0.871s101.59x
🌐 TursoNext.js (Turbopack)2.196s (-1.3%)3.013s (~)0.816s101.62x
🐘 PostgresNitro2.316s (-1.9%)3.014s (~)0.698s101.71x
🐘 PostgresExpress2.346s (-11.5% 🟢)3.012s (~)0.666s101.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.299s (-21.6% 🟢)3.853s (-21.3% 🟢)0.554s81.00x
▲ VercelNitro3.304s (-26.1% 🟢)4.168s (-17.3% 🟢)0.865s81.00x
▲ VercelNext.js (Turbopack)3.939s (+4.4%)4.575s (-3.0%)0.636s71.19x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.959s (-7.3% 🟢)2.741s (-9.8% 🟢)0.782s121.00x
💻 LocalExpress2.202s (-0.7%)3.142s (-0.7%)0.940s101.12x
💻 LocalNitro2.217s (-2.3%)3.187s (-0.6%)0.970s101.13x
🌐 RedisNext.js (Turbopack)2.478s (-0.9%)3.012s (~)0.534s101.26x
🌐 StarterNext.js (Turbopack)2.495s (+1.1%)3.010s (~)0.515s101.27x
🐘 PostgresNext.js (Turbopack)2.641s (+1.8%)3.026s (-3.5%)0.385s101.35x
🐘 PostgresExpress2.740s (-9.1% 🟢)3.023s (-9.9% 🟢)0.283s101.40x
🐘 PostgresNitro3.015s (+1.6%)3.589s (~)0.574s91.54x
🌐 TursoNext.js (Turbopack)4.721s (~)5.182s (~)0.461s62.41x
🌐 MongoDBNext.js (Turbopack)4.755s (-1.3%)5.186s (~)0.431s62.43x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.627s (+1.0%)4.288s (-0.5%)0.661s71.00x
▲ VercelNitro3.662s (-3.8%)4.517s (-4.9%)0.855s71.01x
▲ VercelExpress3.708s (+1.0%)4.655s (+4.3%)0.947s71.02x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.352s (-2.3%)2.010s (~)0.657s151.00x
💻 LocalNext.js (Turbopack)1.353s (-3.5%)2.012s (~)0.660s151.00x
🌐 StarterNext.js (Turbopack)1.358s (-0.9%)2.008s (~)0.650s151.00x
💻 LocalExpress1.420s (~)2.006s (~)0.586s151.05x
💻 LocalNitro1.422s (~)2.007s (~)0.584s151.05x
🐘 PostgresNext.js (Turbopack)1.592s (-12.8% 🟢)2.012s (~)0.421s151.18x
🐘 PostgresNitro1.672s (-11.9% 🟢)2.010s (~)0.338s151.24x
🐘 PostgresExpress2.004s (+19.1% 🔺)2.321s (+15.5% 🔺)0.317s131.48x
🌐 MongoDBNext.js (Turbopack)2.154s (+0.5%)3.014s (~)0.859s101.59x
🌐 TursoNext.js (Turbopack)2.215s (~)3.012s (~)0.797s101.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.700s (-11.8% 🟢)3.629s (-1.5%)0.930s91.00x
▲ VercelNitro2.818s (-10.5% 🟢)3.681s (-6.2% 🟢)0.863s91.04x
▲ VercelNext.js (Turbopack)3.266s (~)4.154s (-0.6%)0.888s81.21x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.040s (-7.5% 🟢)2.836s (-7.6% 🟢)0.796s111.00x
💻 LocalExpress2.216s (~)3.177s (~)0.961s101.09x
💻 LocalNitro2.262s (+1.3%)3.200s (~)0.938s101.11x
🌐 RedisNext.js (Turbopack)2.466s (-0.9%)3.011s (~)0.545s101.21x
🌐 StarterNext.js (Turbopack)2.494s (+0.9%)3.009s (~)0.515s101.22x
🐘 PostgresNitro2.526s (-8.6% 🟢)3.027s (~)0.500s101.24x
🐘 PostgresNext.js (Turbopack)2.560s (~)3.027s (~)0.467s101.25x
🐘 PostgresExpress2.585s (-6.4% 🟢)3.013s (~)0.428s101.27x
🌐 MongoDBNext.js (Turbopack)4.652s (-1.3%)5.186s (~)0.534s62.28x
🌐 TursoNext.js (Turbopack)4.714s (-0.6%)5.181s (~)0.467s62.31x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.164s (+3.9%)3.646s (~)0.481s91.00x
▲ VercelNitro3.220s (-1.0%)3.920s (+1.7%)0.700s81.02x
▲ VercelNext.js (Turbopack)3.349s (+1.2%)3.852s (+0.5%)0.503s91.06x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.110s (-21.2% 🟢)1.003s (~)0.016s (+1.2%)1.029s (~)0.919s101.00x
🌐 StarterNext.js (Turbopack)0.133s (+1.5%)1.006s (~)0.000s (+Infinity% 🔺)1.012s (~)0.878s101.22x
🌐 RedisNext.js (Turbopack)0.143s (~)1.005s (~)0.000s (+Infinity% 🔺)1.013s (~)0.871s101.30x
💻 LocalExpress0.177s (+2.3%)0.992s (~)0.016s (+12.5% 🔺)1.023s (~)0.846s101.62x
💻 LocalNitro0.189s (+1.9%)0.992s (~)0.017s (+6.8% 🔺)1.024s (~)0.836s101.72x
🌐 MongoDBNext.js (Turbopack)0.483s (+6.9% 🔺)0.972s (-2.6%)0.000s (+Infinity% 🔺)1.015s (~)0.532s104.41x
🌐 TursoNext.js (Turbopack)0.521s (-1.0%)0.927s (~)0.000s (-100.0% 🟢)1.013s (~)0.492s104.76x
🐘 PostgresNext.js (Turbopack)1.125s (-10.0% 🟢)1.918s (+6.4% 🔺)0.000s (+Infinity% 🔺)2.017s (~)0.892s1010.27x
🐘 PostgresNitro2.212s (-2.9%)2.826s (+2.1%)0.000s (+Infinity% 🔺)3.015s (~)0.803s1020.21x
🐘 PostgresExpress2.300s (+7.4% 🔺)2.743s (-5.5% 🟢)0.000s (-100.0% 🟢)3.014s (~)0.714s1021.00x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.019s (+7.1% 🔺)3.152s (-2.0%)0.531s (+35.6% 🔺)4.193s (-0.9%)1.174s101.00x
▲ VercelNext.js (Turbopack)3.603s (+1.5%)3.825s (-3.2%)0.752s (+45.1% 🔺)5.054s (+1.3%)1.450s101.19x
▲ VercelExpress3.768s (+26.8% 🔺)4.055s (+25.2% 🔺)0.791s (+12.8% 🔺)5.438s (+22.9% 🔺)1.669s101.25x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)8/8
🐘 PostgresNext.js (Turbopack)6/8
▲ VercelExpress4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)💻 Local6/8
Nitro💻 Local8/8
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 Jan 21, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production435038473
✅ 💻 Local Development398032430
✅ 📦 Local Production398032430
✅ 🐘 Local Postgres398032430
✅ 🪟 Windows430043
❌ 🌍 Community Worlds162220184
Total1834221341990

❌ Failed Tests

🌍 Community Worlds (22 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (19 failed):

  • addTenWorkflow
  • addTenWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • 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
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro3904
✅ example3904
✅ express3904
✅ fastify3904
✅ hono3904
✅ nextjs-turbopack4201
✅ nextjs-webpack4201
✅ nitro3904
✅ nuxt3904
✅ sveltekit3904
✅ vite3904
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable3904
✅ express-stable3904
✅ fastify-stable3904
✅ hono-stable3904
✅ nextjs-turbopack-stable4300
✅ nextjs-webpack-stable4300
✅ nitro-stable3904
✅ nuxt-stable3904
✅ sveltekit-stable3904
✅ vite-stable3904
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable3904
✅ express-stable3904
✅ fastify-stable3904
✅ hono-stable3904
✅ nextjs-turbopack-stable4300
✅ nextjs-webpack-stable4300
✅ nitro-stable3904
✅ nuxt-stable3904
✅ sveltekit-stable3904
✅ vite-stable3904
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable3904
✅ express-stable3904
✅ fastify-stable3904
✅ hono-stable3904
✅ nextjs-turbopack-stable4300
✅ nextjs-webpack-stable4300
✅ nitro-stable3904
✅ nuxt-stable3904
✅ sveltekit-stable3904
✅ vite-stable3904
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4300
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb4210
✅ redis-dev300
❌ redis4210
✅ starter-dev300
❌ starter24190
✅ turso-dev300
❌ turso4210

📋 View full workflow run

@TooTallNateGraphite App

Copy link
Copy Markdown
MemberAuthor

This stack of pull requests is managed by Graphite. Learn more about stacking.

@TooTallNate
TooTallNate marked this pull request as ready for review January 21, 2026 17:37
CopilotAI review requested due to automatic review settings January 21, 2026 17:37
@TooTallNate
TooTallNate removed the request for review from CopilotJanuary 21, 2026 17:37
@TooTallNate
TooTallNate merged commit b05dbd7 into mainJan 21, 2026
94 checks passed
@TooTallNate
TooTallNate deleted the 01-21-clamp_settimeout_value_to_32-bit_integer_25d_for_sleep_ branch January 21, 2026 17:43
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.

Local World: sleep() function cannot be more than ~25 days

2 participants

@TooTallNate@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Clamp setTimeout value to 32-bit integer (~25d) for sleep() - #824

Merged
TooTallNate merged 1 commit into
mainfrom
01-21-clamp_settimeout_value_to_32-bit_integer_25d_for_sleep_
Jan 21, 2026
Merged

Clamp setTimeout value to 32-bit integer (~25d) for sleep()#824
TooTallNate merged 1 commit into
mainfrom
01-21-clamp_settimeout_value_to_32-bit_integer_25d_for_sleep_

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Jan 21, 2026

Copy link
Copy Markdown
Member

Fix timeout overflow error in world-local queue implementation by clamping setTimeout values.

Fixes#823.

What changed?

  • Added a MAX_SAFE_TIMEOUT_MS constant (2147483647 ms, ~24.85 days) to prevent Node.js 32-bit integer overflow
  • Modified the setTimeout call in the queue retry logic to clamp timeout values to this maximum

How to test?

  1. Create a workflow with a very long sleep duration (> 25 days)
  2. Run it in local mode
  3. Verify no "TimeoutOverflowWarning" appears in the logs
  4. Confirm the sleep functionality still works correctly with the clamped values

Why make this change?

Node.js setTimeout uses a 32-bit signed integer internally, which means values larger than ~25 days cause overflow warnings. This change prevents those warnings while maintaining the correct behavior by allowing the handler to recalculate remaining time from persistent state when the clamped timeout fires. This is fine (using a value less than what the user requested) because the workflow handler logic will issue another queue call with timeoutSeconds if the desired date has not elapsed when the workflow is re-run.

@changeset-bot

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a33b789

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

This PR includes changesets to release 15 packages
NameType
@workflow/world-localPatch
@workflow/cliPatch
@workflow/corePatch
@workflow/world-postgresPatch
workflowPatch
@workflow/world-testingPatch
@workflow/buildersPatch
@workflow/docs-typecheckPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
@workflow/aiPatch
@workflow/astroPatch
@workflow/sveltekitPatch
@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 Jan 21, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jan 21, 2026

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
💻 Local🥇 Next.js (Turbopack)0.037s (-17.3% 🟢)1.019s (~)0.983s101.00x
🌐 RedisNext.js (Turbopack)0.041s (-1.7%)1.017s (~)0.976s101.10x
🌐 StarterNext.js (Turbopack)0.042s (-0.7%)1.015s (~)0.973s101.15x
💻 LocalNitro0.043s (-6.1% 🟢)1.006s (~)0.963s101.18x
💻 LocalExpress0.044s (-2.6%)1.007s (~)0.963s101.20x
🌐 MongoDBNext.js (Turbopack)0.075s (-21.8% 🟢)1.016s (~)0.940s102.05x
🌐 TursoNext.js (Turbopack)0.085s (-22.5% 🟢)1.013s (~)0.928s102.30x
🐘 PostgresExpress0.189s (-41.9% 🟢)1.014s (~)0.825s105.13x
🐘 PostgresNext.js (Turbopack)0.215s (+39.6% 🔺)1.019s (-0.6%)0.804s105.84x
🐘 PostgresNitro0.256s (+4.4%)1.023s (+0.8%)0.767s106.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.573s (-18.7% 🟢)1.477s (-11.8% 🟢)0.903s101.00x
▲ VercelNitro0.609s (+0.9%)1.568s (-0.7%)0.959s101.06x
▲ VercelNext.js (Turbopack)0.725s (-10.4% 🟢)1.536s (-16.2% 🟢)0.811s101.26x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.076s (-1.3%)2.013s (~)0.937s101.00x
🌐 StarterNext.js (Turbopack)1.093s (~)2.010s (~)0.918s101.02x
🌐 RedisNext.js (Turbopack)1.109s (~)2.012s (~)0.904s101.03x
💻 LocalNitro1.113s (~)2.006s (~)0.893s101.03x
💻 LocalExpress1.113s (~)2.006s (~)0.893s101.04x
🌐 TursoNext.js (Turbopack)1.285s (-0.8%)2.010s (~)0.725s101.19x
🌐 MongoDBNext.js (Turbopack)1.304s (~)2.014s (~)0.710s101.21x
🐘 PostgresNext.js (Turbopack)1.786s (-8.1% 🟢)2.216s (+9.9% 🔺)0.429s101.66x
🐘 PostgresNitro2.278s (+3.6%)3.013s (~)0.735s102.12x
🐘 PostgresExpress2.296s (-5.9% 🟢)3.013s (~)0.717s102.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.700s (-6.8% 🟢)3.605s (-4.4%)0.904s101.00x
▲ VercelNitro2.829s (-1.6%)3.669s (~)0.841s101.05x
▲ VercelExpress3.259s (+17.1% 🔺)4.147s (+14.4% 🔺)0.888s101.21x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.533s (-1.1%)11.019s (~)0.485s51.00x
🌐 StarterNext.js (Turbopack)10.630s (~)11.014s (~)0.384s51.01x
🌐 RedisNext.js (Turbopack)10.681s (~)11.020s (~)0.339s51.01x
💻 LocalNitro10.783s (~)11.013s (~)0.230s51.02x
💻 LocalExpress10.794s (~)11.014s (~)0.221s51.02x
🌐 TursoNext.js (Turbopack)12.176s (~)13.023s (~)0.847s51.16x
🌐 MongoDBNext.js (Turbopack)12.277s (+0.6%)13.032s (~)0.755s51.17x
🐘 PostgresNext.js (Turbopack)15.355s (~)16.032s (~)0.676s51.46x
🐘 PostgresNitro20.401s (~)21.035s (~)0.633s51.94x
🐘 PostgresExpress20.468s (+0.6%)21.029s (~)0.561s51.94x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)23.357s (+1.5%)24.170s (+1.1%)0.813s51.00x
▲ VercelExpress23.420s (+0.9%)24.242s (~)0.822s51.00x
▲ VercelNitro23.486s (+0.5%)24.552s (+2.6%)1.066s51.01x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.353s (~)2.010s (~)0.657s151.00x
💻 LocalNext.js (Turbopack)1.357s (-1.7%)2.014s (~)0.657s151.00x
🌐 StarterNext.js (Turbopack)1.369s (~)2.009s (~)0.640s151.01x
💻 LocalExpress1.409s (~)2.007s (~)0.598s151.04x
💻 LocalNitro1.424s (~)2.006s (~)0.583s151.05x
🐘 PostgresNext.js (Turbopack)1.729s (-9.2% 🟢)2.013s (-3.6%)0.284s151.28x
🌐 MongoDBNext.js (Turbopack)2.144s (~)3.015s (~)0.871s101.59x
🌐 TursoNext.js (Turbopack)2.196s (-1.3%)3.013s (~)0.816s101.62x
🐘 PostgresNitro2.316s (-1.9%)3.014s (~)0.698s101.71x
🐘 PostgresExpress2.346s (-11.5% 🟢)3.012s (~)0.666s101.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.299s (-21.6% 🟢)3.853s (-21.3% 🟢)0.554s81.00x
▲ VercelNitro3.304s (-26.1% 🟢)4.168s (-17.3% 🟢)0.865s81.00x
▲ VercelNext.js (Turbopack)3.939s (+4.4%)4.575s (-3.0%)0.636s71.19x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.959s (-7.3% 🟢)2.741s (-9.8% 🟢)0.782s121.00x
💻 LocalExpress2.202s (-0.7%)3.142s (-0.7%)0.940s101.12x
💻 LocalNitro2.217s (-2.3%)3.187s (-0.6%)0.970s101.13x
🌐 RedisNext.js (Turbopack)2.478s (-0.9%)3.012s (~)0.534s101.26x
🌐 StarterNext.js (Turbopack)2.495s (+1.1%)3.010s (~)0.515s101.27x
🐘 PostgresNext.js (Turbopack)2.641s (+1.8%)3.026s (-3.5%)0.385s101.35x
🐘 PostgresExpress2.740s (-9.1% 🟢)3.023s (-9.9% 🟢)0.283s101.40x
🐘 PostgresNitro3.015s (+1.6%)3.589s (~)0.574s91.54x
🌐 TursoNext.js (Turbopack)4.721s (~)5.182s (~)0.461s62.41x
🌐 MongoDBNext.js (Turbopack)4.755s (-1.3%)5.186s (~)0.431s62.43x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.627s (+1.0%)4.288s (-0.5%)0.661s71.00x
▲ VercelNitro3.662s (-3.8%)4.517s (-4.9%)0.855s71.01x
▲ VercelExpress3.708s (+1.0%)4.655s (+4.3%)0.947s71.02x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.352s (-2.3%)2.010s (~)0.657s151.00x
💻 LocalNext.js (Turbopack)1.353s (-3.5%)2.012s (~)0.660s151.00x
🌐 StarterNext.js (Turbopack)1.358s (-0.9%)2.008s (~)0.650s151.00x
💻 LocalExpress1.420s (~)2.006s (~)0.586s151.05x
💻 LocalNitro1.422s (~)2.007s (~)0.584s151.05x
🐘 PostgresNext.js (Turbopack)1.592s (-12.8% 🟢)2.012s (~)0.421s151.18x
🐘 PostgresNitro1.672s (-11.9% 🟢)2.010s (~)0.338s151.24x
🐘 PostgresExpress2.004s (+19.1% 🔺)2.321s (+15.5% 🔺)0.317s131.48x
🌐 MongoDBNext.js (Turbopack)2.154s (+0.5%)3.014s (~)0.859s101.59x
🌐 TursoNext.js (Turbopack)2.215s (~)3.012s (~)0.797s101.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.700s (-11.8% 🟢)3.629s (-1.5%)0.930s91.00x
▲ VercelNitro2.818s (-10.5% 🟢)3.681s (-6.2% 🟢)0.863s91.04x
▲ VercelNext.js (Turbopack)3.266s (~)4.154s (-0.6%)0.888s81.21x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.040s (-7.5% 🟢)2.836s (-7.6% 🟢)0.796s111.00x
💻 LocalExpress2.216s (~)3.177s (~)0.961s101.09x
💻 LocalNitro2.262s (+1.3%)3.200s (~)0.938s101.11x
🌐 RedisNext.js (Turbopack)2.466s (-0.9%)3.011s (~)0.545s101.21x
🌐 StarterNext.js (Turbopack)2.494s (+0.9%)3.009s (~)0.515s101.22x
🐘 PostgresNitro2.526s (-8.6% 🟢)3.027s (~)0.500s101.24x
🐘 PostgresNext.js (Turbopack)2.560s (~)3.027s (~)0.467s101.25x
🐘 PostgresExpress2.585s (-6.4% 🟢)3.013s (~)0.428s101.27x
🌐 MongoDBNext.js (Turbopack)4.652s (-1.3%)5.186s (~)0.534s62.28x
🌐 TursoNext.js (Turbopack)4.714s (-0.6%)5.181s (~)0.467s62.31x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.164s (+3.9%)3.646s (~)0.481s91.00x
▲ VercelNitro3.220s (-1.0%)3.920s (+1.7%)0.700s81.02x
▲ VercelNext.js (Turbopack)3.349s (+1.2%)3.852s (+0.5%)0.503s91.06x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.110s (-21.2% 🟢)1.003s (~)0.016s (+1.2%)1.029s (~)0.919s101.00x
🌐 StarterNext.js (Turbopack)0.133s (+1.5%)1.006s (~)0.000s (+Infinity% 🔺)1.012s (~)0.878s101.22x
🌐 RedisNext.js (Turbopack)0.143s (~)1.005s (~)0.000s (+Infinity% 🔺)1.013s (~)0.871s101.30x
💻 LocalExpress0.177s (+2.3%)0.992s (~)0.016s (+12.5% 🔺)1.023s (~)0.846s101.62x
💻 LocalNitro0.189s (+1.9%)0.992s (~)0.017s (+6.8% 🔺)1.024s (~)0.836s101.72x
🌐 MongoDBNext.js (Turbopack)0.483s (+6.9% 🔺)0.972s (-2.6%)0.000s (+Infinity% 🔺)1.015s (~)0.532s104.41x
🌐 TursoNext.js (Turbopack)0.521s (-1.0%)0.927s (~)0.000s (-100.0% 🟢)1.013s (~)0.492s104.76x
🐘 PostgresNext.js (Turbopack)1.125s (-10.0% 🟢)1.918s (+6.4% 🔺)0.000s (+Infinity% 🔺)2.017s (~)0.892s1010.27x
🐘 PostgresNitro2.212s (-2.9%)2.826s (+2.1%)0.000s (+Infinity% 🔺)3.015s (~)0.803s1020.21x
🐘 PostgresExpress2.300s (+7.4% 🔺)2.743s (-5.5% 🟢)0.000s (-100.0% 🟢)3.014s (~)0.714s1021.00x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.019s (+7.1% 🔺)3.152s (-2.0%)0.531s (+35.6% 🔺)4.193s (-0.9%)1.174s101.00x
▲ VercelNext.js (Turbopack)3.603s (+1.5%)3.825s (-3.2%)0.752s (+45.1% 🔺)5.054s (+1.3%)1.450s101.19x
▲ VercelExpress3.768s (+26.8% 🔺)4.055s (+25.2% 🔺)0.791s (+12.8% 🔺)5.438s (+22.9% 🔺)1.669s101.25x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)8/8
🐘 PostgresNext.js (Turbopack)6/8
▲ VercelExpress4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)💻 Local6/8
Nitro💻 Local8/8
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 Jan 21, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production435038473
✅ 💻 Local Development398032430
✅ 📦 Local Production398032430
✅ 🐘 Local Postgres398032430
✅ 🪟 Windows430043
❌ 🌍 Community Worlds162220184
Total1834221341990

❌ Failed Tests

🌍 Community Worlds (22 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (19 failed):

  • addTenWorkflow
  • addTenWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • 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
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro3904
✅ example3904
✅ express3904
✅ fastify3904
✅ hono3904
✅ nextjs-turbopack4201
✅ nextjs-webpack4201
✅ nitro3904
✅ nuxt3904
✅ sveltekit3904
✅ vite3904
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable3904
✅ express-stable3904
✅ fastify-stable3904
✅ hono-stable3904
✅ nextjs-turbopack-stable4300
✅ nextjs-webpack-stable4300
✅ nitro-stable3904
✅ nuxt-stable3904
✅ sveltekit-stable3904
✅ vite-stable3904
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable3904
✅ express-stable3904
✅ fastify-stable3904
✅ hono-stable3904
✅ nextjs-turbopack-stable4300
✅ nextjs-webpack-stable4300
✅ nitro-stable3904
✅ nuxt-stable3904
✅ sveltekit-stable3904
✅ vite-stable3904
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable3904
✅ express-stable3904
✅ fastify-stable3904
✅ hono-stable3904
✅ nextjs-turbopack-stable4300
✅ nextjs-webpack-stable4300
✅ nitro-stable3904
✅ nuxt-stable3904
✅ sveltekit-stable3904
✅ vite-stable3904
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4300
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb4210
✅ redis-dev300
❌ redis4210
✅ starter-dev300
❌ starter24190
✅ turso-dev300
❌ turso4210

📋 View full workflow run

@TooTallNateGraphite App

Copy link
Copy Markdown
MemberAuthor

This stack of pull requests is managed by Graphite. Learn more about stacking.

@TooTallNate
TooTallNate marked this pull request as ready for review January 21, 2026 17:37
CopilotAI review requested due to automatic review settings January 21, 2026 17:37
@TooTallNate
TooTallNate removed the request for review from CopilotJanuary 21, 2026 17:37
@TooTallNate
TooTallNate merged commit b05dbd7 into mainJan 21, 2026
94 checks passed
@TooTallNate
TooTallNate deleted the 01-21-clamp_settimeout_value_to_32-bit_integer_25d_for_sleep_ branch January 21, 2026 17:43
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.

Local World: sleep() function cannot be more than ~25 days

2 participants

@TooTallNate@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Clamp setTimeout value to 32-bit integer (~25d) for sleep() - #824

Merged
TooTallNate merged 1 commit into
mainfrom
01-21-clamp_settimeout_value_to_32-bit_integer_25d_for_sleep_
Jan 21, 2026
Merged

Clamp setTimeout value to 32-bit integer (~25d) for sleep()#824
TooTallNate merged 1 commit into
mainfrom
01-21-clamp_settimeout_value_to_32-bit_integer_25d_for_sleep_

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Jan 21, 2026

Copy link
Copy Markdown
Member

Fix timeout overflow error in world-local queue implementation by clamping setTimeout values.

Fixes#823.

What changed?

  • Added a MAX_SAFE_TIMEOUT_MS constant (2147483647 ms, ~24.85 days) to prevent Node.js 32-bit integer overflow
  • Modified the setTimeout call in the queue retry logic to clamp timeout values to this maximum

How to test?

  1. Create a workflow with a very long sleep duration (> 25 days)
  2. Run it in local mode
  3. Verify no "TimeoutOverflowWarning" appears in the logs
  4. Confirm the sleep functionality still works correctly with the clamped values

Why make this change?

Node.js setTimeout uses a 32-bit signed integer internally, which means values larger than ~25 days cause overflow warnings. This change prevents those warnings while maintaining the correct behavior by allowing the handler to recalculate remaining time from persistent state when the clamped timeout fires. This is fine (using a value less than what the user requested) because the workflow handler logic will issue another queue call with timeoutSeconds if the desired date has not elapsed when the workflow is re-run.

@changeset-bot

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a33b789

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

This PR includes changesets to release 15 packages
NameType
@workflow/world-localPatch
@workflow/cliPatch
@workflow/corePatch
@workflow/world-postgresPatch
workflowPatch
@workflow/world-testingPatch
@workflow/buildersPatch
@workflow/docs-typecheckPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
@workflow/aiPatch
@workflow/astroPatch
@workflow/sveltekitPatch
@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 Jan 21, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jan 21, 2026

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
💻 Local🥇 Next.js (Turbopack)0.037s (-17.3% 🟢)1.019s (~)0.983s101.00x
🌐 RedisNext.js (Turbopack)0.041s (-1.7%)1.017s (~)0.976s101.10x
🌐 StarterNext.js (Turbopack)0.042s (-0.7%)1.015s (~)0.973s101.15x
💻 LocalNitro0.043s (-6.1% 🟢)1.006s (~)0.963s101.18x
💻 LocalExpress0.044s (-2.6%)1.007s (~)0.963s101.20x
🌐 MongoDBNext.js (Turbopack)0.075s (-21.8% 🟢)1.016s (~)0.940s102.05x
🌐 TursoNext.js (Turbopack)0.085s (-22.5% 🟢)1.013s (~)0.928s102.30x
🐘 PostgresExpress0.189s (-41.9% 🟢)1.014s (~)0.825s105.13x
🐘 PostgresNext.js (Turbopack)0.215s (+39.6% 🔺)1.019s (-0.6%)0.804s105.84x
🐘 PostgresNitro0.256s (+4.4%)1.023s (+0.8%)0.767s106.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.573s (-18.7% 🟢)1.477s (-11.8% 🟢)0.903s101.00x
▲ VercelNitro0.609s (+0.9%)1.568s (-0.7%)0.959s101.06x
▲ VercelNext.js (Turbopack)0.725s (-10.4% 🟢)1.536s (-16.2% 🟢)0.811s101.26x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.076s (-1.3%)2.013s (~)0.937s101.00x
🌐 StarterNext.js (Turbopack)1.093s (~)2.010s (~)0.918s101.02x
🌐 RedisNext.js (Turbopack)1.109s (~)2.012s (~)0.904s101.03x
💻 LocalNitro1.113s (~)2.006s (~)0.893s101.03x
💻 LocalExpress1.113s (~)2.006s (~)0.893s101.04x
🌐 TursoNext.js (Turbopack)1.285s (-0.8%)2.010s (~)0.725s101.19x
🌐 MongoDBNext.js (Turbopack)1.304s (~)2.014s (~)0.710s101.21x
🐘 PostgresNext.js (Turbopack)1.786s (-8.1% 🟢)2.216s (+9.9% 🔺)0.429s101.66x
🐘 PostgresNitro2.278s (+3.6%)3.013s (~)0.735s102.12x
🐘 PostgresExpress2.296s (-5.9% 🟢)3.013s (~)0.717s102.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.700s (-6.8% 🟢)3.605s (-4.4%)0.904s101.00x
▲ VercelNitro2.829s (-1.6%)3.669s (~)0.841s101.05x
▲ VercelExpress3.259s (+17.1% 🔺)4.147s (+14.4% 🔺)0.888s101.21x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.533s (-1.1%)11.019s (~)0.485s51.00x
🌐 StarterNext.js (Turbopack)10.630s (~)11.014s (~)0.384s51.01x
🌐 RedisNext.js (Turbopack)10.681s (~)11.020s (~)0.339s51.01x
💻 LocalNitro10.783s (~)11.013s (~)0.230s51.02x
💻 LocalExpress10.794s (~)11.014s (~)0.221s51.02x
🌐 TursoNext.js (Turbopack)12.176s (~)13.023s (~)0.847s51.16x
🌐 MongoDBNext.js (Turbopack)12.277s (+0.6%)13.032s (~)0.755s51.17x
🐘 PostgresNext.js (Turbopack)15.355s (~)16.032s (~)0.676s51.46x
🐘 PostgresNitro20.401s (~)21.035s (~)0.633s51.94x
🐘 PostgresExpress20.468s (+0.6%)21.029s (~)0.561s51.94x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)23.357s (+1.5%)24.170s (+1.1%)0.813s51.00x
▲ VercelExpress23.420s (+0.9%)24.242s (~)0.822s51.00x
▲ VercelNitro23.486s (+0.5%)24.552s (+2.6%)1.066s51.01x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.353s (~)2.010s (~)0.657s151.00x
💻 LocalNext.js (Turbopack)1.357s (-1.7%)2.014s (~)0.657s151.00x
🌐 StarterNext.js (Turbopack)1.369s (~)2.009s (~)0.640s151.01x
💻 LocalExpress1.409s (~)2.007s (~)0.598s151.04x
💻 LocalNitro1.424s (~)2.006s (~)0.583s151.05x
🐘 PostgresNext.js (Turbopack)1.729s (-9.2% 🟢)2.013s (-3.6%)0.284s151.28x
🌐 MongoDBNext.js (Turbopack)2.144s (~)3.015s (~)0.871s101.59x
🌐 TursoNext.js (Turbopack)2.196s (-1.3%)3.013s (~)0.816s101.62x
🐘 PostgresNitro2.316s (-1.9%)3.014s (~)0.698s101.71x
🐘 PostgresExpress2.346s (-11.5% 🟢)3.012s (~)0.666s101.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.299s (-21.6% 🟢)3.853s (-21.3% 🟢)0.554s81.00x
▲ VercelNitro3.304s (-26.1% 🟢)4.168s (-17.3% 🟢)0.865s81.00x
▲ VercelNext.js (Turbopack)3.939s (+4.4%)4.575s (-3.0%)0.636s71.19x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.959s (-7.3% 🟢)2.741s (-9.8% 🟢)0.782s121.00x
💻 LocalExpress2.202s (-0.7%)3.142s (-0.7%)0.940s101.12x
💻 LocalNitro2.217s (-2.3%)3.187s (-0.6%)0.970s101.13x
🌐 RedisNext.js (Turbopack)2.478s (-0.9%)3.012s (~)0.534s101.26x
🌐 StarterNext.js (Turbopack)2.495s (+1.1%)3.010s (~)0.515s101.27x
🐘 PostgresNext.js (Turbopack)2.641s (+1.8%)3.026s (-3.5%)0.385s101.35x
🐘 PostgresExpress2.740s (-9.1% 🟢)3.023s (-9.9% 🟢)0.283s101.40x
🐘 PostgresNitro3.015s (+1.6%)3.589s (~)0.574s91.54x
🌐 TursoNext.js (Turbopack)4.721s (~)5.182s (~)0.461s62.41x
🌐 MongoDBNext.js (Turbopack)4.755s (-1.3%)5.186s (~)0.431s62.43x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.627s (+1.0%)4.288s (-0.5%)0.661s71.00x
▲ VercelNitro3.662s (-3.8%)4.517s (-4.9%)0.855s71.01x
▲ VercelExpress3.708s (+1.0%)4.655s (+4.3%)0.947s71.02x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.352s (-2.3%)2.010s (~)0.657s151.00x
💻 LocalNext.js (Turbopack)1.353s (-3.5%)2.012s (~)0.660s151.00x
🌐 StarterNext.js (Turbopack)1.358s (-0.9%)2.008s (~)0.650s151.00x
💻 LocalExpress1.420s (~)2.006s (~)0.586s151.05x
💻 LocalNitro1.422s (~)2.007s (~)0.584s151.05x
🐘 PostgresNext.js (Turbopack)1.592s (-12.8% 🟢)2.012s (~)0.421s151.18x
🐘 PostgresNitro1.672s (-11.9% 🟢)2.010s (~)0.338s151.24x
🐘 PostgresExpress2.004s (+19.1% 🔺)2.321s (+15.5% 🔺)0.317s131.48x
🌐 MongoDBNext.js (Turbopack)2.154s (+0.5%)3.014s (~)0.859s101.59x
🌐 TursoNext.js (Turbopack)2.215s (~)3.012s (~)0.797s101.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.700s (-11.8% 🟢)3.629s (-1.5%)0.930s91.00x
▲ VercelNitro2.818s (-10.5% 🟢)3.681s (-6.2% 🟢)0.863s91.04x
▲ VercelNext.js (Turbopack)3.266s (~)4.154s (-0.6%)0.888s81.21x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.040s (-7.5% 🟢)2.836s (-7.6% 🟢)0.796s111.00x
💻 LocalExpress2.216s (~)3.177s (~)0.961s101.09x
💻 LocalNitro2.262s (+1.3%)3.200s (~)0.938s101.11x
🌐 RedisNext.js (Turbopack)2.466s (-0.9%)3.011s (~)0.545s101.21x
🌐 StarterNext.js (Turbopack)2.494s (+0.9%)3.009s (~)0.515s101.22x
🐘 PostgresNitro2.526s (-8.6% 🟢)3.027s (~)0.500s101.24x
🐘 PostgresNext.js (Turbopack)2.560s (~)3.027s (~)0.467s101.25x
🐘 PostgresExpress2.585s (-6.4% 🟢)3.013s (~)0.428s101.27x
🌐 MongoDBNext.js (Turbopack)4.652s (-1.3%)5.186s (~)0.534s62.28x
🌐 TursoNext.js (Turbopack)4.714s (-0.6%)5.181s (~)0.467s62.31x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.164s (+3.9%)3.646s (~)0.481s91.00x
▲ VercelNitro3.220s (-1.0%)3.920s (+1.7%)0.700s81.02x
▲ VercelNext.js (Turbopack)3.349s (+1.2%)3.852s (+0.5%)0.503s91.06x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.110s (-21.2% 🟢)1.003s (~)0.016s (+1.2%)1.029s (~)0.919s101.00x
🌐 StarterNext.js (Turbopack)0.133s (+1.5%)1.006s (~)0.000s (+Infinity% 🔺)1.012s (~)0.878s101.22x
🌐 RedisNext.js (Turbopack)0.143s (~)1.005s (~)0.000s (+Infinity% 🔺)1.013s (~)0.871s101.30x
💻 LocalExpress0.177s (+2.3%)0.992s (~)0.016s (+12.5% 🔺)1.023s (~)0.846s101.62x
💻 LocalNitro0.189s (+1.9%)0.992s (~)0.017s (+6.8% 🔺)1.024s (~)0.836s101.72x
🌐 MongoDBNext.js (Turbopack)0.483s (+6.9% 🔺)0.972s (-2.6%)0.000s (+Infinity% 🔺)1.015s (~)0.532s104.41x
🌐 TursoNext.js (Turbopack)0.521s (-1.0%)0.927s (~)0.000s (-100.0% 🟢)1.013s (~)0.492s104.76x
🐘 PostgresNext.js (Turbopack)1.125s (-10.0% 🟢)1.918s (+6.4% 🔺)0.000s (+Infinity% 🔺)2.017s (~)0.892s1010.27x
🐘 PostgresNitro2.212s (-2.9%)2.826s (+2.1%)0.000s (+Infinity% 🔺)3.015s (~)0.803s1020.21x
🐘 PostgresExpress2.300s (+7.4% 🔺)2.743s (-5.5% 🟢)0.000s (-100.0% 🟢)3.014s (~)0.714s1021.00x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.019s (+7.1% 🔺)3.152s (-2.0%)0.531s (+35.6% 🔺)4.193s (-0.9%)1.174s101.00x
▲ VercelNext.js (Turbopack)3.603s (+1.5%)3.825s (-3.2%)0.752s (+45.1% 🔺)5.054s (+1.3%)1.450s101.19x
▲ VercelExpress3.768s (+26.8% 🔺)4.055s (+25.2% 🔺)0.791s (+12.8% 🔺)5.438s (+22.9% 🔺)1.669s101.25x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)8/8
🐘 PostgresNext.js (Turbopack)6/8
▲ VercelExpress4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)💻 Local6/8
Nitro💻 Local8/8
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 Jan 21, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production435038473
✅ 💻 Local Development398032430
✅ 📦 Local Production398032430
✅ 🐘 Local Postgres398032430
✅ 🪟 Windows430043
❌ 🌍 Community Worlds162220184
Total1834221341990

❌ Failed Tests

🌍 Community Worlds (22 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (19 failed):

  • addTenWorkflow
  • addTenWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • 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
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro3904
✅ example3904
✅ express3904
✅ fastify3904
✅ hono3904
✅ nextjs-turbopack4201
✅ nextjs-webpack4201
✅ nitro3904
✅ nuxt3904
✅ sveltekit3904
✅ vite3904
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable3904
✅ express-stable3904
✅ fastify-stable3904
✅ hono-stable3904
✅ nextjs-turbopack-stable4300
✅ nextjs-webpack-stable4300
✅ nitro-stable3904
✅ nuxt-stable3904
✅ sveltekit-stable3904
✅ vite-stable3904
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable3904
✅ express-stable3904
✅ fastify-stable3904
✅ hono-stable3904
✅ nextjs-turbopack-stable4300
✅ nextjs-webpack-stable4300
✅ nitro-stable3904
✅ nuxt-stable3904
✅ sveltekit-stable3904
✅ vite-stable3904
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable3904
✅ express-stable3904
✅ fastify-stable3904
✅ hono-stable3904
✅ nextjs-turbopack-stable4300
✅ nextjs-webpack-stable4300
✅ nitro-stable3904
✅ nuxt-stable3904
✅ sveltekit-stable3904
✅ vite-stable3904
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4300
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb4210
✅ redis-dev300
❌ redis4210
✅ starter-dev300
❌ starter24190
✅ turso-dev300
❌ turso4210

📋 View full workflow run

@TooTallNateGraphite App

Copy link
Copy Markdown
MemberAuthor

This stack of pull requests is managed by Graphite. Learn more about stacking.

@TooTallNate
TooTallNate marked this pull request as ready for review January 21, 2026 17:37
CopilotAI review requested due to automatic review settings January 21, 2026 17:37
@TooTallNate
TooTallNate removed the request for review from CopilotJanuary 21, 2026 17:37
@TooTallNate
TooTallNate merged commit b05dbd7 into mainJan 21, 2026
94 checks passed
@TooTallNate
TooTallNate deleted the 01-21-clamp_settimeout_value_to_32-bit_integer_25d_for_sleep_ branch January 21, 2026 17:43
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.

Local World: sleep() function cannot be more than ~25 days

2 participants

@TooTallNate@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Clamp setTimeout value to 32-bit integer (~25d) for sleep() - #824

Merged
TooTallNate merged 1 commit into
mainfrom
01-21-clamp_settimeout_value_to_32-bit_integer_25d_for_sleep_
Jan 21, 2026
Merged

Clamp setTimeout value to 32-bit integer (~25d) for sleep()#824
TooTallNate merged 1 commit into
mainfrom
01-21-clamp_settimeout_value_to_32-bit_integer_25d_for_sleep_

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Jan 21, 2026

Copy link
Copy Markdown
Member

Fix timeout overflow error in world-local queue implementation by clamping setTimeout values.

Fixes#823.

What changed?

  • Added a MAX_SAFE_TIMEOUT_MS constant (2147483647 ms, ~24.85 days) to prevent Node.js 32-bit integer overflow
  • Modified the setTimeout call in the queue retry logic to clamp timeout values to this maximum

How to test?

  1. Create a workflow with a very long sleep duration (> 25 days)
  2. Run it in local mode
  3. Verify no "TimeoutOverflowWarning" appears in the logs
  4. Confirm the sleep functionality still works correctly with the clamped values

Why make this change?

Node.js setTimeout uses a 32-bit signed integer internally, which means values larger than ~25 days cause overflow warnings. This change prevents those warnings while maintaining the correct behavior by allowing the handler to recalculate remaining time from persistent state when the clamped timeout fires. This is fine (using a value less than what the user requested) because the workflow handler logic will issue another queue call with timeoutSeconds if the desired date has not elapsed when the workflow is re-run.

@changeset-bot

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a33b789

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

This PR includes changesets to release 15 packages
NameType
@workflow/world-localPatch
@workflow/cliPatch
@workflow/corePatch
@workflow/world-postgresPatch
workflowPatch
@workflow/world-testingPatch
@workflow/buildersPatch
@workflow/docs-typecheckPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
@workflow/aiPatch
@workflow/astroPatch
@workflow/sveltekitPatch
@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 Jan 21, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jan 21, 2026

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
💻 Local🥇 Next.js (Turbopack)0.037s (-17.3% 🟢)1.019s (~)0.983s101.00x
🌐 RedisNext.js (Turbopack)0.041s (-1.7%)1.017s (~)0.976s101.10x
🌐 StarterNext.js (Turbopack)0.042s (-0.7%)1.015s (~)0.973s101.15x
💻 LocalNitro0.043s (-6.1% 🟢)1.006s (~)0.963s101.18x
💻 LocalExpress0.044s (-2.6%)1.007s (~)0.963s101.20x
🌐 MongoDBNext.js (Turbopack)0.075s (-21.8% 🟢)1.016s (~)0.940s102.05x
🌐 TursoNext.js (Turbopack)0.085s (-22.5% 🟢)1.013s (~)0.928s102.30x
🐘 PostgresExpress0.189s (-41.9% 🟢)1.014s (~)0.825s105.13x
🐘 PostgresNext.js (Turbopack)0.215s (+39.6% 🔺)1.019s (-0.6%)0.804s105.84x
🐘 PostgresNitro0.256s (+4.4%)1.023s (+0.8%)0.767s106.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.573s (-18.7% 🟢)1.477s (-11.8% 🟢)0.903s101.00x
▲ VercelNitro0.609s (+0.9%)1.568s (-0.7%)0.959s101.06x
▲ VercelNext.js (Turbopack)0.725s (-10.4% 🟢)1.536s (-16.2% 🟢)0.811s101.26x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.076s (-1.3%)2.013s (~)0.937s101.00x
🌐 StarterNext.js (Turbopack)1.093s (~)2.010s (~)0.918s101.02x
🌐 RedisNext.js (Turbopack)1.109s (~)2.012s (~)0.904s101.03x
💻 LocalNitro1.113s (~)2.006s (~)0.893s101.03x
💻 LocalExpress1.113s (~)2.006s (~)0.893s101.04x
🌐 TursoNext.js (Turbopack)1.285s (-0.8%)2.010s (~)0.725s101.19x
🌐 MongoDBNext.js (Turbopack)1.304s (~)2.014s (~)0.710s101.21x
🐘 PostgresNext.js (Turbopack)1.786s (-8.1% 🟢)2.216s (+9.9% 🔺)0.429s101.66x
🐘 PostgresNitro2.278s (+3.6%)3.013s (~)0.735s102.12x
🐘 PostgresExpress2.296s (-5.9% 🟢)3.013s (~)0.717s102.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.700s (-6.8% 🟢)3.605s (-4.4%)0.904s101.00x
▲ VercelNitro2.829s (-1.6%)3.669s (~)0.841s101.05x
▲ VercelExpress3.259s (+17.1% 🔺)4.147s (+14.4% 🔺)0.888s101.21x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.533s (-1.1%)11.019s (~)0.485s51.00x
🌐 StarterNext.js (Turbopack)10.630s (~)11.014s (~)0.384s51.01x
🌐 RedisNext.js (Turbopack)10.681s (~)11.020s (~)0.339s51.01x
💻 LocalNitro10.783s (~)11.013s (~)0.230s51.02x
💻 LocalExpress10.794s (~)11.014s (~)0.221s51.02x
🌐 TursoNext.js (Turbopack)12.176s (~)13.023s (~)0.847s51.16x
🌐 MongoDBNext.js (Turbopack)12.277s (+0.6%)13.032s (~)0.755s51.17x
🐘 PostgresNext.js (Turbopack)15.355s (~)16.032s (~)0.676s51.46x
🐘 PostgresNitro20.401s (~)21.035s (~)0.633s51.94x
🐘 PostgresExpress20.468s (+0.6%)21.029s (~)0.561s51.94x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)23.357s (+1.5%)24.170s (+1.1%)0.813s51.00x
▲ VercelExpress23.420s (+0.9%)24.242s (~)0.822s51.00x
▲ VercelNitro23.486s (+0.5%)24.552s (+2.6%)1.066s51.01x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.353s (~)2.010s (~)0.657s151.00x
💻 LocalNext.js (Turbopack)1.357s (-1.7%)2.014s (~)0.657s151.00x
🌐 StarterNext.js (Turbopack)1.369s (~)2.009s (~)0.640s151.01x
💻 LocalExpress1.409s (~)2.007s (~)0.598s151.04x
💻 LocalNitro1.424s (~)2.006s (~)0.583s151.05x
🐘 PostgresNext.js (Turbopack)1.729s (-9.2% 🟢)2.013s (-3.6%)0.284s151.28x
🌐 MongoDBNext.js (Turbopack)2.144s (~)3.015s (~)0.871s101.59x
🌐 TursoNext.js (Turbopack)2.196s (-1.3%)3.013s (~)0.816s101.62x
🐘 PostgresNitro2.316s (-1.9%)3.014s (~)0.698s101.71x
🐘 PostgresExpress2.346s (-11.5% 🟢)3.012s (~)0.666s101.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.299s (-21.6% 🟢)3.853s (-21.3% 🟢)0.554s81.00x
▲ VercelNitro3.304s (-26.1% 🟢)4.168s (-17.3% 🟢)0.865s81.00x
▲ VercelNext.js (Turbopack)3.939s (+4.4%)4.575s (-3.0%)0.636s71.19x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.959s (-7.3% 🟢)2.741s (-9.8% 🟢)0.782s121.00x
💻 LocalExpress2.202s (-0.7%)3.142s (-0.7%)0.940s101.12x
💻 LocalNitro2.217s (-2.3%)3.187s (-0.6%)0.970s101.13x
🌐 RedisNext.js (Turbopack)2.478s (-0.9%)3.012s (~)0.534s101.26x
🌐 StarterNext.js (Turbopack)2.495s (+1.1%)3.010s (~)0.515s101.27x
🐘 PostgresNext.js (Turbopack)2.641s (+1.8%)3.026s (-3.5%)0.385s101.35x
🐘 PostgresExpress2.740s (-9.1% 🟢)3.023s (-9.9% 🟢)0.283s101.40x
🐘 PostgresNitro3.015s (+1.6%)3.589s (~)0.574s91.54x
🌐 TursoNext.js (Turbopack)4.721s (~)5.182s (~)0.461s62.41x
🌐 MongoDBNext.js (Turbopack)4.755s (-1.3%)5.186s (~)0.431s62.43x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.627s (+1.0%)4.288s (-0.5%)0.661s71.00x
▲ VercelNitro3.662s (-3.8%)4.517s (-4.9%)0.855s71.01x
▲ VercelExpress3.708s (+1.0%)4.655s (+4.3%)0.947s71.02x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.352s (-2.3%)2.010s (~)0.657s151.00x
💻 LocalNext.js (Turbopack)1.353s (-3.5%)2.012s (~)0.660s151.00x
🌐 StarterNext.js (Turbopack)1.358s (-0.9%)2.008s (~)0.650s151.00x
💻 LocalExpress1.420s (~)2.006s (~)0.586s151.05x
💻 LocalNitro1.422s (~)2.007s (~)0.584s151.05x
🐘 PostgresNext.js (Turbopack)1.592s (-12.8% 🟢)2.012s (~)0.421s151.18x
🐘 PostgresNitro1.672s (-11.9% 🟢)2.010s (~)0.338s151.24x
🐘 PostgresExpress2.004s (+19.1% 🔺)2.321s (+15.5% 🔺)0.317s131.48x
🌐 MongoDBNext.js (Turbopack)2.154s (+0.5%)3.014s (~)0.859s101.59x
🌐 TursoNext.js (Turbopack)2.215s (~)3.012s (~)0.797s101.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.700s (-11.8% 🟢)3.629s (-1.5%)0.930s91.00x
▲ VercelNitro2.818s (-10.5% 🟢)3.681s (-6.2% 🟢)0.863s91.04x
▲ VercelNext.js (Turbopack)3.266s (~)4.154s (-0.6%)0.888s81.21x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.040s (-7.5% 🟢)2.836s (-7.6% 🟢)0.796s111.00x
💻 LocalExpress2.216s (~)3.177s (~)0.961s101.09x
💻 LocalNitro2.262s (+1.3%)3.200s (~)0.938s101.11x
🌐 RedisNext.js (Turbopack)2.466s (-0.9%)3.011s (~)0.545s101.21x
🌐 StarterNext.js (Turbopack)2.494s (+0.9%)3.009s (~)0.515s101.22x
🐘 PostgresNitro2.526s (-8.6% 🟢)3.027s (~)0.500s101.24x
🐘 PostgresNext.js (Turbopack)2.560s (~)3.027s (~)0.467s101.25x
🐘 PostgresExpress2.585s (-6.4% 🟢)3.013s (~)0.428s101.27x
🌐 MongoDBNext.js (Turbopack)4.652s (-1.3%)5.186s (~)0.534s62.28x
🌐 TursoNext.js (Turbopack)4.714s (-0.6%)5.181s (~)0.467s62.31x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.164s (+3.9%)3.646s (~)0.481s91.00x
▲ VercelNitro3.220s (-1.0%)3.920s (+1.7%)0.700s81.02x
▲ VercelNext.js (Turbopack)3.349s (+1.2%)3.852s (+0.5%)0.503s91.06x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.110s (-21.2% 🟢)1.003s (~)0.016s (+1.2%)1.029s (~)0.919s101.00x
🌐 StarterNext.js (Turbopack)0.133s (+1.5%)1.006s (~)0.000s (+Infinity% 🔺)1.012s (~)0.878s101.22x
🌐 RedisNext.js (Turbopack)0.143s (~)1.005s (~)0.000s (+Infinity% 🔺)1.013s (~)0.871s101.30x
💻 LocalExpress0.177s (+2.3%)0.992s (~)0.016s (+12.5% 🔺)1.023s (~)0.846s101.62x
💻 LocalNitro0.189s (+1.9%)0.992s (~)0.017s (+6.8% 🔺)1.024s (~)0.836s101.72x
🌐 MongoDBNext.js (Turbopack)0.483s (+6.9% 🔺)0.972s (-2.6%)0.000s (+Infinity% 🔺)1.015s (~)0.532s104.41x
🌐 TursoNext.js (Turbopack)0.521s (-1.0%)0.927s (~)0.000s (-100.0% 🟢)1.013s (~)0.492s104.76x
🐘 PostgresNext.js (Turbopack)1.125s (-10.0% 🟢)1.918s (+6.4% 🔺)0.000s (+Infinity% 🔺)2.017s (~)0.892s1010.27x
🐘 PostgresNitro2.212s (-2.9%)2.826s (+2.1%)0.000s (+Infinity% 🔺)3.015s (~)0.803s1020.21x
🐘 PostgresExpress2.300s (+7.4% 🔺)2.743s (-5.5% 🟢)0.000s (-100.0% 🟢)3.014s (~)0.714s1021.00x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.019s (+7.1% 🔺)3.152s (-2.0%)0.531s (+35.6% 🔺)4.193s (-0.9%)1.174s101.00x
▲ VercelNext.js (Turbopack)3.603s (+1.5%)3.825s (-3.2%)0.752s (+45.1% 🔺)5.054s (+1.3%)1.450s101.19x
▲ VercelExpress3.768s (+26.8% 🔺)4.055s (+25.2% 🔺)0.791s (+12.8% 🔺)5.438s (+22.9% 🔺)1.669s101.25x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)8/8
🐘 PostgresNext.js (Turbopack)6/8
▲ VercelExpress4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)💻 Local6/8
Nitro💻 Local8/8
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 Jan 21, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production435038473
✅ 💻 Local Development398032430
✅ 📦 Local Production398032430
✅ 🐘 Local Postgres398032430
✅ 🪟 Windows430043
❌ 🌍 Community Worlds162220184
Total1834221341990

❌ Failed Tests

🌍 Community Worlds (22 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (19 failed):

  • addTenWorkflow
  • addTenWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • 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
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro3904
✅ example3904
✅ express3904
✅ fastify3904
✅ hono3904
✅ nextjs-turbopack4201
✅ nextjs-webpack4201
✅ nitro3904
✅ nuxt3904
✅ sveltekit3904
✅ vite3904
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable3904
✅ express-stable3904
✅ fastify-stable3904
✅ hono-stable3904
✅ nextjs-turbopack-stable4300
✅ nextjs-webpack-stable4300
✅ nitro-stable3904
✅ nuxt-stable3904
✅ sveltekit-stable3904
✅ vite-stable3904
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable3904
✅ express-stable3904
✅ fastify-stable3904
✅ hono-stable3904
✅ nextjs-turbopack-stable4300
✅ nextjs-webpack-stable4300
✅ nitro-stable3904
✅ nuxt-stable3904
✅ sveltekit-stable3904
✅ vite-stable3904
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable3904
✅ express-stable3904
✅ fastify-stable3904
✅ hono-stable3904
✅ nextjs-turbopack-stable4300
✅ nextjs-webpack-stable4300
✅ nitro-stable3904
✅ nuxt-stable3904
✅ sveltekit-stable3904
✅ vite-stable3904
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4300
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb4210
✅ redis-dev300
❌ redis4210
✅ starter-dev300
❌ starter24190
✅ turso-dev300
❌ turso4210

📋 View full workflow run

@TooTallNateGraphite App

Copy link
Copy Markdown
MemberAuthor

This stack of pull requests is managed by Graphite. Learn more about stacking.

@TooTallNate
TooTallNate marked this pull request as ready for review January 21, 2026 17:37
CopilotAI review requested due to automatic review settings January 21, 2026 17:37
@TooTallNate
TooTallNate removed the request for review from CopilotJanuary 21, 2026 17:37
@TooTallNate
TooTallNate merged commit b05dbd7 into mainJan 21, 2026
94 checks passed
@TooTallNate
TooTallNate deleted the 01-21-clamp_settimeout_value_to_32-bit_integer_25d_for_sleep_ branch January 21, 2026 17:43
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.

Local World: sleep() function cannot be more than ~25 days

2 participants

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

Clamp setTimeout value to 32-bit integer (~25d) for sleep() - #824

Merged
TooTallNate merged 1 commit into
mainfrom
01-21-clamp_settimeout_value_to_32-bit_integer_25d_for_sleep_
Jan 21, 2026
Merged

Clamp setTimeout value to 32-bit integer (~25d) for sleep()#824
TooTallNate merged 1 commit into
mainfrom
01-21-clamp_settimeout_value_to_32-bit_integer_25d_for_sleep_

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Jan 21, 2026

Copy link
Copy Markdown
Member

Fix timeout overflow error in world-local queue implementation by clamping setTimeout values.

Fixes#823.

What changed?

  • Added a MAX_SAFE_TIMEOUT_MS constant (2147483647 ms, ~24.85 days) to prevent Node.js 32-bit integer overflow
  • Modified the setTimeout call in the queue retry logic to clamp timeout values to this maximum

How to test?

  1. Create a workflow with a very long sleep duration (> 25 days)
  2. Run it in local mode
  3. Verify no "TimeoutOverflowWarning" appears in the logs
  4. Confirm the sleep functionality still works correctly with the clamped values

Why make this change?

Node.js setTimeout uses a 32-bit signed integer internally, which means values larger than ~25 days cause overflow warnings. This change prevents those warnings while maintaining the correct behavior by allowing the handler to recalculate remaining time from persistent state when the clamped timeout fires. This is fine (using a value less than what the user requested) because the workflow handler logic will issue another queue call with timeoutSeconds if the desired date has not elapsed when the workflow is re-run.

@changeset-bot

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a33b789

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

This PR includes changesets to release 15 packages
NameType
@workflow/world-localPatch
@workflow/cliPatch
@workflow/corePatch
@workflow/world-postgresPatch
workflowPatch
@workflow/world-testingPatch
@workflow/buildersPatch
@workflow/docs-typecheckPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/web-sharedPatch
@workflow/aiPatch
@workflow/astroPatch
@workflow/sveltekitPatch
@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 Jan 21, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jan 21, 2026

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
💻 Local🥇 Next.js (Turbopack)0.037s (-17.3% 🟢)1.019s (~)0.983s101.00x
🌐 RedisNext.js (Turbopack)0.041s (-1.7%)1.017s (~)0.976s101.10x
🌐 StarterNext.js (Turbopack)0.042s (-0.7%)1.015s (~)0.973s101.15x
💻 LocalNitro0.043s (-6.1% 🟢)1.006s (~)0.963s101.18x
💻 LocalExpress0.044s (-2.6%)1.007s (~)0.963s101.20x
🌐 MongoDBNext.js (Turbopack)0.075s (-21.8% 🟢)1.016s (~)0.940s102.05x
🌐 TursoNext.js (Turbopack)0.085s (-22.5% 🟢)1.013s (~)0.928s102.30x
🐘 PostgresExpress0.189s (-41.9% 🟢)1.014s (~)0.825s105.13x
🐘 PostgresNext.js (Turbopack)0.215s (+39.6% 🔺)1.019s (-0.6%)0.804s105.84x
🐘 PostgresNitro0.256s (+4.4%)1.023s (+0.8%)0.767s106.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.573s (-18.7% 🟢)1.477s (-11.8% 🟢)0.903s101.00x
▲ VercelNitro0.609s (+0.9%)1.568s (-0.7%)0.959s101.06x
▲ VercelNext.js (Turbopack)0.725s (-10.4% 🟢)1.536s (-16.2% 🟢)0.811s101.26x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.076s (-1.3%)2.013s (~)0.937s101.00x
🌐 StarterNext.js (Turbopack)1.093s (~)2.010s (~)0.918s101.02x
🌐 RedisNext.js (Turbopack)1.109s (~)2.012s (~)0.904s101.03x
💻 LocalNitro1.113s (~)2.006s (~)0.893s101.03x
💻 LocalExpress1.113s (~)2.006s (~)0.893s101.04x
🌐 TursoNext.js (Turbopack)1.285s (-0.8%)2.010s (~)0.725s101.19x
🌐 MongoDBNext.js (Turbopack)1.304s (~)2.014s (~)0.710s101.21x
🐘 PostgresNext.js (Turbopack)1.786s (-8.1% 🟢)2.216s (+9.9% 🔺)0.429s101.66x
🐘 PostgresNitro2.278s (+3.6%)3.013s (~)0.735s102.12x
🐘 PostgresExpress2.296s (-5.9% 🟢)3.013s (~)0.717s102.14x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.700s (-6.8% 🟢)3.605s (-4.4%)0.904s101.00x
▲ VercelNitro2.829s (-1.6%)3.669s (~)0.841s101.05x
▲ VercelExpress3.259s (+17.1% 🔺)4.147s (+14.4% 🔺)0.888s101.21x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)10.533s (-1.1%)11.019s (~)0.485s51.00x
🌐 StarterNext.js (Turbopack)10.630s (~)11.014s (~)0.384s51.01x
🌐 RedisNext.js (Turbopack)10.681s (~)11.020s (~)0.339s51.01x
💻 LocalNitro10.783s (~)11.013s (~)0.230s51.02x
💻 LocalExpress10.794s (~)11.014s (~)0.221s51.02x
🌐 TursoNext.js (Turbopack)12.176s (~)13.023s (~)0.847s51.16x
🌐 MongoDBNext.js (Turbopack)12.277s (+0.6%)13.032s (~)0.755s51.17x
🐘 PostgresNext.js (Turbopack)15.355s (~)16.032s (~)0.676s51.46x
🐘 PostgresNitro20.401s (~)21.035s (~)0.633s51.94x
🐘 PostgresExpress20.468s (+0.6%)21.029s (~)0.561s51.94x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)23.357s (+1.5%)24.170s (+1.1%)0.813s51.00x
▲ VercelExpress23.420s (+0.9%)24.242s (~)0.822s51.00x
▲ VercelNitro23.486s (+0.5%)24.552s (+2.6%)1.066s51.01x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.353s (~)2.010s (~)0.657s151.00x
💻 LocalNext.js (Turbopack)1.357s (-1.7%)2.014s (~)0.657s151.00x
🌐 StarterNext.js (Turbopack)1.369s (~)2.009s (~)0.640s151.01x
💻 LocalExpress1.409s (~)2.007s (~)0.598s151.04x
💻 LocalNitro1.424s (~)2.006s (~)0.583s151.05x
🐘 PostgresNext.js (Turbopack)1.729s (-9.2% 🟢)2.013s (-3.6%)0.284s151.28x
🌐 MongoDBNext.js (Turbopack)2.144s (~)3.015s (~)0.871s101.59x
🌐 TursoNext.js (Turbopack)2.196s (-1.3%)3.013s (~)0.816s101.62x
🐘 PostgresNitro2.316s (-1.9%)3.014s (~)0.698s101.71x
🐘 PostgresExpress2.346s (-11.5% 🟢)3.012s (~)0.666s101.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.299s (-21.6% 🟢)3.853s (-21.3% 🟢)0.554s81.00x
▲ VercelNitro3.304s (-26.1% 🟢)4.168s (-17.3% 🟢)0.865s81.00x
▲ VercelNext.js (Turbopack)3.939s (+4.4%)4.575s (-3.0%)0.636s71.19x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.959s (-7.3% 🟢)2.741s (-9.8% 🟢)0.782s121.00x
💻 LocalExpress2.202s (-0.7%)3.142s (-0.7%)0.940s101.12x
💻 LocalNitro2.217s (-2.3%)3.187s (-0.6%)0.970s101.13x
🌐 RedisNext.js (Turbopack)2.478s (-0.9%)3.012s (~)0.534s101.26x
🌐 StarterNext.js (Turbopack)2.495s (+1.1%)3.010s (~)0.515s101.27x
🐘 PostgresNext.js (Turbopack)2.641s (+1.8%)3.026s (-3.5%)0.385s101.35x
🐘 PostgresExpress2.740s (-9.1% 🟢)3.023s (-9.9% 🟢)0.283s101.40x
🐘 PostgresNitro3.015s (+1.6%)3.589s (~)0.574s91.54x
🌐 TursoNext.js (Turbopack)4.721s (~)5.182s (~)0.461s62.41x
🌐 MongoDBNext.js (Turbopack)4.755s (-1.3%)5.186s (~)0.431s62.43x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.627s (+1.0%)4.288s (-0.5%)0.661s71.00x
▲ VercelNitro3.662s (-3.8%)4.517s (-4.9%)0.855s71.01x
▲ VercelExpress3.708s (+1.0%)4.655s (+4.3%)0.947s71.02x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.352s (-2.3%)2.010s (~)0.657s151.00x
💻 LocalNext.js (Turbopack)1.353s (-3.5%)2.012s (~)0.660s151.00x
🌐 StarterNext.js (Turbopack)1.358s (-0.9%)2.008s (~)0.650s151.00x
💻 LocalExpress1.420s (~)2.006s (~)0.586s151.05x
💻 LocalNitro1.422s (~)2.007s (~)0.584s151.05x
🐘 PostgresNext.js (Turbopack)1.592s (-12.8% 🟢)2.012s (~)0.421s151.18x
🐘 PostgresNitro1.672s (-11.9% 🟢)2.010s (~)0.338s151.24x
🐘 PostgresExpress2.004s (+19.1% 🔺)2.321s (+15.5% 🔺)0.317s131.48x
🌐 MongoDBNext.js (Turbopack)2.154s (+0.5%)3.014s (~)0.859s101.59x
🌐 TursoNext.js (Turbopack)2.215s (~)3.012s (~)0.797s101.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.700s (-11.8% 🟢)3.629s (-1.5%)0.930s91.00x
▲ VercelNitro2.818s (-10.5% 🟢)3.681s (-6.2% 🟢)0.863s91.04x
▲ VercelNext.js (Turbopack)3.266s (~)4.154s (-0.6%)0.888s81.21x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.040s (-7.5% 🟢)2.836s (-7.6% 🟢)0.796s111.00x
💻 LocalExpress2.216s (~)3.177s (~)0.961s101.09x
💻 LocalNitro2.262s (+1.3%)3.200s (~)0.938s101.11x
🌐 RedisNext.js (Turbopack)2.466s (-0.9%)3.011s (~)0.545s101.21x
🌐 StarterNext.js (Turbopack)2.494s (+0.9%)3.009s (~)0.515s101.22x
🐘 PostgresNitro2.526s (-8.6% 🟢)3.027s (~)0.500s101.24x
🐘 PostgresNext.js (Turbopack)2.560s (~)3.027s (~)0.467s101.25x
🐘 PostgresExpress2.585s (-6.4% 🟢)3.013s (~)0.428s101.27x
🌐 MongoDBNext.js (Turbopack)4.652s (-1.3%)5.186s (~)0.534s62.28x
🌐 TursoNext.js (Turbopack)4.714s (-0.6%)5.181s (~)0.467s62.31x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.164s (+3.9%)3.646s (~)0.481s91.00x
▲ VercelNitro3.220s (-1.0%)3.920s (+1.7%)0.700s81.02x
▲ VercelNext.js (Turbopack)3.349s (+1.2%)3.852s (+0.5%)0.503s91.06x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)0.110s (-21.2% 🟢)1.003s (~)0.016s (+1.2%)1.029s (~)0.919s101.00x
🌐 StarterNext.js (Turbopack)0.133s (+1.5%)1.006s (~)0.000s (+Infinity% 🔺)1.012s (~)0.878s101.22x
🌐 RedisNext.js (Turbopack)0.143s (~)1.005s (~)0.000s (+Infinity% 🔺)1.013s (~)0.871s101.30x
💻 LocalExpress0.177s (+2.3%)0.992s (~)0.016s (+12.5% 🔺)1.023s (~)0.846s101.62x
💻 LocalNitro0.189s (+1.9%)0.992s (~)0.017s (+6.8% 🔺)1.024s (~)0.836s101.72x
🌐 MongoDBNext.js (Turbopack)0.483s (+6.9% 🔺)0.972s (-2.6%)0.000s (+Infinity% 🔺)1.015s (~)0.532s104.41x
🌐 TursoNext.js (Turbopack)0.521s (-1.0%)0.927s (~)0.000s (-100.0% 🟢)1.013s (~)0.492s104.76x
🐘 PostgresNext.js (Turbopack)1.125s (-10.0% 🟢)1.918s (+6.4% 🔺)0.000s (+Infinity% 🔺)2.017s (~)0.892s1010.27x
🐘 PostgresNitro2.212s (-2.9%)2.826s (+2.1%)0.000s (+Infinity% 🔺)3.015s (~)0.803s1020.21x
🐘 PostgresExpress2.300s (+7.4% 🔺)2.743s (-5.5% 🟢)0.000s (-100.0% 🟢)3.014s (~)0.714s1021.00x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.019s (+7.1% 🔺)3.152s (-2.0%)0.531s (+35.6% 🔺)4.193s (-0.9%)1.174s101.00x
▲ VercelNext.js (Turbopack)3.603s (+1.5%)3.825s (-3.2%)0.752s (+45.1% 🔺)5.054s (+1.3%)1.450s101.19x
▲ VercelExpress3.768s (+26.8% 🔺)4.055s (+25.2% 🔺)0.791s (+12.8% 🔺)5.438s (+22.9% 🔺)1.669s101.25x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)8/8
🐘 PostgresNext.js (Turbopack)6/8
▲ VercelExpress4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)💻 Local6/8
Nitro💻 Local8/8
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 Jan 21, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production435038473
✅ 💻 Local Development398032430
✅ 📦 Local Production398032430
✅ 🐘 Local Postgres398032430
✅ 🪟 Windows430043
❌ 🌍 Community Worlds162220184
Total1834221341990

❌ Failed Tests

🌍 Community Worlds (22 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (19 failed):

  • addTenWorkflow
  • addTenWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • 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
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro3904
✅ example3904
✅ express3904
✅ fastify3904
✅ hono3904
✅ nextjs-turbopack4201
✅ nextjs-webpack4201
✅ nitro3904
✅ nuxt3904
✅ sveltekit3904
✅ vite3904
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable3904
✅ express-stable3904
✅ fastify-stable3904
✅ hono-stable3904
✅ nextjs-turbopack-stable4300
✅ nextjs-webpack-stable4300
✅ nitro-stable3904
✅ nuxt-stable3904
✅ sveltekit-stable3904
✅ vite-stable3904
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable3904
✅ express-stable3904
✅ fastify-stable3904
✅ hono-stable3904
✅ nextjs-turbopack-stable4300
✅ nextjs-webpack-stable4300
✅ nitro-stable3904
✅ nuxt-stable3904
✅ sveltekit-stable3904
✅ vite-stable3904
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable3904
✅ express-stable3904
✅ fastify-stable3904
✅ hono-stable3904
✅ nextjs-turbopack-stable4300
✅ nextjs-webpack-stable4300
✅ nitro-stable3904
✅ nuxt-stable3904
✅ sveltekit-stable3904
✅ vite-stable3904
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4300
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb4210
✅ redis-dev300
❌ redis4210
✅ starter-dev300
❌ starter24190
✅ turso-dev300
❌ turso4210

📋 View full workflow run

@TooTallNateGraphite App

Copy link
Copy Markdown
MemberAuthor

This stack of pull requests is managed by Graphite. Learn more about stacking.

@TooTallNate
TooTallNate marked this pull request as ready for review January 21, 2026 17:37
CopilotAI review requested due to automatic review settings January 21, 2026 17:37
@TooTallNate
TooTallNate removed the request for review from CopilotJanuary 21, 2026 17:37
@TooTallNate
TooTallNate merged commit b05dbd7 into mainJan 21, 2026
94 checks passed
@TooTallNate
TooTallNate deleted the 01-21-clamp_settimeout_value_to_32-bit_integer_25d_for_sleep_ branch January 21, 2026 17:43
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.

Local World: sleep() function cannot be more than ~25 days

2 participants

@TooTallNate@VaguelySerious