Add end-to-end encryption for workflow user data - #950

Closed
TooTallNate wants to merge 7 commits into
mainfrom
e2e-encryption
Closed

Add end-to-end encryption for workflow user data#950
TooTallNate wants to merge 7 commits into
mainfrom
e2e-encryption

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

This implements AES-256-GCM encryption with per-run key derivation via
HKDF-SHA256 for workflow user data.

Key changes:

  • Add encryption module (packages/world-vercel/src/encryption.ts) with
    createEncryptor() and createEncryptorFromEnv() functions
  • Add Encryptor, EncryptionContext, KeyMaterial interfaces to @workflow/world
  • Make all (de)hydrate* serialization functions async and accept encryptor
  • Add maybeEncrypt/maybeDecrypt helpers with 'encr' format prefix
  • Add getEncryptStream/getDecryptStream transform streams
  • Update runWorkflow() to take world as 4th parameter
  • Update WorkflowOrchestratorContext to include runId and world
  • Integrate encryption into WorkflowServerWritableStream/ReadableStream
  • Update hydrateResourceIO and observability helpers for async + world param
  • Update all test files with mock world and async serialization wrappers
  • Add 18 encryption unit tests covering round-trip, key isolation, tampering

Format: [encr (4 bytes)][nonce (12 bytes)][ciphertext + auth tag]

CopilotAI review requested due to automatic review settings February 5, 2026 16:55
@changeset-bot

changeset-botBot commented Feb 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f95f584

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

This PR includes changesets to release 19 packages
NameType
@workflow/cliPatch
@workflow/corePatch
@workflow/web-sharedPatch
@workflow/world-vercelPatch
@workflow/worldPatch
@workflow/world-testingPatch
workflowPatch
@workflow/buildersPatch
@workflow/docs-typecheckPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@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

@github-actions

github-actionsBot commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.029s (-33.6% 🟢)1.008s (~)0.979s101.00x
💻 LocalNext.js (Turbopack)0.039s (+2.7%)1.017s (~)0.978s101.35x
💻 LocalExpress0.044s (+35.8% 🔺)1.008s (~)0.964s101.54x
🐘 PostgresNitro0.192s (+28.2% 🔺)1.015s (~)0.823s106.71x
🐘 PostgresExpress0.215s (-21.3% 🟢)1.024s (+0.8%)0.808s107.53x
🐘 PostgresNext.js (Turbopack)0.413s (+8.2% 🔺)1.022s (~)0.609s1014.45x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.683s (+6.4% 🔺)1.732s (+5.5% 🔺)1.049s101.00x
▲ VercelNitro0.715s (-5.6% 🟢)1.594s (+6.3% 🔺)0.879s101.05x
▲ VercelNext.js (Turbopack)0.754s (+18.1% 🔺)1.614s (+4.9%)0.860s101.10x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.076s (-3.8%)2.007s (~)0.931s101.00x
💻 LocalNext.js (Turbopack)1.098s (~)2.013s (~)0.915s101.02x
💻 LocalExpress1.116s (+3.5%)2.007s (~)0.892s101.04x
🐘 PostgresNext.js (Turbopack)1.807s (-18.2% 🟢)2.231s (-26.2% 🟢)0.424s101.68x
🐘 PostgresNitro2.338s (-4.3%)3.015s (~)0.677s102.17x
🐘 PostgresExpress2.404s (+10.0% 🔺)3.014s (~)0.610s102.23x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.713s (-5.7% 🟢)3.535s (-4.1%)0.822s101.00x
▲ VercelExpress2.717s (-5.0% 🟢)3.665s (-3.3%)0.948s101.00x
▲ VercelNext.js (Turbopack)2.979s (+0.6%)3.776s (+2.6%)0.797s101.10x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.543s (-3.2%)11.013s (~)0.470s31.00x
💻 LocalNext.js (Turbopack)10.720s (~)11.018s (~)0.299s31.02x
💻 LocalExpress10.835s (+2.8%)11.016s (~)0.180s31.03x
🐘 PostgresNext.js (Turbopack)15.437s (-24.0% 🟢)16.032s (-23.8% 🟢)0.595s21.46x
🐘 PostgresExpress20.410s (~)21.034s (~)0.624s21.94x
🐘 PostgresNitro20.451s (~)21.039s (~)0.588s21.94x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express21.580s (-7.8% 🟢)22.095s (-10.9% 🟢)0.515s21.00x
▲ VercelNitro22.276s (-2.6%)23.400s (-2.0%)1.124s21.03x
▲ VercelNext.js (Turbopack)23.073s (+1.2%)24.038s (+1.4%)0.965s21.07x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro26.737s (-3.3%)27.029s (-3.5%)0.292s31.00x
💻 LocalNext.js (Turbopack)27.188s (~)28.029s (~)0.841s31.02x
💻 LocalExpress27.474s (+2.6%)28.026s (+3.7%)0.552s31.03x
🐘 PostgresNext.js (Turbopack)37.556s (-25.6% 🟢)38.074s (-25.5% 🟢)0.518s21.40x
🐘 PostgresExpress50.300s (~)51.090s (~)0.790s21.88x
🐘 PostgresNitro50.380s (~)51.052s (~)0.672s21.88x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express55.879s (-5.3% 🟢)56.635s (-5.7% 🟢)0.756s21.00x
▲ VercelNitro56.087s (-8.8% 🟢)56.921s (-9.2% 🟢)0.834s21.00x
▲ VercelNext.js (Turbopack)57.272s (-6.7% 🟢)58.153s (-6.8% 🟢)0.882s21.02x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro55.542s (-3.5%)56.027s (-3.5%)0.484s21.00x
💻 LocalNext.js (Turbopack)56.659s (~)57.042s (~)0.383s21.02x
💻 LocalExpress57.077s (+2.4%)57.563s (+2.7%)0.486s21.03x
🐘 PostgresNext.js (Turbopack)73.825s (-26.4% 🟢)74.133s (-26.7% 🟢)0.308s21.33x
🐘 PostgresNitro100.346s (~)101.148s (~)0.802s11.81x
🐘 PostgresExpress100.565s (~)101.086s (+0.9%)0.521s11.81x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro118.368s (-3.2%)118.845s (-3.6%)0.477s11.00x
▲ VercelExpress119.023s (-4.1%)120.008s (-4.0%)0.985s11.01x
▲ VercelNext.js (Turbopack)120.948s (-2.5%)121.732s (-2.2%)0.784s11.02x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.365s (-3.1%)2.006s (~)0.641s151.00x
💻 LocalNext.js (Turbopack)1.393s (~)2.012s (~)0.618s151.02x
💻 LocalExpress1.410s (+3.4%)2.007s (~)0.596s151.03x
🐘 PostgresNext.js (Turbopack)2.125s (-5.6% 🟢)2.746s (-9.0% 🟢)0.621s111.56x
🐘 PostgresExpress2.240s (~)3.013s (~)0.773s101.64x
🐘 PostgresNitro2.492s (+10.6% 🔺)3.013s (~)0.520s101.83x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.131s (-17.4% 🟢)4.218s (-8.6% 🟢)1.087s81.00x
▲ VercelNitro3.393s (+15.4% 🔺)4.340s (+13.2% 🔺)0.948s71.08x
▲ VercelNext.js (Turbopack)3.493s (+4.3%)4.424s (+6.9% 🔺)0.931s71.12x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro2.256s (-13.5% 🟢)3.234s (+7.4% 🔺)0.978s101.00x
💻 LocalNext.js (Turbopack)2.455s (-2.4%)3.038s (+0.7%)0.583s101.09x
💻 LocalExpress2.545s (+13.4% 🔺)3.013s (-6.7% 🟢)0.467s101.13x
🐘 PostgresNitro8.457s (+4.0%)8.799s (~)0.342s43.75x
🐘 PostgresExpress8.915s (-7.5% 🟢)9.323s (-7.4% 🟢)0.408s43.95x
🐘 PostgresNext.js (Turbopack)13.105s (+12.8% 🔺)13.401s (+11.4% 🔺)0.296s35.81x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.225s (-17.6% 🟢)4.000s (-13.3% 🟢)0.774s81.00x
▲ VercelExpress3.567s (+4.0%)4.304s (~)0.737s71.11x
▲ VercelNext.js (Turbopack)3.625s (-1.6%)4.454s (+2.1%)0.829s71.12x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro6.223s (-22.0% 🟢)6.883s (-20.8% 🟢)0.660s51.00x
💻 LocalNext.js (Turbopack)6.782s (+4.8%)8.016s (+11.1% 🔺)1.233s41.09x
💻 LocalExpress7.356s (+23.5% 🔺)8.083s (+22.0% 🔺)0.727s41.18x
🐘 PostgresNitro45.798s (-0.6%)46.223s (-1.9%)0.425s17.36x
🐘 PostgresExpress52.093s (+5.7% 🔺)52.299s (+4.2%)0.206s18.37x
🐘 PostgresNext.js (Turbopack)54.162s (-1.7%)54.294s (-1.7%)0.132s18.70x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.851s (+5.2% 🔺)5.202s (+19.1% 🔺)1.351s61.00x
▲ VercelNitro3.875s (+9.0% 🔺)4.417s (+2.3%)0.542s71.01x
▲ VercelNext.js (Turbopack)4.202s (+22.8% 🔺)5.079s (+25.1% 🔺)0.876s61.09x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.385s (-4.1%)2.006s (~)0.621s151.00x
💻 LocalNext.js (Turbopack)1.417s (-0.9%)2.010s (~)0.593s151.02x
💻 LocalExpress1.437s (+3.8%)2.007s (~)0.570s151.04x
🐘 PostgresNitro2.085s (-3.3%)2.473s (-4.7%)0.388s131.51x
🐘 PostgresExpress2.166s (+3.2%)2.683s (+2.6%)0.518s121.56x
🐘 PostgresNext.js (Turbopack)2.276s (-2.3%)2.937s (~)0.660s111.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.806s (-11.0% 🟢)3.763s (-5.4% 🟢)0.957s81.00x
▲ VercelExpress2.869s (-70.0% 🟢)3.800s (-64.0% 🟢)0.930s81.02x
▲ VercelNext.js (Turbopack)2.955s (-11.2% 🟢)3.785s (-8.0% 🟢)0.830s81.05x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro2.389s (-10.9% 🟢)3.301s (+9.2% 🔺)0.912s101.00x
💻 LocalExpress2.662s (+10.4% 🔺)3.010s (-9.5% 🟢)0.348s101.11x
💻 LocalNext.js (Turbopack)2.769s (+7.1% 🔺)3.116s (+3.2%)0.346s101.16x
🐘 PostgresExpress10.166s (-18.6% 🟢)10.710s (-17.8% 🟢)0.544s34.26x
🐘 PostgresNitro10.658s (+6.1% 🔺)11.038s (+6.5% 🔺)0.380s34.46x
🐘 PostgresNext.js (Turbopack)14.383s (-2.0%)15.059s (~)0.675s26.02x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.892s (-42.2% 🟢)3.825s (-33.8% 🟢)0.933s81.00x
▲ VercelNext.js (Turbopack)2.904s (-40.7% 🟢)3.727s (-33.1% 🟢)0.823s91.00x
▲ VercelNitro2.981s (-79.8% 🟢)3.690s (-76.4% 🟢)0.708s91.03x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro6.686s (-17.1% 🟢)7.588s (-12.2% 🟢)0.901s41.00x
💻 LocalExpress7.676s (+15.6% 🔺)8.622s (+13.7% 🔺)0.945s41.15x
💻 LocalNext.js (Turbopack)8.358s (+13.0% 🔺)9.480s (+17.1% 🔺)1.121s41.25x
🐘 PostgresExpress50.265s (-6.3% 🟢)51.137s (-5.6% 🟢)0.872s17.52x
🐘 PostgresNitro53.655s (+0.6%)54.200s (~)0.545s18.02x
🐘 PostgresNext.js (Turbopack)57.590s (+5.5% 🔺)58.248s (+5.5% 🔺)0.658s18.61x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.515s (-88.9% 🟢)4.155s (-87.4% 🟢)0.640s81.00x
▲ VercelNitro3.740s (-26.3% 🟢)4.286s (-24.3% 🟢)0.546s71.06x
▲ VercelNext.js (Turbopack)3.745s (-77.6% 🟢)4.545s (-73.9% 🟢)0.800s71.07x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.116s (-44.1% 🟢)0.999s (+0.8%)0.011s (-31.1% 🟢)1.018s (-0.6%)0.903s101.00x
💻 LocalNext.js (Turbopack)0.141s (~)1.003s (~)0.016s (-11.8% 🟢)1.026s (~)0.885s101.22x
💻 LocalExpress0.182s (+66.0% 🔺)0.992s (-0.7%)0.014s (+19.1% 🔺)1.020s (~)0.839s101.57x
🐘 PostgresNext.js (Turbopack)0.779s (-67.5% 🟢)0.825s (-68.9% 🟢)0.000s (+Infinity% 🔺)1.016s (-66.4% 🟢)0.237s106.73x
🐘 PostgresNitro2.296s (-0.6%)2.746s (~)0.000s (NaN%)3.016s (~)0.719s1019.85x
🐘 PostgresExpress2.334s (~)2.708s (~)0.000s (-50.0% 🟢)3.016s (~)0.681s1020.18x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.071s (~)3.197s (-1.7%)0.205s (-14.9% 🟢)3.896s (-2.6%)0.825s101.00x
▲ VercelExpress3.071s (+1.8%)3.253s (-2.5%)0.287s (+57.8% 🔺)4.187s (+4.1%)1.116s101.00x
▲ VercelNitro3.153s (+2.6%)3.346s (+0.6%)0.148s (-21.2% 🟢)4.044s (+2.0%)0.891s101.03x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro12/12
🐘 PostgresNext.js (Turbopack)6/12
▲ VercelExpress7/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local10/12
Next.js (Turbopack)💻 Local10/12
Nitro💻 Local10/12
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 Feb 5, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production479038517
✅ 💻 Local Development438032470
✅ 📦 Local Production438032470
✅ 🐘 Local Postgres438032470
✅ 🪟 Windows470047
❌ 🌍 Community Worlds311690200
✅ 📋 Other129012141
Total20001691462315

❌ Failed Tests

🌍 Community Worlds (169 failed)

mongodb (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

redis (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

starter (43 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

turso (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4304
✅ example4304
✅ express4304
✅ fastify4304
✅ hono4304
✅ nextjs-turbopack4601
✅ nextjs-webpack4601
✅ nitro4304
✅ nuxt4304
✅ sveltekit4304
✅ vite4304
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb5420
✅ redis-dev300
❌ redis5420
✅ starter-dev300
❌ starter4430
✅ turso-dev300
❌ turso5420
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4304
✅ e2e-local-postgres-nest-stable4304
✅ e2e-local-prod-nest-stable4304

📋 View full workflow run

@vercel

vercelBot commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

@TooTallNateGraphite App

Copy link
Copy Markdown
MemberAuthor

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

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 implements end-to-end encryption for workflow user data using AES-256-GCM with per-run key derivation via HKDF-SHA256. The implementation requires client-side runId generation to enable encryption before data serialization.

Changes:

  • Added encryption module with AES-256-GCM + HKDF-SHA256 key derivation
  • Converted all (de)hydration serialization functions to async with encryption support
  • Implemented client-side runId generation for encryption context
  • Updated workflow execution, steps, hooks, and observability for async serialization
  • Added comprehensive encryption test coverage (18 unit tests)

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 6 comments.

Show a summary per file
FileDescription
packages/world/src/interfaces.tsAdded Encryptor, EncryptionContext, and KeyMaterial interfaces; extended World interface
packages/world/src/events.tsAdded optional client-provided runId field to run_created event
packages/world-vercel/src/encryption.tsNew encryption implementation with HKDF-based per-run key derivation
packages/world-vercel/src/encryption.test.tsComprehensive test suite for encryption functionality
packages/world-vercel/src/index.tsIntegrated encryptor into Vercel World implementation
packages/core/src/serialization.tsMade all serialization functions async; added encryption/decryption helpers
packages/core/src/serialization.test.tsUpdated test wrappers for async serialization
packages/core/src/workflow.tsAdded world parameter to runWorkflow; updated hydration calls
packages/core/src/workflow.test.tsUpdated test helpers with mock world and async wrappers
packages/core/src/step.tsUpdated step hydration for async operation
packages/core/src/step.test.tsUpdated test helpers with mock world
packages/core/src/workflow/hook.tsUpdated hook payload hydration for async operation
packages/core/src/workflow/hook.test.tsUpdated test helpers with mock world
packages/core/src/runtime/start.tsImplemented client-side runId generation for encryption
packages/core/src/runtime/start.test.tsUpdated mocks to return client-provided runId
packages/core/src/runtime/run.tsUpdated result hydration for async operation
packages/core/src/runtime/resume-hook.tsUpdated hook metadata hydration for async operation
packages/core/src/runtime/step-handler.tsUpdated step I/O serialization for async operation
packages/core/src/runtime/suspension-handler.tsUpdated event creation with async serialization
packages/core/src/runtime.tsPass world instance to runWorkflow
packages/core/src/private.tsAdded runId and world to WorkflowOrchestratorContext
packages/core/src/observability.tsMade hydrateResourceIO async with world parameter
packages/core/src/observability.test.tsUpdated test helpers with mock world
packages/core/src/writable-stream.test.tsRemoved Promise support tests
packages/web-shared/src/api/workflow-server-actions.tsUpdated all hydration calls to async with world parameter
packages/cli/src/lib/inspect/output.tsUpdated all hydration calls to async with world parameter
Comments suppressed due to low confidence (2)

packages/world/src/interfaces.ts:109

  • The Streamer interface still allows runId: string | Promise<string> for writeToStream, writeToStreamMulti, and closeStream, but WorkflowServerWritableStream now only accepts string (line 393). This could cause confusion for World implementations.

Since runId is now always generated client-side before serialization (as required for encryption), the Streamer interface should be updated to only accept string for consistency. World implementations (world-local, world-postgres, world-vercel) may need to be updated to match this stricter type.

 writeToStream(
name: string,
runId: string | Promise<string>,
chunk: string | Uint8Array
): Promise<void>;
/**
* Write multiple chunks to a stream in a single operation.
* This is an optional optimization for world implementations that can
* batch multiple writes efficiently (e.g., single HTTP request for world-vercel).
*
* If not implemented, the caller should fall back to sequential writeToStream() calls.
*
* @param name - The stream name
* @param runId - The run ID (can be a promise)
* @param chunks - Array of chunks to write, in order
*/
writeToStreamMulti?(
name: string,
runId: string | Promise<string>,
chunks: (string | Uint8Array)[]
): Promise<void>;
closeStream(name: string, runId: string | Promise<string>): Promise<void>;

packages/core/src/runtime/start.ts:143

  • The client-generated runId is passed in the event data (line 134) but the server implementations (world-local and world-postgres) check the first parameter of events.create() to decide whether to use a client-provided runId or generate one. Since the client passes null as the first parameter (line 130), the server will ignore the client-provided runId in the event data and generate its own runId.

This means encryption will fail because the client encrypted data with one runId but the server will use a different runId when attempting to decrypt.

The fix should be to pass the client-generated runId as the first argument to events.create() instead of null, or update all server implementations to check data.runId from the event data for run_created events.

 const result = await world.events.create(
null,
{
eventType: 'run_created',
specVersion,
runId, // Pass client-generated runId to server
eventData: {
deploymentId: deploymentId,
workflowName: workflowName,
input: workflowArguments,
executionContext: { traceCarrier, workflowCoreVersion },
},
},
{ v1Compat }
);

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

Comment threadpackages/core/src/workflow/hook.ts Outdated
Comment threadpackages/core/src/workflow/hook.ts Outdated
Comment threadpackages/core/src/step.ts Outdated
Comment threadpackages/world-vercel/src/encryption.ts
Comment threadpackages/world-vercel/src/encryption.ts
Comment threadpackages/world-vercel/src/encryption.ts
Comment threadpackages/core/src/step.ts Outdated
Comment threadpackages/core/src/workflow/hook.ts

@vercelvercelBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Additional Suggestion:

The hydrateWorkflowReturnValue calls use the old function signature (value, ops, runId) but the function signature was changed to (value, runId, encryptor, ops?, global?, extraRevivers?)

Fix on Vercel

This implements AES-256-GCM encryption with per-run key derivation via
HKDF-SHA256 for workflow user data.
Key changes:
- Add encryption module (packages/world-vercel/src/encryption.ts) with
createEncryptor() and createEncryptorFromEnv() functions
- Add Encryptor, EncryptionContext, KeyMaterial interfaces to @workflow/world
- Make all (de)hydrate* serialization functions async and accept encryptor
- Add maybeEncrypt/maybeDecrypt helpers with 'encr' format prefix
- Add getEncryptStream/getDecryptStream transform streams
- Update runWorkflow() to take world as 4th parameter
- Update WorkflowOrchestratorContext to include runId and world
- Integrate encryption into WorkflowServerWritableStream/ReadableStream
- Update hydrateResourceIO and observability helpers for async + world param
- Update all test files with mock world and async serialization wrappers
- Add 18 encryption unit tests covering round-trip, key isolation, tampering
Format: [encr (4 bytes)][nonce (12 bytes)][ciphertext + auth tag]
Signed-off-by: Nathan Rajlich <n@n8.io>
- Add .catch() error handlers to async hydrateStepReturnValue calls in
hook.ts and step.ts to address PR review feedback
- Update all (de)hydrate* function calls to use new async signatures:
- hydrateWorkflowArguments(value, runId, encryptor, global?)
- hydrateWorkflowReturnValue(value, runId, encryptor, ops?, global?)
- hydrateStepReturnValue(value, runId, encryptor, global?)
- Fix TypeScript errors in world-testing and workbench trigger endpoints
- Add changeset for E2E encryption feature
Signed-off-by: Nathan Rajlich <n@n8.io>
The E2E encryption feature requires the client to generate the runId
before serializing workflow arguments (so it can use the runId for
encryption context). Update world-local and world-postgres to use the
client-provided runId from the run_created event data when present,
instead of always generating a new runId server-side.
Signed-off-by: Nathan Rajlich <n@n8.io>
For E2E encryption, the client generates the runId before serializing
workflow arguments. Instead of passing runId inside the event data,
pass it as the first parameter to events.create().
Changes:
- Update Storage.events.create() interface to accept string | null for
run_created events (null = server generates, string = client provided)
- Update start() to pass runId as first argument instead of null
- Remove runId field from RunCreatedEventSchema (no longer needed)
- Simplify world implementations - they use the runId parameter directly
- Update tests to expect runId as first argument
Signed-off-by: Nathan Rajlich <n@n8.io>
Update e2e.test.ts and bench.bench.ts to use the new async
dehydrateWorkflowArguments signature that takes (value, runId,
encryptor, ops) instead of the old (value, ops, runId) order.
Since the tests don't use encryption, we pass an empty string
for runId and an empty object for encryptor.
Signed-off-by: Nathan Rajlich <n@n8.io>

@pranaygppranaygp 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.

Review: PR #950 - Add end-to-end encryption for workflow user data

This appears to be the original monolithic PR that has since been split into a cleaner stack: #978 -> #979 -> #956 -> #957. The split PRs are much easier to review incrementally. I'd recommend closing this in favor of the split stack unless there's a reason to keep it open.

Relationship to other PRs:

  • #955 appears to be an intermediate iteration combining what became #978 + #979
  • The active review stack is: #978 (async serde) -> #979 (Encryptor interface) -> #956 (Vercel AES-256-GCM) -> #957 (wire encryption)

Detailed reviews are on the individual PRs in the stack.

@TooTallNate

Copy link
Copy Markdown
MemberAuthor

Good bot

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.

3 participants

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

Add end-to-end encryption for workflow user data - #950

Closed
TooTallNate wants to merge 7 commits into
mainfrom
e2e-encryption
Closed

Add end-to-end encryption for workflow user data#950
TooTallNate wants to merge 7 commits into
mainfrom
e2e-encryption

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

This implements AES-256-GCM encryption with per-run key derivation via
HKDF-SHA256 for workflow user data.

Key changes:

  • Add encryption module (packages/world-vercel/src/encryption.ts) with
    createEncryptor() and createEncryptorFromEnv() functions
  • Add Encryptor, EncryptionContext, KeyMaterial interfaces to @workflow/world
  • Make all (de)hydrate* serialization functions async and accept encryptor
  • Add maybeEncrypt/maybeDecrypt helpers with 'encr' format prefix
  • Add getEncryptStream/getDecryptStream transform streams
  • Update runWorkflow() to take world as 4th parameter
  • Update WorkflowOrchestratorContext to include runId and world
  • Integrate encryption into WorkflowServerWritableStream/ReadableStream
  • Update hydrateResourceIO and observability helpers for async + world param
  • Update all test files with mock world and async serialization wrappers
  • Add 18 encryption unit tests covering round-trip, key isolation, tampering

Format: [encr (4 bytes)][nonce (12 bytes)][ciphertext + auth tag]

CopilotAI review requested due to automatic review settings February 5, 2026 16:55
@changeset-bot

changeset-botBot commented Feb 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f95f584

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

This PR includes changesets to release 19 packages
NameType
@workflow/cliPatch
@workflow/corePatch
@workflow/web-sharedPatch
@workflow/world-vercelPatch
@workflow/worldPatch
@workflow/world-testingPatch
workflowPatch
@workflow/buildersPatch
@workflow/docs-typecheckPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@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

@github-actions

github-actionsBot commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.029s (-33.6% 🟢)1.008s (~)0.979s101.00x
💻 LocalNext.js (Turbopack)0.039s (+2.7%)1.017s (~)0.978s101.35x
💻 LocalExpress0.044s (+35.8% 🔺)1.008s (~)0.964s101.54x
🐘 PostgresNitro0.192s (+28.2% 🔺)1.015s (~)0.823s106.71x
🐘 PostgresExpress0.215s (-21.3% 🟢)1.024s (+0.8%)0.808s107.53x
🐘 PostgresNext.js (Turbopack)0.413s (+8.2% 🔺)1.022s (~)0.609s1014.45x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.683s (+6.4% 🔺)1.732s (+5.5% 🔺)1.049s101.00x
▲ VercelNitro0.715s (-5.6% 🟢)1.594s (+6.3% 🔺)0.879s101.05x
▲ VercelNext.js (Turbopack)0.754s (+18.1% 🔺)1.614s (+4.9%)0.860s101.10x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.076s (-3.8%)2.007s (~)0.931s101.00x
💻 LocalNext.js (Turbopack)1.098s (~)2.013s (~)0.915s101.02x
💻 LocalExpress1.116s (+3.5%)2.007s (~)0.892s101.04x
🐘 PostgresNext.js (Turbopack)1.807s (-18.2% 🟢)2.231s (-26.2% 🟢)0.424s101.68x
🐘 PostgresNitro2.338s (-4.3%)3.015s (~)0.677s102.17x
🐘 PostgresExpress2.404s (+10.0% 🔺)3.014s (~)0.610s102.23x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.713s (-5.7% 🟢)3.535s (-4.1%)0.822s101.00x
▲ VercelExpress2.717s (-5.0% 🟢)3.665s (-3.3%)0.948s101.00x
▲ VercelNext.js (Turbopack)2.979s (+0.6%)3.776s (+2.6%)0.797s101.10x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.543s (-3.2%)11.013s (~)0.470s31.00x
💻 LocalNext.js (Turbopack)10.720s (~)11.018s (~)0.299s31.02x
💻 LocalExpress10.835s (+2.8%)11.016s (~)0.180s31.03x
🐘 PostgresNext.js (Turbopack)15.437s (-24.0% 🟢)16.032s (-23.8% 🟢)0.595s21.46x
🐘 PostgresExpress20.410s (~)21.034s (~)0.624s21.94x
🐘 PostgresNitro20.451s (~)21.039s (~)0.588s21.94x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express21.580s (-7.8% 🟢)22.095s (-10.9% 🟢)0.515s21.00x
▲ VercelNitro22.276s (-2.6%)23.400s (-2.0%)1.124s21.03x
▲ VercelNext.js (Turbopack)23.073s (+1.2%)24.038s (+1.4%)0.965s21.07x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro26.737s (-3.3%)27.029s (-3.5%)0.292s31.00x
💻 LocalNext.js (Turbopack)27.188s (~)28.029s (~)0.841s31.02x
💻 LocalExpress27.474s (+2.6%)28.026s (+3.7%)0.552s31.03x
🐘 PostgresNext.js (Turbopack)37.556s (-25.6% 🟢)38.074s (-25.5% 🟢)0.518s21.40x
🐘 PostgresExpress50.300s (~)51.090s (~)0.790s21.88x
🐘 PostgresNitro50.380s (~)51.052s (~)0.672s21.88x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express55.879s (-5.3% 🟢)56.635s (-5.7% 🟢)0.756s21.00x
▲ VercelNitro56.087s (-8.8% 🟢)56.921s (-9.2% 🟢)0.834s21.00x
▲ VercelNext.js (Turbopack)57.272s (-6.7% 🟢)58.153s (-6.8% 🟢)0.882s21.02x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro55.542s (-3.5%)56.027s (-3.5%)0.484s21.00x
💻 LocalNext.js (Turbopack)56.659s (~)57.042s (~)0.383s21.02x
💻 LocalExpress57.077s (+2.4%)57.563s (+2.7%)0.486s21.03x
🐘 PostgresNext.js (Turbopack)73.825s (-26.4% 🟢)74.133s (-26.7% 🟢)0.308s21.33x
🐘 PostgresNitro100.346s (~)101.148s (~)0.802s11.81x
🐘 PostgresExpress100.565s (~)101.086s (+0.9%)0.521s11.81x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro118.368s (-3.2%)118.845s (-3.6%)0.477s11.00x
▲ VercelExpress119.023s (-4.1%)120.008s (-4.0%)0.985s11.01x
▲ VercelNext.js (Turbopack)120.948s (-2.5%)121.732s (-2.2%)0.784s11.02x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.365s (-3.1%)2.006s (~)0.641s151.00x
💻 LocalNext.js (Turbopack)1.393s (~)2.012s (~)0.618s151.02x
💻 LocalExpress1.410s (+3.4%)2.007s (~)0.596s151.03x
🐘 PostgresNext.js (Turbopack)2.125s (-5.6% 🟢)2.746s (-9.0% 🟢)0.621s111.56x
🐘 PostgresExpress2.240s (~)3.013s (~)0.773s101.64x
🐘 PostgresNitro2.492s (+10.6% 🔺)3.013s (~)0.520s101.83x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.131s (-17.4% 🟢)4.218s (-8.6% 🟢)1.087s81.00x
▲ VercelNitro3.393s (+15.4% 🔺)4.340s (+13.2% 🔺)0.948s71.08x
▲ VercelNext.js (Turbopack)3.493s (+4.3%)4.424s (+6.9% 🔺)0.931s71.12x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro2.256s (-13.5% 🟢)3.234s (+7.4% 🔺)0.978s101.00x
💻 LocalNext.js (Turbopack)2.455s (-2.4%)3.038s (+0.7%)0.583s101.09x
💻 LocalExpress2.545s (+13.4% 🔺)3.013s (-6.7% 🟢)0.467s101.13x
🐘 PostgresNitro8.457s (+4.0%)8.799s (~)0.342s43.75x
🐘 PostgresExpress8.915s (-7.5% 🟢)9.323s (-7.4% 🟢)0.408s43.95x
🐘 PostgresNext.js (Turbopack)13.105s (+12.8% 🔺)13.401s (+11.4% 🔺)0.296s35.81x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.225s (-17.6% 🟢)4.000s (-13.3% 🟢)0.774s81.00x
▲ VercelExpress3.567s (+4.0%)4.304s (~)0.737s71.11x
▲ VercelNext.js (Turbopack)3.625s (-1.6%)4.454s (+2.1%)0.829s71.12x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro6.223s (-22.0% 🟢)6.883s (-20.8% 🟢)0.660s51.00x
💻 LocalNext.js (Turbopack)6.782s (+4.8%)8.016s (+11.1% 🔺)1.233s41.09x
💻 LocalExpress7.356s (+23.5% 🔺)8.083s (+22.0% 🔺)0.727s41.18x
🐘 PostgresNitro45.798s (-0.6%)46.223s (-1.9%)0.425s17.36x
🐘 PostgresExpress52.093s (+5.7% 🔺)52.299s (+4.2%)0.206s18.37x
🐘 PostgresNext.js (Turbopack)54.162s (-1.7%)54.294s (-1.7%)0.132s18.70x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.851s (+5.2% 🔺)5.202s (+19.1% 🔺)1.351s61.00x
▲ VercelNitro3.875s (+9.0% 🔺)4.417s (+2.3%)0.542s71.01x
▲ VercelNext.js (Turbopack)4.202s (+22.8% 🔺)5.079s (+25.1% 🔺)0.876s61.09x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.385s (-4.1%)2.006s (~)0.621s151.00x
💻 LocalNext.js (Turbopack)1.417s (-0.9%)2.010s (~)0.593s151.02x
💻 LocalExpress1.437s (+3.8%)2.007s (~)0.570s151.04x
🐘 PostgresNitro2.085s (-3.3%)2.473s (-4.7%)0.388s131.51x
🐘 PostgresExpress2.166s (+3.2%)2.683s (+2.6%)0.518s121.56x
🐘 PostgresNext.js (Turbopack)2.276s (-2.3%)2.937s (~)0.660s111.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.806s (-11.0% 🟢)3.763s (-5.4% 🟢)0.957s81.00x
▲ VercelExpress2.869s (-70.0% 🟢)3.800s (-64.0% 🟢)0.930s81.02x
▲ VercelNext.js (Turbopack)2.955s (-11.2% 🟢)3.785s (-8.0% 🟢)0.830s81.05x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro2.389s (-10.9% 🟢)3.301s (+9.2% 🔺)0.912s101.00x
💻 LocalExpress2.662s (+10.4% 🔺)3.010s (-9.5% 🟢)0.348s101.11x
💻 LocalNext.js (Turbopack)2.769s (+7.1% 🔺)3.116s (+3.2%)0.346s101.16x
🐘 PostgresExpress10.166s (-18.6% 🟢)10.710s (-17.8% 🟢)0.544s34.26x
🐘 PostgresNitro10.658s (+6.1% 🔺)11.038s (+6.5% 🔺)0.380s34.46x
🐘 PostgresNext.js (Turbopack)14.383s (-2.0%)15.059s (~)0.675s26.02x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.892s (-42.2% 🟢)3.825s (-33.8% 🟢)0.933s81.00x
▲ VercelNext.js (Turbopack)2.904s (-40.7% 🟢)3.727s (-33.1% 🟢)0.823s91.00x
▲ VercelNitro2.981s (-79.8% 🟢)3.690s (-76.4% 🟢)0.708s91.03x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro6.686s (-17.1% 🟢)7.588s (-12.2% 🟢)0.901s41.00x
💻 LocalExpress7.676s (+15.6% 🔺)8.622s (+13.7% 🔺)0.945s41.15x
💻 LocalNext.js (Turbopack)8.358s (+13.0% 🔺)9.480s (+17.1% 🔺)1.121s41.25x
🐘 PostgresExpress50.265s (-6.3% 🟢)51.137s (-5.6% 🟢)0.872s17.52x
🐘 PostgresNitro53.655s (+0.6%)54.200s (~)0.545s18.02x
🐘 PostgresNext.js (Turbopack)57.590s (+5.5% 🔺)58.248s (+5.5% 🔺)0.658s18.61x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.515s (-88.9% 🟢)4.155s (-87.4% 🟢)0.640s81.00x
▲ VercelNitro3.740s (-26.3% 🟢)4.286s (-24.3% 🟢)0.546s71.06x
▲ VercelNext.js (Turbopack)3.745s (-77.6% 🟢)4.545s (-73.9% 🟢)0.800s71.07x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.116s (-44.1% 🟢)0.999s (+0.8%)0.011s (-31.1% 🟢)1.018s (-0.6%)0.903s101.00x
💻 LocalNext.js (Turbopack)0.141s (~)1.003s (~)0.016s (-11.8% 🟢)1.026s (~)0.885s101.22x
💻 LocalExpress0.182s (+66.0% 🔺)0.992s (-0.7%)0.014s (+19.1% 🔺)1.020s (~)0.839s101.57x
🐘 PostgresNext.js (Turbopack)0.779s (-67.5% 🟢)0.825s (-68.9% 🟢)0.000s (+Infinity% 🔺)1.016s (-66.4% 🟢)0.237s106.73x
🐘 PostgresNitro2.296s (-0.6%)2.746s (~)0.000s (NaN%)3.016s (~)0.719s1019.85x
🐘 PostgresExpress2.334s (~)2.708s (~)0.000s (-50.0% 🟢)3.016s (~)0.681s1020.18x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.071s (~)3.197s (-1.7%)0.205s (-14.9% 🟢)3.896s (-2.6%)0.825s101.00x
▲ VercelExpress3.071s (+1.8%)3.253s (-2.5%)0.287s (+57.8% 🔺)4.187s (+4.1%)1.116s101.00x
▲ VercelNitro3.153s (+2.6%)3.346s (+0.6%)0.148s (-21.2% 🟢)4.044s (+2.0%)0.891s101.03x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro12/12
🐘 PostgresNext.js (Turbopack)6/12
▲ VercelExpress7/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local10/12
Next.js (Turbopack)💻 Local10/12
Nitro💻 Local10/12
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 Feb 5, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production479038517
✅ 💻 Local Development438032470
✅ 📦 Local Production438032470
✅ 🐘 Local Postgres438032470
✅ 🪟 Windows470047
❌ 🌍 Community Worlds311690200
✅ 📋 Other129012141
Total20001691462315

❌ Failed Tests

🌍 Community Worlds (169 failed)

mongodb (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

redis (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

starter (43 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

turso (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4304
✅ example4304
✅ express4304
✅ fastify4304
✅ hono4304
✅ nextjs-turbopack4601
✅ nextjs-webpack4601
✅ nitro4304
✅ nuxt4304
✅ sveltekit4304
✅ vite4304
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb5420
✅ redis-dev300
❌ redis5420
✅ starter-dev300
❌ starter4430
✅ turso-dev300
❌ turso5420
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4304
✅ e2e-local-postgres-nest-stable4304
✅ e2e-local-prod-nest-stable4304

📋 View full workflow run

@vercel

vercelBot commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

@TooTallNateGraphite App

Copy link
Copy Markdown
MemberAuthor

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

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 implements end-to-end encryption for workflow user data using AES-256-GCM with per-run key derivation via HKDF-SHA256. The implementation requires client-side runId generation to enable encryption before data serialization.

Changes:

  • Added encryption module with AES-256-GCM + HKDF-SHA256 key derivation
  • Converted all (de)hydration serialization functions to async with encryption support
  • Implemented client-side runId generation for encryption context
  • Updated workflow execution, steps, hooks, and observability for async serialization
  • Added comprehensive encryption test coverage (18 unit tests)

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 6 comments.

Show a summary per file
FileDescription
packages/world/src/interfaces.tsAdded Encryptor, EncryptionContext, and KeyMaterial interfaces; extended World interface
packages/world/src/events.tsAdded optional client-provided runId field to run_created event
packages/world-vercel/src/encryption.tsNew encryption implementation with HKDF-based per-run key derivation
packages/world-vercel/src/encryption.test.tsComprehensive test suite for encryption functionality
packages/world-vercel/src/index.tsIntegrated encryptor into Vercel World implementation
packages/core/src/serialization.tsMade all serialization functions async; added encryption/decryption helpers
packages/core/src/serialization.test.tsUpdated test wrappers for async serialization
packages/core/src/workflow.tsAdded world parameter to runWorkflow; updated hydration calls
packages/core/src/workflow.test.tsUpdated test helpers with mock world and async wrappers
packages/core/src/step.tsUpdated step hydration for async operation
packages/core/src/step.test.tsUpdated test helpers with mock world
packages/core/src/workflow/hook.tsUpdated hook payload hydration for async operation
packages/core/src/workflow/hook.test.tsUpdated test helpers with mock world
packages/core/src/runtime/start.tsImplemented client-side runId generation for encryption
packages/core/src/runtime/start.test.tsUpdated mocks to return client-provided runId
packages/core/src/runtime/run.tsUpdated result hydration for async operation
packages/core/src/runtime/resume-hook.tsUpdated hook metadata hydration for async operation
packages/core/src/runtime/step-handler.tsUpdated step I/O serialization for async operation
packages/core/src/runtime/suspension-handler.tsUpdated event creation with async serialization
packages/core/src/runtime.tsPass world instance to runWorkflow
packages/core/src/private.tsAdded runId and world to WorkflowOrchestratorContext
packages/core/src/observability.tsMade hydrateResourceIO async with world parameter
packages/core/src/observability.test.tsUpdated test helpers with mock world
packages/core/src/writable-stream.test.tsRemoved Promise support tests
packages/web-shared/src/api/workflow-server-actions.tsUpdated all hydration calls to async with world parameter
packages/cli/src/lib/inspect/output.tsUpdated all hydration calls to async with world parameter
Comments suppressed due to low confidence (2)

packages/world/src/interfaces.ts:109

  • The Streamer interface still allows runId: string | Promise<string> for writeToStream, writeToStreamMulti, and closeStream, but WorkflowServerWritableStream now only accepts string (line 393). This could cause confusion for World implementations.

Since runId is now always generated client-side before serialization (as required for encryption), the Streamer interface should be updated to only accept string for consistency. World implementations (world-local, world-postgres, world-vercel) may need to be updated to match this stricter type.

 writeToStream(
name: string,
runId: string | Promise<string>,
chunk: string | Uint8Array
): Promise<void>;
/**
* Write multiple chunks to a stream in a single operation.
* This is an optional optimization for world implementations that can
* batch multiple writes efficiently (e.g., single HTTP request for world-vercel).
*
* If not implemented, the caller should fall back to sequential writeToStream() calls.
*
* @param name - The stream name
* @param runId - The run ID (can be a promise)
* @param chunks - Array of chunks to write, in order
*/
writeToStreamMulti?(
name: string,
runId: string | Promise<string>,
chunks: (string | Uint8Array)[]
): Promise<void>;
closeStream(name: string, runId: string | Promise<string>): Promise<void>;

packages/core/src/runtime/start.ts:143

  • The client-generated runId is passed in the event data (line 134) but the server implementations (world-local and world-postgres) check the first parameter of events.create() to decide whether to use a client-provided runId or generate one. Since the client passes null as the first parameter (line 130), the server will ignore the client-provided runId in the event data and generate its own runId.

This means encryption will fail because the client encrypted data with one runId but the server will use a different runId when attempting to decrypt.

The fix should be to pass the client-generated runId as the first argument to events.create() instead of null, or update all server implementations to check data.runId from the event data for run_created events.

 const result = await world.events.create(
null,
{
eventType: 'run_created',
specVersion,
runId, // Pass client-generated runId to server
eventData: {
deploymentId: deploymentId,
workflowName: workflowName,
input: workflowArguments,
executionContext: { traceCarrier, workflowCoreVersion },
},
},
{ v1Compat }
);

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

Comment threadpackages/core/src/workflow/hook.ts Outdated
Comment threadpackages/core/src/workflow/hook.ts Outdated
Comment threadpackages/core/src/step.ts Outdated
Comment threadpackages/world-vercel/src/encryption.ts
Comment threadpackages/world-vercel/src/encryption.ts
Comment threadpackages/world-vercel/src/encryption.ts
Comment threadpackages/core/src/step.ts Outdated
Comment threadpackages/core/src/workflow/hook.ts

@vercelvercelBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Additional Suggestion:

The hydrateWorkflowReturnValue calls use the old function signature (value, ops, runId) but the function signature was changed to (value, runId, encryptor, ops?, global?, extraRevivers?)

Fix on Vercel

This implements AES-256-GCM encryption with per-run key derivation via
HKDF-SHA256 for workflow user data.
Key changes:
- Add encryption module (packages/world-vercel/src/encryption.ts) with
createEncryptor() and createEncryptorFromEnv() functions
- Add Encryptor, EncryptionContext, KeyMaterial interfaces to @workflow/world
- Make all (de)hydrate* serialization functions async and accept encryptor
- Add maybeEncrypt/maybeDecrypt helpers with 'encr' format prefix
- Add getEncryptStream/getDecryptStream transform streams
- Update runWorkflow() to take world as 4th parameter
- Update WorkflowOrchestratorContext to include runId and world
- Integrate encryption into WorkflowServerWritableStream/ReadableStream
- Update hydrateResourceIO and observability helpers for async + world param
- Update all test files with mock world and async serialization wrappers
- Add 18 encryption unit tests covering round-trip, key isolation, tampering
Format: [encr (4 bytes)][nonce (12 bytes)][ciphertext + auth tag]
Signed-off-by: Nathan Rajlich <n@n8.io>
- Add .catch() error handlers to async hydrateStepReturnValue calls in
hook.ts and step.ts to address PR review feedback
- Update all (de)hydrate* function calls to use new async signatures:
- hydrateWorkflowArguments(value, runId, encryptor, global?)
- hydrateWorkflowReturnValue(value, runId, encryptor, ops?, global?)
- hydrateStepReturnValue(value, runId, encryptor, global?)
- Fix TypeScript errors in world-testing and workbench trigger endpoints
- Add changeset for E2E encryption feature
Signed-off-by: Nathan Rajlich <n@n8.io>
The E2E encryption feature requires the client to generate the runId
before serializing workflow arguments (so it can use the runId for
encryption context). Update world-local and world-postgres to use the
client-provided runId from the run_created event data when present,
instead of always generating a new runId server-side.
Signed-off-by: Nathan Rajlich <n@n8.io>
For E2E encryption, the client generates the runId before serializing
workflow arguments. Instead of passing runId inside the event data,
pass it as the first parameter to events.create().
Changes:
- Update Storage.events.create() interface to accept string | null for
run_created events (null = server generates, string = client provided)
- Update start() to pass runId as first argument instead of null
- Remove runId field from RunCreatedEventSchema (no longer needed)
- Simplify world implementations - they use the runId parameter directly
- Update tests to expect runId as first argument
Signed-off-by: Nathan Rajlich <n@n8.io>
Update e2e.test.ts and bench.bench.ts to use the new async
dehydrateWorkflowArguments signature that takes (value, runId,
encryptor, ops) instead of the old (value, ops, runId) order.
Since the tests don't use encryption, we pass an empty string
for runId and an empty object for encryptor.
Signed-off-by: Nathan Rajlich <n@n8.io>

@pranaygppranaygp 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.

Review: PR #950 - Add end-to-end encryption for workflow user data

This appears to be the original monolithic PR that has since been split into a cleaner stack: #978 -> #979 -> #956 -> #957. The split PRs are much easier to review incrementally. I'd recommend closing this in favor of the split stack unless there's a reason to keep it open.

Relationship to other PRs:

  • #955 appears to be an intermediate iteration combining what became #978 + #979
  • The active review stack is: #978 (async serde) -> #979 (Encryptor interface) -> #956 (Vercel AES-256-GCM) -> #957 (wire encryption)

Detailed reviews are on the individual PRs in the stack.

@TooTallNate

Copy link
Copy Markdown
MemberAuthor

Good bot

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.

3 participants

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

Add end-to-end encryption for workflow user data - #950

Closed
TooTallNate wants to merge 7 commits into
mainfrom
e2e-encryption
Closed

Add end-to-end encryption for workflow user data#950
TooTallNate wants to merge 7 commits into
mainfrom
e2e-encryption

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

This implements AES-256-GCM encryption with per-run key derivation via
HKDF-SHA256 for workflow user data.

Key changes:

  • Add encryption module (packages/world-vercel/src/encryption.ts) with
    createEncryptor() and createEncryptorFromEnv() functions
  • Add Encryptor, EncryptionContext, KeyMaterial interfaces to @workflow/world
  • Make all (de)hydrate* serialization functions async and accept encryptor
  • Add maybeEncrypt/maybeDecrypt helpers with 'encr' format prefix
  • Add getEncryptStream/getDecryptStream transform streams
  • Update runWorkflow() to take world as 4th parameter
  • Update WorkflowOrchestratorContext to include runId and world
  • Integrate encryption into WorkflowServerWritableStream/ReadableStream
  • Update hydrateResourceIO and observability helpers for async + world param
  • Update all test files with mock world and async serialization wrappers
  • Add 18 encryption unit tests covering round-trip, key isolation, tampering

Format: [encr (4 bytes)][nonce (12 bytes)][ciphertext + auth tag]

CopilotAI review requested due to automatic review settings February 5, 2026 16:55
@changeset-bot

changeset-botBot commented Feb 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f95f584

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

This PR includes changesets to release 19 packages
NameType
@workflow/cliPatch
@workflow/corePatch
@workflow/web-sharedPatch
@workflow/world-vercelPatch
@workflow/worldPatch
@workflow/world-testingPatch
workflowPatch
@workflow/buildersPatch
@workflow/docs-typecheckPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@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

@github-actions

github-actionsBot commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.029s (-33.6% 🟢)1.008s (~)0.979s101.00x
💻 LocalNext.js (Turbopack)0.039s (+2.7%)1.017s (~)0.978s101.35x
💻 LocalExpress0.044s (+35.8% 🔺)1.008s (~)0.964s101.54x
🐘 PostgresNitro0.192s (+28.2% 🔺)1.015s (~)0.823s106.71x
🐘 PostgresExpress0.215s (-21.3% 🟢)1.024s (+0.8%)0.808s107.53x
🐘 PostgresNext.js (Turbopack)0.413s (+8.2% 🔺)1.022s (~)0.609s1014.45x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.683s (+6.4% 🔺)1.732s (+5.5% 🔺)1.049s101.00x
▲ VercelNitro0.715s (-5.6% 🟢)1.594s (+6.3% 🔺)0.879s101.05x
▲ VercelNext.js (Turbopack)0.754s (+18.1% 🔺)1.614s (+4.9%)0.860s101.10x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.076s (-3.8%)2.007s (~)0.931s101.00x
💻 LocalNext.js (Turbopack)1.098s (~)2.013s (~)0.915s101.02x
💻 LocalExpress1.116s (+3.5%)2.007s (~)0.892s101.04x
🐘 PostgresNext.js (Turbopack)1.807s (-18.2% 🟢)2.231s (-26.2% 🟢)0.424s101.68x
🐘 PostgresNitro2.338s (-4.3%)3.015s (~)0.677s102.17x
🐘 PostgresExpress2.404s (+10.0% 🔺)3.014s (~)0.610s102.23x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.713s (-5.7% 🟢)3.535s (-4.1%)0.822s101.00x
▲ VercelExpress2.717s (-5.0% 🟢)3.665s (-3.3%)0.948s101.00x
▲ VercelNext.js (Turbopack)2.979s (+0.6%)3.776s (+2.6%)0.797s101.10x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.543s (-3.2%)11.013s (~)0.470s31.00x
💻 LocalNext.js (Turbopack)10.720s (~)11.018s (~)0.299s31.02x
💻 LocalExpress10.835s (+2.8%)11.016s (~)0.180s31.03x
🐘 PostgresNext.js (Turbopack)15.437s (-24.0% 🟢)16.032s (-23.8% 🟢)0.595s21.46x
🐘 PostgresExpress20.410s (~)21.034s (~)0.624s21.94x
🐘 PostgresNitro20.451s (~)21.039s (~)0.588s21.94x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express21.580s (-7.8% 🟢)22.095s (-10.9% 🟢)0.515s21.00x
▲ VercelNitro22.276s (-2.6%)23.400s (-2.0%)1.124s21.03x
▲ VercelNext.js (Turbopack)23.073s (+1.2%)24.038s (+1.4%)0.965s21.07x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro26.737s (-3.3%)27.029s (-3.5%)0.292s31.00x
💻 LocalNext.js (Turbopack)27.188s (~)28.029s (~)0.841s31.02x
💻 LocalExpress27.474s (+2.6%)28.026s (+3.7%)0.552s31.03x
🐘 PostgresNext.js (Turbopack)37.556s (-25.6% 🟢)38.074s (-25.5% 🟢)0.518s21.40x
🐘 PostgresExpress50.300s (~)51.090s (~)0.790s21.88x
🐘 PostgresNitro50.380s (~)51.052s (~)0.672s21.88x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express55.879s (-5.3% 🟢)56.635s (-5.7% 🟢)0.756s21.00x
▲ VercelNitro56.087s (-8.8% 🟢)56.921s (-9.2% 🟢)0.834s21.00x
▲ VercelNext.js (Turbopack)57.272s (-6.7% 🟢)58.153s (-6.8% 🟢)0.882s21.02x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro55.542s (-3.5%)56.027s (-3.5%)0.484s21.00x
💻 LocalNext.js (Turbopack)56.659s (~)57.042s (~)0.383s21.02x
💻 LocalExpress57.077s (+2.4%)57.563s (+2.7%)0.486s21.03x
🐘 PostgresNext.js (Turbopack)73.825s (-26.4% 🟢)74.133s (-26.7% 🟢)0.308s21.33x
🐘 PostgresNitro100.346s (~)101.148s (~)0.802s11.81x
🐘 PostgresExpress100.565s (~)101.086s (+0.9%)0.521s11.81x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro118.368s (-3.2%)118.845s (-3.6%)0.477s11.00x
▲ VercelExpress119.023s (-4.1%)120.008s (-4.0%)0.985s11.01x
▲ VercelNext.js (Turbopack)120.948s (-2.5%)121.732s (-2.2%)0.784s11.02x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.365s (-3.1%)2.006s (~)0.641s151.00x
💻 LocalNext.js (Turbopack)1.393s (~)2.012s (~)0.618s151.02x
💻 LocalExpress1.410s (+3.4%)2.007s (~)0.596s151.03x
🐘 PostgresNext.js (Turbopack)2.125s (-5.6% 🟢)2.746s (-9.0% 🟢)0.621s111.56x
🐘 PostgresExpress2.240s (~)3.013s (~)0.773s101.64x
🐘 PostgresNitro2.492s (+10.6% 🔺)3.013s (~)0.520s101.83x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.131s (-17.4% 🟢)4.218s (-8.6% 🟢)1.087s81.00x
▲ VercelNitro3.393s (+15.4% 🔺)4.340s (+13.2% 🔺)0.948s71.08x
▲ VercelNext.js (Turbopack)3.493s (+4.3%)4.424s (+6.9% 🔺)0.931s71.12x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro2.256s (-13.5% 🟢)3.234s (+7.4% 🔺)0.978s101.00x
💻 LocalNext.js (Turbopack)2.455s (-2.4%)3.038s (+0.7%)0.583s101.09x
💻 LocalExpress2.545s (+13.4% 🔺)3.013s (-6.7% 🟢)0.467s101.13x
🐘 PostgresNitro8.457s (+4.0%)8.799s (~)0.342s43.75x
🐘 PostgresExpress8.915s (-7.5% 🟢)9.323s (-7.4% 🟢)0.408s43.95x
🐘 PostgresNext.js (Turbopack)13.105s (+12.8% 🔺)13.401s (+11.4% 🔺)0.296s35.81x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.225s (-17.6% 🟢)4.000s (-13.3% 🟢)0.774s81.00x
▲ VercelExpress3.567s (+4.0%)4.304s (~)0.737s71.11x
▲ VercelNext.js (Turbopack)3.625s (-1.6%)4.454s (+2.1%)0.829s71.12x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro6.223s (-22.0% 🟢)6.883s (-20.8% 🟢)0.660s51.00x
💻 LocalNext.js (Turbopack)6.782s (+4.8%)8.016s (+11.1% 🔺)1.233s41.09x
💻 LocalExpress7.356s (+23.5% 🔺)8.083s (+22.0% 🔺)0.727s41.18x
🐘 PostgresNitro45.798s (-0.6%)46.223s (-1.9%)0.425s17.36x
🐘 PostgresExpress52.093s (+5.7% 🔺)52.299s (+4.2%)0.206s18.37x
🐘 PostgresNext.js (Turbopack)54.162s (-1.7%)54.294s (-1.7%)0.132s18.70x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.851s (+5.2% 🔺)5.202s (+19.1% 🔺)1.351s61.00x
▲ VercelNitro3.875s (+9.0% 🔺)4.417s (+2.3%)0.542s71.01x
▲ VercelNext.js (Turbopack)4.202s (+22.8% 🔺)5.079s (+25.1% 🔺)0.876s61.09x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.385s (-4.1%)2.006s (~)0.621s151.00x
💻 LocalNext.js (Turbopack)1.417s (-0.9%)2.010s (~)0.593s151.02x
💻 LocalExpress1.437s (+3.8%)2.007s (~)0.570s151.04x
🐘 PostgresNitro2.085s (-3.3%)2.473s (-4.7%)0.388s131.51x
🐘 PostgresExpress2.166s (+3.2%)2.683s (+2.6%)0.518s121.56x
🐘 PostgresNext.js (Turbopack)2.276s (-2.3%)2.937s (~)0.660s111.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.806s (-11.0% 🟢)3.763s (-5.4% 🟢)0.957s81.00x
▲ VercelExpress2.869s (-70.0% 🟢)3.800s (-64.0% 🟢)0.930s81.02x
▲ VercelNext.js (Turbopack)2.955s (-11.2% 🟢)3.785s (-8.0% 🟢)0.830s81.05x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro2.389s (-10.9% 🟢)3.301s (+9.2% 🔺)0.912s101.00x
💻 LocalExpress2.662s (+10.4% 🔺)3.010s (-9.5% 🟢)0.348s101.11x
💻 LocalNext.js (Turbopack)2.769s (+7.1% 🔺)3.116s (+3.2%)0.346s101.16x
🐘 PostgresExpress10.166s (-18.6% 🟢)10.710s (-17.8% 🟢)0.544s34.26x
🐘 PostgresNitro10.658s (+6.1% 🔺)11.038s (+6.5% 🔺)0.380s34.46x
🐘 PostgresNext.js (Turbopack)14.383s (-2.0%)15.059s (~)0.675s26.02x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.892s (-42.2% 🟢)3.825s (-33.8% 🟢)0.933s81.00x
▲ VercelNext.js (Turbopack)2.904s (-40.7% 🟢)3.727s (-33.1% 🟢)0.823s91.00x
▲ VercelNitro2.981s (-79.8% 🟢)3.690s (-76.4% 🟢)0.708s91.03x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro6.686s (-17.1% 🟢)7.588s (-12.2% 🟢)0.901s41.00x
💻 LocalExpress7.676s (+15.6% 🔺)8.622s (+13.7% 🔺)0.945s41.15x
💻 LocalNext.js (Turbopack)8.358s (+13.0% 🔺)9.480s (+17.1% 🔺)1.121s41.25x
🐘 PostgresExpress50.265s (-6.3% 🟢)51.137s (-5.6% 🟢)0.872s17.52x
🐘 PostgresNitro53.655s (+0.6%)54.200s (~)0.545s18.02x
🐘 PostgresNext.js (Turbopack)57.590s (+5.5% 🔺)58.248s (+5.5% 🔺)0.658s18.61x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.515s (-88.9% 🟢)4.155s (-87.4% 🟢)0.640s81.00x
▲ VercelNitro3.740s (-26.3% 🟢)4.286s (-24.3% 🟢)0.546s71.06x
▲ VercelNext.js (Turbopack)3.745s (-77.6% 🟢)4.545s (-73.9% 🟢)0.800s71.07x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.116s (-44.1% 🟢)0.999s (+0.8%)0.011s (-31.1% 🟢)1.018s (-0.6%)0.903s101.00x
💻 LocalNext.js (Turbopack)0.141s (~)1.003s (~)0.016s (-11.8% 🟢)1.026s (~)0.885s101.22x
💻 LocalExpress0.182s (+66.0% 🔺)0.992s (-0.7%)0.014s (+19.1% 🔺)1.020s (~)0.839s101.57x
🐘 PostgresNext.js (Turbopack)0.779s (-67.5% 🟢)0.825s (-68.9% 🟢)0.000s (+Infinity% 🔺)1.016s (-66.4% 🟢)0.237s106.73x
🐘 PostgresNitro2.296s (-0.6%)2.746s (~)0.000s (NaN%)3.016s (~)0.719s1019.85x
🐘 PostgresExpress2.334s (~)2.708s (~)0.000s (-50.0% 🟢)3.016s (~)0.681s1020.18x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.071s (~)3.197s (-1.7%)0.205s (-14.9% 🟢)3.896s (-2.6%)0.825s101.00x
▲ VercelExpress3.071s (+1.8%)3.253s (-2.5%)0.287s (+57.8% 🔺)4.187s (+4.1%)1.116s101.00x
▲ VercelNitro3.153s (+2.6%)3.346s (+0.6%)0.148s (-21.2% 🟢)4.044s (+2.0%)0.891s101.03x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro12/12
🐘 PostgresNext.js (Turbopack)6/12
▲ VercelExpress7/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local10/12
Next.js (Turbopack)💻 Local10/12
Nitro💻 Local10/12
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 Feb 5, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production479038517
✅ 💻 Local Development438032470
✅ 📦 Local Production438032470
✅ 🐘 Local Postgres438032470
✅ 🪟 Windows470047
❌ 🌍 Community Worlds311690200
✅ 📋 Other129012141
Total20001691462315

❌ Failed Tests

🌍 Community Worlds (169 failed)

mongodb (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

redis (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

starter (43 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

turso (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4304
✅ example4304
✅ express4304
✅ fastify4304
✅ hono4304
✅ nextjs-turbopack4601
✅ nextjs-webpack4601
✅ nitro4304
✅ nuxt4304
✅ sveltekit4304
✅ vite4304
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb5420
✅ redis-dev300
❌ redis5420
✅ starter-dev300
❌ starter4430
✅ turso-dev300
❌ turso5420
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4304
✅ e2e-local-postgres-nest-stable4304
✅ e2e-local-prod-nest-stable4304

📋 View full workflow run

@vercel

vercelBot commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

@TooTallNateGraphite App

Copy link
Copy Markdown
MemberAuthor

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

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 implements end-to-end encryption for workflow user data using AES-256-GCM with per-run key derivation via HKDF-SHA256. The implementation requires client-side runId generation to enable encryption before data serialization.

Changes:

  • Added encryption module with AES-256-GCM + HKDF-SHA256 key derivation
  • Converted all (de)hydration serialization functions to async with encryption support
  • Implemented client-side runId generation for encryption context
  • Updated workflow execution, steps, hooks, and observability for async serialization
  • Added comprehensive encryption test coverage (18 unit tests)

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 6 comments.

Show a summary per file
FileDescription
packages/world/src/interfaces.tsAdded Encryptor, EncryptionContext, and KeyMaterial interfaces; extended World interface
packages/world/src/events.tsAdded optional client-provided runId field to run_created event
packages/world-vercel/src/encryption.tsNew encryption implementation with HKDF-based per-run key derivation
packages/world-vercel/src/encryption.test.tsComprehensive test suite for encryption functionality
packages/world-vercel/src/index.tsIntegrated encryptor into Vercel World implementation
packages/core/src/serialization.tsMade all serialization functions async; added encryption/decryption helpers
packages/core/src/serialization.test.tsUpdated test wrappers for async serialization
packages/core/src/workflow.tsAdded world parameter to runWorkflow; updated hydration calls
packages/core/src/workflow.test.tsUpdated test helpers with mock world and async wrappers
packages/core/src/step.tsUpdated step hydration for async operation
packages/core/src/step.test.tsUpdated test helpers with mock world
packages/core/src/workflow/hook.tsUpdated hook payload hydration for async operation
packages/core/src/workflow/hook.test.tsUpdated test helpers with mock world
packages/core/src/runtime/start.tsImplemented client-side runId generation for encryption
packages/core/src/runtime/start.test.tsUpdated mocks to return client-provided runId
packages/core/src/runtime/run.tsUpdated result hydration for async operation
packages/core/src/runtime/resume-hook.tsUpdated hook metadata hydration for async operation
packages/core/src/runtime/step-handler.tsUpdated step I/O serialization for async operation
packages/core/src/runtime/suspension-handler.tsUpdated event creation with async serialization
packages/core/src/runtime.tsPass world instance to runWorkflow
packages/core/src/private.tsAdded runId and world to WorkflowOrchestratorContext
packages/core/src/observability.tsMade hydrateResourceIO async with world parameter
packages/core/src/observability.test.tsUpdated test helpers with mock world
packages/core/src/writable-stream.test.tsRemoved Promise support tests
packages/web-shared/src/api/workflow-server-actions.tsUpdated all hydration calls to async with world parameter
packages/cli/src/lib/inspect/output.tsUpdated all hydration calls to async with world parameter
Comments suppressed due to low confidence (2)

packages/world/src/interfaces.ts:109

  • The Streamer interface still allows runId: string | Promise<string> for writeToStream, writeToStreamMulti, and closeStream, but WorkflowServerWritableStream now only accepts string (line 393). This could cause confusion for World implementations.

Since runId is now always generated client-side before serialization (as required for encryption), the Streamer interface should be updated to only accept string for consistency. World implementations (world-local, world-postgres, world-vercel) may need to be updated to match this stricter type.

 writeToStream(
name: string,
runId: string | Promise<string>,
chunk: string | Uint8Array
): Promise<void>;
/**
* Write multiple chunks to a stream in a single operation.
* This is an optional optimization for world implementations that can
* batch multiple writes efficiently (e.g., single HTTP request for world-vercel).
*
* If not implemented, the caller should fall back to sequential writeToStream() calls.
*
* @param name - The stream name
* @param runId - The run ID (can be a promise)
* @param chunks - Array of chunks to write, in order
*/
writeToStreamMulti?(
name: string,
runId: string | Promise<string>,
chunks: (string | Uint8Array)[]
): Promise<void>;
closeStream(name: string, runId: string | Promise<string>): Promise<void>;

packages/core/src/runtime/start.ts:143

  • The client-generated runId is passed in the event data (line 134) but the server implementations (world-local and world-postgres) check the first parameter of events.create() to decide whether to use a client-provided runId or generate one. Since the client passes null as the first parameter (line 130), the server will ignore the client-provided runId in the event data and generate its own runId.

This means encryption will fail because the client encrypted data with one runId but the server will use a different runId when attempting to decrypt.

The fix should be to pass the client-generated runId as the first argument to events.create() instead of null, or update all server implementations to check data.runId from the event data for run_created events.

 const result = await world.events.create(
null,
{
eventType: 'run_created',
specVersion,
runId, // Pass client-generated runId to server
eventData: {
deploymentId: deploymentId,
workflowName: workflowName,
input: workflowArguments,
executionContext: { traceCarrier, workflowCoreVersion },
},
},
{ v1Compat }
);

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

Comment threadpackages/core/src/workflow/hook.ts Outdated
Comment threadpackages/core/src/workflow/hook.ts Outdated
Comment threadpackages/core/src/step.ts Outdated
Comment threadpackages/world-vercel/src/encryption.ts
Comment threadpackages/world-vercel/src/encryption.ts
Comment threadpackages/world-vercel/src/encryption.ts
Comment threadpackages/core/src/step.ts Outdated
Comment threadpackages/core/src/workflow/hook.ts

@vercelvercelBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Additional Suggestion:

The hydrateWorkflowReturnValue calls use the old function signature (value, ops, runId) but the function signature was changed to (value, runId, encryptor, ops?, global?, extraRevivers?)

Fix on Vercel

This implements AES-256-GCM encryption with per-run key derivation via
HKDF-SHA256 for workflow user data.
Key changes:
- Add encryption module (packages/world-vercel/src/encryption.ts) with
createEncryptor() and createEncryptorFromEnv() functions
- Add Encryptor, EncryptionContext, KeyMaterial interfaces to @workflow/world
- Make all (de)hydrate* serialization functions async and accept encryptor
- Add maybeEncrypt/maybeDecrypt helpers with 'encr' format prefix
- Add getEncryptStream/getDecryptStream transform streams
- Update runWorkflow() to take world as 4th parameter
- Update WorkflowOrchestratorContext to include runId and world
- Integrate encryption into WorkflowServerWritableStream/ReadableStream
- Update hydrateResourceIO and observability helpers for async + world param
- Update all test files with mock world and async serialization wrappers
- Add 18 encryption unit tests covering round-trip, key isolation, tampering
Format: [encr (4 bytes)][nonce (12 bytes)][ciphertext + auth tag]
Signed-off-by: Nathan Rajlich <n@n8.io>
- Add .catch() error handlers to async hydrateStepReturnValue calls in
hook.ts and step.ts to address PR review feedback
- Update all (de)hydrate* function calls to use new async signatures:
- hydrateWorkflowArguments(value, runId, encryptor, global?)
- hydrateWorkflowReturnValue(value, runId, encryptor, ops?, global?)
- hydrateStepReturnValue(value, runId, encryptor, global?)
- Fix TypeScript errors in world-testing and workbench trigger endpoints
- Add changeset for E2E encryption feature
Signed-off-by: Nathan Rajlich <n@n8.io>
The E2E encryption feature requires the client to generate the runId
before serializing workflow arguments (so it can use the runId for
encryption context). Update world-local and world-postgres to use the
client-provided runId from the run_created event data when present,
instead of always generating a new runId server-side.
Signed-off-by: Nathan Rajlich <n@n8.io>
For E2E encryption, the client generates the runId before serializing
workflow arguments. Instead of passing runId inside the event data,
pass it as the first parameter to events.create().
Changes:
- Update Storage.events.create() interface to accept string | null for
run_created events (null = server generates, string = client provided)
- Update start() to pass runId as first argument instead of null
- Remove runId field from RunCreatedEventSchema (no longer needed)
- Simplify world implementations - they use the runId parameter directly
- Update tests to expect runId as first argument
Signed-off-by: Nathan Rajlich <n@n8.io>
Update e2e.test.ts and bench.bench.ts to use the new async
dehydrateWorkflowArguments signature that takes (value, runId,
encryptor, ops) instead of the old (value, ops, runId) order.
Since the tests don't use encryption, we pass an empty string
for runId and an empty object for encryptor.
Signed-off-by: Nathan Rajlich <n@n8.io>

@pranaygppranaygp 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.

Review: PR #950 - Add end-to-end encryption for workflow user data

This appears to be the original monolithic PR that has since been split into a cleaner stack: #978 -> #979 -> #956 -> #957. The split PRs are much easier to review incrementally. I'd recommend closing this in favor of the split stack unless there's a reason to keep it open.

Relationship to other PRs:

  • #955 appears to be an intermediate iteration combining what became #978 + #979
  • The active review stack is: #978 (async serde) -> #979 (Encryptor interface) -> #956 (Vercel AES-256-GCM) -> #957 (wire encryption)

Detailed reviews are on the individual PRs in the stack.

@TooTallNate

Copy link
Copy Markdown
MemberAuthor

Good bot

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.

3 participants

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

Add end-to-end encryption for workflow user data - #950

Closed
TooTallNate wants to merge 7 commits into
mainfrom
e2e-encryption
Closed

Add end-to-end encryption for workflow user data#950
TooTallNate wants to merge 7 commits into
mainfrom
e2e-encryption

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

This implements AES-256-GCM encryption with per-run key derivation via
HKDF-SHA256 for workflow user data.

Key changes:

  • Add encryption module (packages/world-vercel/src/encryption.ts) with
    createEncryptor() and createEncryptorFromEnv() functions
  • Add Encryptor, EncryptionContext, KeyMaterial interfaces to @workflow/world
  • Make all (de)hydrate* serialization functions async and accept encryptor
  • Add maybeEncrypt/maybeDecrypt helpers with 'encr' format prefix
  • Add getEncryptStream/getDecryptStream transform streams
  • Update runWorkflow() to take world as 4th parameter
  • Update WorkflowOrchestratorContext to include runId and world
  • Integrate encryption into WorkflowServerWritableStream/ReadableStream
  • Update hydrateResourceIO and observability helpers for async + world param
  • Update all test files with mock world and async serialization wrappers
  • Add 18 encryption unit tests covering round-trip, key isolation, tampering

Format: [encr (4 bytes)][nonce (12 bytes)][ciphertext + auth tag]

CopilotAI review requested due to automatic review settings February 5, 2026 16:55
@changeset-bot

changeset-botBot commented Feb 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f95f584

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

This PR includes changesets to release 19 packages
NameType
@workflow/cliPatch
@workflow/corePatch
@workflow/web-sharedPatch
@workflow/world-vercelPatch
@workflow/worldPatch
@workflow/world-testingPatch
workflowPatch
@workflow/buildersPatch
@workflow/docs-typecheckPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@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

@github-actions

github-actionsBot commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.029s (-33.6% 🟢)1.008s (~)0.979s101.00x
💻 LocalNext.js (Turbopack)0.039s (+2.7%)1.017s (~)0.978s101.35x
💻 LocalExpress0.044s (+35.8% 🔺)1.008s (~)0.964s101.54x
🐘 PostgresNitro0.192s (+28.2% 🔺)1.015s (~)0.823s106.71x
🐘 PostgresExpress0.215s (-21.3% 🟢)1.024s (+0.8%)0.808s107.53x
🐘 PostgresNext.js (Turbopack)0.413s (+8.2% 🔺)1.022s (~)0.609s1014.45x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.683s (+6.4% 🔺)1.732s (+5.5% 🔺)1.049s101.00x
▲ VercelNitro0.715s (-5.6% 🟢)1.594s (+6.3% 🔺)0.879s101.05x
▲ VercelNext.js (Turbopack)0.754s (+18.1% 🔺)1.614s (+4.9%)0.860s101.10x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.076s (-3.8%)2.007s (~)0.931s101.00x
💻 LocalNext.js (Turbopack)1.098s (~)2.013s (~)0.915s101.02x
💻 LocalExpress1.116s (+3.5%)2.007s (~)0.892s101.04x
🐘 PostgresNext.js (Turbopack)1.807s (-18.2% 🟢)2.231s (-26.2% 🟢)0.424s101.68x
🐘 PostgresNitro2.338s (-4.3%)3.015s (~)0.677s102.17x
🐘 PostgresExpress2.404s (+10.0% 🔺)3.014s (~)0.610s102.23x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.713s (-5.7% 🟢)3.535s (-4.1%)0.822s101.00x
▲ VercelExpress2.717s (-5.0% 🟢)3.665s (-3.3%)0.948s101.00x
▲ VercelNext.js (Turbopack)2.979s (+0.6%)3.776s (+2.6%)0.797s101.10x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.543s (-3.2%)11.013s (~)0.470s31.00x
💻 LocalNext.js (Turbopack)10.720s (~)11.018s (~)0.299s31.02x
💻 LocalExpress10.835s (+2.8%)11.016s (~)0.180s31.03x
🐘 PostgresNext.js (Turbopack)15.437s (-24.0% 🟢)16.032s (-23.8% 🟢)0.595s21.46x
🐘 PostgresExpress20.410s (~)21.034s (~)0.624s21.94x
🐘 PostgresNitro20.451s (~)21.039s (~)0.588s21.94x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express21.580s (-7.8% 🟢)22.095s (-10.9% 🟢)0.515s21.00x
▲ VercelNitro22.276s (-2.6%)23.400s (-2.0%)1.124s21.03x
▲ VercelNext.js (Turbopack)23.073s (+1.2%)24.038s (+1.4%)0.965s21.07x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro26.737s (-3.3%)27.029s (-3.5%)0.292s31.00x
💻 LocalNext.js (Turbopack)27.188s (~)28.029s (~)0.841s31.02x
💻 LocalExpress27.474s (+2.6%)28.026s (+3.7%)0.552s31.03x
🐘 PostgresNext.js (Turbopack)37.556s (-25.6% 🟢)38.074s (-25.5% 🟢)0.518s21.40x
🐘 PostgresExpress50.300s (~)51.090s (~)0.790s21.88x
🐘 PostgresNitro50.380s (~)51.052s (~)0.672s21.88x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express55.879s (-5.3% 🟢)56.635s (-5.7% 🟢)0.756s21.00x
▲ VercelNitro56.087s (-8.8% 🟢)56.921s (-9.2% 🟢)0.834s21.00x
▲ VercelNext.js (Turbopack)57.272s (-6.7% 🟢)58.153s (-6.8% 🟢)0.882s21.02x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro55.542s (-3.5%)56.027s (-3.5%)0.484s21.00x
💻 LocalNext.js (Turbopack)56.659s (~)57.042s (~)0.383s21.02x
💻 LocalExpress57.077s (+2.4%)57.563s (+2.7%)0.486s21.03x
🐘 PostgresNext.js (Turbopack)73.825s (-26.4% 🟢)74.133s (-26.7% 🟢)0.308s21.33x
🐘 PostgresNitro100.346s (~)101.148s (~)0.802s11.81x
🐘 PostgresExpress100.565s (~)101.086s (+0.9%)0.521s11.81x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro118.368s (-3.2%)118.845s (-3.6%)0.477s11.00x
▲ VercelExpress119.023s (-4.1%)120.008s (-4.0%)0.985s11.01x
▲ VercelNext.js (Turbopack)120.948s (-2.5%)121.732s (-2.2%)0.784s11.02x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.365s (-3.1%)2.006s (~)0.641s151.00x
💻 LocalNext.js (Turbopack)1.393s (~)2.012s (~)0.618s151.02x
💻 LocalExpress1.410s (+3.4%)2.007s (~)0.596s151.03x
🐘 PostgresNext.js (Turbopack)2.125s (-5.6% 🟢)2.746s (-9.0% 🟢)0.621s111.56x
🐘 PostgresExpress2.240s (~)3.013s (~)0.773s101.64x
🐘 PostgresNitro2.492s (+10.6% 🔺)3.013s (~)0.520s101.83x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.131s (-17.4% 🟢)4.218s (-8.6% 🟢)1.087s81.00x
▲ VercelNitro3.393s (+15.4% 🔺)4.340s (+13.2% 🔺)0.948s71.08x
▲ VercelNext.js (Turbopack)3.493s (+4.3%)4.424s (+6.9% 🔺)0.931s71.12x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro2.256s (-13.5% 🟢)3.234s (+7.4% 🔺)0.978s101.00x
💻 LocalNext.js (Turbopack)2.455s (-2.4%)3.038s (+0.7%)0.583s101.09x
💻 LocalExpress2.545s (+13.4% 🔺)3.013s (-6.7% 🟢)0.467s101.13x
🐘 PostgresNitro8.457s (+4.0%)8.799s (~)0.342s43.75x
🐘 PostgresExpress8.915s (-7.5% 🟢)9.323s (-7.4% 🟢)0.408s43.95x
🐘 PostgresNext.js (Turbopack)13.105s (+12.8% 🔺)13.401s (+11.4% 🔺)0.296s35.81x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.225s (-17.6% 🟢)4.000s (-13.3% 🟢)0.774s81.00x
▲ VercelExpress3.567s (+4.0%)4.304s (~)0.737s71.11x
▲ VercelNext.js (Turbopack)3.625s (-1.6%)4.454s (+2.1%)0.829s71.12x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro6.223s (-22.0% 🟢)6.883s (-20.8% 🟢)0.660s51.00x
💻 LocalNext.js (Turbopack)6.782s (+4.8%)8.016s (+11.1% 🔺)1.233s41.09x
💻 LocalExpress7.356s (+23.5% 🔺)8.083s (+22.0% 🔺)0.727s41.18x
🐘 PostgresNitro45.798s (-0.6%)46.223s (-1.9%)0.425s17.36x
🐘 PostgresExpress52.093s (+5.7% 🔺)52.299s (+4.2%)0.206s18.37x
🐘 PostgresNext.js (Turbopack)54.162s (-1.7%)54.294s (-1.7%)0.132s18.70x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.851s (+5.2% 🔺)5.202s (+19.1% 🔺)1.351s61.00x
▲ VercelNitro3.875s (+9.0% 🔺)4.417s (+2.3%)0.542s71.01x
▲ VercelNext.js (Turbopack)4.202s (+22.8% 🔺)5.079s (+25.1% 🔺)0.876s61.09x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.385s (-4.1%)2.006s (~)0.621s151.00x
💻 LocalNext.js (Turbopack)1.417s (-0.9%)2.010s (~)0.593s151.02x
💻 LocalExpress1.437s (+3.8%)2.007s (~)0.570s151.04x
🐘 PostgresNitro2.085s (-3.3%)2.473s (-4.7%)0.388s131.51x
🐘 PostgresExpress2.166s (+3.2%)2.683s (+2.6%)0.518s121.56x
🐘 PostgresNext.js (Turbopack)2.276s (-2.3%)2.937s (~)0.660s111.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.806s (-11.0% 🟢)3.763s (-5.4% 🟢)0.957s81.00x
▲ VercelExpress2.869s (-70.0% 🟢)3.800s (-64.0% 🟢)0.930s81.02x
▲ VercelNext.js (Turbopack)2.955s (-11.2% 🟢)3.785s (-8.0% 🟢)0.830s81.05x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro2.389s (-10.9% 🟢)3.301s (+9.2% 🔺)0.912s101.00x
💻 LocalExpress2.662s (+10.4% 🔺)3.010s (-9.5% 🟢)0.348s101.11x
💻 LocalNext.js (Turbopack)2.769s (+7.1% 🔺)3.116s (+3.2%)0.346s101.16x
🐘 PostgresExpress10.166s (-18.6% 🟢)10.710s (-17.8% 🟢)0.544s34.26x
🐘 PostgresNitro10.658s (+6.1% 🔺)11.038s (+6.5% 🔺)0.380s34.46x
🐘 PostgresNext.js (Turbopack)14.383s (-2.0%)15.059s (~)0.675s26.02x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.892s (-42.2% 🟢)3.825s (-33.8% 🟢)0.933s81.00x
▲ VercelNext.js (Turbopack)2.904s (-40.7% 🟢)3.727s (-33.1% 🟢)0.823s91.00x
▲ VercelNitro2.981s (-79.8% 🟢)3.690s (-76.4% 🟢)0.708s91.03x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro6.686s (-17.1% 🟢)7.588s (-12.2% 🟢)0.901s41.00x
💻 LocalExpress7.676s (+15.6% 🔺)8.622s (+13.7% 🔺)0.945s41.15x
💻 LocalNext.js (Turbopack)8.358s (+13.0% 🔺)9.480s (+17.1% 🔺)1.121s41.25x
🐘 PostgresExpress50.265s (-6.3% 🟢)51.137s (-5.6% 🟢)0.872s17.52x
🐘 PostgresNitro53.655s (+0.6%)54.200s (~)0.545s18.02x
🐘 PostgresNext.js (Turbopack)57.590s (+5.5% 🔺)58.248s (+5.5% 🔺)0.658s18.61x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.515s (-88.9% 🟢)4.155s (-87.4% 🟢)0.640s81.00x
▲ VercelNitro3.740s (-26.3% 🟢)4.286s (-24.3% 🟢)0.546s71.06x
▲ VercelNext.js (Turbopack)3.745s (-77.6% 🟢)4.545s (-73.9% 🟢)0.800s71.07x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.116s (-44.1% 🟢)0.999s (+0.8%)0.011s (-31.1% 🟢)1.018s (-0.6%)0.903s101.00x
💻 LocalNext.js (Turbopack)0.141s (~)1.003s (~)0.016s (-11.8% 🟢)1.026s (~)0.885s101.22x
💻 LocalExpress0.182s (+66.0% 🔺)0.992s (-0.7%)0.014s (+19.1% 🔺)1.020s (~)0.839s101.57x
🐘 PostgresNext.js (Turbopack)0.779s (-67.5% 🟢)0.825s (-68.9% 🟢)0.000s (+Infinity% 🔺)1.016s (-66.4% 🟢)0.237s106.73x
🐘 PostgresNitro2.296s (-0.6%)2.746s (~)0.000s (NaN%)3.016s (~)0.719s1019.85x
🐘 PostgresExpress2.334s (~)2.708s (~)0.000s (-50.0% 🟢)3.016s (~)0.681s1020.18x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.071s (~)3.197s (-1.7%)0.205s (-14.9% 🟢)3.896s (-2.6%)0.825s101.00x
▲ VercelExpress3.071s (+1.8%)3.253s (-2.5%)0.287s (+57.8% 🔺)4.187s (+4.1%)1.116s101.00x
▲ VercelNitro3.153s (+2.6%)3.346s (+0.6%)0.148s (-21.2% 🟢)4.044s (+2.0%)0.891s101.03x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro12/12
🐘 PostgresNext.js (Turbopack)6/12
▲ VercelExpress7/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local10/12
Next.js (Turbopack)💻 Local10/12
Nitro💻 Local10/12
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 Feb 5, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production479038517
✅ 💻 Local Development438032470
✅ 📦 Local Production438032470
✅ 🐘 Local Postgres438032470
✅ 🪟 Windows470047
❌ 🌍 Community Worlds311690200
✅ 📋 Other129012141
Total20001691462315

❌ Failed Tests

🌍 Community Worlds (169 failed)

mongodb (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

redis (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

starter (43 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

turso (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4304
✅ example4304
✅ express4304
✅ fastify4304
✅ hono4304
✅ nextjs-turbopack4601
✅ nextjs-webpack4601
✅ nitro4304
✅ nuxt4304
✅ sveltekit4304
✅ vite4304
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb5420
✅ redis-dev300
❌ redis5420
✅ starter-dev300
❌ starter4430
✅ turso-dev300
❌ turso5420
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4304
✅ e2e-local-postgres-nest-stable4304
✅ e2e-local-prod-nest-stable4304

📋 View full workflow run

@vercel

vercelBot commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

@TooTallNateGraphite App

Copy link
Copy Markdown
MemberAuthor

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

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 implements end-to-end encryption for workflow user data using AES-256-GCM with per-run key derivation via HKDF-SHA256. The implementation requires client-side runId generation to enable encryption before data serialization.

Changes:

  • Added encryption module with AES-256-GCM + HKDF-SHA256 key derivation
  • Converted all (de)hydration serialization functions to async with encryption support
  • Implemented client-side runId generation for encryption context
  • Updated workflow execution, steps, hooks, and observability for async serialization
  • Added comprehensive encryption test coverage (18 unit tests)

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 6 comments.

Show a summary per file
FileDescription
packages/world/src/interfaces.tsAdded Encryptor, EncryptionContext, and KeyMaterial interfaces; extended World interface
packages/world/src/events.tsAdded optional client-provided runId field to run_created event
packages/world-vercel/src/encryption.tsNew encryption implementation with HKDF-based per-run key derivation
packages/world-vercel/src/encryption.test.tsComprehensive test suite for encryption functionality
packages/world-vercel/src/index.tsIntegrated encryptor into Vercel World implementation
packages/core/src/serialization.tsMade all serialization functions async; added encryption/decryption helpers
packages/core/src/serialization.test.tsUpdated test wrappers for async serialization
packages/core/src/workflow.tsAdded world parameter to runWorkflow; updated hydration calls
packages/core/src/workflow.test.tsUpdated test helpers with mock world and async wrappers
packages/core/src/step.tsUpdated step hydration for async operation
packages/core/src/step.test.tsUpdated test helpers with mock world
packages/core/src/workflow/hook.tsUpdated hook payload hydration for async operation
packages/core/src/workflow/hook.test.tsUpdated test helpers with mock world
packages/core/src/runtime/start.tsImplemented client-side runId generation for encryption
packages/core/src/runtime/start.test.tsUpdated mocks to return client-provided runId
packages/core/src/runtime/run.tsUpdated result hydration for async operation
packages/core/src/runtime/resume-hook.tsUpdated hook metadata hydration for async operation
packages/core/src/runtime/step-handler.tsUpdated step I/O serialization for async operation
packages/core/src/runtime/suspension-handler.tsUpdated event creation with async serialization
packages/core/src/runtime.tsPass world instance to runWorkflow
packages/core/src/private.tsAdded runId and world to WorkflowOrchestratorContext
packages/core/src/observability.tsMade hydrateResourceIO async with world parameter
packages/core/src/observability.test.tsUpdated test helpers with mock world
packages/core/src/writable-stream.test.tsRemoved Promise support tests
packages/web-shared/src/api/workflow-server-actions.tsUpdated all hydration calls to async with world parameter
packages/cli/src/lib/inspect/output.tsUpdated all hydration calls to async with world parameter
Comments suppressed due to low confidence (2)

packages/world/src/interfaces.ts:109

  • The Streamer interface still allows runId: string | Promise<string> for writeToStream, writeToStreamMulti, and closeStream, but WorkflowServerWritableStream now only accepts string (line 393). This could cause confusion for World implementations.

Since runId is now always generated client-side before serialization (as required for encryption), the Streamer interface should be updated to only accept string for consistency. World implementations (world-local, world-postgres, world-vercel) may need to be updated to match this stricter type.

 writeToStream(
name: string,
runId: string | Promise<string>,
chunk: string | Uint8Array
): Promise<void>;
/**
* Write multiple chunks to a stream in a single operation.
* This is an optional optimization for world implementations that can
* batch multiple writes efficiently (e.g., single HTTP request for world-vercel).
*
* If not implemented, the caller should fall back to sequential writeToStream() calls.
*
* @param name - The stream name
* @param runId - The run ID (can be a promise)
* @param chunks - Array of chunks to write, in order
*/
writeToStreamMulti?(
name: string,
runId: string | Promise<string>,
chunks: (string | Uint8Array)[]
): Promise<void>;
closeStream(name: string, runId: string | Promise<string>): Promise<void>;

packages/core/src/runtime/start.ts:143

  • The client-generated runId is passed in the event data (line 134) but the server implementations (world-local and world-postgres) check the first parameter of events.create() to decide whether to use a client-provided runId or generate one. Since the client passes null as the first parameter (line 130), the server will ignore the client-provided runId in the event data and generate its own runId.

This means encryption will fail because the client encrypted data with one runId but the server will use a different runId when attempting to decrypt.

The fix should be to pass the client-generated runId as the first argument to events.create() instead of null, or update all server implementations to check data.runId from the event data for run_created events.

 const result = await world.events.create(
null,
{
eventType: 'run_created',
specVersion,
runId, // Pass client-generated runId to server
eventData: {
deploymentId: deploymentId,
workflowName: workflowName,
input: workflowArguments,
executionContext: { traceCarrier, workflowCoreVersion },
},
},
{ v1Compat }
);

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

Comment threadpackages/core/src/workflow/hook.ts Outdated
Comment threadpackages/core/src/workflow/hook.ts Outdated
Comment threadpackages/core/src/step.ts Outdated
Comment threadpackages/world-vercel/src/encryption.ts
Comment threadpackages/world-vercel/src/encryption.ts
Comment threadpackages/world-vercel/src/encryption.ts
Comment threadpackages/core/src/step.ts Outdated
Comment threadpackages/core/src/workflow/hook.ts

@vercelvercelBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Additional Suggestion:

The hydrateWorkflowReturnValue calls use the old function signature (value, ops, runId) but the function signature was changed to (value, runId, encryptor, ops?, global?, extraRevivers?)

Fix on Vercel

This implements AES-256-GCM encryption with per-run key derivation via
HKDF-SHA256 for workflow user data.
Key changes:
- Add encryption module (packages/world-vercel/src/encryption.ts) with
createEncryptor() and createEncryptorFromEnv() functions
- Add Encryptor, EncryptionContext, KeyMaterial interfaces to @workflow/world
- Make all (de)hydrate* serialization functions async and accept encryptor
- Add maybeEncrypt/maybeDecrypt helpers with 'encr' format prefix
- Add getEncryptStream/getDecryptStream transform streams
- Update runWorkflow() to take world as 4th parameter
- Update WorkflowOrchestratorContext to include runId and world
- Integrate encryption into WorkflowServerWritableStream/ReadableStream
- Update hydrateResourceIO and observability helpers for async + world param
- Update all test files with mock world and async serialization wrappers
- Add 18 encryption unit tests covering round-trip, key isolation, tampering
Format: [encr (4 bytes)][nonce (12 bytes)][ciphertext + auth tag]
Signed-off-by: Nathan Rajlich <n@n8.io>
- Add .catch() error handlers to async hydrateStepReturnValue calls in
hook.ts and step.ts to address PR review feedback
- Update all (de)hydrate* function calls to use new async signatures:
- hydrateWorkflowArguments(value, runId, encryptor, global?)
- hydrateWorkflowReturnValue(value, runId, encryptor, ops?, global?)
- hydrateStepReturnValue(value, runId, encryptor, global?)
- Fix TypeScript errors in world-testing and workbench trigger endpoints
- Add changeset for E2E encryption feature
Signed-off-by: Nathan Rajlich <n@n8.io>
The E2E encryption feature requires the client to generate the runId
before serializing workflow arguments (so it can use the runId for
encryption context). Update world-local and world-postgres to use the
client-provided runId from the run_created event data when present,
instead of always generating a new runId server-side.
Signed-off-by: Nathan Rajlich <n@n8.io>
For E2E encryption, the client generates the runId before serializing
workflow arguments. Instead of passing runId inside the event data,
pass it as the first parameter to events.create().
Changes:
- Update Storage.events.create() interface to accept string | null for
run_created events (null = server generates, string = client provided)
- Update start() to pass runId as first argument instead of null
- Remove runId field from RunCreatedEventSchema (no longer needed)
- Simplify world implementations - they use the runId parameter directly
- Update tests to expect runId as first argument
Signed-off-by: Nathan Rajlich <n@n8.io>
Update e2e.test.ts and bench.bench.ts to use the new async
dehydrateWorkflowArguments signature that takes (value, runId,
encryptor, ops) instead of the old (value, ops, runId) order.
Since the tests don't use encryption, we pass an empty string
for runId and an empty object for encryptor.
Signed-off-by: Nathan Rajlich <n@n8.io>

@pranaygppranaygp 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.

Review: PR #950 - Add end-to-end encryption for workflow user data

This appears to be the original monolithic PR that has since been split into a cleaner stack: #978 -> #979 -> #956 -> #957. The split PRs are much easier to review incrementally. I'd recommend closing this in favor of the split stack unless there's a reason to keep it open.

Relationship to other PRs:

  • #955 appears to be an intermediate iteration combining what became #978 + #979
  • The active review stack is: #978 (async serde) -> #979 (Encryptor interface) -> #956 (Vercel AES-256-GCM) -> #957 (wire encryption)

Detailed reviews are on the individual PRs in the stack.

@TooTallNate

Copy link
Copy Markdown
MemberAuthor

Good bot

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.

3 participants

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

Add end-to-end encryption for workflow user data - #950

Closed
TooTallNate wants to merge 7 commits into
mainfrom
e2e-encryption
Closed

Add end-to-end encryption for workflow user data#950
TooTallNate wants to merge 7 commits into
mainfrom
e2e-encryption

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

This implements AES-256-GCM encryption with per-run key derivation via
HKDF-SHA256 for workflow user data.

Key changes:

  • Add encryption module (packages/world-vercel/src/encryption.ts) with
    createEncryptor() and createEncryptorFromEnv() functions
  • Add Encryptor, EncryptionContext, KeyMaterial interfaces to @workflow/world
  • Make all (de)hydrate* serialization functions async and accept encryptor
  • Add maybeEncrypt/maybeDecrypt helpers with 'encr' format prefix
  • Add getEncryptStream/getDecryptStream transform streams
  • Update runWorkflow() to take world as 4th parameter
  • Update WorkflowOrchestratorContext to include runId and world
  • Integrate encryption into WorkflowServerWritableStream/ReadableStream
  • Update hydrateResourceIO and observability helpers for async + world param
  • Update all test files with mock world and async serialization wrappers
  • Add 18 encryption unit tests covering round-trip, key isolation, tampering

Format: [encr (4 bytes)][nonce (12 bytes)][ciphertext + auth tag]

CopilotAI review requested due to automatic review settings February 5, 2026 16:55
@changeset-bot

changeset-botBot commented Feb 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f95f584

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

This PR includes changesets to release 19 packages
NameType
@workflow/cliPatch
@workflow/corePatch
@workflow/web-sharedPatch
@workflow/world-vercelPatch
@workflow/worldPatch
@workflow/world-testingPatch
workflowPatch
@workflow/buildersPatch
@workflow/docs-typecheckPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@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

@github-actions

github-actionsBot commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.029s (-33.6% 🟢)1.008s (~)0.979s101.00x
💻 LocalNext.js (Turbopack)0.039s (+2.7%)1.017s (~)0.978s101.35x
💻 LocalExpress0.044s (+35.8% 🔺)1.008s (~)0.964s101.54x
🐘 PostgresNitro0.192s (+28.2% 🔺)1.015s (~)0.823s106.71x
🐘 PostgresExpress0.215s (-21.3% 🟢)1.024s (+0.8%)0.808s107.53x
🐘 PostgresNext.js (Turbopack)0.413s (+8.2% 🔺)1.022s (~)0.609s1014.45x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.683s (+6.4% 🔺)1.732s (+5.5% 🔺)1.049s101.00x
▲ VercelNitro0.715s (-5.6% 🟢)1.594s (+6.3% 🔺)0.879s101.05x
▲ VercelNext.js (Turbopack)0.754s (+18.1% 🔺)1.614s (+4.9%)0.860s101.10x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.076s (-3.8%)2.007s (~)0.931s101.00x
💻 LocalNext.js (Turbopack)1.098s (~)2.013s (~)0.915s101.02x
💻 LocalExpress1.116s (+3.5%)2.007s (~)0.892s101.04x
🐘 PostgresNext.js (Turbopack)1.807s (-18.2% 🟢)2.231s (-26.2% 🟢)0.424s101.68x
🐘 PostgresNitro2.338s (-4.3%)3.015s (~)0.677s102.17x
🐘 PostgresExpress2.404s (+10.0% 🔺)3.014s (~)0.610s102.23x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.713s (-5.7% 🟢)3.535s (-4.1%)0.822s101.00x
▲ VercelExpress2.717s (-5.0% 🟢)3.665s (-3.3%)0.948s101.00x
▲ VercelNext.js (Turbopack)2.979s (+0.6%)3.776s (+2.6%)0.797s101.10x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.543s (-3.2%)11.013s (~)0.470s31.00x
💻 LocalNext.js (Turbopack)10.720s (~)11.018s (~)0.299s31.02x
💻 LocalExpress10.835s (+2.8%)11.016s (~)0.180s31.03x
🐘 PostgresNext.js (Turbopack)15.437s (-24.0% 🟢)16.032s (-23.8% 🟢)0.595s21.46x
🐘 PostgresExpress20.410s (~)21.034s (~)0.624s21.94x
🐘 PostgresNitro20.451s (~)21.039s (~)0.588s21.94x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express21.580s (-7.8% 🟢)22.095s (-10.9% 🟢)0.515s21.00x
▲ VercelNitro22.276s (-2.6%)23.400s (-2.0%)1.124s21.03x
▲ VercelNext.js (Turbopack)23.073s (+1.2%)24.038s (+1.4%)0.965s21.07x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro26.737s (-3.3%)27.029s (-3.5%)0.292s31.00x
💻 LocalNext.js (Turbopack)27.188s (~)28.029s (~)0.841s31.02x
💻 LocalExpress27.474s (+2.6%)28.026s (+3.7%)0.552s31.03x
🐘 PostgresNext.js (Turbopack)37.556s (-25.6% 🟢)38.074s (-25.5% 🟢)0.518s21.40x
🐘 PostgresExpress50.300s (~)51.090s (~)0.790s21.88x
🐘 PostgresNitro50.380s (~)51.052s (~)0.672s21.88x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express55.879s (-5.3% 🟢)56.635s (-5.7% 🟢)0.756s21.00x
▲ VercelNitro56.087s (-8.8% 🟢)56.921s (-9.2% 🟢)0.834s21.00x
▲ VercelNext.js (Turbopack)57.272s (-6.7% 🟢)58.153s (-6.8% 🟢)0.882s21.02x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro55.542s (-3.5%)56.027s (-3.5%)0.484s21.00x
💻 LocalNext.js (Turbopack)56.659s (~)57.042s (~)0.383s21.02x
💻 LocalExpress57.077s (+2.4%)57.563s (+2.7%)0.486s21.03x
🐘 PostgresNext.js (Turbopack)73.825s (-26.4% 🟢)74.133s (-26.7% 🟢)0.308s21.33x
🐘 PostgresNitro100.346s (~)101.148s (~)0.802s11.81x
🐘 PostgresExpress100.565s (~)101.086s (+0.9%)0.521s11.81x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro118.368s (-3.2%)118.845s (-3.6%)0.477s11.00x
▲ VercelExpress119.023s (-4.1%)120.008s (-4.0%)0.985s11.01x
▲ VercelNext.js (Turbopack)120.948s (-2.5%)121.732s (-2.2%)0.784s11.02x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.365s (-3.1%)2.006s (~)0.641s151.00x
💻 LocalNext.js (Turbopack)1.393s (~)2.012s (~)0.618s151.02x
💻 LocalExpress1.410s (+3.4%)2.007s (~)0.596s151.03x
🐘 PostgresNext.js (Turbopack)2.125s (-5.6% 🟢)2.746s (-9.0% 🟢)0.621s111.56x
🐘 PostgresExpress2.240s (~)3.013s (~)0.773s101.64x
🐘 PostgresNitro2.492s (+10.6% 🔺)3.013s (~)0.520s101.83x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.131s (-17.4% 🟢)4.218s (-8.6% 🟢)1.087s81.00x
▲ VercelNitro3.393s (+15.4% 🔺)4.340s (+13.2% 🔺)0.948s71.08x
▲ VercelNext.js (Turbopack)3.493s (+4.3%)4.424s (+6.9% 🔺)0.931s71.12x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro2.256s (-13.5% 🟢)3.234s (+7.4% 🔺)0.978s101.00x
💻 LocalNext.js (Turbopack)2.455s (-2.4%)3.038s (+0.7%)0.583s101.09x
💻 LocalExpress2.545s (+13.4% 🔺)3.013s (-6.7% 🟢)0.467s101.13x
🐘 PostgresNitro8.457s (+4.0%)8.799s (~)0.342s43.75x
🐘 PostgresExpress8.915s (-7.5% 🟢)9.323s (-7.4% 🟢)0.408s43.95x
🐘 PostgresNext.js (Turbopack)13.105s (+12.8% 🔺)13.401s (+11.4% 🔺)0.296s35.81x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.225s (-17.6% 🟢)4.000s (-13.3% 🟢)0.774s81.00x
▲ VercelExpress3.567s (+4.0%)4.304s (~)0.737s71.11x
▲ VercelNext.js (Turbopack)3.625s (-1.6%)4.454s (+2.1%)0.829s71.12x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro6.223s (-22.0% 🟢)6.883s (-20.8% 🟢)0.660s51.00x
💻 LocalNext.js (Turbopack)6.782s (+4.8%)8.016s (+11.1% 🔺)1.233s41.09x
💻 LocalExpress7.356s (+23.5% 🔺)8.083s (+22.0% 🔺)0.727s41.18x
🐘 PostgresNitro45.798s (-0.6%)46.223s (-1.9%)0.425s17.36x
🐘 PostgresExpress52.093s (+5.7% 🔺)52.299s (+4.2%)0.206s18.37x
🐘 PostgresNext.js (Turbopack)54.162s (-1.7%)54.294s (-1.7%)0.132s18.70x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.851s (+5.2% 🔺)5.202s (+19.1% 🔺)1.351s61.00x
▲ VercelNitro3.875s (+9.0% 🔺)4.417s (+2.3%)0.542s71.01x
▲ VercelNext.js (Turbopack)4.202s (+22.8% 🔺)5.079s (+25.1% 🔺)0.876s61.09x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.385s (-4.1%)2.006s (~)0.621s151.00x
💻 LocalNext.js (Turbopack)1.417s (-0.9%)2.010s (~)0.593s151.02x
💻 LocalExpress1.437s (+3.8%)2.007s (~)0.570s151.04x
🐘 PostgresNitro2.085s (-3.3%)2.473s (-4.7%)0.388s131.51x
🐘 PostgresExpress2.166s (+3.2%)2.683s (+2.6%)0.518s121.56x
🐘 PostgresNext.js (Turbopack)2.276s (-2.3%)2.937s (~)0.660s111.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.806s (-11.0% 🟢)3.763s (-5.4% 🟢)0.957s81.00x
▲ VercelExpress2.869s (-70.0% 🟢)3.800s (-64.0% 🟢)0.930s81.02x
▲ VercelNext.js (Turbopack)2.955s (-11.2% 🟢)3.785s (-8.0% 🟢)0.830s81.05x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro2.389s (-10.9% 🟢)3.301s (+9.2% 🔺)0.912s101.00x
💻 LocalExpress2.662s (+10.4% 🔺)3.010s (-9.5% 🟢)0.348s101.11x
💻 LocalNext.js (Turbopack)2.769s (+7.1% 🔺)3.116s (+3.2%)0.346s101.16x
🐘 PostgresExpress10.166s (-18.6% 🟢)10.710s (-17.8% 🟢)0.544s34.26x
🐘 PostgresNitro10.658s (+6.1% 🔺)11.038s (+6.5% 🔺)0.380s34.46x
🐘 PostgresNext.js (Turbopack)14.383s (-2.0%)15.059s (~)0.675s26.02x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.892s (-42.2% 🟢)3.825s (-33.8% 🟢)0.933s81.00x
▲ VercelNext.js (Turbopack)2.904s (-40.7% 🟢)3.727s (-33.1% 🟢)0.823s91.00x
▲ VercelNitro2.981s (-79.8% 🟢)3.690s (-76.4% 🟢)0.708s91.03x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro6.686s (-17.1% 🟢)7.588s (-12.2% 🟢)0.901s41.00x
💻 LocalExpress7.676s (+15.6% 🔺)8.622s (+13.7% 🔺)0.945s41.15x
💻 LocalNext.js (Turbopack)8.358s (+13.0% 🔺)9.480s (+17.1% 🔺)1.121s41.25x
🐘 PostgresExpress50.265s (-6.3% 🟢)51.137s (-5.6% 🟢)0.872s17.52x
🐘 PostgresNitro53.655s (+0.6%)54.200s (~)0.545s18.02x
🐘 PostgresNext.js (Turbopack)57.590s (+5.5% 🔺)58.248s (+5.5% 🔺)0.658s18.61x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.515s (-88.9% 🟢)4.155s (-87.4% 🟢)0.640s81.00x
▲ VercelNitro3.740s (-26.3% 🟢)4.286s (-24.3% 🟢)0.546s71.06x
▲ VercelNext.js (Turbopack)3.745s (-77.6% 🟢)4.545s (-73.9% 🟢)0.800s71.07x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.116s (-44.1% 🟢)0.999s (+0.8%)0.011s (-31.1% 🟢)1.018s (-0.6%)0.903s101.00x
💻 LocalNext.js (Turbopack)0.141s (~)1.003s (~)0.016s (-11.8% 🟢)1.026s (~)0.885s101.22x
💻 LocalExpress0.182s (+66.0% 🔺)0.992s (-0.7%)0.014s (+19.1% 🔺)1.020s (~)0.839s101.57x
🐘 PostgresNext.js (Turbopack)0.779s (-67.5% 🟢)0.825s (-68.9% 🟢)0.000s (+Infinity% 🔺)1.016s (-66.4% 🟢)0.237s106.73x
🐘 PostgresNitro2.296s (-0.6%)2.746s (~)0.000s (NaN%)3.016s (~)0.719s1019.85x
🐘 PostgresExpress2.334s (~)2.708s (~)0.000s (-50.0% 🟢)3.016s (~)0.681s1020.18x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.071s (~)3.197s (-1.7%)0.205s (-14.9% 🟢)3.896s (-2.6%)0.825s101.00x
▲ VercelExpress3.071s (+1.8%)3.253s (-2.5%)0.287s (+57.8% 🔺)4.187s (+4.1%)1.116s101.00x
▲ VercelNitro3.153s (+2.6%)3.346s (+0.6%)0.148s (-21.2% 🟢)4.044s (+2.0%)0.891s101.03x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro12/12
🐘 PostgresNext.js (Turbopack)6/12
▲ VercelExpress7/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local10/12
Next.js (Turbopack)💻 Local10/12
Nitro💻 Local10/12
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 Feb 5, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production479038517
✅ 💻 Local Development438032470
✅ 📦 Local Production438032470
✅ 🐘 Local Postgres438032470
✅ 🪟 Windows470047
❌ 🌍 Community Worlds311690200
✅ 📋 Other129012141
Total20001691462315

❌ Failed Tests

🌍 Community Worlds (169 failed)

mongodb (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

redis (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

starter (43 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

turso (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4304
✅ example4304
✅ express4304
✅ fastify4304
✅ hono4304
✅ nextjs-turbopack4601
✅ nextjs-webpack4601
✅ nitro4304
✅ nuxt4304
✅ sveltekit4304
✅ vite4304
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb5420
✅ redis-dev300
❌ redis5420
✅ starter-dev300
❌ starter4430
✅ turso-dev300
❌ turso5420
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4304
✅ e2e-local-postgres-nest-stable4304
✅ e2e-local-prod-nest-stable4304

📋 View full workflow run

@vercel

vercelBot commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

@TooTallNateGraphite App

Copy link
Copy Markdown
MemberAuthor

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

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 implements end-to-end encryption for workflow user data using AES-256-GCM with per-run key derivation via HKDF-SHA256. The implementation requires client-side runId generation to enable encryption before data serialization.

Changes:

  • Added encryption module with AES-256-GCM + HKDF-SHA256 key derivation
  • Converted all (de)hydration serialization functions to async with encryption support
  • Implemented client-side runId generation for encryption context
  • Updated workflow execution, steps, hooks, and observability for async serialization
  • Added comprehensive encryption test coverage (18 unit tests)

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 6 comments.

Show a summary per file
FileDescription
packages/world/src/interfaces.tsAdded Encryptor, EncryptionContext, and KeyMaterial interfaces; extended World interface
packages/world/src/events.tsAdded optional client-provided runId field to run_created event
packages/world-vercel/src/encryption.tsNew encryption implementation with HKDF-based per-run key derivation
packages/world-vercel/src/encryption.test.tsComprehensive test suite for encryption functionality
packages/world-vercel/src/index.tsIntegrated encryptor into Vercel World implementation
packages/core/src/serialization.tsMade all serialization functions async; added encryption/decryption helpers
packages/core/src/serialization.test.tsUpdated test wrappers for async serialization
packages/core/src/workflow.tsAdded world parameter to runWorkflow; updated hydration calls
packages/core/src/workflow.test.tsUpdated test helpers with mock world and async wrappers
packages/core/src/step.tsUpdated step hydration for async operation
packages/core/src/step.test.tsUpdated test helpers with mock world
packages/core/src/workflow/hook.tsUpdated hook payload hydration for async operation
packages/core/src/workflow/hook.test.tsUpdated test helpers with mock world
packages/core/src/runtime/start.tsImplemented client-side runId generation for encryption
packages/core/src/runtime/start.test.tsUpdated mocks to return client-provided runId
packages/core/src/runtime/run.tsUpdated result hydration for async operation
packages/core/src/runtime/resume-hook.tsUpdated hook metadata hydration for async operation
packages/core/src/runtime/step-handler.tsUpdated step I/O serialization for async operation
packages/core/src/runtime/suspension-handler.tsUpdated event creation with async serialization
packages/core/src/runtime.tsPass world instance to runWorkflow
packages/core/src/private.tsAdded runId and world to WorkflowOrchestratorContext
packages/core/src/observability.tsMade hydrateResourceIO async with world parameter
packages/core/src/observability.test.tsUpdated test helpers with mock world
packages/core/src/writable-stream.test.tsRemoved Promise support tests
packages/web-shared/src/api/workflow-server-actions.tsUpdated all hydration calls to async with world parameter
packages/cli/src/lib/inspect/output.tsUpdated all hydration calls to async with world parameter
Comments suppressed due to low confidence (2)

packages/world/src/interfaces.ts:109

  • The Streamer interface still allows runId: string | Promise<string> for writeToStream, writeToStreamMulti, and closeStream, but WorkflowServerWritableStream now only accepts string (line 393). This could cause confusion for World implementations.

Since runId is now always generated client-side before serialization (as required for encryption), the Streamer interface should be updated to only accept string for consistency. World implementations (world-local, world-postgres, world-vercel) may need to be updated to match this stricter type.

 writeToStream(
name: string,
runId: string | Promise<string>,
chunk: string | Uint8Array
): Promise<void>;
/**
* Write multiple chunks to a stream in a single operation.
* This is an optional optimization for world implementations that can
* batch multiple writes efficiently (e.g., single HTTP request for world-vercel).
*
* If not implemented, the caller should fall back to sequential writeToStream() calls.
*
* @param name - The stream name
* @param runId - The run ID (can be a promise)
* @param chunks - Array of chunks to write, in order
*/
writeToStreamMulti?(
name: string,
runId: string | Promise<string>,
chunks: (string | Uint8Array)[]
): Promise<void>;
closeStream(name: string, runId: string | Promise<string>): Promise<void>;

packages/core/src/runtime/start.ts:143

  • The client-generated runId is passed in the event data (line 134) but the server implementations (world-local and world-postgres) check the first parameter of events.create() to decide whether to use a client-provided runId or generate one. Since the client passes null as the first parameter (line 130), the server will ignore the client-provided runId in the event data and generate its own runId.

This means encryption will fail because the client encrypted data with one runId but the server will use a different runId when attempting to decrypt.

The fix should be to pass the client-generated runId as the first argument to events.create() instead of null, or update all server implementations to check data.runId from the event data for run_created events.

 const result = await world.events.create(
null,
{
eventType: 'run_created',
specVersion,
runId, // Pass client-generated runId to server
eventData: {
deploymentId: deploymentId,
workflowName: workflowName,
input: workflowArguments,
executionContext: { traceCarrier, workflowCoreVersion },
},
},
{ v1Compat }
);

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

Comment threadpackages/core/src/workflow/hook.ts Outdated
Comment threadpackages/core/src/workflow/hook.ts Outdated
Comment threadpackages/core/src/step.ts Outdated
Comment threadpackages/world-vercel/src/encryption.ts
Comment threadpackages/world-vercel/src/encryption.ts
Comment threadpackages/world-vercel/src/encryption.ts
Comment threadpackages/core/src/step.ts Outdated
Comment threadpackages/core/src/workflow/hook.ts

@vercelvercelBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Additional Suggestion:

The hydrateWorkflowReturnValue calls use the old function signature (value, ops, runId) but the function signature was changed to (value, runId, encryptor, ops?, global?, extraRevivers?)

Fix on Vercel

This implements AES-256-GCM encryption with per-run key derivation via
HKDF-SHA256 for workflow user data.
Key changes:
- Add encryption module (packages/world-vercel/src/encryption.ts) with
createEncryptor() and createEncryptorFromEnv() functions
- Add Encryptor, EncryptionContext, KeyMaterial interfaces to @workflow/world
- Make all (de)hydrate* serialization functions async and accept encryptor
- Add maybeEncrypt/maybeDecrypt helpers with 'encr' format prefix
- Add getEncryptStream/getDecryptStream transform streams
- Update runWorkflow() to take world as 4th parameter
- Update WorkflowOrchestratorContext to include runId and world
- Integrate encryption into WorkflowServerWritableStream/ReadableStream
- Update hydrateResourceIO and observability helpers for async + world param
- Update all test files with mock world and async serialization wrappers
- Add 18 encryption unit tests covering round-trip, key isolation, tampering
Format: [encr (4 bytes)][nonce (12 bytes)][ciphertext + auth tag]
Signed-off-by: Nathan Rajlich <n@n8.io>
- Add .catch() error handlers to async hydrateStepReturnValue calls in
hook.ts and step.ts to address PR review feedback
- Update all (de)hydrate* function calls to use new async signatures:
- hydrateWorkflowArguments(value, runId, encryptor, global?)
- hydrateWorkflowReturnValue(value, runId, encryptor, ops?, global?)
- hydrateStepReturnValue(value, runId, encryptor, global?)
- Fix TypeScript errors in world-testing and workbench trigger endpoints
- Add changeset for E2E encryption feature
Signed-off-by: Nathan Rajlich <n@n8.io>
The E2E encryption feature requires the client to generate the runId
before serializing workflow arguments (so it can use the runId for
encryption context). Update world-local and world-postgres to use the
client-provided runId from the run_created event data when present,
instead of always generating a new runId server-side.
Signed-off-by: Nathan Rajlich <n@n8.io>
For E2E encryption, the client generates the runId before serializing
workflow arguments. Instead of passing runId inside the event data,
pass it as the first parameter to events.create().
Changes:
- Update Storage.events.create() interface to accept string | null for
run_created events (null = server generates, string = client provided)
- Update start() to pass runId as first argument instead of null
- Remove runId field from RunCreatedEventSchema (no longer needed)
- Simplify world implementations - they use the runId parameter directly
- Update tests to expect runId as first argument
Signed-off-by: Nathan Rajlich <n@n8.io>
Update e2e.test.ts and bench.bench.ts to use the new async
dehydrateWorkflowArguments signature that takes (value, runId,
encryptor, ops) instead of the old (value, ops, runId) order.
Since the tests don't use encryption, we pass an empty string
for runId and an empty object for encryptor.
Signed-off-by: Nathan Rajlich <n@n8.io>

@pranaygppranaygp 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.

Review: PR #950 - Add end-to-end encryption for workflow user data

This appears to be the original monolithic PR that has since been split into a cleaner stack: #978 -> #979 -> #956 -> #957. The split PRs are much easier to review incrementally. I'd recommend closing this in favor of the split stack unless there's a reason to keep it open.

Relationship to other PRs:

  • #955 appears to be an intermediate iteration combining what became #978 + #979
  • The active review stack is: #978 (async serde) -> #979 (Encryptor interface) -> #956 (Vercel AES-256-GCM) -> #957 (wire encryption)

Detailed reviews are on the individual PRs in the stack.

@TooTallNate

Copy link
Copy Markdown
MemberAuthor

Good bot

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.

3 participants

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

Add end-to-end encryption for workflow user data - #950

Closed
TooTallNate wants to merge 7 commits into
mainfrom
e2e-encryption
Closed

Add end-to-end encryption for workflow user data#950
TooTallNate wants to merge 7 commits into
mainfrom
e2e-encryption

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

This implements AES-256-GCM encryption with per-run key derivation via
HKDF-SHA256 for workflow user data.

Key changes:

  • Add encryption module (packages/world-vercel/src/encryption.ts) with
    createEncryptor() and createEncryptorFromEnv() functions
  • Add Encryptor, EncryptionContext, KeyMaterial interfaces to @workflow/world
  • Make all (de)hydrate* serialization functions async and accept encryptor
  • Add maybeEncrypt/maybeDecrypt helpers with 'encr' format prefix
  • Add getEncryptStream/getDecryptStream transform streams
  • Update runWorkflow() to take world as 4th parameter
  • Update WorkflowOrchestratorContext to include runId and world
  • Integrate encryption into WorkflowServerWritableStream/ReadableStream
  • Update hydrateResourceIO and observability helpers for async + world param
  • Update all test files with mock world and async serialization wrappers
  • Add 18 encryption unit tests covering round-trip, key isolation, tampering

Format: [encr (4 bytes)][nonce (12 bytes)][ciphertext + auth tag]

CopilotAI review requested due to automatic review settings February 5, 2026 16:55
@changeset-bot

changeset-botBot commented Feb 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f95f584

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

This PR includes changesets to release 19 packages
NameType
@workflow/cliPatch
@workflow/corePatch
@workflow/web-sharedPatch
@workflow/world-vercelPatch
@workflow/worldPatch
@workflow/world-testingPatch
workflowPatch
@workflow/buildersPatch
@workflow/docs-typecheckPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@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

@github-actions

github-actionsBot commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.029s (-33.6% 🟢)1.008s (~)0.979s101.00x
💻 LocalNext.js (Turbopack)0.039s (+2.7%)1.017s (~)0.978s101.35x
💻 LocalExpress0.044s (+35.8% 🔺)1.008s (~)0.964s101.54x
🐘 PostgresNitro0.192s (+28.2% 🔺)1.015s (~)0.823s106.71x
🐘 PostgresExpress0.215s (-21.3% 🟢)1.024s (+0.8%)0.808s107.53x
🐘 PostgresNext.js (Turbopack)0.413s (+8.2% 🔺)1.022s (~)0.609s1014.45x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.683s (+6.4% 🔺)1.732s (+5.5% 🔺)1.049s101.00x
▲ VercelNitro0.715s (-5.6% 🟢)1.594s (+6.3% 🔺)0.879s101.05x
▲ VercelNext.js (Turbopack)0.754s (+18.1% 🔺)1.614s (+4.9%)0.860s101.10x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.076s (-3.8%)2.007s (~)0.931s101.00x
💻 LocalNext.js (Turbopack)1.098s (~)2.013s (~)0.915s101.02x
💻 LocalExpress1.116s (+3.5%)2.007s (~)0.892s101.04x
🐘 PostgresNext.js (Turbopack)1.807s (-18.2% 🟢)2.231s (-26.2% 🟢)0.424s101.68x
🐘 PostgresNitro2.338s (-4.3%)3.015s (~)0.677s102.17x
🐘 PostgresExpress2.404s (+10.0% 🔺)3.014s (~)0.610s102.23x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.713s (-5.7% 🟢)3.535s (-4.1%)0.822s101.00x
▲ VercelExpress2.717s (-5.0% 🟢)3.665s (-3.3%)0.948s101.00x
▲ VercelNext.js (Turbopack)2.979s (+0.6%)3.776s (+2.6%)0.797s101.10x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.543s (-3.2%)11.013s (~)0.470s31.00x
💻 LocalNext.js (Turbopack)10.720s (~)11.018s (~)0.299s31.02x
💻 LocalExpress10.835s (+2.8%)11.016s (~)0.180s31.03x
🐘 PostgresNext.js (Turbopack)15.437s (-24.0% 🟢)16.032s (-23.8% 🟢)0.595s21.46x
🐘 PostgresExpress20.410s (~)21.034s (~)0.624s21.94x
🐘 PostgresNitro20.451s (~)21.039s (~)0.588s21.94x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express21.580s (-7.8% 🟢)22.095s (-10.9% 🟢)0.515s21.00x
▲ VercelNitro22.276s (-2.6%)23.400s (-2.0%)1.124s21.03x
▲ VercelNext.js (Turbopack)23.073s (+1.2%)24.038s (+1.4%)0.965s21.07x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro26.737s (-3.3%)27.029s (-3.5%)0.292s31.00x
💻 LocalNext.js (Turbopack)27.188s (~)28.029s (~)0.841s31.02x
💻 LocalExpress27.474s (+2.6%)28.026s (+3.7%)0.552s31.03x
🐘 PostgresNext.js (Turbopack)37.556s (-25.6% 🟢)38.074s (-25.5% 🟢)0.518s21.40x
🐘 PostgresExpress50.300s (~)51.090s (~)0.790s21.88x
🐘 PostgresNitro50.380s (~)51.052s (~)0.672s21.88x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express55.879s (-5.3% 🟢)56.635s (-5.7% 🟢)0.756s21.00x
▲ VercelNitro56.087s (-8.8% 🟢)56.921s (-9.2% 🟢)0.834s21.00x
▲ VercelNext.js (Turbopack)57.272s (-6.7% 🟢)58.153s (-6.8% 🟢)0.882s21.02x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro55.542s (-3.5%)56.027s (-3.5%)0.484s21.00x
💻 LocalNext.js (Turbopack)56.659s (~)57.042s (~)0.383s21.02x
💻 LocalExpress57.077s (+2.4%)57.563s (+2.7%)0.486s21.03x
🐘 PostgresNext.js (Turbopack)73.825s (-26.4% 🟢)74.133s (-26.7% 🟢)0.308s21.33x
🐘 PostgresNitro100.346s (~)101.148s (~)0.802s11.81x
🐘 PostgresExpress100.565s (~)101.086s (+0.9%)0.521s11.81x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro118.368s (-3.2%)118.845s (-3.6%)0.477s11.00x
▲ VercelExpress119.023s (-4.1%)120.008s (-4.0%)0.985s11.01x
▲ VercelNext.js (Turbopack)120.948s (-2.5%)121.732s (-2.2%)0.784s11.02x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.365s (-3.1%)2.006s (~)0.641s151.00x
💻 LocalNext.js (Turbopack)1.393s (~)2.012s (~)0.618s151.02x
💻 LocalExpress1.410s (+3.4%)2.007s (~)0.596s151.03x
🐘 PostgresNext.js (Turbopack)2.125s (-5.6% 🟢)2.746s (-9.0% 🟢)0.621s111.56x
🐘 PostgresExpress2.240s (~)3.013s (~)0.773s101.64x
🐘 PostgresNitro2.492s (+10.6% 🔺)3.013s (~)0.520s101.83x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.131s (-17.4% 🟢)4.218s (-8.6% 🟢)1.087s81.00x
▲ VercelNitro3.393s (+15.4% 🔺)4.340s (+13.2% 🔺)0.948s71.08x
▲ VercelNext.js (Turbopack)3.493s (+4.3%)4.424s (+6.9% 🔺)0.931s71.12x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro2.256s (-13.5% 🟢)3.234s (+7.4% 🔺)0.978s101.00x
💻 LocalNext.js (Turbopack)2.455s (-2.4%)3.038s (+0.7%)0.583s101.09x
💻 LocalExpress2.545s (+13.4% 🔺)3.013s (-6.7% 🟢)0.467s101.13x
🐘 PostgresNitro8.457s (+4.0%)8.799s (~)0.342s43.75x
🐘 PostgresExpress8.915s (-7.5% 🟢)9.323s (-7.4% 🟢)0.408s43.95x
🐘 PostgresNext.js (Turbopack)13.105s (+12.8% 🔺)13.401s (+11.4% 🔺)0.296s35.81x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.225s (-17.6% 🟢)4.000s (-13.3% 🟢)0.774s81.00x
▲ VercelExpress3.567s (+4.0%)4.304s (~)0.737s71.11x
▲ VercelNext.js (Turbopack)3.625s (-1.6%)4.454s (+2.1%)0.829s71.12x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro6.223s (-22.0% 🟢)6.883s (-20.8% 🟢)0.660s51.00x
💻 LocalNext.js (Turbopack)6.782s (+4.8%)8.016s (+11.1% 🔺)1.233s41.09x
💻 LocalExpress7.356s (+23.5% 🔺)8.083s (+22.0% 🔺)0.727s41.18x
🐘 PostgresNitro45.798s (-0.6%)46.223s (-1.9%)0.425s17.36x
🐘 PostgresExpress52.093s (+5.7% 🔺)52.299s (+4.2%)0.206s18.37x
🐘 PostgresNext.js (Turbopack)54.162s (-1.7%)54.294s (-1.7%)0.132s18.70x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.851s (+5.2% 🔺)5.202s (+19.1% 🔺)1.351s61.00x
▲ VercelNitro3.875s (+9.0% 🔺)4.417s (+2.3%)0.542s71.01x
▲ VercelNext.js (Turbopack)4.202s (+22.8% 🔺)5.079s (+25.1% 🔺)0.876s61.09x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.385s (-4.1%)2.006s (~)0.621s151.00x
💻 LocalNext.js (Turbopack)1.417s (-0.9%)2.010s (~)0.593s151.02x
💻 LocalExpress1.437s (+3.8%)2.007s (~)0.570s151.04x
🐘 PostgresNitro2.085s (-3.3%)2.473s (-4.7%)0.388s131.51x
🐘 PostgresExpress2.166s (+3.2%)2.683s (+2.6%)0.518s121.56x
🐘 PostgresNext.js (Turbopack)2.276s (-2.3%)2.937s (~)0.660s111.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.806s (-11.0% 🟢)3.763s (-5.4% 🟢)0.957s81.00x
▲ VercelExpress2.869s (-70.0% 🟢)3.800s (-64.0% 🟢)0.930s81.02x
▲ VercelNext.js (Turbopack)2.955s (-11.2% 🟢)3.785s (-8.0% 🟢)0.830s81.05x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro2.389s (-10.9% 🟢)3.301s (+9.2% 🔺)0.912s101.00x
💻 LocalExpress2.662s (+10.4% 🔺)3.010s (-9.5% 🟢)0.348s101.11x
💻 LocalNext.js (Turbopack)2.769s (+7.1% 🔺)3.116s (+3.2%)0.346s101.16x
🐘 PostgresExpress10.166s (-18.6% 🟢)10.710s (-17.8% 🟢)0.544s34.26x
🐘 PostgresNitro10.658s (+6.1% 🔺)11.038s (+6.5% 🔺)0.380s34.46x
🐘 PostgresNext.js (Turbopack)14.383s (-2.0%)15.059s (~)0.675s26.02x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.892s (-42.2% 🟢)3.825s (-33.8% 🟢)0.933s81.00x
▲ VercelNext.js (Turbopack)2.904s (-40.7% 🟢)3.727s (-33.1% 🟢)0.823s91.00x
▲ VercelNitro2.981s (-79.8% 🟢)3.690s (-76.4% 🟢)0.708s91.03x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro6.686s (-17.1% 🟢)7.588s (-12.2% 🟢)0.901s41.00x
💻 LocalExpress7.676s (+15.6% 🔺)8.622s (+13.7% 🔺)0.945s41.15x
💻 LocalNext.js (Turbopack)8.358s (+13.0% 🔺)9.480s (+17.1% 🔺)1.121s41.25x
🐘 PostgresExpress50.265s (-6.3% 🟢)51.137s (-5.6% 🟢)0.872s17.52x
🐘 PostgresNitro53.655s (+0.6%)54.200s (~)0.545s18.02x
🐘 PostgresNext.js (Turbopack)57.590s (+5.5% 🔺)58.248s (+5.5% 🔺)0.658s18.61x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.515s (-88.9% 🟢)4.155s (-87.4% 🟢)0.640s81.00x
▲ VercelNitro3.740s (-26.3% 🟢)4.286s (-24.3% 🟢)0.546s71.06x
▲ VercelNext.js (Turbopack)3.745s (-77.6% 🟢)4.545s (-73.9% 🟢)0.800s71.07x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.116s (-44.1% 🟢)0.999s (+0.8%)0.011s (-31.1% 🟢)1.018s (-0.6%)0.903s101.00x
💻 LocalNext.js (Turbopack)0.141s (~)1.003s (~)0.016s (-11.8% 🟢)1.026s (~)0.885s101.22x
💻 LocalExpress0.182s (+66.0% 🔺)0.992s (-0.7%)0.014s (+19.1% 🔺)1.020s (~)0.839s101.57x
🐘 PostgresNext.js (Turbopack)0.779s (-67.5% 🟢)0.825s (-68.9% 🟢)0.000s (+Infinity% 🔺)1.016s (-66.4% 🟢)0.237s106.73x
🐘 PostgresNitro2.296s (-0.6%)2.746s (~)0.000s (NaN%)3.016s (~)0.719s1019.85x
🐘 PostgresExpress2.334s (~)2.708s (~)0.000s (-50.0% 🟢)3.016s (~)0.681s1020.18x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.071s (~)3.197s (-1.7%)0.205s (-14.9% 🟢)3.896s (-2.6%)0.825s101.00x
▲ VercelExpress3.071s (+1.8%)3.253s (-2.5%)0.287s (+57.8% 🔺)4.187s (+4.1%)1.116s101.00x
▲ VercelNitro3.153s (+2.6%)3.346s (+0.6%)0.148s (-21.2% 🟢)4.044s (+2.0%)0.891s101.03x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro12/12
🐘 PostgresNext.js (Turbopack)6/12
▲ VercelExpress7/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local10/12
Next.js (Turbopack)💻 Local10/12
Nitro💻 Local10/12
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 Feb 5, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production479038517
✅ 💻 Local Development438032470
✅ 📦 Local Production438032470
✅ 🐘 Local Postgres438032470
✅ 🪟 Windows470047
❌ 🌍 Community Worlds311690200
✅ 📋 Other129012141
Total20001691462315

❌ Failed Tests

🌍 Community Worlds (169 failed)

mongodb (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

redis (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

starter (43 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

turso (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4304
✅ example4304
✅ express4304
✅ fastify4304
✅ hono4304
✅ nextjs-turbopack4601
✅ nextjs-webpack4601
✅ nitro4304
✅ nuxt4304
✅ sveltekit4304
✅ vite4304
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb5420
✅ redis-dev300
❌ redis5420
✅ starter-dev300
❌ starter4430
✅ turso-dev300
❌ turso5420
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4304
✅ e2e-local-postgres-nest-stable4304
✅ e2e-local-prod-nest-stable4304

📋 View full workflow run

@vercel

vercelBot commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

@TooTallNateGraphite App

Copy link
Copy Markdown
MemberAuthor

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

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 implements end-to-end encryption for workflow user data using AES-256-GCM with per-run key derivation via HKDF-SHA256. The implementation requires client-side runId generation to enable encryption before data serialization.

Changes:

  • Added encryption module with AES-256-GCM + HKDF-SHA256 key derivation
  • Converted all (de)hydration serialization functions to async with encryption support
  • Implemented client-side runId generation for encryption context
  • Updated workflow execution, steps, hooks, and observability for async serialization
  • Added comprehensive encryption test coverage (18 unit tests)

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 6 comments.

Show a summary per file
FileDescription
packages/world/src/interfaces.tsAdded Encryptor, EncryptionContext, and KeyMaterial interfaces; extended World interface
packages/world/src/events.tsAdded optional client-provided runId field to run_created event
packages/world-vercel/src/encryption.tsNew encryption implementation with HKDF-based per-run key derivation
packages/world-vercel/src/encryption.test.tsComprehensive test suite for encryption functionality
packages/world-vercel/src/index.tsIntegrated encryptor into Vercel World implementation
packages/core/src/serialization.tsMade all serialization functions async; added encryption/decryption helpers
packages/core/src/serialization.test.tsUpdated test wrappers for async serialization
packages/core/src/workflow.tsAdded world parameter to runWorkflow; updated hydration calls
packages/core/src/workflow.test.tsUpdated test helpers with mock world and async wrappers
packages/core/src/step.tsUpdated step hydration for async operation
packages/core/src/step.test.tsUpdated test helpers with mock world
packages/core/src/workflow/hook.tsUpdated hook payload hydration for async operation
packages/core/src/workflow/hook.test.tsUpdated test helpers with mock world
packages/core/src/runtime/start.tsImplemented client-side runId generation for encryption
packages/core/src/runtime/start.test.tsUpdated mocks to return client-provided runId
packages/core/src/runtime/run.tsUpdated result hydration for async operation
packages/core/src/runtime/resume-hook.tsUpdated hook metadata hydration for async operation
packages/core/src/runtime/step-handler.tsUpdated step I/O serialization for async operation
packages/core/src/runtime/suspension-handler.tsUpdated event creation with async serialization
packages/core/src/runtime.tsPass world instance to runWorkflow
packages/core/src/private.tsAdded runId and world to WorkflowOrchestratorContext
packages/core/src/observability.tsMade hydrateResourceIO async with world parameter
packages/core/src/observability.test.tsUpdated test helpers with mock world
packages/core/src/writable-stream.test.tsRemoved Promise support tests
packages/web-shared/src/api/workflow-server-actions.tsUpdated all hydration calls to async with world parameter
packages/cli/src/lib/inspect/output.tsUpdated all hydration calls to async with world parameter
Comments suppressed due to low confidence (2)

packages/world/src/interfaces.ts:109

  • The Streamer interface still allows runId: string | Promise<string> for writeToStream, writeToStreamMulti, and closeStream, but WorkflowServerWritableStream now only accepts string (line 393). This could cause confusion for World implementations.

Since runId is now always generated client-side before serialization (as required for encryption), the Streamer interface should be updated to only accept string for consistency. World implementations (world-local, world-postgres, world-vercel) may need to be updated to match this stricter type.

 writeToStream(
name: string,
runId: string | Promise<string>,
chunk: string | Uint8Array
): Promise<void>;
/**
* Write multiple chunks to a stream in a single operation.
* This is an optional optimization for world implementations that can
* batch multiple writes efficiently (e.g., single HTTP request for world-vercel).
*
* If not implemented, the caller should fall back to sequential writeToStream() calls.
*
* @param name - The stream name
* @param runId - The run ID (can be a promise)
* @param chunks - Array of chunks to write, in order
*/
writeToStreamMulti?(
name: string,
runId: string | Promise<string>,
chunks: (string | Uint8Array)[]
): Promise<void>;
closeStream(name: string, runId: string | Promise<string>): Promise<void>;

packages/core/src/runtime/start.ts:143

  • The client-generated runId is passed in the event data (line 134) but the server implementations (world-local and world-postgres) check the first parameter of events.create() to decide whether to use a client-provided runId or generate one. Since the client passes null as the first parameter (line 130), the server will ignore the client-provided runId in the event data and generate its own runId.

This means encryption will fail because the client encrypted data with one runId but the server will use a different runId when attempting to decrypt.

The fix should be to pass the client-generated runId as the first argument to events.create() instead of null, or update all server implementations to check data.runId from the event data for run_created events.

 const result = await world.events.create(
null,
{
eventType: 'run_created',
specVersion,
runId, // Pass client-generated runId to server
eventData: {
deploymentId: deploymentId,
workflowName: workflowName,
input: workflowArguments,
executionContext: { traceCarrier, workflowCoreVersion },
},
},
{ v1Compat }
);

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

Comment threadpackages/core/src/workflow/hook.ts Outdated
Comment threadpackages/core/src/workflow/hook.ts Outdated
Comment threadpackages/core/src/step.ts Outdated
Comment threadpackages/world-vercel/src/encryption.ts
Comment threadpackages/world-vercel/src/encryption.ts
Comment threadpackages/world-vercel/src/encryption.ts
Comment threadpackages/core/src/step.ts Outdated
Comment threadpackages/core/src/workflow/hook.ts

@vercelvercelBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Additional Suggestion:

The hydrateWorkflowReturnValue calls use the old function signature (value, ops, runId) but the function signature was changed to (value, runId, encryptor, ops?, global?, extraRevivers?)

Fix on Vercel

This implements AES-256-GCM encryption with per-run key derivation via
HKDF-SHA256 for workflow user data.
Key changes:
- Add encryption module (packages/world-vercel/src/encryption.ts) with
createEncryptor() and createEncryptorFromEnv() functions
- Add Encryptor, EncryptionContext, KeyMaterial interfaces to @workflow/world
- Make all (de)hydrate* serialization functions async and accept encryptor
- Add maybeEncrypt/maybeDecrypt helpers with 'encr' format prefix
- Add getEncryptStream/getDecryptStream transform streams
- Update runWorkflow() to take world as 4th parameter
- Update WorkflowOrchestratorContext to include runId and world
- Integrate encryption into WorkflowServerWritableStream/ReadableStream
- Update hydrateResourceIO and observability helpers for async + world param
- Update all test files with mock world and async serialization wrappers
- Add 18 encryption unit tests covering round-trip, key isolation, tampering
Format: [encr (4 bytes)][nonce (12 bytes)][ciphertext + auth tag]
Signed-off-by: Nathan Rajlich <n@n8.io>
- Add .catch() error handlers to async hydrateStepReturnValue calls in
hook.ts and step.ts to address PR review feedback
- Update all (de)hydrate* function calls to use new async signatures:
- hydrateWorkflowArguments(value, runId, encryptor, global?)
- hydrateWorkflowReturnValue(value, runId, encryptor, ops?, global?)
- hydrateStepReturnValue(value, runId, encryptor, global?)
- Fix TypeScript errors in world-testing and workbench trigger endpoints
- Add changeset for E2E encryption feature
Signed-off-by: Nathan Rajlich <n@n8.io>
The E2E encryption feature requires the client to generate the runId
before serializing workflow arguments (so it can use the runId for
encryption context). Update world-local and world-postgres to use the
client-provided runId from the run_created event data when present,
instead of always generating a new runId server-side.
Signed-off-by: Nathan Rajlich <n@n8.io>
For E2E encryption, the client generates the runId before serializing
workflow arguments. Instead of passing runId inside the event data,
pass it as the first parameter to events.create().
Changes:
- Update Storage.events.create() interface to accept string | null for
run_created events (null = server generates, string = client provided)
- Update start() to pass runId as first argument instead of null
- Remove runId field from RunCreatedEventSchema (no longer needed)
- Simplify world implementations - they use the runId parameter directly
- Update tests to expect runId as first argument
Signed-off-by: Nathan Rajlich <n@n8.io>
Update e2e.test.ts and bench.bench.ts to use the new async
dehydrateWorkflowArguments signature that takes (value, runId,
encryptor, ops) instead of the old (value, ops, runId) order.
Since the tests don't use encryption, we pass an empty string
for runId and an empty object for encryptor.
Signed-off-by: Nathan Rajlich <n@n8.io>

@pranaygppranaygp 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.

Review: PR #950 - Add end-to-end encryption for workflow user data

This appears to be the original monolithic PR that has since been split into a cleaner stack: #978 -> #979 -> #956 -> #957. The split PRs are much easier to review incrementally. I'd recommend closing this in favor of the split stack unless there's a reason to keep it open.

Relationship to other PRs:

  • #955 appears to be an intermediate iteration combining what became #978 + #979
  • The active review stack is: #978 (async serde) -> #979 (Encryptor interface) -> #956 (Vercel AES-256-GCM) -> #957 (wire encryption)

Detailed reviews are on the individual PRs in the stack.

@TooTallNate

Copy link
Copy Markdown
MemberAuthor

Good bot

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.

3 participants

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

Add end-to-end encryption for workflow user data - #950

Closed
TooTallNate wants to merge 7 commits into
mainfrom
e2e-encryption
Closed

Add end-to-end encryption for workflow user data#950
TooTallNate wants to merge 7 commits into
mainfrom
e2e-encryption

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

This implements AES-256-GCM encryption with per-run key derivation via
HKDF-SHA256 for workflow user data.

Key changes:

  • Add encryption module (packages/world-vercel/src/encryption.ts) with
    createEncryptor() and createEncryptorFromEnv() functions
  • Add Encryptor, EncryptionContext, KeyMaterial interfaces to @workflow/world
  • Make all (de)hydrate* serialization functions async and accept encryptor
  • Add maybeEncrypt/maybeDecrypt helpers with 'encr' format prefix
  • Add getEncryptStream/getDecryptStream transform streams
  • Update runWorkflow() to take world as 4th parameter
  • Update WorkflowOrchestratorContext to include runId and world
  • Integrate encryption into WorkflowServerWritableStream/ReadableStream
  • Update hydrateResourceIO and observability helpers for async + world param
  • Update all test files with mock world and async serialization wrappers
  • Add 18 encryption unit tests covering round-trip, key isolation, tampering

Format: [encr (4 bytes)][nonce (12 bytes)][ciphertext + auth tag]

CopilotAI review requested due to automatic review settings February 5, 2026 16:55
@changeset-bot

changeset-botBot commented Feb 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f95f584

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

This PR includes changesets to release 19 packages
NameType
@workflow/cliPatch
@workflow/corePatch
@workflow/web-sharedPatch
@workflow/world-vercelPatch
@workflow/worldPatch
@workflow/world-testingPatch
workflowPatch
@workflow/buildersPatch
@workflow/docs-typecheckPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@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

@github-actions

github-actionsBot commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.029s (-33.6% 🟢)1.008s (~)0.979s101.00x
💻 LocalNext.js (Turbopack)0.039s (+2.7%)1.017s (~)0.978s101.35x
💻 LocalExpress0.044s (+35.8% 🔺)1.008s (~)0.964s101.54x
🐘 PostgresNitro0.192s (+28.2% 🔺)1.015s (~)0.823s106.71x
🐘 PostgresExpress0.215s (-21.3% 🟢)1.024s (+0.8%)0.808s107.53x
🐘 PostgresNext.js (Turbopack)0.413s (+8.2% 🔺)1.022s (~)0.609s1014.45x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.683s (+6.4% 🔺)1.732s (+5.5% 🔺)1.049s101.00x
▲ VercelNitro0.715s (-5.6% 🟢)1.594s (+6.3% 🔺)0.879s101.05x
▲ VercelNext.js (Turbopack)0.754s (+18.1% 🔺)1.614s (+4.9%)0.860s101.10x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.076s (-3.8%)2.007s (~)0.931s101.00x
💻 LocalNext.js (Turbopack)1.098s (~)2.013s (~)0.915s101.02x
💻 LocalExpress1.116s (+3.5%)2.007s (~)0.892s101.04x
🐘 PostgresNext.js (Turbopack)1.807s (-18.2% 🟢)2.231s (-26.2% 🟢)0.424s101.68x
🐘 PostgresNitro2.338s (-4.3%)3.015s (~)0.677s102.17x
🐘 PostgresExpress2.404s (+10.0% 🔺)3.014s (~)0.610s102.23x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.713s (-5.7% 🟢)3.535s (-4.1%)0.822s101.00x
▲ VercelExpress2.717s (-5.0% 🟢)3.665s (-3.3%)0.948s101.00x
▲ VercelNext.js (Turbopack)2.979s (+0.6%)3.776s (+2.6%)0.797s101.10x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.543s (-3.2%)11.013s (~)0.470s31.00x
💻 LocalNext.js (Turbopack)10.720s (~)11.018s (~)0.299s31.02x
💻 LocalExpress10.835s (+2.8%)11.016s (~)0.180s31.03x
🐘 PostgresNext.js (Turbopack)15.437s (-24.0% 🟢)16.032s (-23.8% 🟢)0.595s21.46x
🐘 PostgresExpress20.410s (~)21.034s (~)0.624s21.94x
🐘 PostgresNitro20.451s (~)21.039s (~)0.588s21.94x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express21.580s (-7.8% 🟢)22.095s (-10.9% 🟢)0.515s21.00x
▲ VercelNitro22.276s (-2.6%)23.400s (-2.0%)1.124s21.03x
▲ VercelNext.js (Turbopack)23.073s (+1.2%)24.038s (+1.4%)0.965s21.07x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro26.737s (-3.3%)27.029s (-3.5%)0.292s31.00x
💻 LocalNext.js (Turbopack)27.188s (~)28.029s (~)0.841s31.02x
💻 LocalExpress27.474s (+2.6%)28.026s (+3.7%)0.552s31.03x
🐘 PostgresNext.js (Turbopack)37.556s (-25.6% 🟢)38.074s (-25.5% 🟢)0.518s21.40x
🐘 PostgresExpress50.300s (~)51.090s (~)0.790s21.88x
🐘 PostgresNitro50.380s (~)51.052s (~)0.672s21.88x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express55.879s (-5.3% 🟢)56.635s (-5.7% 🟢)0.756s21.00x
▲ VercelNitro56.087s (-8.8% 🟢)56.921s (-9.2% 🟢)0.834s21.00x
▲ VercelNext.js (Turbopack)57.272s (-6.7% 🟢)58.153s (-6.8% 🟢)0.882s21.02x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro55.542s (-3.5%)56.027s (-3.5%)0.484s21.00x
💻 LocalNext.js (Turbopack)56.659s (~)57.042s (~)0.383s21.02x
💻 LocalExpress57.077s (+2.4%)57.563s (+2.7%)0.486s21.03x
🐘 PostgresNext.js (Turbopack)73.825s (-26.4% 🟢)74.133s (-26.7% 🟢)0.308s21.33x
🐘 PostgresNitro100.346s (~)101.148s (~)0.802s11.81x
🐘 PostgresExpress100.565s (~)101.086s (+0.9%)0.521s11.81x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro118.368s (-3.2%)118.845s (-3.6%)0.477s11.00x
▲ VercelExpress119.023s (-4.1%)120.008s (-4.0%)0.985s11.01x
▲ VercelNext.js (Turbopack)120.948s (-2.5%)121.732s (-2.2%)0.784s11.02x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.365s (-3.1%)2.006s (~)0.641s151.00x
💻 LocalNext.js (Turbopack)1.393s (~)2.012s (~)0.618s151.02x
💻 LocalExpress1.410s (+3.4%)2.007s (~)0.596s151.03x
🐘 PostgresNext.js (Turbopack)2.125s (-5.6% 🟢)2.746s (-9.0% 🟢)0.621s111.56x
🐘 PostgresExpress2.240s (~)3.013s (~)0.773s101.64x
🐘 PostgresNitro2.492s (+10.6% 🔺)3.013s (~)0.520s101.83x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.131s (-17.4% 🟢)4.218s (-8.6% 🟢)1.087s81.00x
▲ VercelNitro3.393s (+15.4% 🔺)4.340s (+13.2% 🔺)0.948s71.08x
▲ VercelNext.js (Turbopack)3.493s (+4.3%)4.424s (+6.9% 🔺)0.931s71.12x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro2.256s (-13.5% 🟢)3.234s (+7.4% 🔺)0.978s101.00x
💻 LocalNext.js (Turbopack)2.455s (-2.4%)3.038s (+0.7%)0.583s101.09x
💻 LocalExpress2.545s (+13.4% 🔺)3.013s (-6.7% 🟢)0.467s101.13x
🐘 PostgresNitro8.457s (+4.0%)8.799s (~)0.342s43.75x
🐘 PostgresExpress8.915s (-7.5% 🟢)9.323s (-7.4% 🟢)0.408s43.95x
🐘 PostgresNext.js (Turbopack)13.105s (+12.8% 🔺)13.401s (+11.4% 🔺)0.296s35.81x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.225s (-17.6% 🟢)4.000s (-13.3% 🟢)0.774s81.00x
▲ VercelExpress3.567s (+4.0%)4.304s (~)0.737s71.11x
▲ VercelNext.js (Turbopack)3.625s (-1.6%)4.454s (+2.1%)0.829s71.12x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro6.223s (-22.0% 🟢)6.883s (-20.8% 🟢)0.660s51.00x
💻 LocalNext.js (Turbopack)6.782s (+4.8%)8.016s (+11.1% 🔺)1.233s41.09x
💻 LocalExpress7.356s (+23.5% 🔺)8.083s (+22.0% 🔺)0.727s41.18x
🐘 PostgresNitro45.798s (-0.6%)46.223s (-1.9%)0.425s17.36x
🐘 PostgresExpress52.093s (+5.7% 🔺)52.299s (+4.2%)0.206s18.37x
🐘 PostgresNext.js (Turbopack)54.162s (-1.7%)54.294s (-1.7%)0.132s18.70x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.851s (+5.2% 🔺)5.202s (+19.1% 🔺)1.351s61.00x
▲ VercelNitro3.875s (+9.0% 🔺)4.417s (+2.3%)0.542s71.01x
▲ VercelNext.js (Turbopack)4.202s (+22.8% 🔺)5.079s (+25.1% 🔺)0.876s61.09x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.385s (-4.1%)2.006s (~)0.621s151.00x
💻 LocalNext.js (Turbopack)1.417s (-0.9%)2.010s (~)0.593s151.02x
💻 LocalExpress1.437s (+3.8%)2.007s (~)0.570s151.04x
🐘 PostgresNitro2.085s (-3.3%)2.473s (-4.7%)0.388s131.51x
🐘 PostgresExpress2.166s (+3.2%)2.683s (+2.6%)0.518s121.56x
🐘 PostgresNext.js (Turbopack)2.276s (-2.3%)2.937s (~)0.660s111.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.806s (-11.0% 🟢)3.763s (-5.4% 🟢)0.957s81.00x
▲ VercelExpress2.869s (-70.0% 🟢)3.800s (-64.0% 🟢)0.930s81.02x
▲ VercelNext.js (Turbopack)2.955s (-11.2% 🟢)3.785s (-8.0% 🟢)0.830s81.05x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro2.389s (-10.9% 🟢)3.301s (+9.2% 🔺)0.912s101.00x
💻 LocalExpress2.662s (+10.4% 🔺)3.010s (-9.5% 🟢)0.348s101.11x
💻 LocalNext.js (Turbopack)2.769s (+7.1% 🔺)3.116s (+3.2%)0.346s101.16x
🐘 PostgresExpress10.166s (-18.6% 🟢)10.710s (-17.8% 🟢)0.544s34.26x
🐘 PostgresNitro10.658s (+6.1% 🔺)11.038s (+6.5% 🔺)0.380s34.46x
🐘 PostgresNext.js (Turbopack)14.383s (-2.0%)15.059s (~)0.675s26.02x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.892s (-42.2% 🟢)3.825s (-33.8% 🟢)0.933s81.00x
▲ VercelNext.js (Turbopack)2.904s (-40.7% 🟢)3.727s (-33.1% 🟢)0.823s91.00x
▲ VercelNitro2.981s (-79.8% 🟢)3.690s (-76.4% 🟢)0.708s91.03x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro6.686s (-17.1% 🟢)7.588s (-12.2% 🟢)0.901s41.00x
💻 LocalExpress7.676s (+15.6% 🔺)8.622s (+13.7% 🔺)0.945s41.15x
💻 LocalNext.js (Turbopack)8.358s (+13.0% 🔺)9.480s (+17.1% 🔺)1.121s41.25x
🐘 PostgresExpress50.265s (-6.3% 🟢)51.137s (-5.6% 🟢)0.872s17.52x
🐘 PostgresNitro53.655s (+0.6%)54.200s (~)0.545s18.02x
🐘 PostgresNext.js (Turbopack)57.590s (+5.5% 🔺)58.248s (+5.5% 🔺)0.658s18.61x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.515s (-88.9% 🟢)4.155s (-87.4% 🟢)0.640s81.00x
▲ VercelNitro3.740s (-26.3% 🟢)4.286s (-24.3% 🟢)0.546s71.06x
▲ VercelNext.js (Turbopack)3.745s (-77.6% 🟢)4.545s (-73.9% 🟢)0.800s71.07x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.116s (-44.1% 🟢)0.999s (+0.8%)0.011s (-31.1% 🟢)1.018s (-0.6%)0.903s101.00x
💻 LocalNext.js (Turbopack)0.141s (~)1.003s (~)0.016s (-11.8% 🟢)1.026s (~)0.885s101.22x
💻 LocalExpress0.182s (+66.0% 🔺)0.992s (-0.7%)0.014s (+19.1% 🔺)1.020s (~)0.839s101.57x
🐘 PostgresNext.js (Turbopack)0.779s (-67.5% 🟢)0.825s (-68.9% 🟢)0.000s (+Infinity% 🔺)1.016s (-66.4% 🟢)0.237s106.73x
🐘 PostgresNitro2.296s (-0.6%)2.746s (~)0.000s (NaN%)3.016s (~)0.719s1019.85x
🐘 PostgresExpress2.334s (~)2.708s (~)0.000s (-50.0% 🟢)3.016s (~)0.681s1020.18x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.071s (~)3.197s (-1.7%)0.205s (-14.9% 🟢)3.896s (-2.6%)0.825s101.00x
▲ VercelExpress3.071s (+1.8%)3.253s (-2.5%)0.287s (+57.8% 🔺)4.187s (+4.1%)1.116s101.00x
▲ VercelNitro3.153s (+2.6%)3.346s (+0.6%)0.148s (-21.2% 🟢)4.044s (+2.0%)0.891s101.03x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro12/12
🐘 PostgresNext.js (Turbopack)6/12
▲ VercelExpress7/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local10/12
Next.js (Turbopack)💻 Local10/12
Nitro💻 Local10/12
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 Feb 5, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production479038517
✅ 💻 Local Development438032470
✅ 📦 Local Production438032470
✅ 🐘 Local Postgres438032470
✅ 🪟 Windows470047
❌ 🌍 Community Worlds311690200
✅ 📋 Other129012141
Total20001691462315

❌ Failed Tests

🌍 Community Worlds (169 failed)

mongodb (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

redis (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

starter (43 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

turso (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4304
✅ example4304
✅ express4304
✅ fastify4304
✅ hono4304
✅ nextjs-turbopack4601
✅ nextjs-webpack4601
✅ nitro4304
✅ nuxt4304
✅ sveltekit4304
✅ vite4304
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb5420
✅ redis-dev300
❌ redis5420
✅ starter-dev300
❌ starter4430
✅ turso-dev300
❌ turso5420
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4304
✅ e2e-local-postgres-nest-stable4304
✅ e2e-local-prod-nest-stable4304

📋 View full workflow run

@vercel

vercelBot commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

@TooTallNateGraphite App

Copy link
Copy Markdown
MemberAuthor

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

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 implements end-to-end encryption for workflow user data using AES-256-GCM with per-run key derivation via HKDF-SHA256. The implementation requires client-side runId generation to enable encryption before data serialization.

Changes:

  • Added encryption module with AES-256-GCM + HKDF-SHA256 key derivation
  • Converted all (de)hydration serialization functions to async with encryption support
  • Implemented client-side runId generation for encryption context
  • Updated workflow execution, steps, hooks, and observability for async serialization
  • Added comprehensive encryption test coverage (18 unit tests)

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 6 comments.

Show a summary per file
FileDescription
packages/world/src/interfaces.tsAdded Encryptor, EncryptionContext, and KeyMaterial interfaces; extended World interface
packages/world/src/events.tsAdded optional client-provided runId field to run_created event
packages/world-vercel/src/encryption.tsNew encryption implementation with HKDF-based per-run key derivation
packages/world-vercel/src/encryption.test.tsComprehensive test suite for encryption functionality
packages/world-vercel/src/index.tsIntegrated encryptor into Vercel World implementation
packages/core/src/serialization.tsMade all serialization functions async; added encryption/decryption helpers
packages/core/src/serialization.test.tsUpdated test wrappers for async serialization
packages/core/src/workflow.tsAdded world parameter to runWorkflow; updated hydration calls
packages/core/src/workflow.test.tsUpdated test helpers with mock world and async wrappers
packages/core/src/step.tsUpdated step hydration for async operation
packages/core/src/step.test.tsUpdated test helpers with mock world
packages/core/src/workflow/hook.tsUpdated hook payload hydration for async operation
packages/core/src/workflow/hook.test.tsUpdated test helpers with mock world
packages/core/src/runtime/start.tsImplemented client-side runId generation for encryption
packages/core/src/runtime/start.test.tsUpdated mocks to return client-provided runId
packages/core/src/runtime/run.tsUpdated result hydration for async operation
packages/core/src/runtime/resume-hook.tsUpdated hook metadata hydration for async operation
packages/core/src/runtime/step-handler.tsUpdated step I/O serialization for async operation
packages/core/src/runtime/suspension-handler.tsUpdated event creation with async serialization
packages/core/src/runtime.tsPass world instance to runWorkflow
packages/core/src/private.tsAdded runId and world to WorkflowOrchestratorContext
packages/core/src/observability.tsMade hydrateResourceIO async with world parameter
packages/core/src/observability.test.tsUpdated test helpers with mock world
packages/core/src/writable-stream.test.tsRemoved Promise support tests
packages/web-shared/src/api/workflow-server-actions.tsUpdated all hydration calls to async with world parameter
packages/cli/src/lib/inspect/output.tsUpdated all hydration calls to async with world parameter
Comments suppressed due to low confidence (2)

packages/world/src/interfaces.ts:109

  • The Streamer interface still allows runId: string | Promise<string> for writeToStream, writeToStreamMulti, and closeStream, but WorkflowServerWritableStream now only accepts string (line 393). This could cause confusion for World implementations.

Since runId is now always generated client-side before serialization (as required for encryption), the Streamer interface should be updated to only accept string for consistency. World implementations (world-local, world-postgres, world-vercel) may need to be updated to match this stricter type.

 writeToStream(
name: string,
runId: string | Promise<string>,
chunk: string | Uint8Array
): Promise<void>;
/**
* Write multiple chunks to a stream in a single operation.
* This is an optional optimization for world implementations that can
* batch multiple writes efficiently (e.g., single HTTP request for world-vercel).
*
* If not implemented, the caller should fall back to sequential writeToStream() calls.
*
* @param name - The stream name
* @param runId - The run ID (can be a promise)
* @param chunks - Array of chunks to write, in order
*/
writeToStreamMulti?(
name: string,
runId: string | Promise<string>,
chunks: (string | Uint8Array)[]
): Promise<void>;
closeStream(name: string, runId: string | Promise<string>): Promise<void>;

packages/core/src/runtime/start.ts:143

  • The client-generated runId is passed in the event data (line 134) but the server implementations (world-local and world-postgres) check the first parameter of events.create() to decide whether to use a client-provided runId or generate one. Since the client passes null as the first parameter (line 130), the server will ignore the client-provided runId in the event data and generate its own runId.

This means encryption will fail because the client encrypted data with one runId but the server will use a different runId when attempting to decrypt.

The fix should be to pass the client-generated runId as the first argument to events.create() instead of null, or update all server implementations to check data.runId from the event data for run_created events.

 const result = await world.events.create(
null,
{
eventType: 'run_created',
specVersion,
runId, // Pass client-generated runId to server
eventData: {
deploymentId: deploymentId,
workflowName: workflowName,
input: workflowArguments,
executionContext: { traceCarrier, workflowCoreVersion },
},
},
{ v1Compat }
);

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

Comment threadpackages/core/src/workflow/hook.ts Outdated
Comment threadpackages/core/src/workflow/hook.ts Outdated
Comment threadpackages/core/src/step.ts Outdated
Comment threadpackages/world-vercel/src/encryption.ts
Comment threadpackages/world-vercel/src/encryption.ts
Comment threadpackages/world-vercel/src/encryption.ts
Comment threadpackages/core/src/step.ts Outdated
Comment threadpackages/core/src/workflow/hook.ts

@vercelvercelBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Additional Suggestion:

The hydrateWorkflowReturnValue calls use the old function signature (value, ops, runId) but the function signature was changed to (value, runId, encryptor, ops?, global?, extraRevivers?)

Fix on Vercel

This implements AES-256-GCM encryption with per-run key derivation via
HKDF-SHA256 for workflow user data.
Key changes:
- Add encryption module (packages/world-vercel/src/encryption.ts) with
createEncryptor() and createEncryptorFromEnv() functions
- Add Encryptor, EncryptionContext, KeyMaterial interfaces to @workflow/world
- Make all (de)hydrate* serialization functions async and accept encryptor
- Add maybeEncrypt/maybeDecrypt helpers with 'encr' format prefix
- Add getEncryptStream/getDecryptStream transform streams
- Update runWorkflow() to take world as 4th parameter
- Update WorkflowOrchestratorContext to include runId and world
- Integrate encryption into WorkflowServerWritableStream/ReadableStream
- Update hydrateResourceIO and observability helpers for async + world param
- Update all test files with mock world and async serialization wrappers
- Add 18 encryption unit tests covering round-trip, key isolation, tampering
Format: [encr (4 bytes)][nonce (12 bytes)][ciphertext + auth tag]
Signed-off-by: Nathan Rajlich <n@n8.io>
- Add .catch() error handlers to async hydrateStepReturnValue calls in
hook.ts and step.ts to address PR review feedback
- Update all (de)hydrate* function calls to use new async signatures:
- hydrateWorkflowArguments(value, runId, encryptor, global?)
- hydrateWorkflowReturnValue(value, runId, encryptor, ops?, global?)
- hydrateStepReturnValue(value, runId, encryptor, global?)
- Fix TypeScript errors in world-testing and workbench trigger endpoints
- Add changeset for E2E encryption feature
Signed-off-by: Nathan Rajlich <n@n8.io>
The E2E encryption feature requires the client to generate the runId
before serializing workflow arguments (so it can use the runId for
encryption context). Update world-local and world-postgres to use the
client-provided runId from the run_created event data when present,
instead of always generating a new runId server-side.
Signed-off-by: Nathan Rajlich <n@n8.io>
For E2E encryption, the client generates the runId before serializing
workflow arguments. Instead of passing runId inside the event data,
pass it as the first parameter to events.create().
Changes:
- Update Storage.events.create() interface to accept string | null for
run_created events (null = server generates, string = client provided)
- Update start() to pass runId as first argument instead of null
- Remove runId field from RunCreatedEventSchema (no longer needed)
- Simplify world implementations - they use the runId parameter directly
- Update tests to expect runId as first argument
Signed-off-by: Nathan Rajlich <n@n8.io>
Update e2e.test.ts and bench.bench.ts to use the new async
dehydrateWorkflowArguments signature that takes (value, runId,
encryptor, ops) instead of the old (value, ops, runId) order.
Since the tests don't use encryption, we pass an empty string
for runId and an empty object for encryptor.
Signed-off-by: Nathan Rajlich <n@n8.io>

@pranaygppranaygp 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.

Review: PR #950 - Add end-to-end encryption for workflow user data

This appears to be the original monolithic PR that has since been split into a cleaner stack: #978 -> #979 -> #956 -> #957. The split PRs are much easier to review incrementally. I'd recommend closing this in favor of the split stack unless there's a reason to keep it open.

Relationship to other PRs:

  • #955 appears to be an intermediate iteration combining what became #978 + #979
  • The active review stack is: #978 (async serde) -> #979 (Encryptor interface) -> #956 (Vercel AES-256-GCM) -> #957 (wire encryption)

Detailed reviews are on the individual PRs in the stack.

@TooTallNate

Copy link
Copy Markdown
MemberAuthor

Good bot

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.

3 participants

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

Add end-to-end encryption for workflow user data - #950

Closed
TooTallNate wants to merge 7 commits into
mainfrom
e2e-encryption
Closed

Add end-to-end encryption for workflow user data#950
TooTallNate wants to merge 7 commits into
mainfrom
e2e-encryption

Conversation

@TooTallNate

Copy link
Copy Markdown
Member

This implements AES-256-GCM encryption with per-run key derivation via
HKDF-SHA256 for workflow user data.

Key changes:

  • Add encryption module (packages/world-vercel/src/encryption.ts) with
    createEncryptor() and createEncryptorFromEnv() functions
  • Add Encryptor, EncryptionContext, KeyMaterial interfaces to @workflow/world
  • Make all (de)hydrate* serialization functions async and accept encryptor
  • Add maybeEncrypt/maybeDecrypt helpers with 'encr' format prefix
  • Add getEncryptStream/getDecryptStream transform streams
  • Update runWorkflow() to take world as 4th parameter
  • Update WorkflowOrchestratorContext to include runId and world
  • Integrate encryption into WorkflowServerWritableStream/ReadableStream
  • Update hydrateResourceIO and observability helpers for async + world param
  • Update all test files with mock world and async serialization wrappers
  • Add 18 encryption unit tests covering round-trip, key isolation, tampering

Format: [encr (4 bytes)][nonce (12 bytes)][ciphertext + auth tag]

CopilotAI review requested due to automatic review settings February 5, 2026 16:55
@changeset-bot

changeset-botBot commented Feb 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f95f584

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

This PR includes changesets to release 19 packages
NameType
@workflow/cliPatch
@workflow/corePatch
@workflow/web-sharedPatch
@workflow/world-vercelPatch
@workflow/worldPatch
@workflow/world-testingPatch
workflowPatch
@workflow/buildersPatch
@workflow/docs-typecheckPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/world-localPatch
@workflow/world-postgresPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@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

@github-actions

github-actionsBot commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.029s (-33.6% 🟢)1.008s (~)0.979s101.00x
💻 LocalNext.js (Turbopack)0.039s (+2.7%)1.017s (~)0.978s101.35x
💻 LocalExpress0.044s (+35.8% 🔺)1.008s (~)0.964s101.54x
🐘 PostgresNitro0.192s (+28.2% 🔺)1.015s (~)0.823s106.71x
🐘 PostgresExpress0.215s (-21.3% 🟢)1.024s (+0.8%)0.808s107.53x
🐘 PostgresNext.js (Turbopack)0.413s (+8.2% 🔺)1.022s (~)0.609s1014.45x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.683s (+6.4% 🔺)1.732s (+5.5% 🔺)1.049s101.00x
▲ VercelNitro0.715s (-5.6% 🟢)1.594s (+6.3% 🔺)0.879s101.05x
▲ VercelNext.js (Turbopack)0.754s (+18.1% 🔺)1.614s (+4.9%)0.860s101.10x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.076s (-3.8%)2.007s (~)0.931s101.00x
💻 LocalNext.js (Turbopack)1.098s (~)2.013s (~)0.915s101.02x
💻 LocalExpress1.116s (+3.5%)2.007s (~)0.892s101.04x
🐘 PostgresNext.js (Turbopack)1.807s (-18.2% 🟢)2.231s (-26.2% 🟢)0.424s101.68x
🐘 PostgresNitro2.338s (-4.3%)3.015s (~)0.677s102.17x
🐘 PostgresExpress2.404s (+10.0% 🔺)3.014s (~)0.610s102.23x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.713s (-5.7% 🟢)3.535s (-4.1%)0.822s101.00x
▲ VercelExpress2.717s (-5.0% 🟢)3.665s (-3.3%)0.948s101.00x
▲ VercelNext.js (Turbopack)2.979s (+0.6%)3.776s (+2.6%)0.797s101.10x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.543s (-3.2%)11.013s (~)0.470s31.00x
💻 LocalNext.js (Turbopack)10.720s (~)11.018s (~)0.299s31.02x
💻 LocalExpress10.835s (+2.8%)11.016s (~)0.180s31.03x
🐘 PostgresNext.js (Turbopack)15.437s (-24.0% 🟢)16.032s (-23.8% 🟢)0.595s21.46x
🐘 PostgresExpress20.410s (~)21.034s (~)0.624s21.94x
🐘 PostgresNitro20.451s (~)21.039s (~)0.588s21.94x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express21.580s (-7.8% 🟢)22.095s (-10.9% 🟢)0.515s21.00x
▲ VercelNitro22.276s (-2.6%)23.400s (-2.0%)1.124s21.03x
▲ VercelNext.js (Turbopack)23.073s (+1.2%)24.038s (+1.4%)0.965s21.07x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro26.737s (-3.3%)27.029s (-3.5%)0.292s31.00x
💻 LocalNext.js (Turbopack)27.188s (~)28.029s (~)0.841s31.02x
💻 LocalExpress27.474s (+2.6%)28.026s (+3.7%)0.552s31.03x
🐘 PostgresNext.js (Turbopack)37.556s (-25.6% 🟢)38.074s (-25.5% 🟢)0.518s21.40x
🐘 PostgresExpress50.300s (~)51.090s (~)0.790s21.88x
🐘 PostgresNitro50.380s (~)51.052s (~)0.672s21.88x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express55.879s (-5.3% 🟢)56.635s (-5.7% 🟢)0.756s21.00x
▲ VercelNitro56.087s (-8.8% 🟢)56.921s (-9.2% 🟢)0.834s21.00x
▲ VercelNext.js (Turbopack)57.272s (-6.7% 🟢)58.153s (-6.8% 🟢)0.882s21.02x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro55.542s (-3.5%)56.027s (-3.5%)0.484s21.00x
💻 LocalNext.js (Turbopack)56.659s (~)57.042s (~)0.383s21.02x
💻 LocalExpress57.077s (+2.4%)57.563s (+2.7%)0.486s21.03x
🐘 PostgresNext.js (Turbopack)73.825s (-26.4% 🟢)74.133s (-26.7% 🟢)0.308s21.33x
🐘 PostgresNitro100.346s (~)101.148s (~)0.802s11.81x
🐘 PostgresExpress100.565s (~)101.086s (+0.9%)0.521s11.81x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro118.368s (-3.2%)118.845s (-3.6%)0.477s11.00x
▲ VercelExpress119.023s (-4.1%)120.008s (-4.0%)0.985s11.01x
▲ VercelNext.js (Turbopack)120.948s (-2.5%)121.732s (-2.2%)0.784s11.02x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.365s (-3.1%)2.006s (~)0.641s151.00x
💻 LocalNext.js (Turbopack)1.393s (~)2.012s (~)0.618s151.02x
💻 LocalExpress1.410s (+3.4%)2.007s (~)0.596s151.03x
🐘 PostgresNext.js (Turbopack)2.125s (-5.6% 🟢)2.746s (-9.0% 🟢)0.621s111.56x
🐘 PostgresExpress2.240s (~)3.013s (~)0.773s101.64x
🐘 PostgresNitro2.492s (+10.6% 🔺)3.013s (~)0.520s101.83x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.131s (-17.4% 🟢)4.218s (-8.6% 🟢)1.087s81.00x
▲ VercelNitro3.393s (+15.4% 🔺)4.340s (+13.2% 🔺)0.948s71.08x
▲ VercelNext.js (Turbopack)3.493s (+4.3%)4.424s (+6.9% 🔺)0.931s71.12x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro2.256s (-13.5% 🟢)3.234s (+7.4% 🔺)0.978s101.00x
💻 LocalNext.js (Turbopack)2.455s (-2.4%)3.038s (+0.7%)0.583s101.09x
💻 LocalExpress2.545s (+13.4% 🔺)3.013s (-6.7% 🟢)0.467s101.13x
🐘 PostgresNitro8.457s (+4.0%)8.799s (~)0.342s43.75x
🐘 PostgresExpress8.915s (-7.5% 🟢)9.323s (-7.4% 🟢)0.408s43.95x
🐘 PostgresNext.js (Turbopack)13.105s (+12.8% 🔺)13.401s (+11.4% 🔺)0.296s35.81x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.225s (-17.6% 🟢)4.000s (-13.3% 🟢)0.774s81.00x
▲ VercelExpress3.567s (+4.0%)4.304s (~)0.737s71.11x
▲ VercelNext.js (Turbopack)3.625s (-1.6%)4.454s (+2.1%)0.829s71.12x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro6.223s (-22.0% 🟢)6.883s (-20.8% 🟢)0.660s51.00x
💻 LocalNext.js (Turbopack)6.782s (+4.8%)8.016s (+11.1% 🔺)1.233s41.09x
💻 LocalExpress7.356s (+23.5% 🔺)8.083s (+22.0% 🔺)0.727s41.18x
🐘 PostgresNitro45.798s (-0.6%)46.223s (-1.9%)0.425s17.36x
🐘 PostgresExpress52.093s (+5.7% 🔺)52.299s (+4.2%)0.206s18.37x
🐘 PostgresNext.js (Turbopack)54.162s (-1.7%)54.294s (-1.7%)0.132s18.70x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.851s (+5.2% 🔺)5.202s (+19.1% 🔺)1.351s61.00x
▲ VercelNitro3.875s (+9.0% 🔺)4.417s (+2.3%)0.542s71.01x
▲ VercelNext.js (Turbopack)4.202s (+22.8% 🔺)5.079s (+25.1% 🔺)0.876s61.09x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.385s (-4.1%)2.006s (~)0.621s151.00x
💻 LocalNext.js (Turbopack)1.417s (-0.9%)2.010s (~)0.593s151.02x
💻 LocalExpress1.437s (+3.8%)2.007s (~)0.570s151.04x
🐘 PostgresNitro2.085s (-3.3%)2.473s (-4.7%)0.388s131.51x
🐘 PostgresExpress2.166s (+3.2%)2.683s (+2.6%)0.518s121.56x
🐘 PostgresNext.js (Turbopack)2.276s (-2.3%)2.937s (~)0.660s111.64x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.806s (-11.0% 🟢)3.763s (-5.4% 🟢)0.957s81.00x
▲ VercelExpress2.869s (-70.0% 🟢)3.800s (-64.0% 🟢)0.930s81.02x
▲ VercelNext.js (Turbopack)2.955s (-11.2% 🟢)3.785s (-8.0% 🟢)0.830s81.05x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro2.389s (-10.9% 🟢)3.301s (+9.2% 🔺)0.912s101.00x
💻 LocalExpress2.662s (+10.4% 🔺)3.010s (-9.5% 🟢)0.348s101.11x
💻 LocalNext.js (Turbopack)2.769s (+7.1% 🔺)3.116s (+3.2%)0.346s101.16x
🐘 PostgresExpress10.166s (-18.6% 🟢)10.710s (-17.8% 🟢)0.544s34.26x
🐘 PostgresNitro10.658s (+6.1% 🔺)11.038s (+6.5% 🔺)0.380s34.46x
🐘 PostgresNext.js (Turbopack)14.383s (-2.0%)15.059s (~)0.675s26.02x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.892s (-42.2% 🟢)3.825s (-33.8% 🟢)0.933s81.00x
▲ VercelNext.js (Turbopack)2.904s (-40.7% 🟢)3.727s (-33.1% 🟢)0.823s91.00x
▲ VercelNitro2.981s (-79.8% 🟢)3.690s (-76.4% 🟢)0.708s91.03x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro6.686s (-17.1% 🟢)7.588s (-12.2% 🟢)0.901s41.00x
💻 LocalExpress7.676s (+15.6% 🔺)8.622s (+13.7% 🔺)0.945s41.15x
💻 LocalNext.js (Turbopack)8.358s (+13.0% 🔺)9.480s (+17.1% 🔺)1.121s41.25x
🐘 PostgresExpress50.265s (-6.3% 🟢)51.137s (-5.6% 🟢)0.872s17.52x
🐘 PostgresNitro53.655s (+0.6%)54.200s (~)0.545s18.02x
🐘 PostgresNext.js (Turbopack)57.590s (+5.5% 🔺)58.248s (+5.5% 🔺)0.658s18.61x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.515s (-88.9% 🟢)4.155s (-87.4% 🟢)0.640s81.00x
▲ VercelNitro3.740s (-26.3% 🟢)4.286s (-24.3% 🟢)0.546s71.06x
▲ VercelNext.js (Turbopack)3.745s (-77.6% 🟢)4.545s (-73.9% 🟢)0.800s71.07x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.116s (-44.1% 🟢)0.999s (+0.8%)0.011s (-31.1% 🟢)1.018s (-0.6%)0.903s101.00x
💻 LocalNext.js (Turbopack)0.141s (~)1.003s (~)0.016s (-11.8% 🟢)1.026s (~)0.885s101.22x
💻 LocalExpress0.182s (+66.0% 🔺)0.992s (-0.7%)0.014s (+19.1% 🔺)1.020s (~)0.839s101.57x
🐘 PostgresNext.js (Turbopack)0.779s (-67.5% 🟢)0.825s (-68.9% 🟢)0.000s (+Infinity% 🔺)1.016s (-66.4% 🟢)0.237s106.73x
🐘 PostgresNitro2.296s (-0.6%)2.746s (~)0.000s (NaN%)3.016s (~)0.719s1019.85x
🐘 PostgresExpress2.334s (~)2.708s (~)0.000s (-50.0% 🟢)3.016s (~)0.681s1020.18x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)3.071s (~)3.197s (-1.7%)0.205s (-14.9% 🟢)3.896s (-2.6%)0.825s101.00x
▲ VercelExpress3.071s (+1.8%)3.253s (-2.5%)0.287s (+57.8% 🔺)4.187s (+4.1%)1.116s101.00x
▲ VercelNitro3.153s (+2.6%)3.346s (+0.6%)0.148s (-21.2% 🟢)4.044s (+2.0%)0.891s101.03x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro12/12
🐘 PostgresNext.js (Turbopack)6/12
▲ VercelExpress7/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local10/12
Next.js (Turbopack)💻 Local10/12
Nitro💻 Local10/12
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 Feb 5, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production479038517
✅ 💻 Local Development438032470
✅ 📦 Local Production438032470
✅ 🐘 Local Postgres438032470
✅ 🪟 Windows470047
❌ 🌍 Community Worlds311690200
✅ 📋 Other129012141
Total20001691462315

❌ Failed Tests

🌍 Community Worlds (169 failed)

mongodb (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

redis (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

starter (43 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

turso (42 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • readableStreamWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • outputStreamWorkflow
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4304
✅ example4304
✅ express4304
✅ fastify4304
✅ hono4304
✅ nextjs-turbopack4601
✅ nextjs-webpack4601
✅ nitro4304
✅ nuxt4304
✅ sveltekit4304
✅ vite4304
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable4304
✅ express-stable4304
✅ fastify-stable4304
✅ hono-stable4304
✅ nextjs-turbopack-stable4700
✅ nextjs-webpack-stable4700
✅ nitro-stable4304
✅ nuxt-stable4304
✅ sveltekit-stable4304
✅ vite-stable4304
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4700
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
❌ mongodb5420
✅ redis-dev300
❌ redis5420
✅ starter-dev300
❌ starter4430
✅ turso-dev300
❌ turso5420
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4304
✅ e2e-local-postgres-nest-stable4304
✅ e2e-local-prod-nest-stable4304

📋 View full workflow run

@vercel

vercelBot commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

@TooTallNateGraphite App

Copy link
Copy Markdown
MemberAuthor

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

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 implements end-to-end encryption for workflow user data using AES-256-GCM with per-run key derivation via HKDF-SHA256. The implementation requires client-side runId generation to enable encryption before data serialization.

Changes:

  • Added encryption module with AES-256-GCM + HKDF-SHA256 key derivation
  • Converted all (de)hydration serialization functions to async with encryption support
  • Implemented client-side runId generation for encryption context
  • Updated workflow execution, steps, hooks, and observability for async serialization
  • Added comprehensive encryption test coverage (18 unit tests)

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 6 comments.

Show a summary per file
FileDescription
packages/world/src/interfaces.tsAdded Encryptor, EncryptionContext, and KeyMaterial interfaces; extended World interface
packages/world/src/events.tsAdded optional client-provided runId field to run_created event
packages/world-vercel/src/encryption.tsNew encryption implementation with HKDF-based per-run key derivation
packages/world-vercel/src/encryption.test.tsComprehensive test suite for encryption functionality
packages/world-vercel/src/index.tsIntegrated encryptor into Vercel World implementation
packages/core/src/serialization.tsMade all serialization functions async; added encryption/decryption helpers
packages/core/src/serialization.test.tsUpdated test wrappers for async serialization
packages/core/src/workflow.tsAdded world parameter to runWorkflow; updated hydration calls
packages/core/src/workflow.test.tsUpdated test helpers with mock world and async wrappers
packages/core/src/step.tsUpdated step hydration for async operation
packages/core/src/step.test.tsUpdated test helpers with mock world
packages/core/src/workflow/hook.tsUpdated hook payload hydration for async operation
packages/core/src/workflow/hook.test.tsUpdated test helpers with mock world
packages/core/src/runtime/start.tsImplemented client-side runId generation for encryption
packages/core/src/runtime/start.test.tsUpdated mocks to return client-provided runId
packages/core/src/runtime/run.tsUpdated result hydration for async operation
packages/core/src/runtime/resume-hook.tsUpdated hook metadata hydration for async operation
packages/core/src/runtime/step-handler.tsUpdated step I/O serialization for async operation
packages/core/src/runtime/suspension-handler.tsUpdated event creation with async serialization
packages/core/src/runtime.tsPass world instance to runWorkflow
packages/core/src/private.tsAdded runId and world to WorkflowOrchestratorContext
packages/core/src/observability.tsMade hydrateResourceIO async with world parameter
packages/core/src/observability.test.tsUpdated test helpers with mock world
packages/core/src/writable-stream.test.tsRemoved Promise support tests
packages/web-shared/src/api/workflow-server-actions.tsUpdated all hydration calls to async with world parameter
packages/cli/src/lib/inspect/output.tsUpdated all hydration calls to async with world parameter
Comments suppressed due to low confidence (2)

packages/world/src/interfaces.ts:109

  • The Streamer interface still allows runId: string | Promise<string> for writeToStream, writeToStreamMulti, and closeStream, but WorkflowServerWritableStream now only accepts string (line 393). This could cause confusion for World implementations.

Since runId is now always generated client-side before serialization (as required for encryption), the Streamer interface should be updated to only accept string for consistency. World implementations (world-local, world-postgres, world-vercel) may need to be updated to match this stricter type.

 writeToStream(
name: string,
runId: string | Promise<string>,
chunk: string | Uint8Array
): Promise<void>;
/**
* Write multiple chunks to a stream in a single operation.
* This is an optional optimization for world implementations that can
* batch multiple writes efficiently (e.g., single HTTP request for world-vercel).
*
* If not implemented, the caller should fall back to sequential writeToStream() calls.
*
* @param name - The stream name
* @param runId - The run ID (can be a promise)
* @param chunks - Array of chunks to write, in order
*/
writeToStreamMulti?(
name: string,
runId: string | Promise<string>,
chunks: (string | Uint8Array)[]
): Promise<void>;
closeStream(name: string, runId: string | Promise<string>): Promise<void>;

packages/core/src/runtime/start.ts:143

  • The client-generated runId is passed in the event data (line 134) but the server implementations (world-local and world-postgres) check the first parameter of events.create() to decide whether to use a client-provided runId or generate one. Since the client passes null as the first parameter (line 130), the server will ignore the client-provided runId in the event data and generate its own runId.

This means encryption will fail because the client encrypted data with one runId but the server will use a different runId when attempting to decrypt.

The fix should be to pass the client-generated runId as the first argument to events.create() instead of null, or update all server implementations to check data.runId from the event data for run_created events.

 const result = await world.events.create(
null,
{
eventType: 'run_created',
specVersion,
runId, // Pass client-generated runId to server
eventData: {
deploymentId: deploymentId,
workflowName: workflowName,
input: workflowArguments,
executionContext: { traceCarrier, workflowCoreVersion },
},
},
{ v1Compat }
);

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

Comment threadpackages/core/src/workflow/hook.ts Outdated
Comment threadpackages/core/src/workflow/hook.ts Outdated
Comment threadpackages/core/src/step.ts Outdated
Comment threadpackages/world-vercel/src/encryption.ts
Comment threadpackages/world-vercel/src/encryption.ts
Comment threadpackages/world-vercel/src/encryption.ts
Comment threadpackages/core/src/step.ts Outdated
Comment threadpackages/core/src/workflow/hook.ts

@vercelvercelBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Additional Suggestion:

The hydrateWorkflowReturnValue calls use the old function signature (value, ops, runId) but the function signature was changed to (value, runId, encryptor, ops?, global?, extraRevivers?)

Fix on Vercel

This implements AES-256-GCM encryption with per-run key derivation via
HKDF-SHA256 for workflow user data.
Key changes:
- Add encryption module (packages/world-vercel/src/encryption.ts) with
createEncryptor() and createEncryptorFromEnv() functions
- Add Encryptor, EncryptionContext, KeyMaterial interfaces to @workflow/world
- Make all (de)hydrate* serialization functions async and accept encryptor
- Add maybeEncrypt/maybeDecrypt helpers with 'encr' format prefix
- Add getEncryptStream/getDecryptStream transform streams
- Update runWorkflow() to take world as 4th parameter
- Update WorkflowOrchestratorContext to include runId and world
- Integrate encryption into WorkflowServerWritableStream/ReadableStream
- Update hydrateResourceIO and observability helpers for async + world param
- Update all test files with mock world and async serialization wrappers
- Add 18 encryption unit tests covering round-trip, key isolation, tampering
Format: [encr (4 bytes)][nonce (12 bytes)][ciphertext + auth tag]
Signed-off-by: Nathan Rajlich <n@n8.io>
- Add .catch() error handlers to async hydrateStepReturnValue calls in
hook.ts and step.ts to address PR review feedback
- Update all (de)hydrate* function calls to use new async signatures:
- hydrateWorkflowArguments(value, runId, encryptor, global?)
- hydrateWorkflowReturnValue(value, runId, encryptor, ops?, global?)
- hydrateStepReturnValue(value, runId, encryptor, global?)
- Fix TypeScript errors in world-testing and workbench trigger endpoints
- Add changeset for E2E encryption feature
Signed-off-by: Nathan Rajlich <n@n8.io>
The E2E encryption feature requires the client to generate the runId
before serializing workflow arguments (so it can use the runId for
encryption context). Update world-local and world-postgres to use the
client-provided runId from the run_created event data when present,
instead of always generating a new runId server-side.
Signed-off-by: Nathan Rajlich <n@n8.io>
For E2E encryption, the client generates the runId before serializing
workflow arguments. Instead of passing runId inside the event data,
pass it as the first parameter to events.create().
Changes:
- Update Storage.events.create() interface to accept string | null for
run_created events (null = server generates, string = client provided)
- Update start() to pass runId as first argument instead of null
- Remove runId field from RunCreatedEventSchema (no longer needed)
- Simplify world implementations - they use the runId parameter directly
- Update tests to expect runId as first argument
Signed-off-by: Nathan Rajlich <n@n8.io>
Update e2e.test.ts and bench.bench.ts to use the new async
dehydrateWorkflowArguments signature that takes (value, runId,
encryptor, ops) instead of the old (value, ops, runId) order.
Since the tests don't use encryption, we pass an empty string
for runId and an empty object for encryptor.
Signed-off-by: Nathan Rajlich <n@n8.io>

@pranaygppranaygp 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.

Review: PR #950 - Add end-to-end encryption for workflow user data

This appears to be the original monolithic PR that has since been split into a cleaner stack: #978 -> #979 -> #956 -> #957. The split PRs are much easier to review incrementally. I'd recommend closing this in favor of the split stack unless there's a reason to keep it open.

Relationship to other PRs:

  • #955 appears to be an intermediate iteration combining what became #978 + #979
  • The active review stack is: #978 (async serde) -> #979 (Encryptor interface) -> #956 (Vercel AES-256-GCM) -> #957 (wire encryption)

Detailed reviews are on the individual PRs in the stack.

@TooTallNate

Copy link
Copy Markdown
MemberAuthor

Good bot

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.

3 participants

@TooTallNate@pranaygp