Handle Vercel Queue 24 hour message TTL by re-enqueueing message - #651

Merged
TooTallNate merged 5 commits into
mainfrom
12-18-handle_vercel_queue_24_hour_message_ttl_by_re-enqueueing_message
Dec 19, 2025
Merged

Handle Vercel Queue 24 hour message TTL by re-enqueueing message#651
TooTallNate merged 5 commits into
mainfrom
12-18-handle_vercel_queue_24_hour_message_ttl_by_re-enqueueing_message

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Dec 18, 2025

Copy link
Copy Markdown
Member

Handle Vercel Queue's 24-hour message TTL by automatically re-enqueueing messages that are approaching expiration.

What changed?

  • Added tracking of message age by storing messageQueuedAt timestamp in queue messages
  • Implemented logic to detect when a message is approaching Vercel's 24-hour TTL limit
  • Added automatic re-enqueueing of messages that would expire before their next scheduled processing
  • Updated the queue handler to properly manage message lifetimes

How to test?

  • Run the new test suite with pnpm test in the packages/world-vercel directory
  • The tests verify various scenarios including:
    • Fresh messages being handled normally
    • Old messages being re-enqueued before they expire
    • Proper handling of timeout values
    • Backward compatibility with messages that don't have the messageQueuedAt field

Why make this change?

Vercel Queue has a hard 24-hour TTL for messages. Previously, long-running workflows that used large timeout values could have their messages expire before being processed again. This change ensures that messages are re-enqueued with a fresh TTL before they reach Vercel's 24-hour limit, preventing workflow executions from being lost due to message expiration.

@changeset-bot

changeset-botBot commented Dec 18, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 01b6955

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

This PR includes changesets to release 13 packages
NameType
@workflow/world-vercelPatch
@workflow/cliPatch
@workflow/corePatch
workflowPatch
@workflow/world-testingPatch
@workflow/buildersPatch
@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 Dec 18, 2025

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.039s (-0.8%)1.013s (~)0.974s101.00x
💻 LocalNext.js (Turbopack)0.039s (+9.4% 🔺)1.017s (~)0.978s101.01x
💻 LocalNitro0.041s (-3.9%)1.006s (~)0.965s101.06x
🌐 RedisNext.js (Turbopack)0.043s (+3.9%)1.018s (~)0.975s101.10x
💻 LocalExpress0.043s (~)1.007s (~)0.964s101.11x
🌐 MongoDBNext.js (Turbopack)0.070s (-2.6%)1.017s (~)0.947s101.80x
🌐 TursoNext.js (Turbopack)0.107s (+7.3% 🔺)1.015s (~)0.908s102.75x
🐘 PostgresNitro0.291s (-13.7% 🟢)1.014s (~)0.722s107.47x
🐘 PostgresExpress0.314s (-19.1% 🟢)1.015s (~)0.702s108.05x
🐘 PostgresNext.js (Turbopack)0.351s (+133.4% 🔺)1.018s (~)0.668s108.99x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.524s (+12.5% 🔺)1.477s (+4.8%)0.953s101.00x
▲ VercelNext.js (Turbopack)0.556s (+1.2%)1.462s (-4.9%)0.906s101.06x
▲ VercelExpress0.655s (+24.6% 🔺)1.590s (+14.2% 🔺)0.935s101.25x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.091s (~)2.009s (~)0.918s101.00x
💻 LocalNext.js (Turbopack)1.097s (+1.3%)2.011s (~)0.914s101.01x
🌐 RedisNext.js (Turbopack)1.105s (+0.5%)2.012s (~)0.907s101.01x
💻 LocalNitro1.110s (~)2.006s (~)0.896s101.02x
💻 LocalExpress1.113s (~)2.006s (~)0.893s101.02x
🌐 MongoDBNext.js (Turbopack)1.281s (-1.5%)2.015s (~)0.734s101.17x
🌐 TursoNext.js (Turbopack)1.306s (+0.5%)2.014s (~)0.708s101.20x
🐘 PostgresExpress2.146s (-3.9%)3.017s (~)0.870s101.97x
🐘 PostgresNitro2.148s (-2.0%)3.012s (~)0.863s101.97x
🐘 PostgresNext.js (Turbopack)2.170s (-10.2% 🟢)3.023s (~)0.853s101.99x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.728s (+43.5% 🔺)4.607s (+28.9% 🔺)0.879s101.00x
▲ VercelNext.js (Turbopack)3.818s (+47.4% 🔺)5.292s (+45.4% 🔺)1.473s101.02x
▲ VercelExpress4.387s (+67.7% 🔺)5.317s (+50.7% 🔺)0.929s101.18x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.598s (~)11.012s (~)0.414s51.00x
💻 LocalNext.js (Turbopack)10.655s (+1.0%)11.015s (~)0.360s51.01x
🌐 RedisNext.js (Turbopack)10.709s (~)11.017s (~)0.308s51.01x
💻 LocalNitro10.789s (~)11.012s (~)0.222s51.02x
💻 LocalExpress10.792s (~)11.012s (~)0.220s51.02x
🌐 MongoDBNext.js (Turbopack)11.968s (-2.0%)12.228s (-6.1% 🟢)0.260s51.13x
🌐 TursoNext.js (Turbopack)12.187s (~)13.022s (~)0.835s51.15x
🐘 PostgresExpress19.974s (-1.5%)20.438s (-2.8%)0.465s51.88x
🐘 PostgresNitro20.414s (+29.5% 🔺)21.031s (+26.5% 🔺)0.617s51.93x
🐘 PostgresNext.js (Turbopack)20.432s (+32.6% 🔺)21.040s (+31.2% 🔺)0.608s51.93x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express21.787s (+3.4%)22.547s (+4.2%)0.760s51.00x
▲ VercelNext.js (Turbopack)21.933s (+3.9%)22.703s (+3.9%)0.770s51.01x
▲ VercelNitro22.053s (+7.1% 🔺)22.946s (+7.8% 🔺)0.893s51.01x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.349s (+0.8%)2.007s (~)0.658s151.00x
🌐 RedisNext.js (Turbopack)1.376s (+1.7%)2.010s (~)0.634s151.02x
💻 LocalNext.js (Turbopack)1.377s (+1.9%)2.012s (~)0.634s151.02x
💻 LocalNitro1.400s (-1.4%)2.005s (~)0.605s151.04x
💻 LocalExpress1.411s (+0.9%)2.006s (~)0.596s151.05x
🐘 PostgresExpress1.972s (-18.7% 🟢)2.412s (-20.0% 🟢)0.440s131.46x
🌐 MongoDBNext.js (Turbopack)2.138s (-1.3%)3.016s (~)0.878s101.58x
🌐 TursoNext.js (Turbopack)2.224s (~)3.015s (~)0.791s101.65x
🐘 PostgresNext.js (Turbopack)2.338s (+10.0% 🔺)3.020s (+29.9% 🔺)0.682s101.73x
🐘 PostgresNitro2.414s (+13.1% 🔺)3.013s (+21.9% 🔺)0.599s101.79x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.972s (+8.4% 🔺)3.833s (+7.6% 🔺)0.861s81.00x
▲ VercelNitro3.090s (+8.6% 🔺)3.920s (+6.9% 🔺)0.830s81.04x
▲ VercelNext.js (Turbopack)3.159s (+7.3% 🔺)3.918s (~)0.759s81.06x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.923s (-4.5%)2.628s (+3.1%)0.704s121.00x
💻 LocalNitro2.194s (-0.5%)3.155s (~)0.961s101.14x
💻 LocalExpress2.248s (+1.4%)3.195s (+1.1%)0.947s101.17x
🌐 StarterNext.js (Turbopack)2.481s (+1.3%)3.025s (+0.5%)0.544s101.29x
🌐 RedisNext.js (Turbopack)2.501s (+0.7%)3.012s (~)0.512s101.30x
🐘 PostgresNext.js (Turbopack)2.619s (-4.5%)3.020s (~)0.401s101.36x
🐘 PostgresNitro2.900s (+2.0%)3.220s (+6.9% 🔺)0.320s101.51x
🐘 PostgresExpress2.925s (-0.6%)3.119s (-7.6% 🟢)0.193s101.52x
🌐 MongoDBNext.js (Turbopack)4.650s (+1.0%)5.186s (~)0.536s62.42x
🌐 TursoNext.js (Turbopack)4.671s (~)5.182s (~)0.510s62.43x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.310s (+5.3% 🔺)3.883s (+5.0%)0.573s81.00x
▲ VercelExpress3.462s (-1.0%)4.061s (-4.1%)0.599s81.05x
▲ VercelNext.js (Turbopack)3.614s (+3.7%)4.592s (+12.8% 🔺)0.978s71.09x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.367s (~)2.010s (~)0.643s151.00x
🌐 StarterNext.js (Turbopack)1.373s (+2.7%)2.007s (~)0.634s151.00x
💻 LocalNext.js (Turbopack)1.392s (+2.1%)2.011s (~)0.619s151.02x
💻 LocalNitro1.409s (-1.3%)2.005s (~)0.596s151.03x
💻 LocalExpress1.437s (+1.1%)2.006s (~)0.569s151.05x
🐘 PostgresNext.js (Turbopack)1.657s (-3.5%)2.013s (~)0.356s151.21x
🐘 PostgresExpress1.726s (-12.2% 🟢)2.012s (-3.1%)0.286s151.26x
🐘 PostgresNitro2.024s (+20.5% 🔺)2.400s (+19.4% 🔺)0.376s131.48x
🌐 MongoDBNext.js (Turbopack)2.145s (+0.7%)3.013s (~)0.868s101.57x
🌐 TursoNext.js (Turbopack)2.230s (~)3.013s (~)0.783s101.63x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.647s (+1.2%)3.563s (+1.9%)0.917s91.00x
▲ VercelExpress2.727s (+8.3% 🔺)3.614s (+2.4%)0.886s91.03x
▲ VercelNext.js (Turbopack)2.917s (+4.6%)3.779s (-0.6%)0.862s81.10x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.177s (+4.1%)3.141s (+5.4% 🔺)0.964s101.00x
💻 LocalNitro2.217s (-5.1% 🟢)3.162s (-2.5%)0.945s101.02x
💻 LocalExpress2.346s (+1.9%)3.266s (+1.4%)0.920s101.08x
🌐 RedisNext.js (Turbopack)2.470s (-0.8%)3.012s (~)0.542s101.13x
🐘 PostgresExpress2.483s (-14.4% 🟢)3.016s (~)0.533s101.14x
🌐 StarterNext.js (Turbopack)2.537s (+3.3%)3.012s (~)0.475s101.17x
🐘 PostgresNext.js (Turbopack)2.550s (+3.6%)3.026s (~)0.477s101.17x
🐘 PostgresNitro2.743s (~)3.019s (~)0.276s101.26x
🌐 TursoNext.js (Turbopack)4.736s (~)5.187s (~)0.451s62.18x
🌐 MongoDBNext.js (Turbopack)4.790s (+3.4%)5.183s (~)0.393s62.20x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.417s (+13.1% 🔺)4.140s (+11.9% 🔺)0.723s81.00x
▲ VercelNitro3.430s (+13.4% 🔺)4.156s (+13.7% 🔺)0.726s81.00x
▲ VercelExpress4.041s (+33.9% 🔺)4.734s (+30.5% 🔺)0.693s71.18x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.132s (+3.6%)1.005s (~)0.000s (+Infinity% 🔺)1.011s (~)0.878s101.00x
💻 LocalNext.js (Turbopack)0.133s (+21.2% 🔺)1.003s (~)0.019s (+16.3% 🔺)1.029s (~)0.896s101.01x
🌐 RedisNext.js (Turbopack)0.150s (+5.1% 🔺)1.005s (~)0.000s (NaN%)1.014s (~)0.863s101.14x
💻 LocalNitro0.175s (-3.5%)0.992s (~)0.015s (-4.5%)1.021s (~)0.846s101.32x
💻 LocalExpress0.178s (+2.5%)0.993s (~)0.017s (-1.8%)1.023s (~)0.845s101.35x
🌐 TursoNext.js (Turbopack)0.462s (-7.3% 🟢)0.990s (+4.1%)0.000s (+Infinity% 🔺)1.013s (~)0.551s103.50x
🌐 MongoDBNext.js (Turbopack)0.481s (-2.9%)0.965s (+1.4%)0.000s (NaN%)1.014s (~)0.533s103.64x
🐘 PostgresExpress1.242s (-47.1% 🟢)1.802s (-33.1% 🟢)0.000s (~)2.016s (-33.2% 🟢)0.773s109.40x
🐘 PostgresNext.js (Turbopack)2.207s (+93.1% 🔺)2.841s (+49.2% 🔺)0.000s (NaN%)3.019s (+49.6% 🔺)0.812s1016.69x
🐘 PostgresNitro2.332s (+60.9% 🔺)2.711s (+62.7% 🔺)0.000s (NaN%)3.014s (+49.8% 🔺)0.682s1017.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.555s (-3.9%)3.159s (-2.8%)0.465s (+98.6% 🔺)4.039s (+3.1%)1.484s101.00x
▲ VercelNitro2.660s (+2.7%)3.251s (+5.6% 🔺)0.239s (-43.8% 🟢)3.938s (+0.9%)1.278s101.04x
▲ VercelExpress2.726s (+9.8% 🔺)3.266s (+7.9% 🔺)0.418s (+49.8% 🔺)4.130s (+11.2% 🔺)1.404s101.07x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)8/8
🐘 PostgresExpress5/8
▲ VercelNitro4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)🌐 Starter5/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 Dec 18, 2025

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production286011297
✅ 💻 Local Development26208270
✅ 📦 Local Production26208270
✅ 🐘 Local Postgres26208270
✅ 🪟 Windows270027
❌ 🌍 Community Worlds109110120
Total120811351254

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

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

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro2601
✅ example2601
✅ express2601
✅ fastify2601
✅ hono2601
✅ nextjs-turbopack2601
✅ nextjs-webpack2601
✅ nitro2601
✅ nuxt2601
✅ sveltekit2601
✅ vite2601
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack2700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb2610
✅ redis-dev300
❌ redis2610
✅ starter-dev300
❌ starter1980
✅ turso-dev300
❌ turso2610

📋 View full workflow run

@TooTallNateGraphite App

TooTallNate commented Dec 18, 2025

Copy link
Copy Markdown
MemberAuthor

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses Vercel Queue's 24-hour message TTL limitation by implementing automatic message re-enqueueing before messages expire. The implementation tracks message age using a messageQueuedAt timestamp and re-enqueues messages that would exceed the TTL before their next scheduled processing.

Key changes:

  • Added message age tracking with messageQueuedAt field in queue messages
  • Implemented logic to detect and re-enqueue messages approaching the 24-hour TTL (with 1-hour buffer)
  • Added comprehensive test suite covering various scenarios including fresh messages, expiring messages, and backward compatibility

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
FileDescription
packages/world-vercel/src/queue.tsCore implementation adding message lifetime tracking, re-enqueueing logic, and new constants for TTL management
packages/world-vercel/src/queue.test.tsComprehensive test suite covering message enqueueing, re-enqueueing scenarios, and backward compatibility
packages/world-vercel/package.jsonUpdated test script and added vitest as a dev dependency
pnpm-lock.yamlLock file updates for vitest dependency addition
.changeset/sad-steaks-burn.mdChangeset documenting the patch-level change
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadpackages/world-vercel/src/queue.ts Outdated
Comment threadpackages/world-vercel/src/queue.ts Outdated
Comment threadpackages/world-vercel/src/queue.ts Outdated
Comment threadpackages/world-vercel/src/queue.test.ts Outdated
Comment threadpackages/world-vercel/src/queue.test.ts Outdated
Comment threadpackages/world-vercel/src/queue.ts
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.

4 participants

@TooTallNate@pranaygp@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

Handle Vercel Queue 24 hour message TTL by re-enqueueing message - #651

Merged
TooTallNate merged 5 commits into
mainfrom
12-18-handle_vercel_queue_24_hour_message_ttl_by_re-enqueueing_message
Dec 19, 2025
Merged

Handle Vercel Queue 24 hour message TTL by re-enqueueing message#651
TooTallNate merged 5 commits into
mainfrom
12-18-handle_vercel_queue_24_hour_message_ttl_by_re-enqueueing_message

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Dec 18, 2025

Copy link
Copy Markdown
Member

Handle Vercel Queue's 24-hour message TTL by automatically re-enqueueing messages that are approaching expiration.

What changed?

  • Added tracking of message age by storing messageQueuedAt timestamp in queue messages
  • Implemented logic to detect when a message is approaching Vercel's 24-hour TTL limit
  • Added automatic re-enqueueing of messages that would expire before their next scheduled processing
  • Updated the queue handler to properly manage message lifetimes

How to test?

  • Run the new test suite with pnpm test in the packages/world-vercel directory
  • The tests verify various scenarios including:
    • Fresh messages being handled normally
    • Old messages being re-enqueued before they expire
    • Proper handling of timeout values
    • Backward compatibility with messages that don't have the messageQueuedAt field

Why make this change?

Vercel Queue has a hard 24-hour TTL for messages. Previously, long-running workflows that used large timeout values could have their messages expire before being processed again. This change ensures that messages are re-enqueued with a fresh TTL before they reach Vercel's 24-hour limit, preventing workflow executions from being lost due to message expiration.

@changeset-bot

changeset-botBot commented Dec 18, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 01b6955

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

This PR includes changesets to release 13 packages
NameType
@workflow/world-vercelPatch
@workflow/cliPatch
@workflow/corePatch
workflowPatch
@workflow/world-testingPatch
@workflow/buildersPatch
@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 Dec 18, 2025

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.039s (-0.8%)1.013s (~)0.974s101.00x
💻 LocalNext.js (Turbopack)0.039s (+9.4% 🔺)1.017s (~)0.978s101.01x
💻 LocalNitro0.041s (-3.9%)1.006s (~)0.965s101.06x
🌐 RedisNext.js (Turbopack)0.043s (+3.9%)1.018s (~)0.975s101.10x
💻 LocalExpress0.043s (~)1.007s (~)0.964s101.11x
🌐 MongoDBNext.js (Turbopack)0.070s (-2.6%)1.017s (~)0.947s101.80x
🌐 TursoNext.js (Turbopack)0.107s (+7.3% 🔺)1.015s (~)0.908s102.75x
🐘 PostgresNitro0.291s (-13.7% 🟢)1.014s (~)0.722s107.47x
🐘 PostgresExpress0.314s (-19.1% 🟢)1.015s (~)0.702s108.05x
🐘 PostgresNext.js (Turbopack)0.351s (+133.4% 🔺)1.018s (~)0.668s108.99x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.524s (+12.5% 🔺)1.477s (+4.8%)0.953s101.00x
▲ VercelNext.js (Turbopack)0.556s (+1.2%)1.462s (-4.9%)0.906s101.06x
▲ VercelExpress0.655s (+24.6% 🔺)1.590s (+14.2% 🔺)0.935s101.25x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.091s (~)2.009s (~)0.918s101.00x
💻 LocalNext.js (Turbopack)1.097s (+1.3%)2.011s (~)0.914s101.01x
🌐 RedisNext.js (Turbopack)1.105s (+0.5%)2.012s (~)0.907s101.01x
💻 LocalNitro1.110s (~)2.006s (~)0.896s101.02x
💻 LocalExpress1.113s (~)2.006s (~)0.893s101.02x
🌐 MongoDBNext.js (Turbopack)1.281s (-1.5%)2.015s (~)0.734s101.17x
🌐 TursoNext.js (Turbopack)1.306s (+0.5%)2.014s (~)0.708s101.20x
🐘 PostgresExpress2.146s (-3.9%)3.017s (~)0.870s101.97x
🐘 PostgresNitro2.148s (-2.0%)3.012s (~)0.863s101.97x
🐘 PostgresNext.js (Turbopack)2.170s (-10.2% 🟢)3.023s (~)0.853s101.99x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.728s (+43.5% 🔺)4.607s (+28.9% 🔺)0.879s101.00x
▲ VercelNext.js (Turbopack)3.818s (+47.4% 🔺)5.292s (+45.4% 🔺)1.473s101.02x
▲ VercelExpress4.387s (+67.7% 🔺)5.317s (+50.7% 🔺)0.929s101.18x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.598s (~)11.012s (~)0.414s51.00x
💻 LocalNext.js (Turbopack)10.655s (+1.0%)11.015s (~)0.360s51.01x
🌐 RedisNext.js (Turbopack)10.709s (~)11.017s (~)0.308s51.01x
💻 LocalNitro10.789s (~)11.012s (~)0.222s51.02x
💻 LocalExpress10.792s (~)11.012s (~)0.220s51.02x
🌐 MongoDBNext.js (Turbopack)11.968s (-2.0%)12.228s (-6.1% 🟢)0.260s51.13x
🌐 TursoNext.js (Turbopack)12.187s (~)13.022s (~)0.835s51.15x
🐘 PostgresExpress19.974s (-1.5%)20.438s (-2.8%)0.465s51.88x
🐘 PostgresNitro20.414s (+29.5% 🔺)21.031s (+26.5% 🔺)0.617s51.93x
🐘 PostgresNext.js (Turbopack)20.432s (+32.6% 🔺)21.040s (+31.2% 🔺)0.608s51.93x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express21.787s (+3.4%)22.547s (+4.2%)0.760s51.00x
▲ VercelNext.js (Turbopack)21.933s (+3.9%)22.703s (+3.9%)0.770s51.01x
▲ VercelNitro22.053s (+7.1% 🔺)22.946s (+7.8% 🔺)0.893s51.01x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.349s (+0.8%)2.007s (~)0.658s151.00x
🌐 RedisNext.js (Turbopack)1.376s (+1.7%)2.010s (~)0.634s151.02x
💻 LocalNext.js (Turbopack)1.377s (+1.9%)2.012s (~)0.634s151.02x
💻 LocalNitro1.400s (-1.4%)2.005s (~)0.605s151.04x
💻 LocalExpress1.411s (+0.9%)2.006s (~)0.596s151.05x
🐘 PostgresExpress1.972s (-18.7% 🟢)2.412s (-20.0% 🟢)0.440s131.46x
🌐 MongoDBNext.js (Turbopack)2.138s (-1.3%)3.016s (~)0.878s101.58x
🌐 TursoNext.js (Turbopack)2.224s (~)3.015s (~)0.791s101.65x
🐘 PostgresNext.js (Turbopack)2.338s (+10.0% 🔺)3.020s (+29.9% 🔺)0.682s101.73x
🐘 PostgresNitro2.414s (+13.1% 🔺)3.013s (+21.9% 🔺)0.599s101.79x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.972s (+8.4% 🔺)3.833s (+7.6% 🔺)0.861s81.00x
▲ VercelNitro3.090s (+8.6% 🔺)3.920s (+6.9% 🔺)0.830s81.04x
▲ VercelNext.js (Turbopack)3.159s (+7.3% 🔺)3.918s (~)0.759s81.06x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.923s (-4.5%)2.628s (+3.1%)0.704s121.00x
💻 LocalNitro2.194s (-0.5%)3.155s (~)0.961s101.14x
💻 LocalExpress2.248s (+1.4%)3.195s (+1.1%)0.947s101.17x
🌐 StarterNext.js (Turbopack)2.481s (+1.3%)3.025s (+0.5%)0.544s101.29x
🌐 RedisNext.js (Turbopack)2.501s (+0.7%)3.012s (~)0.512s101.30x
🐘 PostgresNext.js (Turbopack)2.619s (-4.5%)3.020s (~)0.401s101.36x
🐘 PostgresNitro2.900s (+2.0%)3.220s (+6.9% 🔺)0.320s101.51x
🐘 PostgresExpress2.925s (-0.6%)3.119s (-7.6% 🟢)0.193s101.52x
🌐 MongoDBNext.js (Turbopack)4.650s (+1.0%)5.186s (~)0.536s62.42x
🌐 TursoNext.js (Turbopack)4.671s (~)5.182s (~)0.510s62.43x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.310s (+5.3% 🔺)3.883s (+5.0%)0.573s81.00x
▲ VercelExpress3.462s (-1.0%)4.061s (-4.1%)0.599s81.05x
▲ VercelNext.js (Turbopack)3.614s (+3.7%)4.592s (+12.8% 🔺)0.978s71.09x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.367s (~)2.010s (~)0.643s151.00x
🌐 StarterNext.js (Turbopack)1.373s (+2.7%)2.007s (~)0.634s151.00x
💻 LocalNext.js (Turbopack)1.392s (+2.1%)2.011s (~)0.619s151.02x
💻 LocalNitro1.409s (-1.3%)2.005s (~)0.596s151.03x
💻 LocalExpress1.437s (+1.1%)2.006s (~)0.569s151.05x
🐘 PostgresNext.js (Turbopack)1.657s (-3.5%)2.013s (~)0.356s151.21x
🐘 PostgresExpress1.726s (-12.2% 🟢)2.012s (-3.1%)0.286s151.26x
🐘 PostgresNitro2.024s (+20.5% 🔺)2.400s (+19.4% 🔺)0.376s131.48x
🌐 MongoDBNext.js (Turbopack)2.145s (+0.7%)3.013s (~)0.868s101.57x
🌐 TursoNext.js (Turbopack)2.230s (~)3.013s (~)0.783s101.63x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.647s (+1.2%)3.563s (+1.9%)0.917s91.00x
▲ VercelExpress2.727s (+8.3% 🔺)3.614s (+2.4%)0.886s91.03x
▲ VercelNext.js (Turbopack)2.917s (+4.6%)3.779s (-0.6%)0.862s81.10x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.177s (+4.1%)3.141s (+5.4% 🔺)0.964s101.00x
💻 LocalNitro2.217s (-5.1% 🟢)3.162s (-2.5%)0.945s101.02x
💻 LocalExpress2.346s (+1.9%)3.266s (+1.4%)0.920s101.08x
🌐 RedisNext.js (Turbopack)2.470s (-0.8%)3.012s (~)0.542s101.13x
🐘 PostgresExpress2.483s (-14.4% 🟢)3.016s (~)0.533s101.14x
🌐 StarterNext.js (Turbopack)2.537s (+3.3%)3.012s (~)0.475s101.17x
🐘 PostgresNext.js (Turbopack)2.550s (+3.6%)3.026s (~)0.477s101.17x
🐘 PostgresNitro2.743s (~)3.019s (~)0.276s101.26x
🌐 TursoNext.js (Turbopack)4.736s (~)5.187s (~)0.451s62.18x
🌐 MongoDBNext.js (Turbopack)4.790s (+3.4%)5.183s (~)0.393s62.20x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.417s (+13.1% 🔺)4.140s (+11.9% 🔺)0.723s81.00x
▲ VercelNitro3.430s (+13.4% 🔺)4.156s (+13.7% 🔺)0.726s81.00x
▲ VercelExpress4.041s (+33.9% 🔺)4.734s (+30.5% 🔺)0.693s71.18x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.132s (+3.6%)1.005s (~)0.000s (+Infinity% 🔺)1.011s (~)0.878s101.00x
💻 LocalNext.js (Turbopack)0.133s (+21.2% 🔺)1.003s (~)0.019s (+16.3% 🔺)1.029s (~)0.896s101.01x
🌐 RedisNext.js (Turbopack)0.150s (+5.1% 🔺)1.005s (~)0.000s (NaN%)1.014s (~)0.863s101.14x
💻 LocalNitro0.175s (-3.5%)0.992s (~)0.015s (-4.5%)1.021s (~)0.846s101.32x
💻 LocalExpress0.178s (+2.5%)0.993s (~)0.017s (-1.8%)1.023s (~)0.845s101.35x
🌐 TursoNext.js (Turbopack)0.462s (-7.3% 🟢)0.990s (+4.1%)0.000s (+Infinity% 🔺)1.013s (~)0.551s103.50x
🌐 MongoDBNext.js (Turbopack)0.481s (-2.9%)0.965s (+1.4%)0.000s (NaN%)1.014s (~)0.533s103.64x
🐘 PostgresExpress1.242s (-47.1% 🟢)1.802s (-33.1% 🟢)0.000s (~)2.016s (-33.2% 🟢)0.773s109.40x
🐘 PostgresNext.js (Turbopack)2.207s (+93.1% 🔺)2.841s (+49.2% 🔺)0.000s (NaN%)3.019s (+49.6% 🔺)0.812s1016.69x
🐘 PostgresNitro2.332s (+60.9% 🔺)2.711s (+62.7% 🔺)0.000s (NaN%)3.014s (+49.8% 🔺)0.682s1017.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.555s (-3.9%)3.159s (-2.8%)0.465s (+98.6% 🔺)4.039s (+3.1%)1.484s101.00x
▲ VercelNitro2.660s (+2.7%)3.251s (+5.6% 🔺)0.239s (-43.8% 🟢)3.938s (+0.9%)1.278s101.04x
▲ VercelExpress2.726s (+9.8% 🔺)3.266s (+7.9% 🔺)0.418s (+49.8% 🔺)4.130s (+11.2% 🔺)1.404s101.07x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)8/8
🐘 PostgresExpress5/8
▲ VercelNitro4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)🌐 Starter5/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 Dec 18, 2025

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production286011297
✅ 💻 Local Development26208270
✅ 📦 Local Production26208270
✅ 🐘 Local Postgres26208270
✅ 🪟 Windows270027
❌ 🌍 Community Worlds109110120
Total120811351254

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

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

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro2601
✅ example2601
✅ express2601
✅ fastify2601
✅ hono2601
✅ nextjs-turbopack2601
✅ nextjs-webpack2601
✅ nitro2601
✅ nuxt2601
✅ sveltekit2601
✅ vite2601
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack2700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb2610
✅ redis-dev300
❌ redis2610
✅ starter-dev300
❌ starter1980
✅ turso-dev300
❌ turso2610

📋 View full workflow run

@TooTallNateGraphite App

TooTallNate commented Dec 18, 2025

Copy link
Copy Markdown
MemberAuthor

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses Vercel Queue's 24-hour message TTL limitation by implementing automatic message re-enqueueing before messages expire. The implementation tracks message age using a messageQueuedAt timestamp and re-enqueues messages that would exceed the TTL before their next scheduled processing.

Key changes:

  • Added message age tracking with messageQueuedAt field in queue messages
  • Implemented logic to detect and re-enqueue messages approaching the 24-hour TTL (with 1-hour buffer)
  • Added comprehensive test suite covering various scenarios including fresh messages, expiring messages, and backward compatibility

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
FileDescription
packages/world-vercel/src/queue.tsCore implementation adding message lifetime tracking, re-enqueueing logic, and new constants for TTL management
packages/world-vercel/src/queue.test.tsComprehensive test suite covering message enqueueing, re-enqueueing scenarios, and backward compatibility
packages/world-vercel/package.jsonUpdated test script and added vitest as a dev dependency
pnpm-lock.yamlLock file updates for vitest dependency addition
.changeset/sad-steaks-burn.mdChangeset documenting the patch-level change
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadpackages/world-vercel/src/queue.ts Outdated
Comment threadpackages/world-vercel/src/queue.ts Outdated
Comment threadpackages/world-vercel/src/queue.ts Outdated
Comment threadpackages/world-vercel/src/queue.test.ts Outdated
Comment threadpackages/world-vercel/src/queue.test.ts Outdated
Comment threadpackages/world-vercel/src/queue.ts
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.

4 participants

@TooTallNate@pranaygp@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

Handle Vercel Queue 24 hour message TTL by re-enqueueing message - #651

Merged
TooTallNate merged 5 commits into
mainfrom
12-18-handle_vercel_queue_24_hour_message_ttl_by_re-enqueueing_message
Dec 19, 2025
Merged

Handle Vercel Queue 24 hour message TTL by re-enqueueing message#651
TooTallNate merged 5 commits into
mainfrom
12-18-handle_vercel_queue_24_hour_message_ttl_by_re-enqueueing_message

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Dec 18, 2025

Copy link
Copy Markdown
Member

Handle Vercel Queue's 24-hour message TTL by automatically re-enqueueing messages that are approaching expiration.

What changed?

  • Added tracking of message age by storing messageQueuedAt timestamp in queue messages
  • Implemented logic to detect when a message is approaching Vercel's 24-hour TTL limit
  • Added automatic re-enqueueing of messages that would expire before their next scheduled processing
  • Updated the queue handler to properly manage message lifetimes

How to test?

  • Run the new test suite with pnpm test in the packages/world-vercel directory
  • The tests verify various scenarios including:
    • Fresh messages being handled normally
    • Old messages being re-enqueued before they expire
    • Proper handling of timeout values
    • Backward compatibility with messages that don't have the messageQueuedAt field

Why make this change?

Vercel Queue has a hard 24-hour TTL for messages. Previously, long-running workflows that used large timeout values could have their messages expire before being processed again. This change ensures that messages are re-enqueued with a fresh TTL before they reach Vercel's 24-hour limit, preventing workflow executions from being lost due to message expiration.

@changeset-bot

changeset-botBot commented Dec 18, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 01b6955

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

This PR includes changesets to release 13 packages
NameType
@workflow/world-vercelPatch
@workflow/cliPatch
@workflow/corePatch
workflowPatch
@workflow/world-testingPatch
@workflow/buildersPatch
@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 Dec 18, 2025

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.039s (-0.8%)1.013s (~)0.974s101.00x
💻 LocalNext.js (Turbopack)0.039s (+9.4% 🔺)1.017s (~)0.978s101.01x
💻 LocalNitro0.041s (-3.9%)1.006s (~)0.965s101.06x
🌐 RedisNext.js (Turbopack)0.043s (+3.9%)1.018s (~)0.975s101.10x
💻 LocalExpress0.043s (~)1.007s (~)0.964s101.11x
🌐 MongoDBNext.js (Turbopack)0.070s (-2.6%)1.017s (~)0.947s101.80x
🌐 TursoNext.js (Turbopack)0.107s (+7.3% 🔺)1.015s (~)0.908s102.75x
🐘 PostgresNitro0.291s (-13.7% 🟢)1.014s (~)0.722s107.47x
🐘 PostgresExpress0.314s (-19.1% 🟢)1.015s (~)0.702s108.05x
🐘 PostgresNext.js (Turbopack)0.351s (+133.4% 🔺)1.018s (~)0.668s108.99x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.524s (+12.5% 🔺)1.477s (+4.8%)0.953s101.00x
▲ VercelNext.js (Turbopack)0.556s (+1.2%)1.462s (-4.9%)0.906s101.06x
▲ VercelExpress0.655s (+24.6% 🔺)1.590s (+14.2% 🔺)0.935s101.25x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.091s (~)2.009s (~)0.918s101.00x
💻 LocalNext.js (Turbopack)1.097s (+1.3%)2.011s (~)0.914s101.01x
🌐 RedisNext.js (Turbopack)1.105s (+0.5%)2.012s (~)0.907s101.01x
💻 LocalNitro1.110s (~)2.006s (~)0.896s101.02x
💻 LocalExpress1.113s (~)2.006s (~)0.893s101.02x
🌐 MongoDBNext.js (Turbopack)1.281s (-1.5%)2.015s (~)0.734s101.17x
🌐 TursoNext.js (Turbopack)1.306s (+0.5%)2.014s (~)0.708s101.20x
🐘 PostgresExpress2.146s (-3.9%)3.017s (~)0.870s101.97x
🐘 PostgresNitro2.148s (-2.0%)3.012s (~)0.863s101.97x
🐘 PostgresNext.js (Turbopack)2.170s (-10.2% 🟢)3.023s (~)0.853s101.99x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.728s (+43.5% 🔺)4.607s (+28.9% 🔺)0.879s101.00x
▲ VercelNext.js (Turbopack)3.818s (+47.4% 🔺)5.292s (+45.4% 🔺)1.473s101.02x
▲ VercelExpress4.387s (+67.7% 🔺)5.317s (+50.7% 🔺)0.929s101.18x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.598s (~)11.012s (~)0.414s51.00x
💻 LocalNext.js (Turbopack)10.655s (+1.0%)11.015s (~)0.360s51.01x
🌐 RedisNext.js (Turbopack)10.709s (~)11.017s (~)0.308s51.01x
💻 LocalNitro10.789s (~)11.012s (~)0.222s51.02x
💻 LocalExpress10.792s (~)11.012s (~)0.220s51.02x
🌐 MongoDBNext.js (Turbopack)11.968s (-2.0%)12.228s (-6.1% 🟢)0.260s51.13x
🌐 TursoNext.js (Turbopack)12.187s (~)13.022s (~)0.835s51.15x
🐘 PostgresExpress19.974s (-1.5%)20.438s (-2.8%)0.465s51.88x
🐘 PostgresNitro20.414s (+29.5% 🔺)21.031s (+26.5% 🔺)0.617s51.93x
🐘 PostgresNext.js (Turbopack)20.432s (+32.6% 🔺)21.040s (+31.2% 🔺)0.608s51.93x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express21.787s (+3.4%)22.547s (+4.2%)0.760s51.00x
▲ VercelNext.js (Turbopack)21.933s (+3.9%)22.703s (+3.9%)0.770s51.01x
▲ VercelNitro22.053s (+7.1% 🔺)22.946s (+7.8% 🔺)0.893s51.01x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.349s (+0.8%)2.007s (~)0.658s151.00x
🌐 RedisNext.js (Turbopack)1.376s (+1.7%)2.010s (~)0.634s151.02x
💻 LocalNext.js (Turbopack)1.377s (+1.9%)2.012s (~)0.634s151.02x
💻 LocalNitro1.400s (-1.4%)2.005s (~)0.605s151.04x
💻 LocalExpress1.411s (+0.9%)2.006s (~)0.596s151.05x
🐘 PostgresExpress1.972s (-18.7% 🟢)2.412s (-20.0% 🟢)0.440s131.46x
🌐 MongoDBNext.js (Turbopack)2.138s (-1.3%)3.016s (~)0.878s101.58x
🌐 TursoNext.js (Turbopack)2.224s (~)3.015s (~)0.791s101.65x
🐘 PostgresNext.js (Turbopack)2.338s (+10.0% 🔺)3.020s (+29.9% 🔺)0.682s101.73x
🐘 PostgresNitro2.414s (+13.1% 🔺)3.013s (+21.9% 🔺)0.599s101.79x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.972s (+8.4% 🔺)3.833s (+7.6% 🔺)0.861s81.00x
▲ VercelNitro3.090s (+8.6% 🔺)3.920s (+6.9% 🔺)0.830s81.04x
▲ VercelNext.js (Turbopack)3.159s (+7.3% 🔺)3.918s (~)0.759s81.06x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.923s (-4.5%)2.628s (+3.1%)0.704s121.00x
💻 LocalNitro2.194s (-0.5%)3.155s (~)0.961s101.14x
💻 LocalExpress2.248s (+1.4%)3.195s (+1.1%)0.947s101.17x
🌐 StarterNext.js (Turbopack)2.481s (+1.3%)3.025s (+0.5%)0.544s101.29x
🌐 RedisNext.js (Turbopack)2.501s (+0.7%)3.012s (~)0.512s101.30x
🐘 PostgresNext.js (Turbopack)2.619s (-4.5%)3.020s (~)0.401s101.36x
🐘 PostgresNitro2.900s (+2.0%)3.220s (+6.9% 🔺)0.320s101.51x
🐘 PostgresExpress2.925s (-0.6%)3.119s (-7.6% 🟢)0.193s101.52x
🌐 MongoDBNext.js (Turbopack)4.650s (+1.0%)5.186s (~)0.536s62.42x
🌐 TursoNext.js (Turbopack)4.671s (~)5.182s (~)0.510s62.43x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.310s (+5.3% 🔺)3.883s (+5.0%)0.573s81.00x
▲ VercelExpress3.462s (-1.0%)4.061s (-4.1%)0.599s81.05x
▲ VercelNext.js (Turbopack)3.614s (+3.7%)4.592s (+12.8% 🔺)0.978s71.09x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.367s (~)2.010s (~)0.643s151.00x
🌐 StarterNext.js (Turbopack)1.373s (+2.7%)2.007s (~)0.634s151.00x
💻 LocalNext.js (Turbopack)1.392s (+2.1%)2.011s (~)0.619s151.02x
💻 LocalNitro1.409s (-1.3%)2.005s (~)0.596s151.03x
💻 LocalExpress1.437s (+1.1%)2.006s (~)0.569s151.05x
🐘 PostgresNext.js (Turbopack)1.657s (-3.5%)2.013s (~)0.356s151.21x
🐘 PostgresExpress1.726s (-12.2% 🟢)2.012s (-3.1%)0.286s151.26x
🐘 PostgresNitro2.024s (+20.5% 🔺)2.400s (+19.4% 🔺)0.376s131.48x
🌐 MongoDBNext.js (Turbopack)2.145s (+0.7%)3.013s (~)0.868s101.57x
🌐 TursoNext.js (Turbopack)2.230s (~)3.013s (~)0.783s101.63x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.647s (+1.2%)3.563s (+1.9%)0.917s91.00x
▲ VercelExpress2.727s (+8.3% 🔺)3.614s (+2.4%)0.886s91.03x
▲ VercelNext.js (Turbopack)2.917s (+4.6%)3.779s (-0.6%)0.862s81.10x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.177s (+4.1%)3.141s (+5.4% 🔺)0.964s101.00x
💻 LocalNitro2.217s (-5.1% 🟢)3.162s (-2.5%)0.945s101.02x
💻 LocalExpress2.346s (+1.9%)3.266s (+1.4%)0.920s101.08x
🌐 RedisNext.js (Turbopack)2.470s (-0.8%)3.012s (~)0.542s101.13x
🐘 PostgresExpress2.483s (-14.4% 🟢)3.016s (~)0.533s101.14x
🌐 StarterNext.js (Turbopack)2.537s (+3.3%)3.012s (~)0.475s101.17x
🐘 PostgresNext.js (Turbopack)2.550s (+3.6%)3.026s (~)0.477s101.17x
🐘 PostgresNitro2.743s (~)3.019s (~)0.276s101.26x
🌐 TursoNext.js (Turbopack)4.736s (~)5.187s (~)0.451s62.18x
🌐 MongoDBNext.js (Turbopack)4.790s (+3.4%)5.183s (~)0.393s62.20x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.417s (+13.1% 🔺)4.140s (+11.9% 🔺)0.723s81.00x
▲ VercelNitro3.430s (+13.4% 🔺)4.156s (+13.7% 🔺)0.726s81.00x
▲ VercelExpress4.041s (+33.9% 🔺)4.734s (+30.5% 🔺)0.693s71.18x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.132s (+3.6%)1.005s (~)0.000s (+Infinity% 🔺)1.011s (~)0.878s101.00x
💻 LocalNext.js (Turbopack)0.133s (+21.2% 🔺)1.003s (~)0.019s (+16.3% 🔺)1.029s (~)0.896s101.01x
🌐 RedisNext.js (Turbopack)0.150s (+5.1% 🔺)1.005s (~)0.000s (NaN%)1.014s (~)0.863s101.14x
💻 LocalNitro0.175s (-3.5%)0.992s (~)0.015s (-4.5%)1.021s (~)0.846s101.32x
💻 LocalExpress0.178s (+2.5%)0.993s (~)0.017s (-1.8%)1.023s (~)0.845s101.35x
🌐 TursoNext.js (Turbopack)0.462s (-7.3% 🟢)0.990s (+4.1%)0.000s (+Infinity% 🔺)1.013s (~)0.551s103.50x
🌐 MongoDBNext.js (Turbopack)0.481s (-2.9%)0.965s (+1.4%)0.000s (NaN%)1.014s (~)0.533s103.64x
🐘 PostgresExpress1.242s (-47.1% 🟢)1.802s (-33.1% 🟢)0.000s (~)2.016s (-33.2% 🟢)0.773s109.40x
🐘 PostgresNext.js (Turbopack)2.207s (+93.1% 🔺)2.841s (+49.2% 🔺)0.000s (NaN%)3.019s (+49.6% 🔺)0.812s1016.69x
🐘 PostgresNitro2.332s (+60.9% 🔺)2.711s (+62.7% 🔺)0.000s (NaN%)3.014s (+49.8% 🔺)0.682s1017.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.555s (-3.9%)3.159s (-2.8%)0.465s (+98.6% 🔺)4.039s (+3.1%)1.484s101.00x
▲ VercelNitro2.660s (+2.7%)3.251s (+5.6% 🔺)0.239s (-43.8% 🟢)3.938s (+0.9%)1.278s101.04x
▲ VercelExpress2.726s (+9.8% 🔺)3.266s (+7.9% 🔺)0.418s (+49.8% 🔺)4.130s (+11.2% 🔺)1.404s101.07x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)8/8
🐘 PostgresExpress5/8
▲ VercelNitro4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)🌐 Starter5/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 Dec 18, 2025

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production286011297
✅ 💻 Local Development26208270
✅ 📦 Local Production26208270
✅ 🐘 Local Postgres26208270
✅ 🪟 Windows270027
❌ 🌍 Community Worlds109110120
Total120811351254

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

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

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro2601
✅ example2601
✅ express2601
✅ fastify2601
✅ hono2601
✅ nextjs-turbopack2601
✅ nextjs-webpack2601
✅ nitro2601
✅ nuxt2601
✅ sveltekit2601
✅ vite2601
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack2700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb2610
✅ redis-dev300
❌ redis2610
✅ starter-dev300
❌ starter1980
✅ turso-dev300
❌ turso2610

📋 View full workflow run

@TooTallNateGraphite App

TooTallNate commented Dec 18, 2025

Copy link
Copy Markdown
MemberAuthor

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses Vercel Queue's 24-hour message TTL limitation by implementing automatic message re-enqueueing before messages expire. The implementation tracks message age using a messageQueuedAt timestamp and re-enqueues messages that would exceed the TTL before their next scheduled processing.

Key changes:

  • Added message age tracking with messageQueuedAt field in queue messages
  • Implemented logic to detect and re-enqueue messages approaching the 24-hour TTL (with 1-hour buffer)
  • Added comprehensive test suite covering various scenarios including fresh messages, expiring messages, and backward compatibility

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
FileDescription
packages/world-vercel/src/queue.tsCore implementation adding message lifetime tracking, re-enqueueing logic, and new constants for TTL management
packages/world-vercel/src/queue.test.tsComprehensive test suite covering message enqueueing, re-enqueueing scenarios, and backward compatibility
packages/world-vercel/package.jsonUpdated test script and added vitest as a dev dependency
pnpm-lock.yamlLock file updates for vitest dependency addition
.changeset/sad-steaks-burn.mdChangeset documenting the patch-level change
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadpackages/world-vercel/src/queue.ts Outdated
Comment threadpackages/world-vercel/src/queue.ts Outdated
Comment threadpackages/world-vercel/src/queue.ts Outdated
Comment threadpackages/world-vercel/src/queue.test.ts Outdated
Comment threadpackages/world-vercel/src/queue.test.ts Outdated
Comment threadpackages/world-vercel/src/queue.ts
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.

4 participants

@TooTallNate@pranaygp@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

Handle Vercel Queue 24 hour message TTL by re-enqueueing message - #651

Merged
TooTallNate merged 5 commits into
mainfrom
12-18-handle_vercel_queue_24_hour_message_ttl_by_re-enqueueing_message
Dec 19, 2025
Merged

Handle Vercel Queue 24 hour message TTL by re-enqueueing message#651
TooTallNate merged 5 commits into
mainfrom
12-18-handle_vercel_queue_24_hour_message_ttl_by_re-enqueueing_message

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Dec 18, 2025

Copy link
Copy Markdown
Member

Handle Vercel Queue's 24-hour message TTL by automatically re-enqueueing messages that are approaching expiration.

What changed?

  • Added tracking of message age by storing messageQueuedAt timestamp in queue messages
  • Implemented logic to detect when a message is approaching Vercel's 24-hour TTL limit
  • Added automatic re-enqueueing of messages that would expire before their next scheduled processing
  • Updated the queue handler to properly manage message lifetimes

How to test?

  • Run the new test suite with pnpm test in the packages/world-vercel directory
  • The tests verify various scenarios including:
    • Fresh messages being handled normally
    • Old messages being re-enqueued before they expire
    • Proper handling of timeout values
    • Backward compatibility with messages that don't have the messageQueuedAt field

Why make this change?

Vercel Queue has a hard 24-hour TTL for messages. Previously, long-running workflows that used large timeout values could have their messages expire before being processed again. This change ensures that messages are re-enqueued with a fresh TTL before they reach Vercel's 24-hour limit, preventing workflow executions from being lost due to message expiration.

@changeset-bot

changeset-botBot commented Dec 18, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 01b6955

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

This PR includes changesets to release 13 packages
NameType
@workflow/world-vercelPatch
@workflow/cliPatch
@workflow/corePatch
workflowPatch
@workflow/world-testingPatch
@workflow/buildersPatch
@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 Dec 18, 2025

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.039s (-0.8%)1.013s (~)0.974s101.00x
💻 LocalNext.js (Turbopack)0.039s (+9.4% 🔺)1.017s (~)0.978s101.01x
💻 LocalNitro0.041s (-3.9%)1.006s (~)0.965s101.06x
🌐 RedisNext.js (Turbopack)0.043s (+3.9%)1.018s (~)0.975s101.10x
💻 LocalExpress0.043s (~)1.007s (~)0.964s101.11x
🌐 MongoDBNext.js (Turbopack)0.070s (-2.6%)1.017s (~)0.947s101.80x
🌐 TursoNext.js (Turbopack)0.107s (+7.3% 🔺)1.015s (~)0.908s102.75x
🐘 PostgresNitro0.291s (-13.7% 🟢)1.014s (~)0.722s107.47x
🐘 PostgresExpress0.314s (-19.1% 🟢)1.015s (~)0.702s108.05x
🐘 PostgresNext.js (Turbopack)0.351s (+133.4% 🔺)1.018s (~)0.668s108.99x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.524s (+12.5% 🔺)1.477s (+4.8%)0.953s101.00x
▲ VercelNext.js (Turbopack)0.556s (+1.2%)1.462s (-4.9%)0.906s101.06x
▲ VercelExpress0.655s (+24.6% 🔺)1.590s (+14.2% 🔺)0.935s101.25x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.091s (~)2.009s (~)0.918s101.00x
💻 LocalNext.js (Turbopack)1.097s (+1.3%)2.011s (~)0.914s101.01x
🌐 RedisNext.js (Turbopack)1.105s (+0.5%)2.012s (~)0.907s101.01x
💻 LocalNitro1.110s (~)2.006s (~)0.896s101.02x
💻 LocalExpress1.113s (~)2.006s (~)0.893s101.02x
🌐 MongoDBNext.js (Turbopack)1.281s (-1.5%)2.015s (~)0.734s101.17x
🌐 TursoNext.js (Turbopack)1.306s (+0.5%)2.014s (~)0.708s101.20x
🐘 PostgresExpress2.146s (-3.9%)3.017s (~)0.870s101.97x
🐘 PostgresNitro2.148s (-2.0%)3.012s (~)0.863s101.97x
🐘 PostgresNext.js (Turbopack)2.170s (-10.2% 🟢)3.023s (~)0.853s101.99x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.728s (+43.5% 🔺)4.607s (+28.9% 🔺)0.879s101.00x
▲ VercelNext.js (Turbopack)3.818s (+47.4% 🔺)5.292s (+45.4% 🔺)1.473s101.02x
▲ VercelExpress4.387s (+67.7% 🔺)5.317s (+50.7% 🔺)0.929s101.18x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.598s (~)11.012s (~)0.414s51.00x
💻 LocalNext.js (Turbopack)10.655s (+1.0%)11.015s (~)0.360s51.01x
🌐 RedisNext.js (Turbopack)10.709s (~)11.017s (~)0.308s51.01x
💻 LocalNitro10.789s (~)11.012s (~)0.222s51.02x
💻 LocalExpress10.792s (~)11.012s (~)0.220s51.02x
🌐 MongoDBNext.js (Turbopack)11.968s (-2.0%)12.228s (-6.1% 🟢)0.260s51.13x
🌐 TursoNext.js (Turbopack)12.187s (~)13.022s (~)0.835s51.15x
🐘 PostgresExpress19.974s (-1.5%)20.438s (-2.8%)0.465s51.88x
🐘 PostgresNitro20.414s (+29.5% 🔺)21.031s (+26.5% 🔺)0.617s51.93x
🐘 PostgresNext.js (Turbopack)20.432s (+32.6% 🔺)21.040s (+31.2% 🔺)0.608s51.93x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express21.787s (+3.4%)22.547s (+4.2%)0.760s51.00x
▲ VercelNext.js (Turbopack)21.933s (+3.9%)22.703s (+3.9%)0.770s51.01x
▲ VercelNitro22.053s (+7.1% 🔺)22.946s (+7.8% 🔺)0.893s51.01x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.349s (+0.8%)2.007s (~)0.658s151.00x
🌐 RedisNext.js (Turbopack)1.376s (+1.7%)2.010s (~)0.634s151.02x
💻 LocalNext.js (Turbopack)1.377s (+1.9%)2.012s (~)0.634s151.02x
💻 LocalNitro1.400s (-1.4%)2.005s (~)0.605s151.04x
💻 LocalExpress1.411s (+0.9%)2.006s (~)0.596s151.05x
🐘 PostgresExpress1.972s (-18.7% 🟢)2.412s (-20.0% 🟢)0.440s131.46x
🌐 MongoDBNext.js (Turbopack)2.138s (-1.3%)3.016s (~)0.878s101.58x
🌐 TursoNext.js (Turbopack)2.224s (~)3.015s (~)0.791s101.65x
🐘 PostgresNext.js (Turbopack)2.338s (+10.0% 🔺)3.020s (+29.9% 🔺)0.682s101.73x
🐘 PostgresNitro2.414s (+13.1% 🔺)3.013s (+21.9% 🔺)0.599s101.79x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.972s (+8.4% 🔺)3.833s (+7.6% 🔺)0.861s81.00x
▲ VercelNitro3.090s (+8.6% 🔺)3.920s (+6.9% 🔺)0.830s81.04x
▲ VercelNext.js (Turbopack)3.159s (+7.3% 🔺)3.918s (~)0.759s81.06x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.923s (-4.5%)2.628s (+3.1%)0.704s121.00x
💻 LocalNitro2.194s (-0.5%)3.155s (~)0.961s101.14x
💻 LocalExpress2.248s (+1.4%)3.195s (+1.1%)0.947s101.17x
🌐 StarterNext.js (Turbopack)2.481s (+1.3%)3.025s (+0.5%)0.544s101.29x
🌐 RedisNext.js (Turbopack)2.501s (+0.7%)3.012s (~)0.512s101.30x
🐘 PostgresNext.js (Turbopack)2.619s (-4.5%)3.020s (~)0.401s101.36x
🐘 PostgresNitro2.900s (+2.0%)3.220s (+6.9% 🔺)0.320s101.51x
🐘 PostgresExpress2.925s (-0.6%)3.119s (-7.6% 🟢)0.193s101.52x
🌐 MongoDBNext.js (Turbopack)4.650s (+1.0%)5.186s (~)0.536s62.42x
🌐 TursoNext.js (Turbopack)4.671s (~)5.182s (~)0.510s62.43x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.310s (+5.3% 🔺)3.883s (+5.0%)0.573s81.00x
▲ VercelExpress3.462s (-1.0%)4.061s (-4.1%)0.599s81.05x
▲ VercelNext.js (Turbopack)3.614s (+3.7%)4.592s (+12.8% 🔺)0.978s71.09x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.367s (~)2.010s (~)0.643s151.00x
🌐 StarterNext.js (Turbopack)1.373s (+2.7%)2.007s (~)0.634s151.00x
💻 LocalNext.js (Turbopack)1.392s (+2.1%)2.011s (~)0.619s151.02x
💻 LocalNitro1.409s (-1.3%)2.005s (~)0.596s151.03x
💻 LocalExpress1.437s (+1.1%)2.006s (~)0.569s151.05x
🐘 PostgresNext.js (Turbopack)1.657s (-3.5%)2.013s (~)0.356s151.21x
🐘 PostgresExpress1.726s (-12.2% 🟢)2.012s (-3.1%)0.286s151.26x
🐘 PostgresNitro2.024s (+20.5% 🔺)2.400s (+19.4% 🔺)0.376s131.48x
🌐 MongoDBNext.js (Turbopack)2.145s (+0.7%)3.013s (~)0.868s101.57x
🌐 TursoNext.js (Turbopack)2.230s (~)3.013s (~)0.783s101.63x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.647s (+1.2%)3.563s (+1.9%)0.917s91.00x
▲ VercelExpress2.727s (+8.3% 🔺)3.614s (+2.4%)0.886s91.03x
▲ VercelNext.js (Turbopack)2.917s (+4.6%)3.779s (-0.6%)0.862s81.10x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.177s (+4.1%)3.141s (+5.4% 🔺)0.964s101.00x
💻 LocalNitro2.217s (-5.1% 🟢)3.162s (-2.5%)0.945s101.02x
💻 LocalExpress2.346s (+1.9%)3.266s (+1.4%)0.920s101.08x
🌐 RedisNext.js (Turbopack)2.470s (-0.8%)3.012s (~)0.542s101.13x
🐘 PostgresExpress2.483s (-14.4% 🟢)3.016s (~)0.533s101.14x
🌐 StarterNext.js (Turbopack)2.537s (+3.3%)3.012s (~)0.475s101.17x
🐘 PostgresNext.js (Turbopack)2.550s (+3.6%)3.026s (~)0.477s101.17x
🐘 PostgresNitro2.743s (~)3.019s (~)0.276s101.26x
🌐 TursoNext.js (Turbopack)4.736s (~)5.187s (~)0.451s62.18x
🌐 MongoDBNext.js (Turbopack)4.790s (+3.4%)5.183s (~)0.393s62.20x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.417s (+13.1% 🔺)4.140s (+11.9% 🔺)0.723s81.00x
▲ VercelNitro3.430s (+13.4% 🔺)4.156s (+13.7% 🔺)0.726s81.00x
▲ VercelExpress4.041s (+33.9% 🔺)4.734s (+30.5% 🔺)0.693s71.18x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.132s (+3.6%)1.005s (~)0.000s (+Infinity% 🔺)1.011s (~)0.878s101.00x
💻 LocalNext.js (Turbopack)0.133s (+21.2% 🔺)1.003s (~)0.019s (+16.3% 🔺)1.029s (~)0.896s101.01x
🌐 RedisNext.js (Turbopack)0.150s (+5.1% 🔺)1.005s (~)0.000s (NaN%)1.014s (~)0.863s101.14x
💻 LocalNitro0.175s (-3.5%)0.992s (~)0.015s (-4.5%)1.021s (~)0.846s101.32x
💻 LocalExpress0.178s (+2.5%)0.993s (~)0.017s (-1.8%)1.023s (~)0.845s101.35x
🌐 TursoNext.js (Turbopack)0.462s (-7.3% 🟢)0.990s (+4.1%)0.000s (+Infinity% 🔺)1.013s (~)0.551s103.50x
🌐 MongoDBNext.js (Turbopack)0.481s (-2.9%)0.965s (+1.4%)0.000s (NaN%)1.014s (~)0.533s103.64x
🐘 PostgresExpress1.242s (-47.1% 🟢)1.802s (-33.1% 🟢)0.000s (~)2.016s (-33.2% 🟢)0.773s109.40x
🐘 PostgresNext.js (Turbopack)2.207s (+93.1% 🔺)2.841s (+49.2% 🔺)0.000s (NaN%)3.019s (+49.6% 🔺)0.812s1016.69x
🐘 PostgresNitro2.332s (+60.9% 🔺)2.711s (+62.7% 🔺)0.000s (NaN%)3.014s (+49.8% 🔺)0.682s1017.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.555s (-3.9%)3.159s (-2.8%)0.465s (+98.6% 🔺)4.039s (+3.1%)1.484s101.00x
▲ VercelNitro2.660s (+2.7%)3.251s (+5.6% 🔺)0.239s (-43.8% 🟢)3.938s (+0.9%)1.278s101.04x
▲ VercelExpress2.726s (+9.8% 🔺)3.266s (+7.9% 🔺)0.418s (+49.8% 🔺)4.130s (+11.2% 🔺)1.404s101.07x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)8/8
🐘 PostgresExpress5/8
▲ VercelNitro4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)🌐 Starter5/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 Dec 18, 2025

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production286011297
✅ 💻 Local Development26208270
✅ 📦 Local Production26208270
✅ 🐘 Local Postgres26208270
✅ 🪟 Windows270027
❌ 🌍 Community Worlds109110120
Total120811351254

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

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

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro2601
✅ example2601
✅ express2601
✅ fastify2601
✅ hono2601
✅ nextjs-turbopack2601
✅ nextjs-webpack2601
✅ nitro2601
✅ nuxt2601
✅ sveltekit2601
✅ vite2601
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack2700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb2610
✅ redis-dev300
❌ redis2610
✅ starter-dev300
❌ starter1980
✅ turso-dev300
❌ turso2610

📋 View full workflow run

@TooTallNateGraphite App

TooTallNate commented Dec 18, 2025

Copy link
Copy Markdown
MemberAuthor

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses Vercel Queue's 24-hour message TTL limitation by implementing automatic message re-enqueueing before messages expire. The implementation tracks message age using a messageQueuedAt timestamp and re-enqueues messages that would exceed the TTL before their next scheduled processing.

Key changes:

  • Added message age tracking with messageQueuedAt field in queue messages
  • Implemented logic to detect and re-enqueue messages approaching the 24-hour TTL (with 1-hour buffer)
  • Added comprehensive test suite covering various scenarios including fresh messages, expiring messages, and backward compatibility

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
FileDescription
packages/world-vercel/src/queue.tsCore implementation adding message lifetime tracking, re-enqueueing logic, and new constants for TTL management
packages/world-vercel/src/queue.test.tsComprehensive test suite covering message enqueueing, re-enqueueing scenarios, and backward compatibility
packages/world-vercel/package.jsonUpdated test script and added vitest as a dev dependency
pnpm-lock.yamlLock file updates for vitest dependency addition
.changeset/sad-steaks-burn.mdChangeset documenting the patch-level change
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadpackages/world-vercel/src/queue.ts Outdated
Comment threadpackages/world-vercel/src/queue.ts Outdated
Comment threadpackages/world-vercel/src/queue.ts Outdated
Comment threadpackages/world-vercel/src/queue.test.ts Outdated
Comment threadpackages/world-vercel/src/queue.test.ts Outdated
Comment threadpackages/world-vercel/src/queue.ts
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.

4 participants

@TooTallNate@pranaygp@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

Handle Vercel Queue 24 hour message TTL by re-enqueueing message - #651

Merged
TooTallNate merged 5 commits into
mainfrom
12-18-handle_vercel_queue_24_hour_message_ttl_by_re-enqueueing_message
Dec 19, 2025
Merged

Handle Vercel Queue 24 hour message TTL by re-enqueueing message#651
TooTallNate merged 5 commits into
mainfrom
12-18-handle_vercel_queue_24_hour_message_ttl_by_re-enqueueing_message

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Dec 18, 2025

Copy link
Copy Markdown
Member

Handle Vercel Queue's 24-hour message TTL by automatically re-enqueueing messages that are approaching expiration.

What changed?

  • Added tracking of message age by storing messageQueuedAt timestamp in queue messages
  • Implemented logic to detect when a message is approaching Vercel's 24-hour TTL limit
  • Added automatic re-enqueueing of messages that would expire before their next scheduled processing
  • Updated the queue handler to properly manage message lifetimes

How to test?

  • Run the new test suite with pnpm test in the packages/world-vercel directory
  • The tests verify various scenarios including:
    • Fresh messages being handled normally
    • Old messages being re-enqueued before they expire
    • Proper handling of timeout values
    • Backward compatibility with messages that don't have the messageQueuedAt field

Why make this change?

Vercel Queue has a hard 24-hour TTL for messages. Previously, long-running workflows that used large timeout values could have their messages expire before being processed again. This change ensures that messages are re-enqueued with a fresh TTL before they reach Vercel's 24-hour limit, preventing workflow executions from being lost due to message expiration.

@changeset-bot

changeset-botBot commented Dec 18, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 01b6955

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

This PR includes changesets to release 13 packages
NameType
@workflow/world-vercelPatch
@workflow/cliPatch
@workflow/corePatch
workflowPatch
@workflow/world-testingPatch
@workflow/buildersPatch
@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 Dec 18, 2025

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.039s (-0.8%)1.013s (~)0.974s101.00x
💻 LocalNext.js (Turbopack)0.039s (+9.4% 🔺)1.017s (~)0.978s101.01x
💻 LocalNitro0.041s (-3.9%)1.006s (~)0.965s101.06x
🌐 RedisNext.js (Turbopack)0.043s (+3.9%)1.018s (~)0.975s101.10x
💻 LocalExpress0.043s (~)1.007s (~)0.964s101.11x
🌐 MongoDBNext.js (Turbopack)0.070s (-2.6%)1.017s (~)0.947s101.80x
🌐 TursoNext.js (Turbopack)0.107s (+7.3% 🔺)1.015s (~)0.908s102.75x
🐘 PostgresNitro0.291s (-13.7% 🟢)1.014s (~)0.722s107.47x
🐘 PostgresExpress0.314s (-19.1% 🟢)1.015s (~)0.702s108.05x
🐘 PostgresNext.js (Turbopack)0.351s (+133.4% 🔺)1.018s (~)0.668s108.99x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.524s (+12.5% 🔺)1.477s (+4.8%)0.953s101.00x
▲ VercelNext.js (Turbopack)0.556s (+1.2%)1.462s (-4.9%)0.906s101.06x
▲ VercelExpress0.655s (+24.6% 🔺)1.590s (+14.2% 🔺)0.935s101.25x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.091s (~)2.009s (~)0.918s101.00x
💻 LocalNext.js (Turbopack)1.097s (+1.3%)2.011s (~)0.914s101.01x
🌐 RedisNext.js (Turbopack)1.105s (+0.5%)2.012s (~)0.907s101.01x
💻 LocalNitro1.110s (~)2.006s (~)0.896s101.02x
💻 LocalExpress1.113s (~)2.006s (~)0.893s101.02x
🌐 MongoDBNext.js (Turbopack)1.281s (-1.5%)2.015s (~)0.734s101.17x
🌐 TursoNext.js (Turbopack)1.306s (+0.5%)2.014s (~)0.708s101.20x
🐘 PostgresExpress2.146s (-3.9%)3.017s (~)0.870s101.97x
🐘 PostgresNitro2.148s (-2.0%)3.012s (~)0.863s101.97x
🐘 PostgresNext.js (Turbopack)2.170s (-10.2% 🟢)3.023s (~)0.853s101.99x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.728s (+43.5% 🔺)4.607s (+28.9% 🔺)0.879s101.00x
▲ VercelNext.js (Turbopack)3.818s (+47.4% 🔺)5.292s (+45.4% 🔺)1.473s101.02x
▲ VercelExpress4.387s (+67.7% 🔺)5.317s (+50.7% 🔺)0.929s101.18x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.598s (~)11.012s (~)0.414s51.00x
💻 LocalNext.js (Turbopack)10.655s (+1.0%)11.015s (~)0.360s51.01x
🌐 RedisNext.js (Turbopack)10.709s (~)11.017s (~)0.308s51.01x
💻 LocalNitro10.789s (~)11.012s (~)0.222s51.02x
💻 LocalExpress10.792s (~)11.012s (~)0.220s51.02x
🌐 MongoDBNext.js (Turbopack)11.968s (-2.0%)12.228s (-6.1% 🟢)0.260s51.13x
🌐 TursoNext.js (Turbopack)12.187s (~)13.022s (~)0.835s51.15x
🐘 PostgresExpress19.974s (-1.5%)20.438s (-2.8%)0.465s51.88x
🐘 PostgresNitro20.414s (+29.5% 🔺)21.031s (+26.5% 🔺)0.617s51.93x
🐘 PostgresNext.js (Turbopack)20.432s (+32.6% 🔺)21.040s (+31.2% 🔺)0.608s51.93x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express21.787s (+3.4%)22.547s (+4.2%)0.760s51.00x
▲ VercelNext.js (Turbopack)21.933s (+3.9%)22.703s (+3.9%)0.770s51.01x
▲ VercelNitro22.053s (+7.1% 🔺)22.946s (+7.8% 🔺)0.893s51.01x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.349s (+0.8%)2.007s (~)0.658s151.00x
🌐 RedisNext.js (Turbopack)1.376s (+1.7%)2.010s (~)0.634s151.02x
💻 LocalNext.js (Turbopack)1.377s (+1.9%)2.012s (~)0.634s151.02x
💻 LocalNitro1.400s (-1.4%)2.005s (~)0.605s151.04x
💻 LocalExpress1.411s (+0.9%)2.006s (~)0.596s151.05x
🐘 PostgresExpress1.972s (-18.7% 🟢)2.412s (-20.0% 🟢)0.440s131.46x
🌐 MongoDBNext.js (Turbopack)2.138s (-1.3%)3.016s (~)0.878s101.58x
🌐 TursoNext.js (Turbopack)2.224s (~)3.015s (~)0.791s101.65x
🐘 PostgresNext.js (Turbopack)2.338s (+10.0% 🔺)3.020s (+29.9% 🔺)0.682s101.73x
🐘 PostgresNitro2.414s (+13.1% 🔺)3.013s (+21.9% 🔺)0.599s101.79x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.972s (+8.4% 🔺)3.833s (+7.6% 🔺)0.861s81.00x
▲ VercelNitro3.090s (+8.6% 🔺)3.920s (+6.9% 🔺)0.830s81.04x
▲ VercelNext.js (Turbopack)3.159s (+7.3% 🔺)3.918s (~)0.759s81.06x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.923s (-4.5%)2.628s (+3.1%)0.704s121.00x
💻 LocalNitro2.194s (-0.5%)3.155s (~)0.961s101.14x
💻 LocalExpress2.248s (+1.4%)3.195s (+1.1%)0.947s101.17x
🌐 StarterNext.js (Turbopack)2.481s (+1.3%)3.025s (+0.5%)0.544s101.29x
🌐 RedisNext.js (Turbopack)2.501s (+0.7%)3.012s (~)0.512s101.30x
🐘 PostgresNext.js (Turbopack)2.619s (-4.5%)3.020s (~)0.401s101.36x
🐘 PostgresNitro2.900s (+2.0%)3.220s (+6.9% 🔺)0.320s101.51x
🐘 PostgresExpress2.925s (-0.6%)3.119s (-7.6% 🟢)0.193s101.52x
🌐 MongoDBNext.js (Turbopack)4.650s (+1.0%)5.186s (~)0.536s62.42x
🌐 TursoNext.js (Turbopack)4.671s (~)5.182s (~)0.510s62.43x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.310s (+5.3% 🔺)3.883s (+5.0%)0.573s81.00x
▲ VercelExpress3.462s (-1.0%)4.061s (-4.1%)0.599s81.05x
▲ VercelNext.js (Turbopack)3.614s (+3.7%)4.592s (+12.8% 🔺)0.978s71.09x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.367s (~)2.010s (~)0.643s151.00x
🌐 StarterNext.js (Turbopack)1.373s (+2.7%)2.007s (~)0.634s151.00x
💻 LocalNext.js (Turbopack)1.392s (+2.1%)2.011s (~)0.619s151.02x
💻 LocalNitro1.409s (-1.3%)2.005s (~)0.596s151.03x
💻 LocalExpress1.437s (+1.1%)2.006s (~)0.569s151.05x
🐘 PostgresNext.js (Turbopack)1.657s (-3.5%)2.013s (~)0.356s151.21x
🐘 PostgresExpress1.726s (-12.2% 🟢)2.012s (-3.1%)0.286s151.26x
🐘 PostgresNitro2.024s (+20.5% 🔺)2.400s (+19.4% 🔺)0.376s131.48x
🌐 MongoDBNext.js (Turbopack)2.145s (+0.7%)3.013s (~)0.868s101.57x
🌐 TursoNext.js (Turbopack)2.230s (~)3.013s (~)0.783s101.63x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.647s (+1.2%)3.563s (+1.9%)0.917s91.00x
▲ VercelExpress2.727s (+8.3% 🔺)3.614s (+2.4%)0.886s91.03x
▲ VercelNext.js (Turbopack)2.917s (+4.6%)3.779s (-0.6%)0.862s81.10x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.177s (+4.1%)3.141s (+5.4% 🔺)0.964s101.00x
💻 LocalNitro2.217s (-5.1% 🟢)3.162s (-2.5%)0.945s101.02x
💻 LocalExpress2.346s (+1.9%)3.266s (+1.4%)0.920s101.08x
🌐 RedisNext.js (Turbopack)2.470s (-0.8%)3.012s (~)0.542s101.13x
🐘 PostgresExpress2.483s (-14.4% 🟢)3.016s (~)0.533s101.14x
🌐 StarterNext.js (Turbopack)2.537s (+3.3%)3.012s (~)0.475s101.17x
🐘 PostgresNext.js (Turbopack)2.550s (+3.6%)3.026s (~)0.477s101.17x
🐘 PostgresNitro2.743s (~)3.019s (~)0.276s101.26x
🌐 TursoNext.js (Turbopack)4.736s (~)5.187s (~)0.451s62.18x
🌐 MongoDBNext.js (Turbopack)4.790s (+3.4%)5.183s (~)0.393s62.20x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.417s (+13.1% 🔺)4.140s (+11.9% 🔺)0.723s81.00x
▲ VercelNitro3.430s (+13.4% 🔺)4.156s (+13.7% 🔺)0.726s81.00x
▲ VercelExpress4.041s (+33.9% 🔺)4.734s (+30.5% 🔺)0.693s71.18x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.132s (+3.6%)1.005s (~)0.000s (+Infinity% 🔺)1.011s (~)0.878s101.00x
💻 LocalNext.js (Turbopack)0.133s (+21.2% 🔺)1.003s (~)0.019s (+16.3% 🔺)1.029s (~)0.896s101.01x
🌐 RedisNext.js (Turbopack)0.150s (+5.1% 🔺)1.005s (~)0.000s (NaN%)1.014s (~)0.863s101.14x
💻 LocalNitro0.175s (-3.5%)0.992s (~)0.015s (-4.5%)1.021s (~)0.846s101.32x
💻 LocalExpress0.178s (+2.5%)0.993s (~)0.017s (-1.8%)1.023s (~)0.845s101.35x
🌐 TursoNext.js (Turbopack)0.462s (-7.3% 🟢)0.990s (+4.1%)0.000s (+Infinity% 🔺)1.013s (~)0.551s103.50x
🌐 MongoDBNext.js (Turbopack)0.481s (-2.9%)0.965s (+1.4%)0.000s (NaN%)1.014s (~)0.533s103.64x
🐘 PostgresExpress1.242s (-47.1% 🟢)1.802s (-33.1% 🟢)0.000s (~)2.016s (-33.2% 🟢)0.773s109.40x
🐘 PostgresNext.js (Turbopack)2.207s (+93.1% 🔺)2.841s (+49.2% 🔺)0.000s (NaN%)3.019s (+49.6% 🔺)0.812s1016.69x
🐘 PostgresNitro2.332s (+60.9% 🔺)2.711s (+62.7% 🔺)0.000s (NaN%)3.014s (+49.8% 🔺)0.682s1017.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.555s (-3.9%)3.159s (-2.8%)0.465s (+98.6% 🔺)4.039s (+3.1%)1.484s101.00x
▲ VercelNitro2.660s (+2.7%)3.251s (+5.6% 🔺)0.239s (-43.8% 🟢)3.938s (+0.9%)1.278s101.04x
▲ VercelExpress2.726s (+9.8% 🔺)3.266s (+7.9% 🔺)0.418s (+49.8% 🔺)4.130s (+11.2% 🔺)1.404s101.07x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)8/8
🐘 PostgresExpress5/8
▲ VercelNitro4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)🌐 Starter5/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 Dec 18, 2025

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production286011297
✅ 💻 Local Development26208270
✅ 📦 Local Production26208270
✅ 🐘 Local Postgres26208270
✅ 🪟 Windows270027
❌ 🌍 Community Worlds109110120
Total120811351254

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

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

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro2601
✅ example2601
✅ express2601
✅ fastify2601
✅ hono2601
✅ nextjs-turbopack2601
✅ nextjs-webpack2601
✅ nitro2601
✅ nuxt2601
✅ sveltekit2601
✅ vite2601
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack2700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb2610
✅ redis-dev300
❌ redis2610
✅ starter-dev300
❌ starter1980
✅ turso-dev300
❌ turso2610

📋 View full workflow run

@TooTallNateGraphite App

TooTallNate commented Dec 18, 2025

Copy link
Copy Markdown
MemberAuthor

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses Vercel Queue's 24-hour message TTL limitation by implementing automatic message re-enqueueing before messages expire. The implementation tracks message age using a messageQueuedAt timestamp and re-enqueues messages that would exceed the TTL before their next scheduled processing.

Key changes:

  • Added message age tracking with messageQueuedAt field in queue messages
  • Implemented logic to detect and re-enqueue messages approaching the 24-hour TTL (with 1-hour buffer)
  • Added comprehensive test suite covering various scenarios including fresh messages, expiring messages, and backward compatibility

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
FileDescription
packages/world-vercel/src/queue.tsCore implementation adding message lifetime tracking, re-enqueueing logic, and new constants for TTL management
packages/world-vercel/src/queue.test.tsComprehensive test suite covering message enqueueing, re-enqueueing scenarios, and backward compatibility
packages/world-vercel/package.jsonUpdated test script and added vitest as a dev dependency
pnpm-lock.yamlLock file updates for vitest dependency addition
.changeset/sad-steaks-burn.mdChangeset documenting the patch-level change
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadpackages/world-vercel/src/queue.ts Outdated
Comment threadpackages/world-vercel/src/queue.ts Outdated
Comment threadpackages/world-vercel/src/queue.ts Outdated
Comment threadpackages/world-vercel/src/queue.test.ts Outdated
Comment threadpackages/world-vercel/src/queue.test.ts Outdated
Comment threadpackages/world-vercel/src/queue.ts
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.

4 participants

@TooTallNate@pranaygp@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

Handle Vercel Queue 24 hour message TTL by re-enqueueing message - #651

Merged
TooTallNate merged 5 commits into
mainfrom
12-18-handle_vercel_queue_24_hour_message_ttl_by_re-enqueueing_message
Dec 19, 2025
Merged

Handle Vercel Queue 24 hour message TTL by re-enqueueing message#651
TooTallNate merged 5 commits into
mainfrom
12-18-handle_vercel_queue_24_hour_message_ttl_by_re-enqueueing_message

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Dec 18, 2025

Copy link
Copy Markdown
Member

Handle Vercel Queue's 24-hour message TTL by automatically re-enqueueing messages that are approaching expiration.

What changed?

  • Added tracking of message age by storing messageQueuedAt timestamp in queue messages
  • Implemented logic to detect when a message is approaching Vercel's 24-hour TTL limit
  • Added automatic re-enqueueing of messages that would expire before their next scheduled processing
  • Updated the queue handler to properly manage message lifetimes

How to test?

  • Run the new test suite with pnpm test in the packages/world-vercel directory
  • The tests verify various scenarios including:
    • Fresh messages being handled normally
    • Old messages being re-enqueued before they expire
    • Proper handling of timeout values
    • Backward compatibility with messages that don't have the messageQueuedAt field

Why make this change?

Vercel Queue has a hard 24-hour TTL for messages. Previously, long-running workflows that used large timeout values could have their messages expire before being processed again. This change ensures that messages are re-enqueued with a fresh TTL before they reach Vercel's 24-hour limit, preventing workflow executions from being lost due to message expiration.

@changeset-bot

changeset-botBot commented Dec 18, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 01b6955

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

This PR includes changesets to release 13 packages
NameType
@workflow/world-vercelPatch
@workflow/cliPatch
@workflow/corePatch
workflowPatch
@workflow/world-testingPatch
@workflow/buildersPatch
@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 Dec 18, 2025

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.039s (-0.8%)1.013s (~)0.974s101.00x
💻 LocalNext.js (Turbopack)0.039s (+9.4% 🔺)1.017s (~)0.978s101.01x
💻 LocalNitro0.041s (-3.9%)1.006s (~)0.965s101.06x
🌐 RedisNext.js (Turbopack)0.043s (+3.9%)1.018s (~)0.975s101.10x
💻 LocalExpress0.043s (~)1.007s (~)0.964s101.11x
🌐 MongoDBNext.js (Turbopack)0.070s (-2.6%)1.017s (~)0.947s101.80x
🌐 TursoNext.js (Turbopack)0.107s (+7.3% 🔺)1.015s (~)0.908s102.75x
🐘 PostgresNitro0.291s (-13.7% 🟢)1.014s (~)0.722s107.47x
🐘 PostgresExpress0.314s (-19.1% 🟢)1.015s (~)0.702s108.05x
🐘 PostgresNext.js (Turbopack)0.351s (+133.4% 🔺)1.018s (~)0.668s108.99x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.524s (+12.5% 🔺)1.477s (+4.8%)0.953s101.00x
▲ VercelNext.js (Turbopack)0.556s (+1.2%)1.462s (-4.9%)0.906s101.06x
▲ VercelExpress0.655s (+24.6% 🔺)1.590s (+14.2% 🔺)0.935s101.25x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.091s (~)2.009s (~)0.918s101.00x
💻 LocalNext.js (Turbopack)1.097s (+1.3%)2.011s (~)0.914s101.01x
🌐 RedisNext.js (Turbopack)1.105s (+0.5%)2.012s (~)0.907s101.01x
💻 LocalNitro1.110s (~)2.006s (~)0.896s101.02x
💻 LocalExpress1.113s (~)2.006s (~)0.893s101.02x
🌐 MongoDBNext.js (Turbopack)1.281s (-1.5%)2.015s (~)0.734s101.17x
🌐 TursoNext.js (Turbopack)1.306s (+0.5%)2.014s (~)0.708s101.20x
🐘 PostgresExpress2.146s (-3.9%)3.017s (~)0.870s101.97x
🐘 PostgresNitro2.148s (-2.0%)3.012s (~)0.863s101.97x
🐘 PostgresNext.js (Turbopack)2.170s (-10.2% 🟢)3.023s (~)0.853s101.99x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.728s (+43.5% 🔺)4.607s (+28.9% 🔺)0.879s101.00x
▲ VercelNext.js (Turbopack)3.818s (+47.4% 🔺)5.292s (+45.4% 🔺)1.473s101.02x
▲ VercelExpress4.387s (+67.7% 🔺)5.317s (+50.7% 🔺)0.929s101.18x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.598s (~)11.012s (~)0.414s51.00x
💻 LocalNext.js (Turbopack)10.655s (+1.0%)11.015s (~)0.360s51.01x
🌐 RedisNext.js (Turbopack)10.709s (~)11.017s (~)0.308s51.01x
💻 LocalNitro10.789s (~)11.012s (~)0.222s51.02x
💻 LocalExpress10.792s (~)11.012s (~)0.220s51.02x
🌐 MongoDBNext.js (Turbopack)11.968s (-2.0%)12.228s (-6.1% 🟢)0.260s51.13x
🌐 TursoNext.js (Turbopack)12.187s (~)13.022s (~)0.835s51.15x
🐘 PostgresExpress19.974s (-1.5%)20.438s (-2.8%)0.465s51.88x
🐘 PostgresNitro20.414s (+29.5% 🔺)21.031s (+26.5% 🔺)0.617s51.93x
🐘 PostgresNext.js (Turbopack)20.432s (+32.6% 🔺)21.040s (+31.2% 🔺)0.608s51.93x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express21.787s (+3.4%)22.547s (+4.2%)0.760s51.00x
▲ VercelNext.js (Turbopack)21.933s (+3.9%)22.703s (+3.9%)0.770s51.01x
▲ VercelNitro22.053s (+7.1% 🔺)22.946s (+7.8% 🔺)0.893s51.01x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.349s (+0.8%)2.007s (~)0.658s151.00x
🌐 RedisNext.js (Turbopack)1.376s (+1.7%)2.010s (~)0.634s151.02x
💻 LocalNext.js (Turbopack)1.377s (+1.9%)2.012s (~)0.634s151.02x
💻 LocalNitro1.400s (-1.4%)2.005s (~)0.605s151.04x
💻 LocalExpress1.411s (+0.9%)2.006s (~)0.596s151.05x
🐘 PostgresExpress1.972s (-18.7% 🟢)2.412s (-20.0% 🟢)0.440s131.46x
🌐 MongoDBNext.js (Turbopack)2.138s (-1.3%)3.016s (~)0.878s101.58x
🌐 TursoNext.js (Turbopack)2.224s (~)3.015s (~)0.791s101.65x
🐘 PostgresNext.js (Turbopack)2.338s (+10.0% 🔺)3.020s (+29.9% 🔺)0.682s101.73x
🐘 PostgresNitro2.414s (+13.1% 🔺)3.013s (+21.9% 🔺)0.599s101.79x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.972s (+8.4% 🔺)3.833s (+7.6% 🔺)0.861s81.00x
▲ VercelNitro3.090s (+8.6% 🔺)3.920s (+6.9% 🔺)0.830s81.04x
▲ VercelNext.js (Turbopack)3.159s (+7.3% 🔺)3.918s (~)0.759s81.06x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.923s (-4.5%)2.628s (+3.1%)0.704s121.00x
💻 LocalNitro2.194s (-0.5%)3.155s (~)0.961s101.14x
💻 LocalExpress2.248s (+1.4%)3.195s (+1.1%)0.947s101.17x
🌐 StarterNext.js (Turbopack)2.481s (+1.3%)3.025s (+0.5%)0.544s101.29x
🌐 RedisNext.js (Turbopack)2.501s (+0.7%)3.012s (~)0.512s101.30x
🐘 PostgresNext.js (Turbopack)2.619s (-4.5%)3.020s (~)0.401s101.36x
🐘 PostgresNitro2.900s (+2.0%)3.220s (+6.9% 🔺)0.320s101.51x
🐘 PostgresExpress2.925s (-0.6%)3.119s (-7.6% 🟢)0.193s101.52x
🌐 MongoDBNext.js (Turbopack)4.650s (+1.0%)5.186s (~)0.536s62.42x
🌐 TursoNext.js (Turbopack)4.671s (~)5.182s (~)0.510s62.43x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.310s (+5.3% 🔺)3.883s (+5.0%)0.573s81.00x
▲ VercelExpress3.462s (-1.0%)4.061s (-4.1%)0.599s81.05x
▲ VercelNext.js (Turbopack)3.614s (+3.7%)4.592s (+12.8% 🔺)0.978s71.09x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.367s (~)2.010s (~)0.643s151.00x
🌐 StarterNext.js (Turbopack)1.373s (+2.7%)2.007s (~)0.634s151.00x
💻 LocalNext.js (Turbopack)1.392s (+2.1%)2.011s (~)0.619s151.02x
💻 LocalNitro1.409s (-1.3%)2.005s (~)0.596s151.03x
💻 LocalExpress1.437s (+1.1%)2.006s (~)0.569s151.05x
🐘 PostgresNext.js (Turbopack)1.657s (-3.5%)2.013s (~)0.356s151.21x
🐘 PostgresExpress1.726s (-12.2% 🟢)2.012s (-3.1%)0.286s151.26x
🐘 PostgresNitro2.024s (+20.5% 🔺)2.400s (+19.4% 🔺)0.376s131.48x
🌐 MongoDBNext.js (Turbopack)2.145s (+0.7%)3.013s (~)0.868s101.57x
🌐 TursoNext.js (Turbopack)2.230s (~)3.013s (~)0.783s101.63x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.647s (+1.2%)3.563s (+1.9%)0.917s91.00x
▲ VercelExpress2.727s (+8.3% 🔺)3.614s (+2.4%)0.886s91.03x
▲ VercelNext.js (Turbopack)2.917s (+4.6%)3.779s (-0.6%)0.862s81.10x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.177s (+4.1%)3.141s (+5.4% 🔺)0.964s101.00x
💻 LocalNitro2.217s (-5.1% 🟢)3.162s (-2.5%)0.945s101.02x
💻 LocalExpress2.346s (+1.9%)3.266s (+1.4%)0.920s101.08x
🌐 RedisNext.js (Turbopack)2.470s (-0.8%)3.012s (~)0.542s101.13x
🐘 PostgresExpress2.483s (-14.4% 🟢)3.016s (~)0.533s101.14x
🌐 StarterNext.js (Turbopack)2.537s (+3.3%)3.012s (~)0.475s101.17x
🐘 PostgresNext.js (Turbopack)2.550s (+3.6%)3.026s (~)0.477s101.17x
🐘 PostgresNitro2.743s (~)3.019s (~)0.276s101.26x
🌐 TursoNext.js (Turbopack)4.736s (~)5.187s (~)0.451s62.18x
🌐 MongoDBNext.js (Turbopack)4.790s (+3.4%)5.183s (~)0.393s62.20x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.417s (+13.1% 🔺)4.140s (+11.9% 🔺)0.723s81.00x
▲ VercelNitro3.430s (+13.4% 🔺)4.156s (+13.7% 🔺)0.726s81.00x
▲ VercelExpress4.041s (+33.9% 🔺)4.734s (+30.5% 🔺)0.693s71.18x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.132s (+3.6%)1.005s (~)0.000s (+Infinity% 🔺)1.011s (~)0.878s101.00x
💻 LocalNext.js (Turbopack)0.133s (+21.2% 🔺)1.003s (~)0.019s (+16.3% 🔺)1.029s (~)0.896s101.01x
🌐 RedisNext.js (Turbopack)0.150s (+5.1% 🔺)1.005s (~)0.000s (NaN%)1.014s (~)0.863s101.14x
💻 LocalNitro0.175s (-3.5%)0.992s (~)0.015s (-4.5%)1.021s (~)0.846s101.32x
💻 LocalExpress0.178s (+2.5%)0.993s (~)0.017s (-1.8%)1.023s (~)0.845s101.35x
🌐 TursoNext.js (Turbopack)0.462s (-7.3% 🟢)0.990s (+4.1%)0.000s (+Infinity% 🔺)1.013s (~)0.551s103.50x
🌐 MongoDBNext.js (Turbopack)0.481s (-2.9%)0.965s (+1.4%)0.000s (NaN%)1.014s (~)0.533s103.64x
🐘 PostgresExpress1.242s (-47.1% 🟢)1.802s (-33.1% 🟢)0.000s (~)2.016s (-33.2% 🟢)0.773s109.40x
🐘 PostgresNext.js (Turbopack)2.207s (+93.1% 🔺)2.841s (+49.2% 🔺)0.000s (NaN%)3.019s (+49.6% 🔺)0.812s1016.69x
🐘 PostgresNitro2.332s (+60.9% 🔺)2.711s (+62.7% 🔺)0.000s (NaN%)3.014s (+49.8% 🔺)0.682s1017.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.555s (-3.9%)3.159s (-2.8%)0.465s (+98.6% 🔺)4.039s (+3.1%)1.484s101.00x
▲ VercelNitro2.660s (+2.7%)3.251s (+5.6% 🔺)0.239s (-43.8% 🟢)3.938s (+0.9%)1.278s101.04x
▲ VercelExpress2.726s (+9.8% 🔺)3.266s (+7.9% 🔺)0.418s (+49.8% 🔺)4.130s (+11.2% 🔺)1.404s101.07x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)8/8
🐘 PostgresExpress5/8
▲ VercelNitro4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)🌐 Starter5/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 Dec 18, 2025

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production286011297
✅ 💻 Local Development26208270
✅ 📦 Local Production26208270
✅ 🐘 Local Postgres26208270
✅ 🪟 Windows270027
❌ 🌍 Community Worlds109110120
Total120811351254

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

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

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro2601
✅ example2601
✅ express2601
✅ fastify2601
✅ hono2601
✅ nextjs-turbopack2601
✅ nextjs-webpack2601
✅ nitro2601
✅ nuxt2601
✅ sveltekit2601
✅ vite2601
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack2700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb2610
✅ redis-dev300
❌ redis2610
✅ starter-dev300
❌ starter1980
✅ turso-dev300
❌ turso2610

📋 View full workflow run

@TooTallNateGraphite App

TooTallNate commented Dec 18, 2025

Copy link
Copy Markdown
MemberAuthor

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses Vercel Queue's 24-hour message TTL limitation by implementing automatic message re-enqueueing before messages expire. The implementation tracks message age using a messageQueuedAt timestamp and re-enqueues messages that would exceed the TTL before their next scheduled processing.

Key changes:

  • Added message age tracking with messageQueuedAt field in queue messages
  • Implemented logic to detect and re-enqueue messages approaching the 24-hour TTL (with 1-hour buffer)
  • Added comprehensive test suite covering various scenarios including fresh messages, expiring messages, and backward compatibility

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
FileDescription
packages/world-vercel/src/queue.tsCore implementation adding message lifetime tracking, re-enqueueing logic, and new constants for TTL management
packages/world-vercel/src/queue.test.tsComprehensive test suite covering message enqueueing, re-enqueueing scenarios, and backward compatibility
packages/world-vercel/package.jsonUpdated test script and added vitest as a dev dependency
pnpm-lock.yamlLock file updates for vitest dependency addition
.changeset/sad-steaks-burn.mdChangeset documenting the patch-level change
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadpackages/world-vercel/src/queue.ts Outdated
Comment threadpackages/world-vercel/src/queue.ts Outdated
Comment threadpackages/world-vercel/src/queue.ts Outdated
Comment threadpackages/world-vercel/src/queue.test.ts Outdated
Comment threadpackages/world-vercel/src/queue.test.ts Outdated
Comment threadpackages/world-vercel/src/queue.ts
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.

4 participants

@TooTallNate@pranaygp@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

Handle Vercel Queue 24 hour message TTL by re-enqueueing message - #651

Merged
TooTallNate merged 5 commits into
mainfrom
12-18-handle_vercel_queue_24_hour_message_ttl_by_re-enqueueing_message
Dec 19, 2025
Merged

Handle Vercel Queue 24 hour message TTL by re-enqueueing message#651
TooTallNate merged 5 commits into
mainfrom
12-18-handle_vercel_queue_24_hour_message_ttl_by_re-enqueueing_message

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Dec 18, 2025

Copy link
Copy Markdown
Member

Handle Vercel Queue's 24-hour message TTL by automatically re-enqueueing messages that are approaching expiration.

What changed?

  • Added tracking of message age by storing messageQueuedAt timestamp in queue messages
  • Implemented logic to detect when a message is approaching Vercel's 24-hour TTL limit
  • Added automatic re-enqueueing of messages that would expire before their next scheduled processing
  • Updated the queue handler to properly manage message lifetimes

How to test?

  • Run the new test suite with pnpm test in the packages/world-vercel directory
  • The tests verify various scenarios including:
    • Fresh messages being handled normally
    • Old messages being re-enqueued before they expire
    • Proper handling of timeout values
    • Backward compatibility with messages that don't have the messageQueuedAt field

Why make this change?

Vercel Queue has a hard 24-hour TTL for messages. Previously, long-running workflows that used large timeout values could have their messages expire before being processed again. This change ensures that messages are re-enqueued with a fresh TTL before they reach Vercel's 24-hour limit, preventing workflow executions from being lost due to message expiration.

@changeset-bot

changeset-botBot commented Dec 18, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 01b6955

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

This PR includes changesets to release 13 packages
NameType
@workflow/world-vercelPatch
@workflow/cliPatch
@workflow/corePatch
workflowPatch
@workflow/world-testingPatch
@workflow/buildersPatch
@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 Dec 18, 2025

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.039s (-0.8%)1.013s (~)0.974s101.00x
💻 LocalNext.js (Turbopack)0.039s (+9.4% 🔺)1.017s (~)0.978s101.01x
💻 LocalNitro0.041s (-3.9%)1.006s (~)0.965s101.06x
🌐 RedisNext.js (Turbopack)0.043s (+3.9%)1.018s (~)0.975s101.10x
💻 LocalExpress0.043s (~)1.007s (~)0.964s101.11x
🌐 MongoDBNext.js (Turbopack)0.070s (-2.6%)1.017s (~)0.947s101.80x
🌐 TursoNext.js (Turbopack)0.107s (+7.3% 🔺)1.015s (~)0.908s102.75x
🐘 PostgresNitro0.291s (-13.7% 🟢)1.014s (~)0.722s107.47x
🐘 PostgresExpress0.314s (-19.1% 🟢)1.015s (~)0.702s108.05x
🐘 PostgresNext.js (Turbopack)0.351s (+133.4% 🔺)1.018s (~)0.668s108.99x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.524s (+12.5% 🔺)1.477s (+4.8%)0.953s101.00x
▲ VercelNext.js (Turbopack)0.556s (+1.2%)1.462s (-4.9%)0.906s101.06x
▲ VercelExpress0.655s (+24.6% 🔺)1.590s (+14.2% 🔺)0.935s101.25x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.091s (~)2.009s (~)0.918s101.00x
💻 LocalNext.js (Turbopack)1.097s (+1.3%)2.011s (~)0.914s101.01x
🌐 RedisNext.js (Turbopack)1.105s (+0.5%)2.012s (~)0.907s101.01x
💻 LocalNitro1.110s (~)2.006s (~)0.896s101.02x
💻 LocalExpress1.113s (~)2.006s (~)0.893s101.02x
🌐 MongoDBNext.js (Turbopack)1.281s (-1.5%)2.015s (~)0.734s101.17x
🌐 TursoNext.js (Turbopack)1.306s (+0.5%)2.014s (~)0.708s101.20x
🐘 PostgresExpress2.146s (-3.9%)3.017s (~)0.870s101.97x
🐘 PostgresNitro2.148s (-2.0%)3.012s (~)0.863s101.97x
🐘 PostgresNext.js (Turbopack)2.170s (-10.2% 🟢)3.023s (~)0.853s101.99x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.728s (+43.5% 🔺)4.607s (+28.9% 🔺)0.879s101.00x
▲ VercelNext.js (Turbopack)3.818s (+47.4% 🔺)5.292s (+45.4% 🔺)1.473s101.02x
▲ VercelExpress4.387s (+67.7% 🔺)5.317s (+50.7% 🔺)0.929s101.18x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.598s (~)11.012s (~)0.414s51.00x
💻 LocalNext.js (Turbopack)10.655s (+1.0%)11.015s (~)0.360s51.01x
🌐 RedisNext.js (Turbopack)10.709s (~)11.017s (~)0.308s51.01x
💻 LocalNitro10.789s (~)11.012s (~)0.222s51.02x
💻 LocalExpress10.792s (~)11.012s (~)0.220s51.02x
🌐 MongoDBNext.js (Turbopack)11.968s (-2.0%)12.228s (-6.1% 🟢)0.260s51.13x
🌐 TursoNext.js (Turbopack)12.187s (~)13.022s (~)0.835s51.15x
🐘 PostgresExpress19.974s (-1.5%)20.438s (-2.8%)0.465s51.88x
🐘 PostgresNitro20.414s (+29.5% 🔺)21.031s (+26.5% 🔺)0.617s51.93x
🐘 PostgresNext.js (Turbopack)20.432s (+32.6% 🔺)21.040s (+31.2% 🔺)0.608s51.93x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express21.787s (+3.4%)22.547s (+4.2%)0.760s51.00x
▲ VercelNext.js (Turbopack)21.933s (+3.9%)22.703s (+3.9%)0.770s51.01x
▲ VercelNitro22.053s (+7.1% 🔺)22.946s (+7.8% 🔺)0.893s51.01x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.349s (+0.8%)2.007s (~)0.658s151.00x
🌐 RedisNext.js (Turbopack)1.376s (+1.7%)2.010s (~)0.634s151.02x
💻 LocalNext.js (Turbopack)1.377s (+1.9%)2.012s (~)0.634s151.02x
💻 LocalNitro1.400s (-1.4%)2.005s (~)0.605s151.04x
💻 LocalExpress1.411s (+0.9%)2.006s (~)0.596s151.05x
🐘 PostgresExpress1.972s (-18.7% 🟢)2.412s (-20.0% 🟢)0.440s131.46x
🌐 MongoDBNext.js (Turbopack)2.138s (-1.3%)3.016s (~)0.878s101.58x
🌐 TursoNext.js (Turbopack)2.224s (~)3.015s (~)0.791s101.65x
🐘 PostgresNext.js (Turbopack)2.338s (+10.0% 🔺)3.020s (+29.9% 🔺)0.682s101.73x
🐘 PostgresNitro2.414s (+13.1% 🔺)3.013s (+21.9% 🔺)0.599s101.79x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.972s (+8.4% 🔺)3.833s (+7.6% 🔺)0.861s81.00x
▲ VercelNitro3.090s (+8.6% 🔺)3.920s (+6.9% 🔺)0.830s81.04x
▲ VercelNext.js (Turbopack)3.159s (+7.3% 🔺)3.918s (~)0.759s81.06x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.923s (-4.5%)2.628s (+3.1%)0.704s121.00x
💻 LocalNitro2.194s (-0.5%)3.155s (~)0.961s101.14x
💻 LocalExpress2.248s (+1.4%)3.195s (+1.1%)0.947s101.17x
🌐 StarterNext.js (Turbopack)2.481s (+1.3%)3.025s (+0.5%)0.544s101.29x
🌐 RedisNext.js (Turbopack)2.501s (+0.7%)3.012s (~)0.512s101.30x
🐘 PostgresNext.js (Turbopack)2.619s (-4.5%)3.020s (~)0.401s101.36x
🐘 PostgresNitro2.900s (+2.0%)3.220s (+6.9% 🔺)0.320s101.51x
🐘 PostgresExpress2.925s (-0.6%)3.119s (-7.6% 🟢)0.193s101.52x
🌐 MongoDBNext.js (Turbopack)4.650s (+1.0%)5.186s (~)0.536s62.42x
🌐 TursoNext.js (Turbopack)4.671s (~)5.182s (~)0.510s62.43x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.310s (+5.3% 🔺)3.883s (+5.0%)0.573s81.00x
▲ VercelExpress3.462s (-1.0%)4.061s (-4.1%)0.599s81.05x
▲ VercelNext.js (Turbopack)3.614s (+3.7%)4.592s (+12.8% 🔺)0.978s71.09x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.367s (~)2.010s (~)0.643s151.00x
🌐 StarterNext.js (Turbopack)1.373s (+2.7%)2.007s (~)0.634s151.00x
💻 LocalNext.js (Turbopack)1.392s (+2.1%)2.011s (~)0.619s151.02x
💻 LocalNitro1.409s (-1.3%)2.005s (~)0.596s151.03x
💻 LocalExpress1.437s (+1.1%)2.006s (~)0.569s151.05x
🐘 PostgresNext.js (Turbopack)1.657s (-3.5%)2.013s (~)0.356s151.21x
🐘 PostgresExpress1.726s (-12.2% 🟢)2.012s (-3.1%)0.286s151.26x
🐘 PostgresNitro2.024s (+20.5% 🔺)2.400s (+19.4% 🔺)0.376s131.48x
🌐 MongoDBNext.js (Turbopack)2.145s (+0.7%)3.013s (~)0.868s101.57x
🌐 TursoNext.js (Turbopack)2.230s (~)3.013s (~)0.783s101.63x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.647s (+1.2%)3.563s (+1.9%)0.917s91.00x
▲ VercelExpress2.727s (+8.3% 🔺)3.614s (+2.4%)0.886s91.03x
▲ VercelNext.js (Turbopack)2.917s (+4.6%)3.779s (-0.6%)0.862s81.10x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.177s (+4.1%)3.141s (+5.4% 🔺)0.964s101.00x
💻 LocalNitro2.217s (-5.1% 🟢)3.162s (-2.5%)0.945s101.02x
💻 LocalExpress2.346s (+1.9%)3.266s (+1.4%)0.920s101.08x
🌐 RedisNext.js (Turbopack)2.470s (-0.8%)3.012s (~)0.542s101.13x
🐘 PostgresExpress2.483s (-14.4% 🟢)3.016s (~)0.533s101.14x
🌐 StarterNext.js (Turbopack)2.537s (+3.3%)3.012s (~)0.475s101.17x
🐘 PostgresNext.js (Turbopack)2.550s (+3.6%)3.026s (~)0.477s101.17x
🐘 PostgresNitro2.743s (~)3.019s (~)0.276s101.26x
🌐 TursoNext.js (Turbopack)4.736s (~)5.187s (~)0.451s62.18x
🌐 MongoDBNext.js (Turbopack)4.790s (+3.4%)5.183s (~)0.393s62.20x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.417s (+13.1% 🔺)4.140s (+11.9% 🔺)0.723s81.00x
▲ VercelNitro3.430s (+13.4% 🔺)4.156s (+13.7% 🔺)0.726s81.00x
▲ VercelExpress4.041s (+33.9% 🔺)4.734s (+30.5% 🔺)0.693s71.18x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.132s (+3.6%)1.005s (~)0.000s (+Infinity% 🔺)1.011s (~)0.878s101.00x
💻 LocalNext.js (Turbopack)0.133s (+21.2% 🔺)1.003s (~)0.019s (+16.3% 🔺)1.029s (~)0.896s101.01x
🌐 RedisNext.js (Turbopack)0.150s (+5.1% 🔺)1.005s (~)0.000s (NaN%)1.014s (~)0.863s101.14x
💻 LocalNitro0.175s (-3.5%)0.992s (~)0.015s (-4.5%)1.021s (~)0.846s101.32x
💻 LocalExpress0.178s (+2.5%)0.993s (~)0.017s (-1.8%)1.023s (~)0.845s101.35x
🌐 TursoNext.js (Turbopack)0.462s (-7.3% 🟢)0.990s (+4.1%)0.000s (+Infinity% 🔺)1.013s (~)0.551s103.50x
🌐 MongoDBNext.js (Turbopack)0.481s (-2.9%)0.965s (+1.4%)0.000s (NaN%)1.014s (~)0.533s103.64x
🐘 PostgresExpress1.242s (-47.1% 🟢)1.802s (-33.1% 🟢)0.000s (~)2.016s (-33.2% 🟢)0.773s109.40x
🐘 PostgresNext.js (Turbopack)2.207s (+93.1% 🔺)2.841s (+49.2% 🔺)0.000s (NaN%)3.019s (+49.6% 🔺)0.812s1016.69x
🐘 PostgresNitro2.332s (+60.9% 🔺)2.711s (+62.7% 🔺)0.000s (NaN%)3.014s (+49.8% 🔺)0.682s1017.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.555s (-3.9%)3.159s (-2.8%)0.465s (+98.6% 🔺)4.039s (+3.1%)1.484s101.00x
▲ VercelNitro2.660s (+2.7%)3.251s (+5.6% 🔺)0.239s (-43.8% 🟢)3.938s (+0.9%)1.278s101.04x
▲ VercelExpress2.726s (+9.8% 🔺)3.266s (+7.9% 🔺)0.418s (+49.8% 🔺)4.130s (+11.2% 🔺)1.404s101.07x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)8/8
🐘 PostgresExpress5/8
▲ VercelNitro4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)🌐 Starter5/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 Dec 18, 2025

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production286011297
✅ 💻 Local Development26208270
✅ 📦 Local Production26208270
✅ 🐘 Local Postgres26208270
✅ 🪟 Windows270027
❌ 🌍 Community Worlds109110120
Total120811351254

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

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

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro2601
✅ example2601
✅ express2601
✅ fastify2601
✅ hono2601
✅ nextjs-turbopack2601
✅ nextjs-webpack2601
✅ nitro2601
✅ nuxt2601
✅ sveltekit2601
✅ vite2601
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack2700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb2610
✅ redis-dev300
❌ redis2610
✅ starter-dev300
❌ starter1980
✅ turso-dev300
❌ turso2610

📋 View full workflow run

@TooTallNateGraphite App

TooTallNate commented Dec 18, 2025

Copy link
Copy Markdown
MemberAuthor

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses Vercel Queue's 24-hour message TTL limitation by implementing automatic message re-enqueueing before messages expire. The implementation tracks message age using a messageQueuedAt timestamp and re-enqueues messages that would exceed the TTL before their next scheduled processing.

Key changes:

  • Added message age tracking with messageQueuedAt field in queue messages
  • Implemented logic to detect and re-enqueue messages approaching the 24-hour TTL (with 1-hour buffer)
  • Added comprehensive test suite covering various scenarios including fresh messages, expiring messages, and backward compatibility

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
FileDescription
packages/world-vercel/src/queue.tsCore implementation adding message lifetime tracking, re-enqueueing logic, and new constants for TTL management
packages/world-vercel/src/queue.test.tsComprehensive test suite covering message enqueueing, re-enqueueing scenarios, and backward compatibility
packages/world-vercel/package.jsonUpdated test script and added vitest as a dev dependency
pnpm-lock.yamlLock file updates for vitest dependency addition
.changeset/sad-steaks-burn.mdChangeset documenting the patch-level change
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadpackages/world-vercel/src/queue.ts Outdated
Comment threadpackages/world-vercel/src/queue.ts Outdated
Comment threadpackages/world-vercel/src/queue.ts Outdated
Comment threadpackages/world-vercel/src/queue.test.ts Outdated
Comment threadpackages/world-vercel/src/queue.test.ts Outdated
Comment threadpackages/world-vercel/src/queue.ts
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.

4 participants

@TooTallNate@pranaygp@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

Handle Vercel Queue 24 hour message TTL by re-enqueueing message - #651

Merged
TooTallNate merged 5 commits into
mainfrom
12-18-handle_vercel_queue_24_hour_message_ttl_by_re-enqueueing_message
Dec 19, 2025
Merged

Handle Vercel Queue 24 hour message TTL by re-enqueueing message#651
TooTallNate merged 5 commits into
mainfrom
12-18-handle_vercel_queue_24_hour_message_ttl_by_re-enqueueing_message

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Dec 18, 2025

Copy link
Copy Markdown
Member

Handle Vercel Queue's 24-hour message TTL by automatically re-enqueueing messages that are approaching expiration.

What changed?

  • Added tracking of message age by storing messageQueuedAt timestamp in queue messages
  • Implemented logic to detect when a message is approaching Vercel's 24-hour TTL limit
  • Added automatic re-enqueueing of messages that would expire before their next scheduled processing
  • Updated the queue handler to properly manage message lifetimes

How to test?

  • Run the new test suite with pnpm test in the packages/world-vercel directory
  • The tests verify various scenarios including:
    • Fresh messages being handled normally
    • Old messages being re-enqueued before they expire
    • Proper handling of timeout values
    • Backward compatibility with messages that don't have the messageQueuedAt field

Why make this change?

Vercel Queue has a hard 24-hour TTL for messages. Previously, long-running workflows that used large timeout values could have their messages expire before being processed again. This change ensures that messages are re-enqueued with a fresh TTL before they reach Vercel's 24-hour limit, preventing workflow executions from being lost due to message expiration.

@changeset-bot

changeset-botBot commented Dec 18, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 01b6955

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

This PR includes changesets to release 13 packages
NameType
@workflow/world-vercelPatch
@workflow/cliPatch
@workflow/corePatch
workflowPatch
@workflow/world-testingPatch
@workflow/buildersPatch
@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 Dec 18, 2025

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.039s (-0.8%)1.013s (~)0.974s101.00x
💻 LocalNext.js (Turbopack)0.039s (+9.4% 🔺)1.017s (~)0.978s101.01x
💻 LocalNitro0.041s (-3.9%)1.006s (~)0.965s101.06x
🌐 RedisNext.js (Turbopack)0.043s (+3.9%)1.018s (~)0.975s101.10x
💻 LocalExpress0.043s (~)1.007s (~)0.964s101.11x
🌐 MongoDBNext.js (Turbopack)0.070s (-2.6%)1.017s (~)0.947s101.80x
🌐 TursoNext.js (Turbopack)0.107s (+7.3% 🔺)1.015s (~)0.908s102.75x
🐘 PostgresNitro0.291s (-13.7% 🟢)1.014s (~)0.722s107.47x
🐘 PostgresExpress0.314s (-19.1% 🟢)1.015s (~)0.702s108.05x
🐘 PostgresNext.js (Turbopack)0.351s (+133.4% 🔺)1.018s (~)0.668s108.99x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.524s (+12.5% 🔺)1.477s (+4.8%)0.953s101.00x
▲ VercelNext.js (Turbopack)0.556s (+1.2%)1.462s (-4.9%)0.906s101.06x
▲ VercelExpress0.655s (+24.6% 🔺)1.590s (+14.2% 🔺)0.935s101.25x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.091s (~)2.009s (~)0.918s101.00x
💻 LocalNext.js (Turbopack)1.097s (+1.3%)2.011s (~)0.914s101.01x
🌐 RedisNext.js (Turbopack)1.105s (+0.5%)2.012s (~)0.907s101.01x
💻 LocalNitro1.110s (~)2.006s (~)0.896s101.02x
💻 LocalExpress1.113s (~)2.006s (~)0.893s101.02x
🌐 MongoDBNext.js (Turbopack)1.281s (-1.5%)2.015s (~)0.734s101.17x
🌐 TursoNext.js (Turbopack)1.306s (+0.5%)2.014s (~)0.708s101.20x
🐘 PostgresExpress2.146s (-3.9%)3.017s (~)0.870s101.97x
🐘 PostgresNitro2.148s (-2.0%)3.012s (~)0.863s101.97x
🐘 PostgresNext.js (Turbopack)2.170s (-10.2% 🟢)3.023s (~)0.853s101.99x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.728s (+43.5% 🔺)4.607s (+28.9% 🔺)0.879s101.00x
▲ VercelNext.js (Turbopack)3.818s (+47.4% 🔺)5.292s (+45.4% 🔺)1.473s101.02x
▲ VercelExpress4.387s (+67.7% 🔺)5.317s (+50.7% 🔺)0.929s101.18x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)10.598s (~)11.012s (~)0.414s51.00x
💻 LocalNext.js (Turbopack)10.655s (+1.0%)11.015s (~)0.360s51.01x
🌐 RedisNext.js (Turbopack)10.709s (~)11.017s (~)0.308s51.01x
💻 LocalNitro10.789s (~)11.012s (~)0.222s51.02x
💻 LocalExpress10.792s (~)11.012s (~)0.220s51.02x
🌐 MongoDBNext.js (Turbopack)11.968s (-2.0%)12.228s (-6.1% 🟢)0.260s51.13x
🌐 TursoNext.js (Turbopack)12.187s (~)13.022s (~)0.835s51.15x
🐘 PostgresExpress19.974s (-1.5%)20.438s (-2.8%)0.465s51.88x
🐘 PostgresNitro20.414s (+29.5% 🔺)21.031s (+26.5% 🔺)0.617s51.93x
🐘 PostgresNext.js (Turbopack)20.432s (+32.6% 🔺)21.040s (+31.2% 🔺)0.608s51.93x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express21.787s (+3.4%)22.547s (+4.2%)0.760s51.00x
▲ VercelNext.js (Turbopack)21.933s (+3.9%)22.703s (+3.9%)0.770s51.01x
▲ VercelNitro22.053s (+7.1% 🔺)22.946s (+7.8% 🔺)0.893s51.01x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)1.349s (+0.8%)2.007s (~)0.658s151.00x
🌐 RedisNext.js (Turbopack)1.376s (+1.7%)2.010s (~)0.634s151.02x
💻 LocalNext.js (Turbopack)1.377s (+1.9%)2.012s (~)0.634s151.02x
💻 LocalNitro1.400s (-1.4%)2.005s (~)0.605s151.04x
💻 LocalExpress1.411s (+0.9%)2.006s (~)0.596s151.05x
🐘 PostgresExpress1.972s (-18.7% 🟢)2.412s (-20.0% 🟢)0.440s131.46x
🌐 MongoDBNext.js (Turbopack)2.138s (-1.3%)3.016s (~)0.878s101.58x
🌐 TursoNext.js (Turbopack)2.224s (~)3.015s (~)0.791s101.65x
🐘 PostgresNext.js (Turbopack)2.338s (+10.0% 🔺)3.020s (+29.9% 🔺)0.682s101.73x
🐘 PostgresNitro2.414s (+13.1% 🔺)3.013s (+21.9% 🔺)0.599s101.79x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.972s (+8.4% 🔺)3.833s (+7.6% 🔺)0.861s81.00x
▲ VercelNitro3.090s (+8.6% 🔺)3.920s (+6.9% 🔺)0.830s81.04x
▲ VercelNext.js (Turbopack)3.159s (+7.3% 🔺)3.918s (~)0.759s81.06x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)1.923s (-4.5%)2.628s (+3.1%)0.704s121.00x
💻 LocalNitro2.194s (-0.5%)3.155s (~)0.961s101.14x
💻 LocalExpress2.248s (+1.4%)3.195s (+1.1%)0.947s101.17x
🌐 StarterNext.js (Turbopack)2.481s (+1.3%)3.025s (+0.5%)0.544s101.29x
🌐 RedisNext.js (Turbopack)2.501s (+0.7%)3.012s (~)0.512s101.30x
🐘 PostgresNext.js (Turbopack)2.619s (-4.5%)3.020s (~)0.401s101.36x
🐘 PostgresNitro2.900s (+2.0%)3.220s (+6.9% 🔺)0.320s101.51x
🐘 PostgresExpress2.925s (-0.6%)3.119s (-7.6% 🟢)0.193s101.52x
🌐 MongoDBNext.js (Turbopack)4.650s (+1.0%)5.186s (~)0.536s62.42x
🌐 TursoNext.js (Turbopack)4.671s (~)5.182s (~)0.510s62.43x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.310s (+5.3% 🔺)3.883s (+5.0%)0.573s81.00x
▲ VercelExpress3.462s (-1.0%)4.061s (-4.1%)0.599s81.05x
▲ VercelNext.js (Turbopack)3.614s (+3.7%)4.592s (+12.8% 🔺)0.978s71.09x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🌐 Redis🥇 Next.js (Turbopack)1.367s (~)2.010s (~)0.643s151.00x
🌐 StarterNext.js (Turbopack)1.373s (+2.7%)2.007s (~)0.634s151.00x
💻 LocalNext.js (Turbopack)1.392s (+2.1%)2.011s (~)0.619s151.02x
💻 LocalNitro1.409s (-1.3%)2.005s (~)0.596s151.03x
💻 LocalExpress1.437s (+1.1%)2.006s (~)0.569s151.05x
🐘 PostgresNext.js (Turbopack)1.657s (-3.5%)2.013s (~)0.356s151.21x
🐘 PostgresExpress1.726s (-12.2% 🟢)2.012s (-3.1%)0.286s151.26x
🐘 PostgresNitro2.024s (+20.5% 🔺)2.400s (+19.4% 🔺)0.376s131.48x
🌐 MongoDBNext.js (Turbopack)2.145s (+0.7%)3.013s (~)0.868s101.57x
🌐 TursoNext.js (Turbopack)2.230s (~)3.013s (~)0.783s101.63x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.647s (+1.2%)3.563s (+1.9%)0.917s91.00x
▲ VercelExpress2.727s (+8.3% 🔺)3.614s (+2.4%)0.886s91.03x
▲ VercelNext.js (Turbopack)2.917s (+4.6%)3.779s (-0.6%)0.862s81.10x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Next.js (Turbopack)2.177s (+4.1%)3.141s (+5.4% 🔺)0.964s101.00x
💻 LocalNitro2.217s (-5.1% 🟢)3.162s (-2.5%)0.945s101.02x
💻 LocalExpress2.346s (+1.9%)3.266s (+1.4%)0.920s101.08x
🌐 RedisNext.js (Turbopack)2.470s (-0.8%)3.012s (~)0.542s101.13x
🐘 PostgresExpress2.483s (-14.4% 🟢)3.016s (~)0.533s101.14x
🌐 StarterNext.js (Turbopack)2.537s (+3.3%)3.012s (~)0.475s101.17x
🐘 PostgresNext.js (Turbopack)2.550s (+3.6%)3.026s (~)0.477s101.17x
🐘 PostgresNitro2.743s (~)3.019s (~)0.276s101.26x
🌐 TursoNext.js (Turbopack)4.736s (~)5.187s (~)0.451s62.18x
🌐 MongoDBNext.js (Turbopack)4.790s (+3.4%)5.183s (~)0.393s62.20x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.417s (+13.1% 🔺)4.140s (+11.9% 🔺)0.723s81.00x
▲ VercelNitro3.430s (+13.4% 🔺)4.156s (+13.7% 🔺)0.726s81.00x
▲ VercelExpress4.041s (+33.9% 🔺)4.734s (+30.5% 🔺)0.693s71.18x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🌐 Starter🥇 Next.js (Turbopack)0.132s (+3.6%)1.005s (~)0.000s (+Infinity% 🔺)1.011s (~)0.878s101.00x
💻 LocalNext.js (Turbopack)0.133s (+21.2% 🔺)1.003s (~)0.019s (+16.3% 🔺)1.029s (~)0.896s101.01x
🌐 RedisNext.js (Turbopack)0.150s (+5.1% 🔺)1.005s (~)0.000s (NaN%)1.014s (~)0.863s101.14x
💻 LocalNitro0.175s (-3.5%)0.992s (~)0.015s (-4.5%)1.021s (~)0.846s101.32x
💻 LocalExpress0.178s (+2.5%)0.993s (~)0.017s (-1.8%)1.023s (~)0.845s101.35x
🌐 TursoNext.js (Turbopack)0.462s (-7.3% 🟢)0.990s (+4.1%)0.000s (+Infinity% 🔺)1.013s (~)0.551s103.50x
🌐 MongoDBNext.js (Turbopack)0.481s (-2.9%)0.965s (+1.4%)0.000s (NaN%)1.014s (~)0.533s103.64x
🐘 PostgresExpress1.242s (-47.1% 🟢)1.802s (-33.1% 🟢)0.000s (~)2.016s (-33.2% 🟢)0.773s109.40x
🐘 PostgresNext.js (Turbopack)2.207s (+93.1% 🔺)2.841s (+49.2% 🔺)0.000s (NaN%)3.019s (+49.6% 🔺)0.812s1016.69x
🐘 PostgresNitro2.332s (+60.9% 🔺)2.711s (+62.7% 🔺)0.000s (NaN%)3.014s (+49.8% 🔺)0.682s1017.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.555s (-3.9%)3.159s (-2.8%)0.465s (+98.6% 🔺)4.039s (+3.1%)1.484s101.00x
▲ VercelNitro2.660s (+2.7%)3.251s (+5.6% 🔺)0.239s (-43.8% 🟢)3.938s (+0.9%)1.278s101.04x
▲ VercelExpress2.726s (+9.8% 🔺)3.266s (+7.9% 🔺)0.418s (+49.8% 🔺)4.130s (+11.2% 🔺)1.404s101.07x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNext.js (Turbopack)8/8
🐘 PostgresExpress5/8
▲ VercelNitro4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local8/8
Next.js (Turbopack)🌐 Starter5/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 Dec 18, 2025

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production286011297
✅ 💻 Local Development26208270
✅ 📦 Local Production26208270
✅ 🐘 Local Postgres26208270
✅ 🪟 Windows270027
❌ 🌍 Community Worlds109110120
Total120811351254

❌ Failed Tests

🌍 Community Worlds (11 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (8 failed):

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

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro2601
✅ example2601
✅ express2601
✅ fastify2601
✅ hono2601
✅ nextjs-turbopack2601
✅ nextjs-webpack2601
✅ nitro2601
✅ nuxt2601
✅ sveltekit2601
✅ vite2601
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable2601
✅ express-stable2601
✅ fastify-stable2601
✅ hono-stable2601
✅ nextjs-turbopack-stable2700
✅ nextjs-webpack-stable2700
✅ nitro-stable2601
✅ nuxt-stable2601
✅ sveltekit-stable2601
✅ vite-stable2601
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack2700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb2610
✅ redis-dev300
❌ redis2610
✅ starter-dev300
❌ starter1980
✅ turso-dev300
❌ turso2610

📋 View full workflow run

@TooTallNateGraphite App

TooTallNate commented Dec 18, 2025

Copy link
Copy Markdown
MemberAuthor

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses Vercel Queue's 24-hour message TTL limitation by implementing automatic message re-enqueueing before messages expire. The implementation tracks message age using a messageQueuedAt timestamp and re-enqueues messages that would exceed the TTL before their next scheduled processing.

Key changes:

  • Added message age tracking with messageQueuedAt field in queue messages
  • Implemented logic to detect and re-enqueue messages approaching the 24-hour TTL (with 1-hour buffer)
  • Added comprehensive test suite covering various scenarios including fresh messages, expiring messages, and backward compatibility

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
FileDescription
packages/world-vercel/src/queue.tsCore implementation adding message lifetime tracking, re-enqueueing logic, and new constants for TTL management
packages/world-vercel/src/queue.test.tsComprehensive test suite covering message enqueueing, re-enqueueing scenarios, and backward compatibility
packages/world-vercel/package.jsonUpdated test script and added vitest as a dev dependency
pnpm-lock.yamlLock file updates for vitest dependency addition
.changeset/sad-steaks-burn.mdChangeset documenting the patch-level change
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadpackages/world-vercel/src/queue.ts Outdated
Comment threadpackages/world-vercel/src/queue.ts Outdated
Comment threadpackages/world-vercel/src/queue.ts Outdated
Comment threadpackages/world-vercel/src/queue.test.ts Outdated
Comment threadpackages/world-vercel/src/queue.test.ts Outdated
Comment threadpackages/world-vercel/src/queue.ts
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.

4 participants

@TooTallNate@pranaygp@VaguelySerious