Skip to content

Fix 12 documentation accuracy issues across API reference, foundations, and AI docs - #1200

Closed
johnlindquist wants to merge 5 commits into
mainfrom
worktree-swift-jumping-pizza
Closed

Fix 12 documentation accuracy issues across API reference, foundations, and AI docs#1200
johnlindquist wants to merge 5 commits into
mainfrom
worktree-swift-jumping-pizza

Conversation

@johnlindquist

Copy link
Copy Markdown
Contributor

Summary

Fixes validated documentation issues found during a comprehensive docs audit:

  • API reference: Fix nonexistent world.runs.cancel() in getWorld examples — replaced with cancelRun() from @workflow/core/runtime
  • Streaming guide: Fix import path mismatch (simple vs simple-streaming) and replace nonexistent run.result() with run.returnValue
  • World/Streamer interfaces: Add missing close?() and getEncryptionKeyForRun?() to World, fix runId type from string | Promise<string> to string in Streamer, add missing writeToStreamMulti? method
  • Deploying docs: Fix wrong Postgres world package name (@workflow-worlds/postgres@workflow/world-postgres)
  • AI docs: Fix tools naming mismatch (tools vs flightBookingTools), remove unused getWritable import, fix missing || operator, add missing RetryableError import, fix broken highlight annotation
  • Misc: Fix [!code highlight} typo, correct "Vite root directory" → "Astro project root directory", fix inaccurate npx "install globally" claim, remove fetch from Node.js core modules list

Test plan

  • Verify docs build succeeds
  • Spot-check corrected code examples compile against actual workflow exports
  • Verify getWorld cancel example uses correct cancelRun API
  • Verify World/Streamer interfaces match packages/world/src/interfaces.ts

Update docs examples that referenced outdated or incorrect APIs.
This fixes cancellation usage in get-world, stream import path and run return access in streaming, clarifies stream wording in starting-workflows, and removes fetch from Node.js core module examples.
Verified: node -e '...docs snippet verification passed' (requested old/new snippets checked in 4 files)
How to test: run the same node assertion command from repo root to confirm snippets.
Swarm-Agent: codex-core-docs
Correct World interface docs to include close() and getEncryptionKeyForRun() overloads, and clarify their runtime behavior.
Update Streamer runId types to string, add writeToStreamMulti(), and document it as an optional batching optimization.
Also fix package references from @workflow-worlds/postgres to @workflow/world-postgres.
Verified: pnpm biome check docs/content/docs/deploying/building-a-world.mdx docs/content/docs/deploying/index.mdx (fails because Biome config ignores *.mdx paths)
Verified: node <<'NODE' ... scoped assertions on docs/content/docs/deploying/building-a-world.mdx and docs/content/docs/deploying/index.mdx (pass)
Swarm-Agent: codex-world-interface
Align code examples across AI docs by renaming the tools export, fixing import snippets, restoring a missing logical OR, adding missing RetryableError import context, and repairing a broken highlight annotation.
Verified: git diff --check -- docs/content/docs/ai/index.mdx docs/content/docs/ai/sleep-and-delays.mdx docs/content/docs/ai/resumable-streams.mdx
Verified: set -euo pipefail; rg -n "export const flightBookingTools = \\{" docs/content/docs/ai/index.mdx; rg -n "import \\{ flightBookingTools \\} from \"@/ai/tools\";" docs/content/docs/ai/index.mdx; rg -n "import \\{ sleep \\} from \"workflow\";" docs/content/docs/ai/sleep-and-delays.mdx; rg -n "tool-checkBaggageAllowance\" \\|\\|" docs/content/docs/ai/sleep-and-delays.mdx; rg -n "part.type === \"tool-sleep\"" docs/content/docs/ai/sleep-and-delays.mdx; rg -n "import \\{ RetryableError \\} from \"workflow\";" docs/content/docs/ai/sleep-and-delays.mdx; rg -n "headers: \\{ // \\[!code highlight\\]" docs/content/docs/ai/resumable-streams.mdx
Swarm-Agent: codex-ai-docs
Update three docs files to fix a malformed code-highlight annotation,\nclarify Astro directory wording, and correct npx behavior wording.\n\nVerified: set -e; rg assertions for old/new strings in all 3 files (pass)\nVerified: git diff --check -- docs/content/docs/errors/start-invalid-workflow-function.mdx docs/content/docs/getting-started/astro.mdx docs/content/docs/observability/index.mdx (pass)\nVerified: npx -y prettier@3 --check docs/content/docs/errors/start-invalid-workflow-function.mdx docs/content/docs/getting-started/astro.mdx docs/content/docs/observability/index.mdx (fails: pre-existing formatting style mismatch in docs)\nSwarm-Agent: codex-misc-fixes
@johnlindquist
johnlindquist requested a review from a team as a code ownerFebruary 26, 2026 04:23
@vercel

vercelBot commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Feb 26, 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🥇 Express0.025s (-22.3% 🟢)1.005s (~)0.979s101.00x
💻 LocalNitro0.033s (+2.8%)1.005s (~)0.972s101.31x
🐘 PostgresNitro0.054s (-4.1%)1.010s (~)0.956s102.13x
🐘 PostgresExpress0.056s (+4.3%)1.010s (~)0.955s102.19x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.410s (-23.3% 🟢)1.731s (-4.6%)1.321s101.00x
▲ VercelNext.js (Turbopack)0.458s (-19.1% 🟢)1.907s (-4.3%)1.449s101.12x
▲ VercelExpress0.458s (-28.0% 🟢)1.795s (-9.8% 🟢)1.337s101.12x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.072s (-3.3%)2.005s (~)0.933s101.00x
💻 LocalNitro1.112s (~)2.005s (~)0.893s101.04x
🐘 PostgresExpress1.129s (-0.9%)2.018s (~)0.889s101.05x
🐘 PostgresNitro1.131s (~)2.011s (~)0.880s101.05x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.975s (+1.3%)2.840s (-3.5%)0.865s101.00x
▲ VercelNext.js (Turbopack)2.077s (+6.8% 🔺)3.167s (+2.5%)1.090s101.05x
▲ VercelExpress2.145s (+1.7%)3.042s (-8.5% 🟢)0.897s101.09x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express10.554s (-2.6%)11.020s (~)0.467s31.00x
🐘 PostgresNitro10.841s (-0.5%)11.042s (~)0.201s31.03x
💻 LocalNitro10.861s (~)11.022s (~)0.160s31.03x
🐘 PostgresExpress10.918s (~)11.045s (~)0.126s31.03x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro16.812s (+5.2% 🔺)17.864s (+5.6% 🔺)1.052s21.00x
▲ VercelExpress16.985s (+1.1%)17.783s (-0.9%)0.797s21.01x
▲ VercelNext.js (Turbopack)17.249s (+6.6% 🔺)18.776s (+10.2% 🔺)1.527s21.03x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express26.763s (-2.6%)27.049s (-3.6%)0.286s31.00x
🐘 PostgresNitro27.309s (~)28.070s (~)0.762s31.02x
🐘 PostgresExpress27.319s (~)28.069s (~)0.750s31.02x
💻 LocalNitro27.587s (~)28.053s (~)0.466s31.03x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)44.431s (+2.3%)45.959s (+2.8%)1.527s21.00x
▲ VercelExpress44.937s (+5.1% 🔺)46.273s (+4.8%)1.336s21.01x
▲ VercelNitro45.338s (+6.5% 🔺)45.967s (+6.0% 🔺)0.629s21.02x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express54.971s (~)55.099s (~)0.128s21.00x
🐘 PostgresNitro55.087s (~)55.607s (-0.9%)0.521s21.00x
💻 LocalExpress55.663s (-2.7%)56.093s (-3.5%)0.430s21.01x
💻 LocalNitro57.379s (~)58.105s (~)0.726s21.04x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express95.058s (+3.0%)96.094s (+2.8%)1.036s11.00x
▲ VercelNitro99.276s (+7.0% 🔺)100.397s (+7.7% 🔺)1.121s11.04x
▲ VercelNext.js (Turbopack)100.990s (+0.7%)102.638s (+1.3%)1.648s11.06x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.353s (-3.9%)2.005s (~)0.652s151.00x
🐘 PostgresExpress1.366s (~)2.011s (~)0.646s151.01x
🐘 PostgresNitro1.377s (+1.8%)2.010s (~)0.634s151.02x
💻 LocalNitro1.402s (-2.1%)2.006s (~)0.604s151.04x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.150s (-4.7%)2.950s (-19.8% 🟢)0.800s111.00x
▲ VercelNitro2.204s (-13.9% 🟢)3.002s (-14.0% 🟢)0.798s101.03x
▲ VercelNext.js (Turbopack)2.600s (+17.2% 🔺)3.671s (+16.8% 🔺)1.071s91.21x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.009s (+3.6%)2.600s (+5.1% 🔺)0.591s121.00x
🐘 PostgresNitro2.013s (+3.4%)2.514s (~)0.501s121.00x
💻 LocalExpress2.280s (-9.7% 🟢)3.006s (~)0.727s101.13x
💻 LocalNitro2.488s (-4.9%)3.007s (~)0.519s101.24x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.693s (-15.9% 🟢)3.365s (-32.8% 🟢)0.671s91.00x
▲ VercelNext.js (Turbopack)3.022s (-4.2%)3.929s (-3.4%)0.907s81.12x
▲ VercelExpress3.126s (+25.4% 🔺)4.034s (+10.5% 🔺)0.908s81.16x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.627s (+6.1% 🔺)4.266s (+5.8% 🔺)0.639s81.00x
🐘 PostgresExpress3.780s (+14.9% 🔺)4.314s (+10.6% 🔺)0.534s71.04x
💻 LocalExpress6.192s (-17.8% 🟢)7.015s (-12.6% 🟢)0.823s51.71x
💻 LocalNitro7.011s (-5.2% 🟢)7.516s (-6.3% 🟢)0.505s41.93x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.232s (+0.5%)4.512s (-3.8%)1.280s71.00x
▲ VercelExpress3.765s (+20.7% 🔺)4.812s (+10.4% 🔺)1.046s71.16x
▲ VercelNext.js (Turbopack)3.967s (+10.3% 🔺)5.057s (+9.0% 🔺)1.090s61.23x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.355s (-5.2% 🟢)2.005s (~)0.650s151.00x
🐘 PostgresExpress1.374s (+1.1%)2.010s (~)0.636s151.01x
🐘 PostgresNitro1.386s (+1.6%)2.011s (~)0.625s151.02x
💻 LocalNitro1.429s (~)2.005s (~)0.576s151.05x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.188s (+8.1% 🔺)3.172s (+3.4%)0.984s101.00x
▲ VercelExpress2.205s (+4.4%)3.166s (-5.8% 🟢)0.960s101.01x
▲ VercelNitro2.224s (+4.0%)2.970s (-2.2%)0.746s111.02x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.034s (+1.7%)2.600s (+3.5%)0.566s121.00x
🐘 PostgresNitro2.074s (+5.9% 🔺)2.679s (+8.2% 🔺)0.605s121.02x
💻 LocalExpress2.417s (-9.4% 🟢)3.008s (~)0.590s101.19x
💻 LocalNitro2.615s (-5.0%)3.008s (~)0.393s101.29x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.953s (+22.5% 🔺)3.562s (+8.3% 🔺)0.609s91.00x
▲ VercelNext.js (Turbopack)3.370s (+33.5% 🔺)4.422s (+32.5% 🔺)1.051s71.14x
▲ VercelExpress3.438s (+48.8% 🔺)4.189s (+22.3% 🔺)0.752s81.16x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.511s (+9.3% 🔺)4.315s (+10.8% 🔺)0.805s71.00x
🐘 PostgresExpress3.761s (+9.1% 🔺)4.451s (+7.3% 🔺)0.689s71.07x
💻 LocalExpress6.695s (-13.9% 🟢)7.014s (-15.2% 🟢)0.319s51.91x
💻 LocalNitro7.564s (-3.6%)8.019s (-5.9% 🟢)0.454s42.15x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.447s (+6.2% 🔺)4.363s (+4.0%)0.916s71.00x
▲ VercelNext.js (Turbopack)3.976s (+17.7% 🔺)5.020s (+15.8% 🔺)1.044s61.15x
▲ VercelExpress4.801s (+60.2% 🔺)5.773s (+44.3% 🔺)0.972s71.39x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.109s (-37.3% 🟢)1.002s (~)0.009s (-12.8% 🟢)1.014s (~)0.906s101.00x
💻 LocalNitro0.182s (+2.8%)1.002s (~)0.011s (-3.6%)1.016s (~)0.834s101.68x
🐘 PostgresExpress0.189s (-1.8%)0.997s (+0.5%)0.001s (-6.7% 🟢)1.012s (~)0.822s101.74x
🐘 PostgresNitro0.194s (-1.6%)0.996s (~)0.001s (-17.6% 🟢)1.013s (~)0.820s101.78x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.615s (+3.2%)2.237s (+18.6% 🔺)0.101s (-4.4%)2.705s (+10.1% 🔺)1.090s101.00x
▲ VercelNext.js (Turbopack)1.639s (+11.1% 🔺)2.160s (+23.6% 🔺)0.095s (~)2.688s (+20.1% 🔺)1.050s101.01x
▲ VercelNitro1.787s (+26.0% 🔺)2.509s (+47.8% 🔺)0.081s (-28.5% 🟢)2.960s (+35.6% 🔺)1.173s101.11x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress12/12
🐘 PostgresExpress7/12
▲ VercelNitro7/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local7/12
Next.js (Turbopack)▲ Vercel12/12
Nitro🐘 Postgres7/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
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@changeset-bot

changeset-botBot commented Feb 26, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 9fe76fa

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

github-actionsBot commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production523049572
✅ 💻 Local Development556068624
✅ 📦 Local Production556068624
❌ 🐘 Local Postgres555168624
✅ 🪟 Windows490352
❌ 🌍 Community Worlds111459165
✅ 📋 Other135021156
Total2485462862817

❌ Failed Tests

🐘 Local Postgres (1 failed)

astro-stable (1 failed):

  • webhookWorkflow
🌍 Community Worlds (45 failed)

turso (45 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • parallelSleepWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • 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 retry behavior workflow completes despite transient 5xx on step_completed
  • 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 (queue-based) - workflow and step endpoints respond to health check messages
  • 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
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • cancelRun - cancelling a running workflow
  • cancelRun via CLI - cancelling a running workflow
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4705
✅ example4705
✅ express4705
✅ fastify4705
✅ hono4705
✅ nextjs-turbopack5002
✅ nextjs-webpack5002
✅ nitro4705
✅ nuxt4705
✅ sveltekit4705
✅ vite4705
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
❌ 🐘 Local Postgres
AppPassedFailedSkipped
❌ astro-stable4417
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4903
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4903
✅ redis-dev300
✅ redis4903
✅ turso-dev300
❌ turso4453
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4507
✅ e2e-local-postgres-nest-stable4507
✅ e2e-local-prod-nest-stable4507

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: success
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: failure
  • Windows: success

Check the workflow run for details.

The first overload of events.create() accepts string | null, not just
null. Clients can provide their own runId for run_created events.
VaguelySerious
VaguelySerious previously approved these changes Feb 26, 2026

```typescript lineNumbers
import { getWorld} from "workflow/runtime";
import { getWorld, cancelRun } from "@workflow/core/runtime";

@pranaygppranaygpMar 1, 2026

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.

nah the correct way to programmatically cancel a run is await getRun(runId).cancel() - not cancelRun from world. We don't adequately document it though so good call on making this. We should include an example in getRun api reference for cancelling a run so that it's searchable by AI. right now it's not well documented

Also users should almost never be importing from @workflow/core for normal usage. workflow/api should be what people use for normal behavior. using getWorld is an advanced/low level features that will break often as we change things around and not meant to be relied on

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

using getWorld is an advanced/low level features that will break often as we change things around and not meant to be relied on

At least once we actually have a different way of querying the same data, which we won't for a while? In which case it wouldn't hurt to document. Users could already be relying on it

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.

I don't think we should document it and then have to support it

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.

also like I said, for now the fix is simple. we have run.cancel(). let's document that instead of telling people to use @workflow/core/runtime which is never meant to be user facing

@pranaygp
pranaygp dismissed VaguelySerious’s stale reviewMarch 2, 2026 21:36

we shouldn't document and recommend cancelRun from @workflow/core/runtime. it should be run.cancel

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

Good docs audit overall — most fixes here are correct and helpful. The interface updates, typo fixes, run.returnValue, import path corrections, and flightBookingTools rename are all verified against the source.

The main blocker is the cancelRun change (already discussed in the thread) — it needs to use the public API instead of an internal module.


```typescript lineNumbers
import { getWorld} from "workflow/runtime";
import { getWorld, cancelRun } from "@workflow/core/runtime";

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.

As pranaygp noted in the earlier thread, this should use the public API:

import{getRun}from"workflow/runtime";exportasyncfunctionPOST(req: Request){const{ runId }=awaitreq.json();// ...construn=getRun(runId);awaitrun.cancel();returnResponse.json({status: "cancelled"});}

cancelRun from @workflow/core/runtime is an internal function — users should never import from @workflow/core directly. getRun(runId).cancel() is the supported public API for this (exported from workflow/runtime).

events: {
// Create a new workflow run (runId must be null - server generates it)
create(runId: null, data: RunCreatedEventRequest, params?: CreateEventParams): Promise<EventResult>;
// Create a new workflow run (runId may be client-provided or null for server generation)

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.

Nit: The source code doc comment (interfaces.ts:130) says: "The runId may be provided by the client or left as null for the server to generate." Consider matching this wording exactly for consistency between source and docs.

@@ -34,10 +34,13 @@ A World connects workflows to the infrastructure that powers them. The World int
```typescript
interface World extends Storage, Queue, Streamer {
start?(): Promise<void>;

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.

Verified: the close?() and getEncryptionKeyForRun?() additions match the actual World interface in packages/world/src/interfaces.ts exactly. 👍

johnlindquist added a commit that referenced this pull request Apr 6, 2026
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
@johnlindquist

Copy link
Copy Markdown
ContributorAuthor

Closing — fixes have been dispositioned:

  • 3 fixes already on main (ai/index.mdx variable rename, ai/resumable-streams.mdx highlight bracket, ai/sleep-and-delays.mdx import/operator fixes) — these were merged in subsequent PRs.
  • 3 fixes covered by docs: March docs audit and alignment #1466 (get-world.mdx, start-invalid-workflow-function.mdx, astro.mdx) — docs: March docs audit and alignment #1466 has more comprehensive rewrites of these files that include these corrections.
  • 6 unique fixes cherry-picked into docs: March docs audit and alignment #1466 (observability CLI wording, fetch removal from restricted modules, package name fix, stream wording, import path fix, World/Streamer interface updates) — committed to march-docs-audit branch.

No content lost.

johnlindquist added a commit that referenced this pull request Apr 6, 2026
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
johnlindquist added a commit that referenced this pull request Apr 6, 2026
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
pranaygp pushed a commit that referenced this pull request Apr 7, 2026
* docs: clarify Next monorepo setup
Prevent confusion when Next.js apps live below the repository root and workflow code imports sibling workspace packages.
This documents the output tracing root requirement at the point where users configure withWorkflow, so monorepo setups follow the same working patterns as the shipped Next.js integration instead of failing due to unresolved workspace imports.
Ploop-Iter: 1
* ploop: iteration 2 checkpoint
Automated checkpoint commit.
Ploop-Iter: 2
* ploop: iteration 3 checkpoint
Automated checkpoint commit.
Ploop-Iter: 3
* docs: audit recent documentation coverage
Capture recent workflow documentation updates so the public docs and package guidance stay aligned with the implementation and current docs-typecheck behavior.
Ploop-Iter: 1
* docs: align docs-typecheck docs
Document the current docs verification contract so contributors do not assume JavaScript examples are type-checked when only TypeScript snippets are enforced today.
Add regression coverage around the README language and framework integration guidance to keep those docs aligned with the implemented Next.js and docs-typecheck behavior as future changes land.
Ploop-Iter: 2
* docs: add start() troubleshooting guidance
Document the most common causes of the invalid workflow function error so users can resolve start() failures from the API docs and Next.js setup flow without having to infer build-time requirements from runtime behavior.
Keep the new troubleshooting page aligned with the shipped runtime message and add regression coverage so future wording or cross-link changes do not silently break that guidance.
Ploop-Iter: 3
* docs: align NestJS setup docs
Document both supported NestJS module formats and add a regression check so the getting-started guide stays aligned with the package README as the integration evolves.
Ploop-Iter: 1
* docs: tighten NestJS CommonJS guidance
Keep the NestJS getting-started guide consistent across the ESM and CommonJS paths so readers do not mix module settings or import styles mid-setup.
Strengthen the docs regression coverage around the later guide sections so future edits are more likely to preserve the supported CommonJS path documented in the package README.
Ploop-Iter: 2
* docs: align docs with recent workflow guidance
Document the recently added troubleshooting and observability patterns so the public docs stay aligned with the behavior users now encounter in practice.
This keeps the NestJS guide, workflow API reference, and docs regression coverage in sync with the runtime-facing guidance from recent changes.
Ploop-Iter: 3
* docs: audit docs coverage
Why: keep the docs aligned with recent API and runtime behavior changes so examples and reference pages don’t drift from the supported surface.
Ploop-Iter: 1
* test: add docs audit guards
Add regression coverage for doc surfaces that are easy to drift from implementation so docs audits catch mismatches early and keep published guidance aligned with the supported API surface.
Ploop-Iter: 2
* docs: add docs audit guards
Keep new observability and server-testing guidance anchored to machine-readable interfaces so follow-up implementation changes do not silently drift away from the documented agent and automation patterns.
Ploop-Iter: 3
* docs: align observability troubleshooting guidance
Keep the docs consistent so users get the same guidance when debugging hook token collisions and correlating workflow events with platform logs.
This prevents the event-sourcing reference from drifting away from the observability and error docs, and adds guard tests to catch regressions.
Ploop-Iter: 1
* Remove the unreferenced image file img-a-clean-minimal-technical-architecture-d-2026-02-27T14-07-52-1.png from the repo root, workbench/fastify/public/index.html (a Nitro example mistakenly placed in the fastify workbench by a ploop checkpoint), all .claude/worktrees/* submodule references, and all 15 string-presence audit guard tests in packages/docs-typecheck/src/__tests__/ (they only assert keyword presence, not semantic correctness). None of these belong in the docs audit PR.
* Address all PR #1466 review feedback from VaguelySerious, pranaygp, and ijjk:
1. Remove the "Machine-Readable Surfaces" section from docs/content/docs/observability/index.mdx (reviewers say it's unnecessary and already in world docs)
2. Remove all @skip-typecheck annotations from durable-agent.mdx (8) and server-based.mdx (1) — types exist in built packages/ai/dist after pnpm build
3. In durable-agent.mdx, change "machine-readable tool activity" to "tool call details" in the stream() return description
4. In durable-agent.mdx "Aborting Long-Running Streams" section, add a warning callout that abortSignal is not yet supported (blocked by #1301), recommend timeout instead
5. In event-sourcing.mdx, update requestId description: "On Vercel, requestId is the platform request ID when available. Other worlds are not expected to provide a requestId."
6. In get-world.mdx, change "user-friendly names from the machine-readable workflowName field" to "human-readable names from the workflowName field"
7. In start-invalid-workflow-function.mdx, add "// Does NOT work" comment above the bad example line
8. In with-workflow.mdx: reframe outputFileTracingRoot as a workaround (Next.js auto-detects by default per ijjk); change options description from "control local development behavior" to "configure the Next.js integration"; scope the callout to "workflows.local options only affect local development"
9. Drop the withWorkflow() options callout from docs/content/docs/getting-started/next.mdx
10. Remove the Next.js-specific outputFileTracingRoot callout from framework-integrations.mdx
11. Add a Troubleshooting section with the start() invalid-workflow-function error to all 9 non-Next getting-started guides (astro, express, fastify, hono, nestjs, nitro, nuxt, sveltekit, vite), each with framework-appropriate config check in point 2
* docs: absorb unique accuracy fixes from PR #1200
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
* docs: address review feedback on March docs audit
- durable-agent.mdx: "structured tool activity" → "tool call information"
per VaguelySerious's suggestion
- next.mdx: drop monorepo callout from getting-started per pranaygp
(too much context too early; info is in withWorkflow API ref)
* docs: fix 2 typecheck failures in encryption and nestjs guides
- encryption.mdx: add skip-typecheck for interface signature block
(getEncryptionKeyForRun overloads are not runnable code)
- nestjs.mdx: add skip-typecheck for WorkflowModule.forRoot config
snippet (fragment inside callout, full import shown above)
Verified: pnpm vitest run passes 300/300 in docs-typecheck.
VaguelySerious pushed a commit that referenced this pull request Apr 7, 2026
* docs: clarify Next monorepo setup
Prevent confusion when Next.js apps live below the repository root and workflow code imports sibling workspace packages.
This documents the output tracing root requirement at the point where users configure withWorkflow, so monorepo setups follow the same working patterns as the shipped Next.js integration instead of failing due to unresolved workspace imports.
Ploop-Iter: 1
* ploop: iteration 2 checkpoint
Automated checkpoint commit.
Ploop-Iter: 2
* ploop: iteration 3 checkpoint
Automated checkpoint commit.
Ploop-Iter: 3
* docs: audit recent documentation coverage
Capture recent workflow documentation updates so the public docs and package guidance stay aligned with the implementation and current docs-typecheck behavior.
Ploop-Iter: 1
* docs: align docs-typecheck docs
Document the current docs verification contract so contributors do not assume JavaScript examples are type-checked when only TypeScript snippets are enforced today.
Add regression coverage around the README language and framework integration guidance to keep those docs aligned with the implemented Next.js and docs-typecheck behavior as future changes land.
Ploop-Iter: 2
* docs: add start() troubleshooting guidance
Document the most common causes of the invalid workflow function error so users can resolve start() failures from the API docs and Next.js setup flow without having to infer build-time requirements from runtime behavior.
Keep the new troubleshooting page aligned with the shipped runtime message and add regression coverage so future wording or cross-link changes do not silently break that guidance.
Ploop-Iter: 3
* docs: align NestJS setup docs
Document both supported NestJS module formats and add a regression check so the getting-started guide stays aligned with the package README as the integration evolves.
Ploop-Iter: 1
* docs: tighten NestJS CommonJS guidance
Keep the NestJS getting-started guide consistent across the ESM and CommonJS paths so readers do not mix module settings or import styles mid-setup.
Strengthen the docs regression coverage around the later guide sections so future edits are more likely to preserve the supported CommonJS path documented in the package README.
Ploop-Iter: 2
* docs: align docs with recent workflow guidance
Document the recently added troubleshooting and observability patterns so the public docs stay aligned with the behavior users now encounter in practice.
This keeps the NestJS guide, workflow API reference, and docs regression coverage in sync with the runtime-facing guidance from recent changes.
Ploop-Iter: 3
* docs: audit docs coverage
Why: keep the docs aligned with recent API and runtime behavior changes so examples and reference pages don’t drift from the supported surface.
Ploop-Iter: 1
* test: add docs audit guards
Add regression coverage for doc surfaces that are easy to drift from implementation so docs audits catch mismatches early and keep published guidance aligned with the supported API surface.
Ploop-Iter: 2
* docs: add docs audit guards
Keep new observability and server-testing guidance anchored to machine-readable interfaces so follow-up implementation changes do not silently drift away from the documented agent and automation patterns.
Ploop-Iter: 3
* docs: align observability troubleshooting guidance
Keep the docs consistent so users get the same guidance when debugging hook token collisions and correlating workflow events with platform logs.
This prevents the event-sourcing reference from drifting away from the observability and error docs, and adds guard tests to catch regressions.
Ploop-Iter: 1
* Remove the unreferenced image file img-a-clean-minimal-technical-architecture-d-2026-02-27T14-07-52-1.png from the repo root, workbench/fastify/public/index.html (a Nitro example mistakenly placed in the fastify workbench by a ploop checkpoint), all .claude/worktrees/* submodule references, and all 15 string-presence audit guard tests in packages/docs-typecheck/src/__tests__/ (they only assert keyword presence, not semantic correctness). None of these belong in the docs audit PR.
* Address all PR #1466 review feedback from VaguelySerious, pranaygp, and ijjk:
1. Remove the "Machine-Readable Surfaces" section from docs/content/docs/observability/index.mdx (reviewers say it's unnecessary and already in world docs)
2. Remove all @skip-typecheck annotations from durable-agent.mdx (8) and server-based.mdx (1) — types exist in built packages/ai/dist after pnpm build
3. In durable-agent.mdx, change "machine-readable tool activity" to "tool call details" in the stream() return description
4. In durable-agent.mdx "Aborting Long-Running Streams" section, add a warning callout that abortSignal is not yet supported (blocked by #1301), recommend timeout instead
5. In event-sourcing.mdx, update requestId description: "On Vercel, requestId is the platform request ID when available. Other worlds are not expected to provide a requestId."
6. In get-world.mdx, change "user-friendly names from the machine-readable workflowName field" to "human-readable names from the workflowName field"
7. In start-invalid-workflow-function.mdx, add "// Does NOT work" comment above the bad example line
8. In with-workflow.mdx: reframe outputFileTracingRoot as a workaround (Next.js auto-detects by default per ijjk); change options description from "control local development behavior" to "configure the Next.js integration"; scope the callout to "workflows.local options only affect local development"
9. Drop the withWorkflow() options callout from docs/content/docs/getting-started/next.mdx
10. Remove the Next.js-specific outputFileTracingRoot callout from framework-integrations.mdx
11. Add a Troubleshooting section with the start() invalid-workflow-function error to all 9 non-Next getting-started guides (astro, express, fastify, hono, nestjs, nitro, nuxt, sveltekit, vite), each with framework-appropriate config check in point 2
* docs: absorb unique accuracy fixes from PR #1200
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
* docs: address review feedback on March docs audit
- durable-agent.mdx: "structured tool activity" → "tool call information"
per VaguelySerious's suggestion
- next.mdx: drop monorepo callout from getting-started per pranaygp
(too much context too early; info is in withWorkflow API ref)
* docs: fix 2 typecheck failures in encryption and nestjs guides
- encryption.mdx: add skip-typecheck for interface signature block
(getEncryptionKeyForRun overloads are not runnable code)
- nestjs.mdx: add skip-typecheck for WorkflowModule.forRoot config
snippet (fragment inside callout, full import shown above)
Verified: pnpm vitest run passes 300/300 in docs-typecheck.
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

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

Fix 12 documentation accuracy issues across API reference, foundations, and AI docs - #1200

Closed
johnlindquist wants to merge 5 commits into
mainfrom
worktree-swift-jumping-pizza
Closed

Fix 12 documentation accuracy issues across API reference, foundations, and AI docs#1200
johnlindquist wants to merge 5 commits into
mainfrom
worktree-swift-jumping-pizza

Conversation

@johnlindquist

Copy link
Copy Markdown
Contributor

Summary

Fixes validated documentation issues found during a comprehensive docs audit:

  • API reference: Fix nonexistent world.runs.cancel() in getWorld examples — replaced with cancelRun() from @workflow/core/runtime
  • Streaming guide: Fix import path mismatch (simple vs simple-streaming) and replace nonexistent run.result() with run.returnValue
  • World/Streamer interfaces: Add missing close?() and getEncryptionKeyForRun?() to World, fix runId type from string | Promise<string> to string in Streamer, add missing writeToStreamMulti? method
  • Deploying docs: Fix wrong Postgres world package name (@workflow-worlds/postgres@workflow/world-postgres)
  • AI docs: Fix tools naming mismatch (tools vs flightBookingTools), remove unused getWritable import, fix missing || operator, add missing RetryableError import, fix broken highlight annotation
  • Misc: Fix [!code highlight} typo, correct "Vite root directory" → "Astro project root directory", fix inaccurate npx "install globally" claim, remove fetch from Node.js core modules list

Test plan

  • Verify docs build succeeds
  • Spot-check corrected code examples compile against actual workflow exports
  • Verify getWorld cancel example uses correct cancelRun API
  • Verify World/Streamer interfaces match packages/world/src/interfaces.ts

Update docs examples that referenced outdated or incorrect APIs.
This fixes cancellation usage in get-world, stream import path and run return access in streaming, clarifies stream wording in starting-workflows, and removes fetch from Node.js core module examples.
Verified: node -e '...docs snippet verification passed' (requested old/new snippets checked in 4 files)
How to test: run the same node assertion command from repo root to confirm snippets.
Swarm-Agent: codex-core-docs
Correct World interface docs to include close() and getEncryptionKeyForRun() overloads, and clarify their runtime behavior.
Update Streamer runId types to string, add writeToStreamMulti(), and document it as an optional batching optimization.
Also fix package references from @workflow-worlds/postgres to @workflow/world-postgres.
Verified: pnpm biome check docs/content/docs/deploying/building-a-world.mdx docs/content/docs/deploying/index.mdx (fails because Biome config ignores *.mdx paths)
Verified: node <<'NODE' ... scoped assertions on docs/content/docs/deploying/building-a-world.mdx and docs/content/docs/deploying/index.mdx (pass)
Swarm-Agent: codex-world-interface
Align code examples across AI docs by renaming the tools export, fixing import snippets, restoring a missing logical OR, adding missing RetryableError import context, and repairing a broken highlight annotation.
Verified: git diff --check -- docs/content/docs/ai/index.mdx docs/content/docs/ai/sleep-and-delays.mdx docs/content/docs/ai/resumable-streams.mdx
Verified: set -euo pipefail; rg -n "export const flightBookingTools = \\{" docs/content/docs/ai/index.mdx; rg -n "import \\{ flightBookingTools \\} from \"@/ai/tools\";" docs/content/docs/ai/index.mdx; rg -n "import \\{ sleep \\} from \"workflow\";" docs/content/docs/ai/sleep-and-delays.mdx; rg -n "tool-checkBaggageAllowance\" \\|\\|" docs/content/docs/ai/sleep-and-delays.mdx; rg -n "part.type === \"tool-sleep\"" docs/content/docs/ai/sleep-and-delays.mdx; rg -n "import \\{ RetryableError \\} from \"workflow\";" docs/content/docs/ai/sleep-and-delays.mdx; rg -n "headers: \\{ // \\[!code highlight\\]" docs/content/docs/ai/resumable-streams.mdx
Swarm-Agent: codex-ai-docs
Update three docs files to fix a malformed code-highlight annotation,\nclarify Astro directory wording, and correct npx behavior wording.\n\nVerified: set -e; rg assertions for old/new strings in all 3 files (pass)\nVerified: git diff --check -- docs/content/docs/errors/start-invalid-workflow-function.mdx docs/content/docs/getting-started/astro.mdx docs/content/docs/observability/index.mdx (pass)\nVerified: npx -y prettier@3 --check docs/content/docs/errors/start-invalid-workflow-function.mdx docs/content/docs/getting-started/astro.mdx docs/content/docs/observability/index.mdx (fails: pre-existing formatting style mismatch in docs)\nSwarm-Agent: codex-misc-fixes
@johnlindquist
johnlindquist requested a review from a team as a code ownerFebruary 26, 2026 04:23
@vercel

vercelBot commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Feb 26, 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🥇 Express0.025s (-22.3% 🟢)1.005s (~)0.979s101.00x
💻 LocalNitro0.033s (+2.8%)1.005s (~)0.972s101.31x
🐘 PostgresNitro0.054s (-4.1%)1.010s (~)0.956s102.13x
🐘 PostgresExpress0.056s (+4.3%)1.010s (~)0.955s102.19x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.410s (-23.3% 🟢)1.731s (-4.6%)1.321s101.00x
▲ VercelNext.js (Turbopack)0.458s (-19.1% 🟢)1.907s (-4.3%)1.449s101.12x
▲ VercelExpress0.458s (-28.0% 🟢)1.795s (-9.8% 🟢)1.337s101.12x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.072s (-3.3%)2.005s (~)0.933s101.00x
💻 LocalNitro1.112s (~)2.005s (~)0.893s101.04x
🐘 PostgresExpress1.129s (-0.9%)2.018s (~)0.889s101.05x
🐘 PostgresNitro1.131s (~)2.011s (~)0.880s101.05x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.975s (+1.3%)2.840s (-3.5%)0.865s101.00x
▲ VercelNext.js (Turbopack)2.077s (+6.8% 🔺)3.167s (+2.5%)1.090s101.05x
▲ VercelExpress2.145s (+1.7%)3.042s (-8.5% 🟢)0.897s101.09x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express10.554s (-2.6%)11.020s (~)0.467s31.00x
🐘 PostgresNitro10.841s (-0.5%)11.042s (~)0.201s31.03x
💻 LocalNitro10.861s (~)11.022s (~)0.160s31.03x
🐘 PostgresExpress10.918s (~)11.045s (~)0.126s31.03x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro16.812s (+5.2% 🔺)17.864s (+5.6% 🔺)1.052s21.00x
▲ VercelExpress16.985s (+1.1%)17.783s (-0.9%)0.797s21.01x
▲ VercelNext.js (Turbopack)17.249s (+6.6% 🔺)18.776s (+10.2% 🔺)1.527s21.03x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express26.763s (-2.6%)27.049s (-3.6%)0.286s31.00x
🐘 PostgresNitro27.309s (~)28.070s (~)0.762s31.02x
🐘 PostgresExpress27.319s (~)28.069s (~)0.750s31.02x
💻 LocalNitro27.587s (~)28.053s (~)0.466s31.03x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)44.431s (+2.3%)45.959s (+2.8%)1.527s21.00x
▲ VercelExpress44.937s (+5.1% 🔺)46.273s (+4.8%)1.336s21.01x
▲ VercelNitro45.338s (+6.5% 🔺)45.967s (+6.0% 🔺)0.629s21.02x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express54.971s (~)55.099s (~)0.128s21.00x
🐘 PostgresNitro55.087s (~)55.607s (-0.9%)0.521s21.00x
💻 LocalExpress55.663s (-2.7%)56.093s (-3.5%)0.430s21.01x
💻 LocalNitro57.379s (~)58.105s (~)0.726s21.04x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express95.058s (+3.0%)96.094s (+2.8%)1.036s11.00x
▲ VercelNitro99.276s (+7.0% 🔺)100.397s (+7.7% 🔺)1.121s11.04x
▲ VercelNext.js (Turbopack)100.990s (+0.7%)102.638s (+1.3%)1.648s11.06x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.353s (-3.9%)2.005s (~)0.652s151.00x
🐘 PostgresExpress1.366s (~)2.011s (~)0.646s151.01x
🐘 PostgresNitro1.377s (+1.8%)2.010s (~)0.634s151.02x
💻 LocalNitro1.402s (-2.1%)2.006s (~)0.604s151.04x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.150s (-4.7%)2.950s (-19.8% 🟢)0.800s111.00x
▲ VercelNitro2.204s (-13.9% 🟢)3.002s (-14.0% 🟢)0.798s101.03x
▲ VercelNext.js (Turbopack)2.600s (+17.2% 🔺)3.671s (+16.8% 🔺)1.071s91.21x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.009s (+3.6%)2.600s (+5.1% 🔺)0.591s121.00x
🐘 PostgresNitro2.013s (+3.4%)2.514s (~)0.501s121.00x
💻 LocalExpress2.280s (-9.7% 🟢)3.006s (~)0.727s101.13x
💻 LocalNitro2.488s (-4.9%)3.007s (~)0.519s101.24x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.693s (-15.9% 🟢)3.365s (-32.8% 🟢)0.671s91.00x
▲ VercelNext.js (Turbopack)3.022s (-4.2%)3.929s (-3.4%)0.907s81.12x
▲ VercelExpress3.126s (+25.4% 🔺)4.034s (+10.5% 🔺)0.908s81.16x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.627s (+6.1% 🔺)4.266s (+5.8% 🔺)0.639s81.00x
🐘 PostgresExpress3.780s (+14.9% 🔺)4.314s (+10.6% 🔺)0.534s71.04x
💻 LocalExpress6.192s (-17.8% 🟢)7.015s (-12.6% 🟢)0.823s51.71x
💻 LocalNitro7.011s (-5.2% 🟢)7.516s (-6.3% 🟢)0.505s41.93x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.232s (+0.5%)4.512s (-3.8%)1.280s71.00x
▲ VercelExpress3.765s (+20.7% 🔺)4.812s (+10.4% 🔺)1.046s71.16x
▲ VercelNext.js (Turbopack)3.967s (+10.3% 🔺)5.057s (+9.0% 🔺)1.090s61.23x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.355s (-5.2% 🟢)2.005s (~)0.650s151.00x
🐘 PostgresExpress1.374s (+1.1%)2.010s (~)0.636s151.01x
🐘 PostgresNitro1.386s (+1.6%)2.011s (~)0.625s151.02x
💻 LocalNitro1.429s (~)2.005s (~)0.576s151.05x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.188s (+8.1% 🔺)3.172s (+3.4%)0.984s101.00x
▲ VercelExpress2.205s (+4.4%)3.166s (-5.8% 🟢)0.960s101.01x
▲ VercelNitro2.224s (+4.0%)2.970s (-2.2%)0.746s111.02x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.034s (+1.7%)2.600s (+3.5%)0.566s121.00x
🐘 PostgresNitro2.074s (+5.9% 🔺)2.679s (+8.2% 🔺)0.605s121.02x
💻 LocalExpress2.417s (-9.4% 🟢)3.008s (~)0.590s101.19x
💻 LocalNitro2.615s (-5.0%)3.008s (~)0.393s101.29x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.953s (+22.5% 🔺)3.562s (+8.3% 🔺)0.609s91.00x
▲ VercelNext.js (Turbopack)3.370s (+33.5% 🔺)4.422s (+32.5% 🔺)1.051s71.14x
▲ VercelExpress3.438s (+48.8% 🔺)4.189s (+22.3% 🔺)0.752s81.16x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.511s (+9.3% 🔺)4.315s (+10.8% 🔺)0.805s71.00x
🐘 PostgresExpress3.761s (+9.1% 🔺)4.451s (+7.3% 🔺)0.689s71.07x
💻 LocalExpress6.695s (-13.9% 🟢)7.014s (-15.2% 🟢)0.319s51.91x
💻 LocalNitro7.564s (-3.6%)8.019s (-5.9% 🟢)0.454s42.15x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.447s (+6.2% 🔺)4.363s (+4.0%)0.916s71.00x
▲ VercelNext.js (Turbopack)3.976s (+17.7% 🔺)5.020s (+15.8% 🔺)1.044s61.15x
▲ VercelExpress4.801s (+60.2% 🔺)5.773s (+44.3% 🔺)0.972s71.39x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.109s (-37.3% 🟢)1.002s (~)0.009s (-12.8% 🟢)1.014s (~)0.906s101.00x
💻 LocalNitro0.182s (+2.8%)1.002s (~)0.011s (-3.6%)1.016s (~)0.834s101.68x
🐘 PostgresExpress0.189s (-1.8%)0.997s (+0.5%)0.001s (-6.7% 🟢)1.012s (~)0.822s101.74x
🐘 PostgresNitro0.194s (-1.6%)0.996s (~)0.001s (-17.6% 🟢)1.013s (~)0.820s101.78x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.615s (+3.2%)2.237s (+18.6% 🔺)0.101s (-4.4%)2.705s (+10.1% 🔺)1.090s101.00x
▲ VercelNext.js (Turbopack)1.639s (+11.1% 🔺)2.160s (+23.6% 🔺)0.095s (~)2.688s (+20.1% 🔺)1.050s101.01x
▲ VercelNitro1.787s (+26.0% 🔺)2.509s (+47.8% 🔺)0.081s (-28.5% 🟢)2.960s (+35.6% 🔺)1.173s101.11x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress12/12
🐘 PostgresExpress7/12
▲ VercelNitro7/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local7/12
Next.js (Turbopack)▲ Vercel12/12
Nitro🐘 Postgres7/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
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@changeset-bot

changeset-botBot commented Feb 26, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 9fe76fa

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

github-actionsBot commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production523049572
✅ 💻 Local Development556068624
✅ 📦 Local Production556068624
❌ 🐘 Local Postgres555168624
✅ 🪟 Windows490352
❌ 🌍 Community Worlds111459165
✅ 📋 Other135021156
Total2485462862817

❌ Failed Tests

🐘 Local Postgres (1 failed)

astro-stable (1 failed):

  • webhookWorkflow
🌍 Community Worlds (45 failed)

turso (45 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • parallelSleepWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • 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 retry behavior workflow completes despite transient 5xx on step_completed
  • 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 (queue-based) - workflow and step endpoints respond to health check messages
  • 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
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • cancelRun - cancelling a running workflow
  • cancelRun via CLI - cancelling a running workflow
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4705
✅ example4705
✅ express4705
✅ fastify4705
✅ hono4705
✅ nextjs-turbopack5002
✅ nextjs-webpack5002
✅ nitro4705
✅ nuxt4705
✅ sveltekit4705
✅ vite4705
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
❌ 🐘 Local Postgres
AppPassedFailedSkipped
❌ astro-stable4417
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4903
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4903
✅ redis-dev300
✅ redis4903
✅ turso-dev300
❌ turso4453
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4507
✅ e2e-local-postgres-nest-stable4507
✅ e2e-local-prod-nest-stable4507

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: success
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: failure
  • Windows: success

Check the workflow run for details.

The first overload of events.create() accepts string | null, not just
null. Clients can provide their own runId for run_created events.
VaguelySerious
VaguelySerious previously approved these changes Feb 26, 2026

```typescript lineNumbers
import { getWorld} from "workflow/runtime";
import { getWorld, cancelRun } from "@workflow/core/runtime";

@pranaygppranaygpMar 1, 2026

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.

nah the correct way to programmatically cancel a run is await getRun(runId).cancel() - not cancelRun from world. We don't adequately document it though so good call on making this. We should include an example in getRun api reference for cancelling a run so that it's searchable by AI. right now it's not well documented

Also users should almost never be importing from @workflow/core for normal usage. workflow/api should be what people use for normal behavior. using getWorld is an advanced/low level features that will break often as we change things around and not meant to be relied on

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

using getWorld is an advanced/low level features that will break often as we change things around and not meant to be relied on

At least once we actually have a different way of querying the same data, which we won't for a while? In which case it wouldn't hurt to document. Users could already be relying on it

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.

I don't think we should document it and then have to support it

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.

also like I said, for now the fix is simple. we have run.cancel(). let's document that instead of telling people to use @workflow/core/runtime which is never meant to be user facing

@pranaygp
pranaygp dismissed VaguelySerious’s stale reviewMarch 2, 2026 21:36

we shouldn't document and recommend cancelRun from @workflow/core/runtime. it should be run.cancel

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

Good docs audit overall — most fixes here are correct and helpful. The interface updates, typo fixes, run.returnValue, import path corrections, and flightBookingTools rename are all verified against the source.

The main blocker is the cancelRun change (already discussed in the thread) — it needs to use the public API instead of an internal module.


```typescript lineNumbers
import { getWorld} from "workflow/runtime";
import { getWorld, cancelRun } from "@workflow/core/runtime";

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.

As pranaygp noted in the earlier thread, this should use the public API:

import{getRun}from"workflow/runtime";exportasyncfunctionPOST(req: Request){const{ runId }=awaitreq.json();// ...construn=getRun(runId);awaitrun.cancel();returnResponse.json({status: "cancelled"});}

cancelRun from @workflow/core/runtime is an internal function — users should never import from @workflow/core directly. getRun(runId).cancel() is the supported public API for this (exported from workflow/runtime).

events: {
// Create a new workflow run (runId must be null - server generates it)
create(runId: null, data: RunCreatedEventRequest, params?: CreateEventParams): Promise<EventResult>;
// Create a new workflow run (runId may be client-provided or null for server generation)

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.

Nit: The source code doc comment (interfaces.ts:130) says: "The runId may be provided by the client or left as null for the server to generate." Consider matching this wording exactly for consistency between source and docs.

@@ -34,10 +34,13 @@ A World connects workflows to the infrastructure that powers them. The World int
```typescript
interface World extends Storage, Queue, Streamer {
start?(): Promise<void>;

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.

Verified: the close?() and getEncryptionKeyForRun?() additions match the actual World interface in packages/world/src/interfaces.ts exactly. 👍

johnlindquist added a commit that referenced this pull request Apr 6, 2026
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
@johnlindquist

Copy link
Copy Markdown
ContributorAuthor

Closing — fixes have been dispositioned:

  • 3 fixes already on main (ai/index.mdx variable rename, ai/resumable-streams.mdx highlight bracket, ai/sleep-and-delays.mdx import/operator fixes) — these were merged in subsequent PRs.
  • 3 fixes covered by docs: March docs audit and alignment #1466 (get-world.mdx, start-invalid-workflow-function.mdx, astro.mdx) — docs: March docs audit and alignment #1466 has more comprehensive rewrites of these files that include these corrections.
  • 6 unique fixes cherry-picked into docs: March docs audit and alignment #1466 (observability CLI wording, fetch removal from restricted modules, package name fix, stream wording, import path fix, World/Streamer interface updates) — committed to march-docs-audit branch.

No content lost.

johnlindquist added a commit that referenced this pull request Apr 6, 2026
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
johnlindquist added a commit that referenced this pull request Apr 6, 2026
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
pranaygp pushed a commit that referenced this pull request Apr 7, 2026
* docs: clarify Next monorepo setup
Prevent confusion when Next.js apps live below the repository root and workflow code imports sibling workspace packages.
This documents the output tracing root requirement at the point where users configure withWorkflow, so monorepo setups follow the same working patterns as the shipped Next.js integration instead of failing due to unresolved workspace imports.
Ploop-Iter: 1
* ploop: iteration 2 checkpoint
Automated checkpoint commit.
Ploop-Iter: 2
* ploop: iteration 3 checkpoint
Automated checkpoint commit.
Ploop-Iter: 3
* docs: audit recent documentation coverage
Capture recent workflow documentation updates so the public docs and package guidance stay aligned with the implementation and current docs-typecheck behavior.
Ploop-Iter: 1
* docs: align docs-typecheck docs
Document the current docs verification contract so contributors do not assume JavaScript examples are type-checked when only TypeScript snippets are enforced today.
Add regression coverage around the README language and framework integration guidance to keep those docs aligned with the implemented Next.js and docs-typecheck behavior as future changes land.
Ploop-Iter: 2
* docs: add start() troubleshooting guidance
Document the most common causes of the invalid workflow function error so users can resolve start() failures from the API docs and Next.js setup flow without having to infer build-time requirements from runtime behavior.
Keep the new troubleshooting page aligned with the shipped runtime message and add regression coverage so future wording or cross-link changes do not silently break that guidance.
Ploop-Iter: 3
* docs: align NestJS setup docs
Document both supported NestJS module formats and add a regression check so the getting-started guide stays aligned with the package README as the integration evolves.
Ploop-Iter: 1
* docs: tighten NestJS CommonJS guidance
Keep the NestJS getting-started guide consistent across the ESM and CommonJS paths so readers do not mix module settings or import styles mid-setup.
Strengthen the docs regression coverage around the later guide sections so future edits are more likely to preserve the supported CommonJS path documented in the package README.
Ploop-Iter: 2
* docs: align docs with recent workflow guidance
Document the recently added troubleshooting and observability patterns so the public docs stay aligned with the behavior users now encounter in practice.
This keeps the NestJS guide, workflow API reference, and docs regression coverage in sync with the runtime-facing guidance from recent changes.
Ploop-Iter: 3
* docs: audit docs coverage
Why: keep the docs aligned with recent API and runtime behavior changes so examples and reference pages don’t drift from the supported surface.
Ploop-Iter: 1
* test: add docs audit guards
Add regression coverage for doc surfaces that are easy to drift from implementation so docs audits catch mismatches early and keep published guidance aligned with the supported API surface.
Ploop-Iter: 2
* docs: add docs audit guards
Keep new observability and server-testing guidance anchored to machine-readable interfaces so follow-up implementation changes do not silently drift away from the documented agent and automation patterns.
Ploop-Iter: 3
* docs: align observability troubleshooting guidance
Keep the docs consistent so users get the same guidance when debugging hook token collisions and correlating workflow events with platform logs.
This prevents the event-sourcing reference from drifting away from the observability and error docs, and adds guard tests to catch regressions.
Ploop-Iter: 1
* Remove the unreferenced image file img-a-clean-minimal-technical-architecture-d-2026-02-27T14-07-52-1.png from the repo root, workbench/fastify/public/index.html (a Nitro example mistakenly placed in the fastify workbench by a ploop checkpoint), all .claude/worktrees/* submodule references, and all 15 string-presence audit guard tests in packages/docs-typecheck/src/__tests__/ (they only assert keyword presence, not semantic correctness). None of these belong in the docs audit PR.
* Address all PR #1466 review feedback from VaguelySerious, pranaygp, and ijjk:
1. Remove the "Machine-Readable Surfaces" section from docs/content/docs/observability/index.mdx (reviewers say it's unnecessary and already in world docs)
2. Remove all @skip-typecheck annotations from durable-agent.mdx (8) and server-based.mdx (1) — types exist in built packages/ai/dist after pnpm build
3. In durable-agent.mdx, change "machine-readable tool activity" to "tool call details" in the stream() return description
4. In durable-agent.mdx "Aborting Long-Running Streams" section, add a warning callout that abortSignal is not yet supported (blocked by #1301), recommend timeout instead
5. In event-sourcing.mdx, update requestId description: "On Vercel, requestId is the platform request ID when available. Other worlds are not expected to provide a requestId."
6. In get-world.mdx, change "user-friendly names from the machine-readable workflowName field" to "human-readable names from the workflowName field"
7. In start-invalid-workflow-function.mdx, add "// Does NOT work" comment above the bad example line
8. In with-workflow.mdx: reframe outputFileTracingRoot as a workaround (Next.js auto-detects by default per ijjk); change options description from "control local development behavior" to "configure the Next.js integration"; scope the callout to "workflows.local options only affect local development"
9. Drop the withWorkflow() options callout from docs/content/docs/getting-started/next.mdx
10. Remove the Next.js-specific outputFileTracingRoot callout from framework-integrations.mdx
11. Add a Troubleshooting section with the start() invalid-workflow-function error to all 9 non-Next getting-started guides (astro, express, fastify, hono, nestjs, nitro, nuxt, sveltekit, vite), each with framework-appropriate config check in point 2
* docs: absorb unique accuracy fixes from PR #1200
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
* docs: address review feedback on March docs audit
- durable-agent.mdx: "structured tool activity" → "tool call information"
per VaguelySerious's suggestion
- next.mdx: drop monorepo callout from getting-started per pranaygp
(too much context too early; info is in withWorkflow API ref)
* docs: fix 2 typecheck failures in encryption and nestjs guides
- encryption.mdx: add skip-typecheck for interface signature block
(getEncryptionKeyForRun overloads are not runnable code)
- nestjs.mdx: add skip-typecheck for WorkflowModule.forRoot config
snippet (fragment inside callout, full import shown above)
Verified: pnpm vitest run passes 300/300 in docs-typecheck.
VaguelySerious pushed a commit that referenced this pull request Apr 7, 2026
* docs: clarify Next monorepo setup
Prevent confusion when Next.js apps live below the repository root and workflow code imports sibling workspace packages.
This documents the output tracing root requirement at the point where users configure withWorkflow, so monorepo setups follow the same working patterns as the shipped Next.js integration instead of failing due to unresolved workspace imports.
Ploop-Iter: 1
* ploop: iteration 2 checkpoint
Automated checkpoint commit.
Ploop-Iter: 2
* ploop: iteration 3 checkpoint
Automated checkpoint commit.
Ploop-Iter: 3
* docs: audit recent documentation coverage
Capture recent workflow documentation updates so the public docs and package guidance stay aligned with the implementation and current docs-typecheck behavior.
Ploop-Iter: 1
* docs: align docs-typecheck docs
Document the current docs verification contract so contributors do not assume JavaScript examples are type-checked when only TypeScript snippets are enforced today.
Add regression coverage around the README language and framework integration guidance to keep those docs aligned with the implemented Next.js and docs-typecheck behavior as future changes land.
Ploop-Iter: 2
* docs: add start() troubleshooting guidance
Document the most common causes of the invalid workflow function error so users can resolve start() failures from the API docs and Next.js setup flow without having to infer build-time requirements from runtime behavior.
Keep the new troubleshooting page aligned with the shipped runtime message and add regression coverage so future wording or cross-link changes do not silently break that guidance.
Ploop-Iter: 3
* docs: align NestJS setup docs
Document both supported NestJS module formats and add a regression check so the getting-started guide stays aligned with the package README as the integration evolves.
Ploop-Iter: 1
* docs: tighten NestJS CommonJS guidance
Keep the NestJS getting-started guide consistent across the ESM and CommonJS paths so readers do not mix module settings or import styles mid-setup.
Strengthen the docs regression coverage around the later guide sections so future edits are more likely to preserve the supported CommonJS path documented in the package README.
Ploop-Iter: 2
* docs: align docs with recent workflow guidance
Document the recently added troubleshooting and observability patterns so the public docs stay aligned with the behavior users now encounter in practice.
This keeps the NestJS guide, workflow API reference, and docs regression coverage in sync with the runtime-facing guidance from recent changes.
Ploop-Iter: 3
* docs: audit docs coverage
Why: keep the docs aligned with recent API and runtime behavior changes so examples and reference pages don’t drift from the supported surface.
Ploop-Iter: 1
* test: add docs audit guards
Add regression coverage for doc surfaces that are easy to drift from implementation so docs audits catch mismatches early and keep published guidance aligned with the supported API surface.
Ploop-Iter: 2
* docs: add docs audit guards
Keep new observability and server-testing guidance anchored to machine-readable interfaces so follow-up implementation changes do not silently drift away from the documented agent and automation patterns.
Ploop-Iter: 3
* docs: align observability troubleshooting guidance
Keep the docs consistent so users get the same guidance when debugging hook token collisions and correlating workflow events with platform logs.
This prevents the event-sourcing reference from drifting away from the observability and error docs, and adds guard tests to catch regressions.
Ploop-Iter: 1
* Remove the unreferenced image file img-a-clean-minimal-technical-architecture-d-2026-02-27T14-07-52-1.png from the repo root, workbench/fastify/public/index.html (a Nitro example mistakenly placed in the fastify workbench by a ploop checkpoint), all .claude/worktrees/* submodule references, and all 15 string-presence audit guard tests in packages/docs-typecheck/src/__tests__/ (they only assert keyword presence, not semantic correctness). None of these belong in the docs audit PR.
* Address all PR #1466 review feedback from VaguelySerious, pranaygp, and ijjk:
1. Remove the "Machine-Readable Surfaces" section from docs/content/docs/observability/index.mdx (reviewers say it's unnecessary and already in world docs)
2. Remove all @skip-typecheck annotations from durable-agent.mdx (8) and server-based.mdx (1) — types exist in built packages/ai/dist after pnpm build
3. In durable-agent.mdx, change "machine-readable tool activity" to "tool call details" in the stream() return description
4. In durable-agent.mdx "Aborting Long-Running Streams" section, add a warning callout that abortSignal is not yet supported (blocked by #1301), recommend timeout instead
5. In event-sourcing.mdx, update requestId description: "On Vercel, requestId is the platform request ID when available. Other worlds are not expected to provide a requestId."
6. In get-world.mdx, change "user-friendly names from the machine-readable workflowName field" to "human-readable names from the workflowName field"
7. In start-invalid-workflow-function.mdx, add "// Does NOT work" comment above the bad example line
8. In with-workflow.mdx: reframe outputFileTracingRoot as a workaround (Next.js auto-detects by default per ijjk); change options description from "control local development behavior" to "configure the Next.js integration"; scope the callout to "workflows.local options only affect local development"
9. Drop the withWorkflow() options callout from docs/content/docs/getting-started/next.mdx
10. Remove the Next.js-specific outputFileTracingRoot callout from framework-integrations.mdx
11. Add a Troubleshooting section with the start() invalid-workflow-function error to all 9 non-Next getting-started guides (astro, express, fastify, hono, nestjs, nitro, nuxt, sveltekit, vite), each with framework-appropriate config check in point 2
* docs: absorb unique accuracy fixes from PR #1200
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
* docs: address review feedback on March docs audit
- durable-agent.mdx: "structured tool activity" → "tool call information"
per VaguelySerious's suggestion
- next.mdx: drop monorepo callout from getting-started per pranaygp
(too much context too early; info is in withWorkflow API ref)
* docs: fix 2 typecheck failures in encryption and nestjs guides
- encryption.mdx: add skip-typecheck for interface signature block
(getEncryptionKeyForRun overloads are not runnable code)
- nestjs.mdx: add skip-typecheck for WorkflowModule.forRoot config
snippet (fragment inside callout, full import shown above)
Verified: pnpm vitest run passes 300/300 in docs-typecheck.
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

@johnlindquist@pranaygp@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Fix 12 documentation accuracy issues across API reference, foundations, and AI docs by johnlindquist · Pull Request #1200 · vercel/workflow · GitHub
Skip to content

Fix 12 documentation accuracy issues across API reference, foundations, and AI docs - #1200

Closed
johnlindquist wants to merge 5 commits into
mainfrom
worktree-swift-jumping-pizza
Closed

Fix 12 documentation accuracy issues across API reference, foundations, and AI docs#1200
johnlindquist wants to merge 5 commits into
mainfrom
worktree-swift-jumping-pizza

Conversation

@johnlindquist

Copy link
Copy Markdown
Contributor

Summary

Fixes validated documentation issues found during a comprehensive docs audit:

  • API reference: Fix nonexistent world.runs.cancel() in getWorld examples — replaced with cancelRun() from @workflow/core/runtime
  • Streaming guide: Fix import path mismatch (simple vs simple-streaming) and replace nonexistent run.result() with run.returnValue
  • World/Streamer interfaces: Add missing close?() and getEncryptionKeyForRun?() to World, fix runId type from string | Promise<string> to string in Streamer, add missing writeToStreamMulti? method
  • Deploying docs: Fix wrong Postgres world package name (@workflow-worlds/postgres@workflow/world-postgres)
  • AI docs: Fix tools naming mismatch (tools vs flightBookingTools), remove unused getWritable import, fix missing || operator, add missing RetryableError import, fix broken highlight annotation
  • Misc: Fix [!code highlight} typo, correct "Vite root directory" → "Astro project root directory", fix inaccurate npx "install globally" claim, remove fetch from Node.js core modules list

Test plan

  • Verify docs build succeeds
  • Spot-check corrected code examples compile against actual workflow exports
  • Verify getWorld cancel example uses correct cancelRun API
  • Verify World/Streamer interfaces match packages/world/src/interfaces.ts

Update docs examples that referenced outdated or incorrect APIs.
This fixes cancellation usage in get-world, stream import path and run return access in streaming, clarifies stream wording in starting-workflows, and removes fetch from Node.js core module examples.
Verified: node -e '...docs snippet verification passed' (requested old/new snippets checked in 4 files)
How to test: run the same node assertion command from repo root to confirm snippets.
Swarm-Agent: codex-core-docs
Correct World interface docs to include close() and getEncryptionKeyForRun() overloads, and clarify their runtime behavior.
Update Streamer runId types to string, add writeToStreamMulti(), and document it as an optional batching optimization.
Also fix package references from @workflow-worlds/postgres to @workflow/world-postgres.
Verified: pnpm biome check docs/content/docs/deploying/building-a-world.mdx docs/content/docs/deploying/index.mdx (fails because Biome config ignores *.mdx paths)
Verified: node <<'NODE' ... scoped assertions on docs/content/docs/deploying/building-a-world.mdx and docs/content/docs/deploying/index.mdx (pass)
Swarm-Agent: codex-world-interface
Align code examples across AI docs by renaming the tools export, fixing import snippets, restoring a missing logical OR, adding missing RetryableError import context, and repairing a broken highlight annotation.
Verified: git diff --check -- docs/content/docs/ai/index.mdx docs/content/docs/ai/sleep-and-delays.mdx docs/content/docs/ai/resumable-streams.mdx
Verified: set -euo pipefail; rg -n "export const flightBookingTools = \\{" docs/content/docs/ai/index.mdx; rg -n "import \\{ flightBookingTools \\} from \"@/ai/tools\";" docs/content/docs/ai/index.mdx; rg -n "import \\{ sleep \\} from \"workflow\";" docs/content/docs/ai/sleep-and-delays.mdx; rg -n "tool-checkBaggageAllowance\" \\|\\|" docs/content/docs/ai/sleep-and-delays.mdx; rg -n "part.type === \"tool-sleep\"" docs/content/docs/ai/sleep-and-delays.mdx; rg -n "import \\{ RetryableError \\} from \"workflow\";" docs/content/docs/ai/sleep-and-delays.mdx; rg -n "headers: \\{ // \\[!code highlight\\]" docs/content/docs/ai/resumable-streams.mdx
Swarm-Agent: codex-ai-docs
Update three docs files to fix a malformed code-highlight annotation,\nclarify Astro directory wording, and correct npx behavior wording.\n\nVerified: set -e; rg assertions for old/new strings in all 3 files (pass)\nVerified: git diff --check -- docs/content/docs/errors/start-invalid-workflow-function.mdx docs/content/docs/getting-started/astro.mdx docs/content/docs/observability/index.mdx (pass)\nVerified: npx -y prettier@3 --check docs/content/docs/errors/start-invalid-workflow-function.mdx docs/content/docs/getting-started/astro.mdx docs/content/docs/observability/index.mdx (fails: pre-existing formatting style mismatch in docs)\nSwarm-Agent: codex-misc-fixes
@johnlindquist
johnlindquist requested a review from a team as a code ownerFebruary 26, 2026 04:23
@vercel

vercelBot commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Feb 26, 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🥇 Express0.025s (-22.3% 🟢)1.005s (~)0.979s101.00x
💻 LocalNitro0.033s (+2.8%)1.005s (~)0.972s101.31x
🐘 PostgresNitro0.054s (-4.1%)1.010s (~)0.956s102.13x
🐘 PostgresExpress0.056s (+4.3%)1.010s (~)0.955s102.19x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.410s (-23.3% 🟢)1.731s (-4.6%)1.321s101.00x
▲ VercelNext.js (Turbopack)0.458s (-19.1% 🟢)1.907s (-4.3%)1.449s101.12x
▲ VercelExpress0.458s (-28.0% 🟢)1.795s (-9.8% 🟢)1.337s101.12x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.072s (-3.3%)2.005s (~)0.933s101.00x
💻 LocalNitro1.112s (~)2.005s (~)0.893s101.04x
🐘 PostgresExpress1.129s (-0.9%)2.018s (~)0.889s101.05x
🐘 PostgresNitro1.131s (~)2.011s (~)0.880s101.05x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.975s (+1.3%)2.840s (-3.5%)0.865s101.00x
▲ VercelNext.js (Turbopack)2.077s (+6.8% 🔺)3.167s (+2.5%)1.090s101.05x
▲ VercelExpress2.145s (+1.7%)3.042s (-8.5% 🟢)0.897s101.09x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express10.554s (-2.6%)11.020s (~)0.467s31.00x
🐘 PostgresNitro10.841s (-0.5%)11.042s (~)0.201s31.03x
💻 LocalNitro10.861s (~)11.022s (~)0.160s31.03x
🐘 PostgresExpress10.918s (~)11.045s (~)0.126s31.03x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro16.812s (+5.2% 🔺)17.864s (+5.6% 🔺)1.052s21.00x
▲ VercelExpress16.985s (+1.1%)17.783s (-0.9%)0.797s21.01x
▲ VercelNext.js (Turbopack)17.249s (+6.6% 🔺)18.776s (+10.2% 🔺)1.527s21.03x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express26.763s (-2.6%)27.049s (-3.6%)0.286s31.00x
🐘 PostgresNitro27.309s (~)28.070s (~)0.762s31.02x
🐘 PostgresExpress27.319s (~)28.069s (~)0.750s31.02x
💻 LocalNitro27.587s (~)28.053s (~)0.466s31.03x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)44.431s (+2.3%)45.959s (+2.8%)1.527s21.00x
▲ VercelExpress44.937s (+5.1% 🔺)46.273s (+4.8%)1.336s21.01x
▲ VercelNitro45.338s (+6.5% 🔺)45.967s (+6.0% 🔺)0.629s21.02x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express54.971s (~)55.099s (~)0.128s21.00x
🐘 PostgresNitro55.087s (~)55.607s (-0.9%)0.521s21.00x
💻 LocalExpress55.663s (-2.7%)56.093s (-3.5%)0.430s21.01x
💻 LocalNitro57.379s (~)58.105s (~)0.726s21.04x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express95.058s (+3.0%)96.094s (+2.8%)1.036s11.00x
▲ VercelNitro99.276s (+7.0% 🔺)100.397s (+7.7% 🔺)1.121s11.04x
▲ VercelNext.js (Turbopack)100.990s (+0.7%)102.638s (+1.3%)1.648s11.06x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.353s (-3.9%)2.005s (~)0.652s151.00x
🐘 PostgresExpress1.366s (~)2.011s (~)0.646s151.01x
🐘 PostgresNitro1.377s (+1.8%)2.010s (~)0.634s151.02x
💻 LocalNitro1.402s (-2.1%)2.006s (~)0.604s151.04x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.150s (-4.7%)2.950s (-19.8% 🟢)0.800s111.00x
▲ VercelNitro2.204s (-13.9% 🟢)3.002s (-14.0% 🟢)0.798s101.03x
▲ VercelNext.js (Turbopack)2.600s (+17.2% 🔺)3.671s (+16.8% 🔺)1.071s91.21x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.009s (+3.6%)2.600s (+5.1% 🔺)0.591s121.00x
🐘 PostgresNitro2.013s (+3.4%)2.514s (~)0.501s121.00x
💻 LocalExpress2.280s (-9.7% 🟢)3.006s (~)0.727s101.13x
💻 LocalNitro2.488s (-4.9%)3.007s (~)0.519s101.24x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.693s (-15.9% 🟢)3.365s (-32.8% 🟢)0.671s91.00x
▲ VercelNext.js (Turbopack)3.022s (-4.2%)3.929s (-3.4%)0.907s81.12x
▲ VercelExpress3.126s (+25.4% 🔺)4.034s (+10.5% 🔺)0.908s81.16x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.627s (+6.1% 🔺)4.266s (+5.8% 🔺)0.639s81.00x
🐘 PostgresExpress3.780s (+14.9% 🔺)4.314s (+10.6% 🔺)0.534s71.04x
💻 LocalExpress6.192s (-17.8% 🟢)7.015s (-12.6% 🟢)0.823s51.71x
💻 LocalNitro7.011s (-5.2% 🟢)7.516s (-6.3% 🟢)0.505s41.93x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.232s (+0.5%)4.512s (-3.8%)1.280s71.00x
▲ VercelExpress3.765s (+20.7% 🔺)4.812s (+10.4% 🔺)1.046s71.16x
▲ VercelNext.js (Turbopack)3.967s (+10.3% 🔺)5.057s (+9.0% 🔺)1.090s61.23x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.355s (-5.2% 🟢)2.005s (~)0.650s151.00x
🐘 PostgresExpress1.374s (+1.1%)2.010s (~)0.636s151.01x
🐘 PostgresNitro1.386s (+1.6%)2.011s (~)0.625s151.02x
💻 LocalNitro1.429s (~)2.005s (~)0.576s151.05x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.188s (+8.1% 🔺)3.172s (+3.4%)0.984s101.00x
▲ VercelExpress2.205s (+4.4%)3.166s (-5.8% 🟢)0.960s101.01x
▲ VercelNitro2.224s (+4.0%)2.970s (-2.2%)0.746s111.02x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.034s (+1.7%)2.600s (+3.5%)0.566s121.00x
🐘 PostgresNitro2.074s (+5.9% 🔺)2.679s (+8.2% 🔺)0.605s121.02x
💻 LocalExpress2.417s (-9.4% 🟢)3.008s (~)0.590s101.19x
💻 LocalNitro2.615s (-5.0%)3.008s (~)0.393s101.29x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.953s (+22.5% 🔺)3.562s (+8.3% 🔺)0.609s91.00x
▲ VercelNext.js (Turbopack)3.370s (+33.5% 🔺)4.422s (+32.5% 🔺)1.051s71.14x
▲ VercelExpress3.438s (+48.8% 🔺)4.189s (+22.3% 🔺)0.752s81.16x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.511s (+9.3% 🔺)4.315s (+10.8% 🔺)0.805s71.00x
🐘 PostgresExpress3.761s (+9.1% 🔺)4.451s (+7.3% 🔺)0.689s71.07x
💻 LocalExpress6.695s (-13.9% 🟢)7.014s (-15.2% 🟢)0.319s51.91x
💻 LocalNitro7.564s (-3.6%)8.019s (-5.9% 🟢)0.454s42.15x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.447s (+6.2% 🔺)4.363s (+4.0%)0.916s71.00x
▲ VercelNext.js (Turbopack)3.976s (+17.7% 🔺)5.020s (+15.8% 🔺)1.044s61.15x
▲ VercelExpress4.801s (+60.2% 🔺)5.773s (+44.3% 🔺)0.972s71.39x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.109s (-37.3% 🟢)1.002s (~)0.009s (-12.8% 🟢)1.014s (~)0.906s101.00x
💻 LocalNitro0.182s (+2.8%)1.002s (~)0.011s (-3.6%)1.016s (~)0.834s101.68x
🐘 PostgresExpress0.189s (-1.8%)0.997s (+0.5%)0.001s (-6.7% 🟢)1.012s (~)0.822s101.74x
🐘 PostgresNitro0.194s (-1.6%)0.996s (~)0.001s (-17.6% 🟢)1.013s (~)0.820s101.78x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.615s (+3.2%)2.237s (+18.6% 🔺)0.101s (-4.4%)2.705s (+10.1% 🔺)1.090s101.00x
▲ VercelNext.js (Turbopack)1.639s (+11.1% 🔺)2.160s (+23.6% 🔺)0.095s (~)2.688s (+20.1% 🔺)1.050s101.01x
▲ VercelNitro1.787s (+26.0% 🔺)2.509s (+47.8% 🔺)0.081s (-28.5% 🟢)2.960s (+35.6% 🔺)1.173s101.11x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress12/12
🐘 PostgresExpress7/12
▲ VercelNitro7/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local7/12
Next.js (Turbopack)▲ Vercel12/12
Nitro🐘 Postgres7/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
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@changeset-bot

changeset-botBot commented Feb 26, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 9fe76fa

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

github-actionsBot commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production523049572
✅ 💻 Local Development556068624
✅ 📦 Local Production556068624
❌ 🐘 Local Postgres555168624
✅ 🪟 Windows490352
❌ 🌍 Community Worlds111459165
✅ 📋 Other135021156
Total2485462862817

❌ Failed Tests

🐘 Local Postgres (1 failed)

astro-stable (1 failed):

  • webhookWorkflow
🌍 Community Worlds (45 failed)

turso (45 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • parallelSleepWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • 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 retry behavior workflow completes despite transient 5xx on step_completed
  • 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 (queue-based) - workflow and step endpoints respond to health check messages
  • 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
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • cancelRun - cancelling a running workflow
  • cancelRun via CLI - cancelling a running workflow
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4705
✅ example4705
✅ express4705
✅ fastify4705
✅ hono4705
✅ nextjs-turbopack5002
✅ nextjs-webpack5002
✅ nitro4705
✅ nuxt4705
✅ sveltekit4705
✅ vite4705
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
❌ 🐘 Local Postgres
AppPassedFailedSkipped
❌ astro-stable4417
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4903
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4903
✅ redis-dev300
✅ redis4903
✅ turso-dev300
❌ turso4453
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4507
✅ e2e-local-postgres-nest-stable4507
✅ e2e-local-prod-nest-stable4507

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: success
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: failure
  • Windows: success

Check the workflow run for details.

The first overload of events.create() accepts string | null, not just
null. Clients can provide their own runId for run_created events.
VaguelySerious
VaguelySerious previously approved these changes Feb 26, 2026

```typescript lineNumbers
import { getWorld} from "workflow/runtime";
import { getWorld, cancelRun } from "@workflow/core/runtime";

@pranaygppranaygpMar 1, 2026

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.

nah the correct way to programmatically cancel a run is await getRun(runId).cancel() - not cancelRun from world. We don't adequately document it though so good call on making this. We should include an example in getRun api reference for cancelling a run so that it's searchable by AI. right now it's not well documented

Also users should almost never be importing from @workflow/core for normal usage. workflow/api should be what people use for normal behavior. using getWorld is an advanced/low level features that will break often as we change things around and not meant to be relied on

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

using getWorld is an advanced/low level features that will break often as we change things around and not meant to be relied on

At least once we actually have a different way of querying the same data, which we won't for a while? In which case it wouldn't hurt to document. Users could already be relying on it

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.

I don't think we should document it and then have to support it

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.

also like I said, for now the fix is simple. we have run.cancel(). let's document that instead of telling people to use @workflow/core/runtime which is never meant to be user facing

@pranaygp
pranaygp dismissed VaguelySerious’s stale reviewMarch 2, 2026 21:36

we shouldn't document and recommend cancelRun from @workflow/core/runtime. it should be run.cancel

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

Good docs audit overall — most fixes here are correct and helpful. The interface updates, typo fixes, run.returnValue, import path corrections, and flightBookingTools rename are all verified against the source.

The main blocker is the cancelRun change (already discussed in the thread) — it needs to use the public API instead of an internal module.


```typescript lineNumbers
import { getWorld} from "workflow/runtime";
import { getWorld, cancelRun } from "@workflow/core/runtime";

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.

As pranaygp noted in the earlier thread, this should use the public API:

import{getRun}from"workflow/runtime";exportasyncfunctionPOST(req: Request){const{ runId }=awaitreq.json();// ...construn=getRun(runId);awaitrun.cancel();returnResponse.json({status: "cancelled"});}

cancelRun from @workflow/core/runtime is an internal function — users should never import from @workflow/core directly. getRun(runId).cancel() is the supported public API for this (exported from workflow/runtime).

events: {
// Create a new workflow run (runId must be null - server generates it)
create(runId: null, data: RunCreatedEventRequest, params?: CreateEventParams): Promise<EventResult>;
// Create a new workflow run (runId may be client-provided or null for server generation)

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.

Nit: The source code doc comment (interfaces.ts:130) says: "The runId may be provided by the client or left as null for the server to generate." Consider matching this wording exactly for consistency between source and docs.

@@ -34,10 +34,13 @@ A World connects workflows to the infrastructure that powers them. The World int
```typescript
interface World extends Storage, Queue, Streamer {
start?(): Promise<void>;

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.

Verified: the close?() and getEncryptionKeyForRun?() additions match the actual World interface in packages/world/src/interfaces.ts exactly. 👍

johnlindquist added a commit that referenced this pull request Apr 6, 2026
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
@johnlindquist

Copy link
Copy Markdown
ContributorAuthor

Closing — fixes have been dispositioned:

  • 3 fixes already on main (ai/index.mdx variable rename, ai/resumable-streams.mdx highlight bracket, ai/sleep-and-delays.mdx import/operator fixes) — these were merged in subsequent PRs.
  • 3 fixes covered by docs: March docs audit and alignment #1466 (get-world.mdx, start-invalid-workflow-function.mdx, astro.mdx) — docs: March docs audit and alignment #1466 has more comprehensive rewrites of these files that include these corrections.
  • 6 unique fixes cherry-picked into docs: March docs audit and alignment #1466 (observability CLI wording, fetch removal from restricted modules, package name fix, stream wording, import path fix, World/Streamer interface updates) — committed to march-docs-audit branch.

No content lost.

johnlindquist added a commit that referenced this pull request Apr 6, 2026
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
johnlindquist added a commit that referenced this pull request Apr 6, 2026
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
pranaygp pushed a commit that referenced this pull request Apr 7, 2026
* docs: clarify Next monorepo setup
Prevent confusion when Next.js apps live below the repository root and workflow code imports sibling workspace packages.
This documents the output tracing root requirement at the point where users configure withWorkflow, so monorepo setups follow the same working patterns as the shipped Next.js integration instead of failing due to unresolved workspace imports.
Ploop-Iter: 1
* ploop: iteration 2 checkpoint
Automated checkpoint commit.
Ploop-Iter: 2
* ploop: iteration 3 checkpoint
Automated checkpoint commit.
Ploop-Iter: 3
* docs: audit recent documentation coverage
Capture recent workflow documentation updates so the public docs and package guidance stay aligned with the implementation and current docs-typecheck behavior.
Ploop-Iter: 1
* docs: align docs-typecheck docs
Document the current docs verification contract so contributors do not assume JavaScript examples are type-checked when only TypeScript snippets are enforced today.
Add regression coverage around the README language and framework integration guidance to keep those docs aligned with the implemented Next.js and docs-typecheck behavior as future changes land.
Ploop-Iter: 2
* docs: add start() troubleshooting guidance
Document the most common causes of the invalid workflow function error so users can resolve start() failures from the API docs and Next.js setup flow without having to infer build-time requirements from runtime behavior.
Keep the new troubleshooting page aligned with the shipped runtime message and add regression coverage so future wording or cross-link changes do not silently break that guidance.
Ploop-Iter: 3
* docs: align NestJS setup docs
Document both supported NestJS module formats and add a regression check so the getting-started guide stays aligned with the package README as the integration evolves.
Ploop-Iter: 1
* docs: tighten NestJS CommonJS guidance
Keep the NestJS getting-started guide consistent across the ESM and CommonJS paths so readers do not mix module settings or import styles mid-setup.
Strengthen the docs regression coverage around the later guide sections so future edits are more likely to preserve the supported CommonJS path documented in the package README.
Ploop-Iter: 2
* docs: align docs with recent workflow guidance
Document the recently added troubleshooting and observability patterns so the public docs stay aligned with the behavior users now encounter in practice.
This keeps the NestJS guide, workflow API reference, and docs regression coverage in sync with the runtime-facing guidance from recent changes.
Ploop-Iter: 3
* docs: audit docs coverage
Why: keep the docs aligned with recent API and runtime behavior changes so examples and reference pages don’t drift from the supported surface.
Ploop-Iter: 1
* test: add docs audit guards
Add regression coverage for doc surfaces that are easy to drift from implementation so docs audits catch mismatches early and keep published guidance aligned with the supported API surface.
Ploop-Iter: 2
* docs: add docs audit guards
Keep new observability and server-testing guidance anchored to machine-readable interfaces so follow-up implementation changes do not silently drift away from the documented agent and automation patterns.
Ploop-Iter: 3
* docs: align observability troubleshooting guidance
Keep the docs consistent so users get the same guidance when debugging hook token collisions and correlating workflow events with platform logs.
This prevents the event-sourcing reference from drifting away from the observability and error docs, and adds guard tests to catch regressions.
Ploop-Iter: 1
* Remove the unreferenced image file img-a-clean-minimal-technical-architecture-d-2026-02-27T14-07-52-1.png from the repo root, workbench/fastify/public/index.html (a Nitro example mistakenly placed in the fastify workbench by a ploop checkpoint), all .claude/worktrees/* submodule references, and all 15 string-presence audit guard tests in packages/docs-typecheck/src/__tests__/ (they only assert keyword presence, not semantic correctness). None of these belong in the docs audit PR.
* Address all PR #1466 review feedback from VaguelySerious, pranaygp, and ijjk:
1. Remove the "Machine-Readable Surfaces" section from docs/content/docs/observability/index.mdx (reviewers say it's unnecessary and already in world docs)
2. Remove all @skip-typecheck annotations from durable-agent.mdx (8) and server-based.mdx (1) — types exist in built packages/ai/dist after pnpm build
3. In durable-agent.mdx, change "machine-readable tool activity" to "tool call details" in the stream() return description
4. In durable-agent.mdx "Aborting Long-Running Streams" section, add a warning callout that abortSignal is not yet supported (blocked by #1301), recommend timeout instead
5. In event-sourcing.mdx, update requestId description: "On Vercel, requestId is the platform request ID when available. Other worlds are not expected to provide a requestId."
6. In get-world.mdx, change "user-friendly names from the machine-readable workflowName field" to "human-readable names from the workflowName field"
7. In start-invalid-workflow-function.mdx, add "// Does NOT work" comment above the bad example line
8. In with-workflow.mdx: reframe outputFileTracingRoot as a workaround (Next.js auto-detects by default per ijjk); change options description from "control local development behavior" to "configure the Next.js integration"; scope the callout to "workflows.local options only affect local development"
9. Drop the withWorkflow() options callout from docs/content/docs/getting-started/next.mdx
10. Remove the Next.js-specific outputFileTracingRoot callout from framework-integrations.mdx
11. Add a Troubleshooting section with the start() invalid-workflow-function error to all 9 non-Next getting-started guides (astro, express, fastify, hono, nestjs, nitro, nuxt, sveltekit, vite), each with framework-appropriate config check in point 2
* docs: absorb unique accuracy fixes from PR #1200
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
* docs: address review feedback on March docs audit
- durable-agent.mdx: "structured tool activity" → "tool call information"
per VaguelySerious's suggestion
- next.mdx: drop monorepo callout from getting-started per pranaygp
(too much context too early; info is in withWorkflow API ref)
* docs: fix 2 typecheck failures in encryption and nestjs guides
- encryption.mdx: add skip-typecheck for interface signature block
(getEncryptionKeyForRun overloads are not runnable code)
- nestjs.mdx: add skip-typecheck for WorkflowModule.forRoot config
snippet (fragment inside callout, full import shown above)
Verified: pnpm vitest run passes 300/300 in docs-typecheck.
VaguelySerious pushed a commit that referenced this pull request Apr 7, 2026
* docs: clarify Next monorepo setup
Prevent confusion when Next.js apps live below the repository root and workflow code imports sibling workspace packages.
This documents the output tracing root requirement at the point where users configure withWorkflow, so monorepo setups follow the same working patterns as the shipped Next.js integration instead of failing due to unresolved workspace imports.
Ploop-Iter: 1
* ploop: iteration 2 checkpoint
Automated checkpoint commit.
Ploop-Iter: 2
* ploop: iteration 3 checkpoint
Automated checkpoint commit.
Ploop-Iter: 3
* docs: audit recent documentation coverage
Capture recent workflow documentation updates so the public docs and package guidance stay aligned with the implementation and current docs-typecheck behavior.
Ploop-Iter: 1
* docs: align docs-typecheck docs
Document the current docs verification contract so contributors do not assume JavaScript examples are type-checked when only TypeScript snippets are enforced today.
Add regression coverage around the README language and framework integration guidance to keep those docs aligned with the implemented Next.js and docs-typecheck behavior as future changes land.
Ploop-Iter: 2
* docs: add start() troubleshooting guidance
Document the most common causes of the invalid workflow function error so users can resolve start() failures from the API docs and Next.js setup flow without having to infer build-time requirements from runtime behavior.
Keep the new troubleshooting page aligned with the shipped runtime message and add regression coverage so future wording or cross-link changes do not silently break that guidance.
Ploop-Iter: 3
* docs: align NestJS setup docs
Document both supported NestJS module formats and add a regression check so the getting-started guide stays aligned with the package README as the integration evolves.
Ploop-Iter: 1
* docs: tighten NestJS CommonJS guidance
Keep the NestJS getting-started guide consistent across the ESM and CommonJS paths so readers do not mix module settings or import styles mid-setup.
Strengthen the docs regression coverage around the later guide sections so future edits are more likely to preserve the supported CommonJS path documented in the package README.
Ploop-Iter: 2
* docs: align docs with recent workflow guidance
Document the recently added troubleshooting and observability patterns so the public docs stay aligned with the behavior users now encounter in practice.
This keeps the NestJS guide, workflow API reference, and docs regression coverage in sync with the runtime-facing guidance from recent changes.
Ploop-Iter: 3
* docs: audit docs coverage
Why: keep the docs aligned with recent API and runtime behavior changes so examples and reference pages don’t drift from the supported surface.
Ploop-Iter: 1
* test: add docs audit guards
Add regression coverage for doc surfaces that are easy to drift from implementation so docs audits catch mismatches early and keep published guidance aligned with the supported API surface.
Ploop-Iter: 2
* docs: add docs audit guards
Keep new observability and server-testing guidance anchored to machine-readable interfaces so follow-up implementation changes do not silently drift away from the documented agent and automation patterns.
Ploop-Iter: 3
* docs: align observability troubleshooting guidance
Keep the docs consistent so users get the same guidance when debugging hook token collisions and correlating workflow events with platform logs.
This prevents the event-sourcing reference from drifting away from the observability and error docs, and adds guard tests to catch regressions.
Ploop-Iter: 1
* Remove the unreferenced image file img-a-clean-minimal-technical-architecture-d-2026-02-27T14-07-52-1.png from the repo root, workbench/fastify/public/index.html (a Nitro example mistakenly placed in the fastify workbench by a ploop checkpoint), all .claude/worktrees/* submodule references, and all 15 string-presence audit guard tests in packages/docs-typecheck/src/__tests__/ (they only assert keyword presence, not semantic correctness). None of these belong in the docs audit PR.
* Address all PR #1466 review feedback from VaguelySerious, pranaygp, and ijjk:
1. Remove the "Machine-Readable Surfaces" section from docs/content/docs/observability/index.mdx (reviewers say it's unnecessary and already in world docs)
2. Remove all @skip-typecheck annotations from durable-agent.mdx (8) and server-based.mdx (1) — types exist in built packages/ai/dist after pnpm build
3. In durable-agent.mdx, change "machine-readable tool activity" to "tool call details" in the stream() return description
4. In durable-agent.mdx "Aborting Long-Running Streams" section, add a warning callout that abortSignal is not yet supported (blocked by #1301), recommend timeout instead
5. In event-sourcing.mdx, update requestId description: "On Vercel, requestId is the platform request ID when available. Other worlds are not expected to provide a requestId."
6. In get-world.mdx, change "user-friendly names from the machine-readable workflowName field" to "human-readable names from the workflowName field"
7. In start-invalid-workflow-function.mdx, add "// Does NOT work" comment above the bad example line
8. In with-workflow.mdx: reframe outputFileTracingRoot as a workaround (Next.js auto-detects by default per ijjk); change options description from "control local development behavior" to "configure the Next.js integration"; scope the callout to "workflows.local options only affect local development"
9. Drop the withWorkflow() options callout from docs/content/docs/getting-started/next.mdx
10. Remove the Next.js-specific outputFileTracingRoot callout from framework-integrations.mdx
11. Add a Troubleshooting section with the start() invalid-workflow-function error to all 9 non-Next getting-started guides (astro, express, fastify, hono, nestjs, nitro, nuxt, sveltekit, vite), each with framework-appropriate config check in point 2
* docs: absorb unique accuracy fixes from PR #1200
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
* docs: address review feedback on March docs audit
- durable-agent.mdx: "structured tool activity" → "tool call information"
per VaguelySerious's suggestion
- next.mdx: drop monorepo callout from getting-started per pranaygp
(too much context too early; info is in withWorkflow API ref)
* docs: fix 2 typecheck failures in encryption and nestjs guides
- encryption.mdx: add skip-typecheck for interface signature block
(getEncryptionKeyForRun overloads are not runnable code)
- nestjs.mdx: add skip-typecheck for WorkflowModule.forRoot config
snippet (fragment inside callout, full import shown above)
Verified: pnpm vitest run passes 300/300 in docs-typecheck.
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

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

Fix 12 documentation accuracy issues across API reference, foundations, and AI docs - #1200

Closed
johnlindquist wants to merge 5 commits into
mainfrom
worktree-swift-jumping-pizza
Closed

Fix 12 documentation accuracy issues across API reference, foundations, and AI docs#1200
johnlindquist wants to merge 5 commits into
mainfrom
worktree-swift-jumping-pizza

Conversation

@johnlindquist

Copy link
Copy Markdown
Contributor

Summary

Fixes validated documentation issues found during a comprehensive docs audit:

  • API reference: Fix nonexistent world.runs.cancel() in getWorld examples — replaced with cancelRun() from @workflow/core/runtime
  • Streaming guide: Fix import path mismatch (simple vs simple-streaming) and replace nonexistent run.result() with run.returnValue
  • World/Streamer interfaces: Add missing close?() and getEncryptionKeyForRun?() to World, fix runId type from string | Promise<string> to string in Streamer, add missing writeToStreamMulti? method
  • Deploying docs: Fix wrong Postgres world package name (@workflow-worlds/postgres@workflow/world-postgres)
  • AI docs: Fix tools naming mismatch (tools vs flightBookingTools), remove unused getWritable import, fix missing || operator, add missing RetryableError import, fix broken highlight annotation
  • Misc: Fix [!code highlight} typo, correct "Vite root directory" → "Astro project root directory", fix inaccurate npx "install globally" claim, remove fetch from Node.js core modules list

Test plan

  • Verify docs build succeeds
  • Spot-check corrected code examples compile against actual workflow exports
  • Verify getWorld cancel example uses correct cancelRun API
  • Verify World/Streamer interfaces match packages/world/src/interfaces.ts

Update docs examples that referenced outdated or incorrect APIs.
This fixes cancellation usage in get-world, stream import path and run return access in streaming, clarifies stream wording in starting-workflows, and removes fetch from Node.js core module examples.
Verified: node -e '...docs snippet verification passed' (requested old/new snippets checked in 4 files)
How to test: run the same node assertion command from repo root to confirm snippets.
Swarm-Agent: codex-core-docs
Correct World interface docs to include close() and getEncryptionKeyForRun() overloads, and clarify their runtime behavior.
Update Streamer runId types to string, add writeToStreamMulti(), and document it as an optional batching optimization.
Also fix package references from @workflow-worlds/postgres to @workflow/world-postgres.
Verified: pnpm biome check docs/content/docs/deploying/building-a-world.mdx docs/content/docs/deploying/index.mdx (fails because Biome config ignores *.mdx paths)
Verified: node <<'NODE' ... scoped assertions on docs/content/docs/deploying/building-a-world.mdx and docs/content/docs/deploying/index.mdx (pass)
Swarm-Agent: codex-world-interface
Align code examples across AI docs by renaming the tools export, fixing import snippets, restoring a missing logical OR, adding missing RetryableError import context, and repairing a broken highlight annotation.
Verified: git diff --check -- docs/content/docs/ai/index.mdx docs/content/docs/ai/sleep-and-delays.mdx docs/content/docs/ai/resumable-streams.mdx
Verified: set -euo pipefail; rg -n "export const flightBookingTools = \\{" docs/content/docs/ai/index.mdx; rg -n "import \\{ flightBookingTools \\} from \"@/ai/tools\";" docs/content/docs/ai/index.mdx; rg -n "import \\{ sleep \\} from \"workflow\";" docs/content/docs/ai/sleep-and-delays.mdx; rg -n "tool-checkBaggageAllowance\" \\|\\|" docs/content/docs/ai/sleep-and-delays.mdx; rg -n "part.type === \"tool-sleep\"" docs/content/docs/ai/sleep-and-delays.mdx; rg -n "import \\{ RetryableError \\} from \"workflow\";" docs/content/docs/ai/sleep-and-delays.mdx; rg -n "headers: \\{ // \\[!code highlight\\]" docs/content/docs/ai/resumable-streams.mdx
Swarm-Agent: codex-ai-docs
Update three docs files to fix a malformed code-highlight annotation,\nclarify Astro directory wording, and correct npx behavior wording.\n\nVerified: set -e; rg assertions for old/new strings in all 3 files (pass)\nVerified: git diff --check -- docs/content/docs/errors/start-invalid-workflow-function.mdx docs/content/docs/getting-started/astro.mdx docs/content/docs/observability/index.mdx (pass)\nVerified: npx -y prettier@3 --check docs/content/docs/errors/start-invalid-workflow-function.mdx docs/content/docs/getting-started/astro.mdx docs/content/docs/observability/index.mdx (fails: pre-existing formatting style mismatch in docs)\nSwarm-Agent: codex-misc-fixes
@johnlindquist
johnlindquist requested a review from a team as a code ownerFebruary 26, 2026 04:23
@vercel

vercelBot commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Feb 26, 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🥇 Express0.025s (-22.3% 🟢)1.005s (~)0.979s101.00x
💻 LocalNitro0.033s (+2.8%)1.005s (~)0.972s101.31x
🐘 PostgresNitro0.054s (-4.1%)1.010s (~)0.956s102.13x
🐘 PostgresExpress0.056s (+4.3%)1.010s (~)0.955s102.19x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.410s (-23.3% 🟢)1.731s (-4.6%)1.321s101.00x
▲ VercelNext.js (Turbopack)0.458s (-19.1% 🟢)1.907s (-4.3%)1.449s101.12x
▲ VercelExpress0.458s (-28.0% 🟢)1.795s (-9.8% 🟢)1.337s101.12x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.072s (-3.3%)2.005s (~)0.933s101.00x
💻 LocalNitro1.112s (~)2.005s (~)0.893s101.04x
🐘 PostgresExpress1.129s (-0.9%)2.018s (~)0.889s101.05x
🐘 PostgresNitro1.131s (~)2.011s (~)0.880s101.05x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.975s (+1.3%)2.840s (-3.5%)0.865s101.00x
▲ VercelNext.js (Turbopack)2.077s (+6.8% 🔺)3.167s (+2.5%)1.090s101.05x
▲ VercelExpress2.145s (+1.7%)3.042s (-8.5% 🟢)0.897s101.09x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express10.554s (-2.6%)11.020s (~)0.467s31.00x
🐘 PostgresNitro10.841s (-0.5%)11.042s (~)0.201s31.03x
💻 LocalNitro10.861s (~)11.022s (~)0.160s31.03x
🐘 PostgresExpress10.918s (~)11.045s (~)0.126s31.03x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro16.812s (+5.2% 🔺)17.864s (+5.6% 🔺)1.052s21.00x
▲ VercelExpress16.985s (+1.1%)17.783s (-0.9%)0.797s21.01x
▲ VercelNext.js (Turbopack)17.249s (+6.6% 🔺)18.776s (+10.2% 🔺)1.527s21.03x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express26.763s (-2.6%)27.049s (-3.6%)0.286s31.00x
🐘 PostgresNitro27.309s (~)28.070s (~)0.762s31.02x
🐘 PostgresExpress27.319s (~)28.069s (~)0.750s31.02x
💻 LocalNitro27.587s (~)28.053s (~)0.466s31.03x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)44.431s (+2.3%)45.959s (+2.8%)1.527s21.00x
▲ VercelExpress44.937s (+5.1% 🔺)46.273s (+4.8%)1.336s21.01x
▲ VercelNitro45.338s (+6.5% 🔺)45.967s (+6.0% 🔺)0.629s21.02x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express54.971s (~)55.099s (~)0.128s21.00x
🐘 PostgresNitro55.087s (~)55.607s (-0.9%)0.521s21.00x
💻 LocalExpress55.663s (-2.7%)56.093s (-3.5%)0.430s21.01x
💻 LocalNitro57.379s (~)58.105s (~)0.726s21.04x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express95.058s (+3.0%)96.094s (+2.8%)1.036s11.00x
▲ VercelNitro99.276s (+7.0% 🔺)100.397s (+7.7% 🔺)1.121s11.04x
▲ VercelNext.js (Turbopack)100.990s (+0.7%)102.638s (+1.3%)1.648s11.06x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.353s (-3.9%)2.005s (~)0.652s151.00x
🐘 PostgresExpress1.366s (~)2.011s (~)0.646s151.01x
🐘 PostgresNitro1.377s (+1.8%)2.010s (~)0.634s151.02x
💻 LocalNitro1.402s (-2.1%)2.006s (~)0.604s151.04x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.150s (-4.7%)2.950s (-19.8% 🟢)0.800s111.00x
▲ VercelNitro2.204s (-13.9% 🟢)3.002s (-14.0% 🟢)0.798s101.03x
▲ VercelNext.js (Turbopack)2.600s (+17.2% 🔺)3.671s (+16.8% 🔺)1.071s91.21x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.009s (+3.6%)2.600s (+5.1% 🔺)0.591s121.00x
🐘 PostgresNitro2.013s (+3.4%)2.514s (~)0.501s121.00x
💻 LocalExpress2.280s (-9.7% 🟢)3.006s (~)0.727s101.13x
💻 LocalNitro2.488s (-4.9%)3.007s (~)0.519s101.24x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.693s (-15.9% 🟢)3.365s (-32.8% 🟢)0.671s91.00x
▲ VercelNext.js (Turbopack)3.022s (-4.2%)3.929s (-3.4%)0.907s81.12x
▲ VercelExpress3.126s (+25.4% 🔺)4.034s (+10.5% 🔺)0.908s81.16x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.627s (+6.1% 🔺)4.266s (+5.8% 🔺)0.639s81.00x
🐘 PostgresExpress3.780s (+14.9% 🔺)4.314s (+10.6% 🔺)0.534s71.04x
💻 LocalExpress6.192s (-17.8% 🟢)7.015s (-12.6% 🟢)0.823s51.71x
💻 LocalNitro7.011s (-5.2% 🟢)7.516s (-6.3% 🟢)0.505s41.93x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.232s (+0.5%)4.512s (-3.8%)1.280s71.00x
▲ VercelExpress3.765s (+20.7% 🔺)4.812s (+10.4% 🔺)1.046s71.16x
▲ VercelNext.js (Turbopack)3.967s (+10.3% 🔺)5.057s (+9.0% 🔺)1.090s61.23x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.355s (-5.2% 🟢)2.005s (~)0.650s151.00x
🐘 PostgresExpress1.374s (+1.1%)2.010s (~)0.636s151.01x
🐘 PostgresNitro1.386s (+1.6%)2.011s (~)0.625s151.02x
💻 LocalNitro1.429s (~)2.005s (~)0.576s151.05x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.188s (+8.1% 🔺)3.172s (+3.4%)0.984s101.00x
▲ VercelExpress2.205s (+4.4%)3.166s (-5.8% 🟢)0.960s101.01x
▲ VercelNitro2.224s (+4.0%)2.970s (-2.2%)0.746s111.02x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.034s (+1.7%)2.600s (+3.5%)0.566s121.00x
🐘 PostgresNitro2.074s (+5.9% 🔺)2.679s (+8.2% 🔺)0.605s121.02x
💻 LocalExpress2.417s (-9.4% 🟢)3.008s (~)0.590s101.19x
💻 LocalNitro2.615s (-5.0%)3.008s (~)0.393s101.29x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.953s (+22.5% 🔺)3.562s (+8.3% 🔺)0.609s91.00x
▲ VercelNext.js (Turbopack)3.370s (+33.5% 🔺)4.422s (+32.5% 🔺)1.051s71.14x
▲ VercelExpress3.438s (+48.8% 🔺)4.189s (+22.3% 🔺)0.752s81.16x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.511s (+9.3% 🔺)4.315s (+10.8% 🔺)0.805s71.00x
🐘 PostgresExpress3.761s (+9.1% 🔺)4.451s (+7.3% 🔺)0.689s71.07x
💻 LocalExpress6.695s (-13.9% 🟢)7.014s (-15.2% 🟢)0.319s51.91x
💻 LocalNitro7.564s (-3.6%)8.019s (-5.9% 🟢)0.454s42.15x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.447s (+6.2% 🔺)4.363s (+4.0%)0.916s71.00x
▲ VercelNext.js (Turbopack)3.976s (+17.7% 🔺)5.020s (+15.8% 🔺)1.044s61.15x
▲ VercelExpress4.801s (+60.2% 🔺)5.773s (+44.3% 🔺)0.972s71.39x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.109s (-37.3% 🟢)1.002s (~)0.009s (-12.8% 🟢)1.014s (~)0.906s101.00x
💻 LocalNitro0.182s (+2.8%)1.002s (~)0.011s (-3.6%)1.016s (~)0.834s101.68x
🐘 PostgresExpress0.189s (-1.8%)0.997s (+0.5%)0.001s (-6.7% 🟢)1.012s (~)0.822s101.74x
🐘 PostgresNitro0.194s (-1.6%)0.996s (~)0.001s (-17.6% 🟢)1.013s (~)0.820s101.78x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.615s (+3.2%)2.237s (+18.6% 🔺)0.101s (-4.4%)2.705s (+10.1% 🔺)1.090s101.00x
▲ VercelNext.js (Turbopack)1.639s (+11.1% 🔺)2.160s (+23.6% 🔺)0.095s (~)2.688s (+20.1% 🔺)1.050s101.01x
▲ VercelNitro1.787s (+26.0% 🔺)2.509s (+47.8% 🔺)0.081s (-28.5% 🟢)2.960s (+35.6% 🔺)1.173s101.11x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress12/12
🐘 PostgresExpress7/12
▲ VercelNitro7/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local7/12
Next.js (Turbopack)▲ Vercel12/12
Nitro🐘 Postgres7/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
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@changeset-bot

changeset-botBot commented Feb 26, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 9fe76fa

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

github-actionsBot commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production523049572
✅ 💻 Local Development556068624
✅ 📦 Local Production556068624
❌ 🐘 Local Postgres555168624
✅ 🪟 Windows490352
❌ 🌍 Community Worlds111459165
✅ 📋 Other135021156
Total2485462862817

❌ Failed Tests

🐘 Local Postgres (1 failed)

astro-stable (1 failed):

  • webhookWorkflow
🌍 Community Worlds (45 failed)

turso (45 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • parallelSleepWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • 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 retry behavior workflow completes despite transient 5xx on step_completed
  • 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 (queue-based) - workflow and step endpoints respond to health check messages
  • 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
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • cancelRun - cancelling a running workflow
  • cancelRun via CLI - cancelling a running workflow
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4705
✅ example4705
✅ express4705
✅ fastify4705
✅ hono4705
✅ nextjs-turbopack5002
✅ nextjs-webpack5002
✅ nitro4705
✅ nuxt4705
✅ sveltekit4705
✅ vite4705
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
❌ 🐘 Local Postgres
AppPassedFailedSkipped
❌ astro-stable4417
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4903
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4903
✅ redis-dev300
✅ redis4903
✅ turso-dev300
❌ turso4453
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4507
✅ e2e-local-postgres-nest-stable4507
✅ e2e-local-prod-nest-stable4507

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: success
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: failure
  • Windows: success

Check the workflow run for details.

The first overload of events.create() accepts string | null, not just
null. Clients can provide their own runId for run_created events.
VaguelySerious
VaguelySerious previously approved these changes Feb 26, 2026

```typescript lineNumbers
import { getWorld} from "workflow/runtime";
import { getWorld, cancelRun } from "@workflow/core/runtime";

@pranaygppranaygpMar 1, 2026

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.

nah the correct way to programmatically cancel a run is await getRun(runId).cancel() - not cancelRun from world. We don't adequately document it though so good call on making this. We should include an example in getRun api reference for cancelling a run so that it's searchable by AI. right now it's not well documented

Also users should almost never be importing from @workflow/core for normal usage. workflow/api should be what people use for normal behavior. using getWorld is an advanced/low level features that will break often as we change things around and not meant to be relied on

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

using getWorld is an advanced/low level features that will break often as we change things around and not meant to be relied on

At least once we actually have a different way of querying the same data, which we won't for a while? In which case it wouldn't hurt to document. Users could already be relying on it

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.

I don't think we should document it and then have to support it

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.

also like I said, for now the fix is simple. we have run.cancel(). let's document that instead of telling people to use @workflow/core/runtime which is never meant to be user facing

@pranaygp
pranaygp dismissed VaguelySerious’s stale reviewMarch 2, 2026 21:36

we shouldn't document and recommend cancelRun from @workflow/core/runtime. it should be run.cancel

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

Good docs audit overall — most fixes here are correct and helpful. The interface updates, typo fixes, run.returnValue, import path corrections, and flightBookingTools rename are all verified against the source.

The main blocker is the cancelRun change (already discussed in the thread) — it needs to use the public API instead of an internal module.


```typescript lineNumbers
import { getWorld} from "workflow/runtime";
import { getWorld, cancelRun } from "@workflow/core/runtime";

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.

As pranaygp noted in the earlier thread, this should use the public API:

import{getRun}from"workflow/runtime";exportasyncfunctionPOST(req: Request){const{ runId }=awaitreq.json();// ...construn=getRun(runId);awaitrun.cancel();returnResponse.json({status: "cancelled"});}

cancelRun from @workflow/core/runtime is an internal function — users should never import from @workflow/core directly. getRun(runId).cancel() is the supported public API for this (exported from workflow/runtime).

events: {
// Create a new workflow run (runId must be null - server generates it)
create(runId: null, data: RunCreatedEventRequest, params?: CreateEventParams): Promise<EventResult>;
// Create a new workflow run (runId may be client-provided or null for server generation)

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.

Nit: The source code doc comment (interfaces.ts:130) says: "The runId may be provided by the client or left as null for the server to generate." Consider matching this wording exactly for consistency between source and docs.

@@ -34,10 +34,13 @@ A World connects workflows to the infrastructure that powers them. The World int
```typescript
interface World extends Storage, Queue, Streamer {
start?(): Promise<void>;

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.

Verified: the close?() and getEncryptionKeyForRun?() additions match the actual World interface in packages/world/src/interfaces.ts exactly. 👍

johnlindquist added a commit that referenced this pull request Apr 6, 2026
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
@johnlindquist

Copy link
Copy Markdown
ContributorAuthor

Closing — fixes have been dispositioned:

  • 3 fixes already on main (ai/index.mdx variable rename, ai/resumable-streams.mdx highlight bracket, ai/sleep-and-delays.mdx import/operator fixes) — these were merged in subsequent PRs.
  • 3 fixes covered by docs: March docs audit and alignment #1466 (get-world.mdx, start-invalid-workflow-function.mdx, astro.mdx) — docs: March docs audit and alignment #1466 has more comprehensive rewrites of these files that include these corrections.
  • 6 unique fixes cherry-picked into docs: March docs audit and alignment #1466 (observability CLI wording, fetch removal from restricted modules, package name fix, stream wording, import path fix, World/Streamer interface updates) — committed to march-docs-audit branch.

No content lost.

johnlindquist added a commit that referenced this pull request Apr 6, 2026
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
johnlindquist added a commit that referenced this pull request Apr 6, 2026
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
pranaygp pushed a commit that referenced this pull request Apr 7, 2026
* docs: clarify Next monorepo setup
Prevent confusion when Next.js apps live below the repository root and workflow code imports sibling workspace packages.
This documents the output tracing root requirement at the point where users configure withWorkflow, so monorepo setups follow the same working patterns as the shipped Next.js integration instead of failing due to unresolved workspace imports.
Ploop-Iter: 1
* ploop: iteration 2 checkpoint
Automated checkpoint commit.
Ploop-Iter: 2
* ploop: iteration 3 checkpoint
Automated checkpoint commit.
Ploop-Iter: 3
* docs: audit recent documentation coverage
Capture recent workflow documentation updates so the public docs and package guidance stay aligned with the implementation and current docs-typecheck behavior.
Ploop-Iter: 1
* docs: align docs-typecheck docs
Document the current docs verification contract so contributors do not assume JavaScript examples are type-checked when only TypeScript snippets are enforced today.
Add regression coverage around the README language and framework integration guidance to keep those docs aligned with the implemented Next.js and docs-typecheck behavior as future changes land.
Ploop-Iter: 2
* docs: add start() troubleshooting guidance
Document the most common causes of the invalid workflow function error so users can resolve start() failures from the API docs and Next.js setup flow without having to infer build-time requirements from runtime behavior.
Keep the new troubleshooting page aligned with the shipped runtime message and add regression coverage so future wording or cross-link changes do not silently break that guidance.
Ploop-Iter: 3
* docs: align NestJS setup docs
Document both supported NestJS module formats and add a regression check so the getting-started guide stays aligned with the package README as the integration evolves.
Ploop-Iter: 1
* docs: tighten NestJS CommonJS guidance
Keep the NestJS getting-started guide consistent across the ESM and CommonJS paths so readers do not mix module settings or import styles mid-setup.
Strengthen the docs regression coverage around the later guide sections so future edits are more likely to preserve the supported CommonJS path documented in the package README.
Ploop-Iter: 2
* docs: align docs with recent workflow guidance
Document the recently added troubleshooting and observability patterns so the public docs stay aligned with the behavior users now encounter in practice.
This keeps the NestJS guide, workflow API reference, and docs regression coverage in sync with the runtime-facing guidance from recent changes.
Ploop-Iter: 3
* docs: audit docs coverage
Why: keep the docs aligned with recent API and runtime behavior changes so examples and reference pages don’t drift from the supported surface.
Ploop-Iter: 1
* test: add docs audit guards
Add regression coverage for doc surfaces that are easy to drift from implementation so docs audits catch mismatches early and keep published guidance aligned with the supported API surface.
Ploop-Iter: 2
* docs: add docs audit guards
Keep new observability and server-testing guidance anchored to machine-readable interfaces so follow-up implementation changes do not silently drift away from the documented agent and automation patterns.
Ploop-Iter: 3
* docs: align observability troubleshooting guidance
Keep the docs consistent so users get the same guidance when debugging hook token collisions and correlating workflow events with platform logs.
This prevents the event-sourcing reference from drifting away from the observability and error docs, and adds guard tests to catch regressions.
Ploop-Iter: 1
* Remove the unreferenced image file img-a-clean-minimal-technical-architecture-d-2026-02-27T14-07-52-1.png from the repo root, workbench/fastify/public/index.html (a Nitro example mistakenly placed in the fastify workbench by a ploop checkpoint), all .claude/worktrees/* submodule references, and all 15 string-presence audit guard tests in packages/docs-typecheck/src/__tests__/ (they only assert keyword presence, not semantic correctness). None of these belong in the docs audit PR.
* Address all PR #1466 review feedback from VaguelySerious, pranaygp, and ijjk:
1. Remove the "Machine-Readable Surfaces" section from docs/content/docs/observability/index.mdx (reviewers say it's unnecessary and already in world docs)
2. Remove all @skip-typecheck annotations from durable-agent.mdx (8) and server-based.mdx (1) — types exist in built packages/ai/dist after pnpm build
3. In durable-agent.mdx, change "machine-readable tool activity" to "tool call details" in the stream() return description
4. In durable-agent.mdx "Aborting Long-Running Streams" section, add a warning callout that abortSignal is not yet supported (blocked by #1301), recommend timeout instead
5. In event-sourcing.mdx, update requestId description: "On Vercel, requestId is the platform request ID when available. Other worlds are not expected to provide a requestId."
6. In get-world.mdx, change "user-friendly names from the machine-readable workflowName field" to "human-readable names from the workflowName field"
7. In start-invalid-workflow-function.mdx, add "// Does NOT work" comment above the bad example line
8. In with-workflow.mdx: reframe outputFileTracingRoot as a workaround (Next.js auto-detects by default per ijjk); change options description from "control local development behavior" to "configure the Next.js integration"; scope the callout to "workflows.local options only affect local development"
9. Drop the withWorkflow() options callout from docs/content/docs/getting-started/next.mdx
10. Remove the Next.js-specific outputFileTracingRoot callout from framework-integrations.mdx
11. Add a Troubleshooting section with the start() invalid-workflow-function error to all 9 non-Next getting-started guides (astro, express, fastify, hono, nestjs, nitro, nuxt, sveltekit, vite), each with framework-appropriate config check in point 2
* docs: absorb unique accuracy fixes from PR #1200
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
* docs: address review feedback on March docs audit
- durable-agent.mdx: "structured tool activity" → "tool call information"
per VaguelySerious's suggestion
- next.mdx: drop monorepo callout from getting-started per pranaygp
(too much context too early; info is in withWorkflow API ref)
* docs: fix 2 typecheck failures in encryption and nestjs guides
- encryption.mdx: add skip-typecheck for interface signature block
(getEncryptionKeyForRun overloads are not runnable code)
- nestjs.mdx: add skip-typecheck for WorkflowModule.forRoot config
snippet (fragment inside callout, full import shown above)
Verified: pnpm vitest run passes 300/300 in docs-typecheck.
VaguelySerious pushed a commit that referenced this pull request Apr 7, 2026
* docs: clarify Next monorepo setup
Prevent confusion when Next.js apps live below the repository root and workflow code imports sibling workspace packages.
This documents the output tracing root requirement at the point where users configure withWorkflow, so monorepo setups follow the same working patterns as the shipped Next.js integration instead of failing due to unresolved workspace imports.
Ploop-Iter: 1
* ploop: iteration 2 checkpoint
Automated checkpoint commit.
Ploop-Iter: 2
* ploop: iteration 3 checkpoint
Automated checkpoint commit.
Ploop-Iter: 3
* docs: audit recent documentation coverage
Capture recent workflow documentation updates so the public docs and package guidance stay aligned with the implementation and current docs-typecheck behavior.
Ploop-Iter: 1
* docs: align docs-typecheck docs
Document the current docs verification contract so contributors do not assume JavaScript examples are type-checked when only TypeScript snippets are enforced today.
Add regression coverage around the README language and framework integration guidance to keep those docs aligned with the implemented Next.js and docs-typecheck behavior as future changes land.
Ploop-Iter: 2
* docs: add start() troubleshooting guidance
Document the most common causes of the invalid workflow function error so users can resolve start() failures from the API docs and Next.js setup flow without having to infer build-time requirements from runtime behavior.
Keep the new troubleshooting page aligned with the shipped runtime message and add regression coverage so future wording or cross-link changes do not silently break that guidance.
Ploop-Iter: 3
* docs: align NestJS setup docs
Document both supported NestJS module formats and add a regression check so the getting-started guide stays aligned with the package README as the integration evolves.
Ploop-Iter: 1
* docs: tighten NestJS CommonJS guidance
Keep the NestJS getting-started guide consistent across the ESM and CommonJS paths so readers do not mix module settings or import styles mid-setup.
Strengthen the docs regression coverage around the later guide sections so future edits are more likely to preserve the supported CommonJS path documented in the package README.
Ploop-Iter: 2
* docs: align docs with recent workflow guidance
Document the recently added troubleshooting and observability patterns so the public docs stay aligned with the behavior users now encounter in practice.
This keeps the NestJS guide, workflow API reference, and docs regression coverage in sync with the runtime-facing guidance from recent changes.
Ploop-Iter: 3
* docs: audit docs coverage
Why: keep the docs aligned with recent API and runtime behavior changes so examples and reference pages don’t drift from the supported surface.
Ploop-Iter: 1
* test: add docs audit guards
Add regression coverage for doc surfaces that are easy to drift from implementation so docs audits catch mismatches early and keep published guidance aligned with the supported API surface.
Ploop-Iter: 2
* docs: add docs audit guards
Keep new observability and server-testing guidance anchored to machine-readable interfaces so follow-up implementation changes do not silently drift away from the documented agent and automation patterns.
Ploop-Iter: 3
* docs: align observability troubleshooting guidance
Keep the docs consistent so users get the same guidance when debugging hook token collisions and correlating workflow events with platform logs.
This prevents the event-sourcing reference from drifting away from the observability and error docs, and adds guard tests to catch regressions.
Ploop-Iter: 1
* Remove the unreferenced image file img-a-clean-minimal-technical-architecture-d-2026-02-27T14-07-52-1.png from the repo root, workbench/fastify/public/index.html (a Nitro example mistakenly placed in the fastify workbench by a ploop checkpoint), all .claude/worktrees/* submodule references, and all 15 string-presence audit guard tests in packages/docs-typecheck/src/__tests__/ (they only assert keyword presence, not semantic correctness). None of these belong in the docs audit PR.
* Address all PR #1466 review feedback from VaguelySerious, pranaygp, and ijjk:
1. Remove the "Machine-Readable Surfaces" section from docs/content/docs/observability/index.mdx (reviewers say it's unnecessary and already in world docs)
2. Remove all @skip-typecheck annotations from durable-agent.mdx (8) and server-based.mdx (1) — types exist in built packages/ai/dist after pnpm build
3. In durable-agent.mdx, change "machine-readable tool activity" to "tool call details" in the stream() return description
4. In durable-agent.mdx "Aborting Long-Running Streams" section, add a warning callout that abortSignal is not yet supported (blocked by #1301), recommend timeout instead
5. In event-sourcing.mdx, update requestId description: "On Vercel, requestId is the platform request ID when available. Other worlds are not expected to provide a requestId."
6. In get-world.mdx, change "user-friendly names from the machine-readable workflowName field" to "human-readable names from the workflowName field"
7. In start-invalid-workflow-function.mdx, add "// Does NOT work" comment above the bad example line
8. In with-workflow.mdx: reframe outputFileTracingRoot as a workaround (Next.js auto-detects by default per ijjk); change options description from "control local development behavior" to "configure the Next.js integration"; scope the callout to "workflows.local options only affect local development"
9. Drop the withWorkflow() options callout from docs/content/docs/getting-started/next.mdx
10. Remove the Next.js-specific outputFileTracingRoot callout from framework-integrations.mdx
11. Add a Troubleshooting section with the start() invalid-workflow-function error to all 9 non-Next getting-started guides (astro, express, fastify, hono, nestjs, nitro, nuxt, sveltekit, vite), each with framework-appropriate config check in point 2
* docs: absorb unique accuracy fixes from PR #1200
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
* docs: address review feedback on March docs audit
- durable-agent.mdx: "structured tool activity" → "tool call information"
per VaguelySerious's suggestion
- next.mdx: drop monorepo callout from getting-started per pranaygp
(too much context too early; info is in withWorkflow API ref)
* docs: fix 2 typecheck failures in encryption and nestjs guides
- encryption.mdx: add skip-typecheck for interface signature block
(getEncryptionKeyForRun overloads are not runnable code)
- nestjs.mdx: add skip-typecheck for WorkflowModule.forRoot config
snippet (fragment inside callout, full import shown above)
Verified: pnpm vitest run passes 300/300 in docs-typecheck.
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

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

Fix 12 documentation accuracy issues across API reference, foundations, and AI docs - #1200

Closed
johnlindquist wants to merge 5 commits into
mainfrom
worktree-swift-jumping-pizza
Closed

Fix 12 documentation accuracy issues across API reference, foundations, and AI docs#1200
johnlindquist wants to merge 5 commits into
mainfrom
worktree-swift-jumping-pizza

Conversation

@johnlindquist

Copy link
Copy Markdown
Contributor

Summary

Fixes validated documentation issues found during a comprehensive docs audit:

  • API reference: Fix nonexistent world.runs.cancel() in getWorld examples — replaced with cancelRun() from @workflow/core/runtime
  • Streaming guide: Fix import path mismatch (simple vs simple-streaming) and replace nonexistent run.result() with run.returnValue
  • World/Streamer interfaces: Add missing close?() and getEncryptionKeyForRun?() to World, fix runId type from string | Promise<string> to string in Streamer, add missing writeToStreamMulti? method
  • Deploying docs: Fix wrong Postgres world package name (@workflow-worlds/postgres@workflow/world-postgres)
  • AI docs: Fix tools naming mismatch (tools vs flightBookingTools), remove unused getWritable import, fix missing || operator, add missing RetryableError import, fix broken highlight annotation
  • Misc: Fix [!code highlight} typo, correct "Vite root directory" → "Astro project root directory", fix inaccurate npx "install globally" claim, remove fetch from Node.js core modules list

Test plan

  • Verify docs build succeeds
  • Spot-check corrected code examples compile against actual workflow exports
  • Verify getWorld cancel example uses correct cancelRun API
  • Verify World/Streamer interfaces match packages/world/src/interfaces.ts

Update docs examples that referenced outdated or incorrect APIs.
This fixes cancellation usage in get-world, stream import path and run return access in streaming, clarifies stream wording in starting-workflows, and removes fetch from Node.js core module examples.
Verified: node -e '...docs snippet verification passed' (requested old/new snippets checked in 4 files)
How to test: run the same node assertion command from repo root to confirm snippets.
Swarm-Agent: codex-core-docs
Correct World interface docs to include close() and getEncryptionKeyForRun() overloads, and clarify their runtime behavior.
Update Streamer runId types to string, add writeToStreamMulti(), and document it as an optional batching optimization.
Also fix package references from @workflow-worlds/postgres to @workflow/world-postgres.
Verified: pnpm biome check docs/content/docs/deploying/building-a-world.mdx docs/content/docs/deploying/index.mdx (fails because Biome config ignores *.mdx paths)
Verified: node <<'NODE' ... scoped assertions on docs/content/docs/deploying/building-a-world.mdx and docs/content/docs/deploying/index.mdx (pass)
Swarm-Agent: codex-world-interface
Align code examples across AI docs by renaming the tools export, fixing import snippets, restoring a missing logical OR, adding missing RetryableError import context, and repairing a broken highlight annotation.
Verified: git diff --check -- docs/content/docs/ai/index.mdx docs/content/docs/ai/sleep-and-delays.mdx docs/content/docs/ai/resumable-streams.mdx
Verified: set -euo pipefail; rg -n "export const flightBookingTools = \\{" docs/content/docs/ai/index.mdx; rg -n "import \\{ flightBookingTools \\} from \"@/ai/tools\";" docs/content/docs/ai/index.mdx; rg -n "import \\{ sleep \\} from \"workflow\";" docs/content/docs/ai/sleep-and-delays.mdx; rg -n "tool-checkBaggageAllowance\" \\|\\|" docs/content/docs/ai/sleep-and-delays.mdx; rg -n "part.type === \"tool-sleep\"" docs/content/docs/ai/sleep-and-delays.mdx; rg -n "import \\{ RetryableError \\} from \"workflow\";" docs/content/docs/ai/sleep-and-delays.mdx; rg -n "headers: \\{ // \\[!code highlight\\]" docs/content/docs/ai/resumable-streams.mdx
Swarm-Agent: codex-ai-docs
Update three docs files to fix a malformed code-highlight annotation,\nclarify Astro directory wording, and correct npx behavior wording.\n\nVerified: set -e; rg assertions for old/new strings in all 3 files (pass)\nVerified: git diff --check -- docs/content/docs/errors/start-invalid-workflow-function.mdx docs/content/docs/getting-started/astro.mdx docs/content/docs/observability/index.mdx (pass)\nVerified: npx -y prettier@3 --check docs/content/docs/errors/start-invalid-workflow-function.mdx docs/content/docs/getting-started/astro.mdx docs/content/docs/observability/index.mdx (fails: pre-existing formatting style mismatch in docs)\nSwarm-Agent: codex-misc-fixes
@johnlindquist
johnlindquist requested a review from a team as a code ownerFebruary 26, 2026 04:23
@vercel

vercelBot commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Feb 26, 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🥇 Express0.025s (-22.3% 🟢)1.005s (~)0.979s101.00x
💻 LocalNitro0.033s (+2.8%)1.005s (~)0.972s101.31x
🐘 PostgresNitro0.054s (-4.1%)1.010s (~)0.956s102.13x
🐘 PostgresExpress0.056s (+4.3%)1.010s (~)0.955s102.19x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.410s (-23.3% 🟢)1.731s (-4.6%)1.321s101.00x
▲ VercelNext.js (Turbopack)0.458s (-19.1% 🟢)1.907s (-4.3%)1.449s101.12x
▲ VercelExpress0.458s (-28.0% 🟢)1.795s (-9.8% 🟢)1.337s101.12x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.072s (-3.3%)2.005s (~)0.933s101.00x
💻 LocalNitro1.112s (~)2.005s (~)0.893s101.04x
🐘 PostgresExpress1.129s (-0.9%)2.018s (~)0.889s101.05x
🐘 PostgresNitro1.131s (~)2.011s (~)0.880s101.05x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.975s (+1.3%)2.840s (-3.5%)0.865s101.00x
▲ VercelNext.js (Turbopack)2.077s (+6.8% 🔺)3.167s (+2.5%)1.090s101.05x
▲ VercelExpress2.145s (+1.7%)3.042s (-8.5% 🟢)0.897s101.09x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express10.554s (-2.6%)11.020s (~)0.467s31.00x
🐘 PostgresNitro10.841s (-0.5%)11.042s (~)0.201s31.03x
💻 LocalNitro10.861s (~)11.022s (~)0.160s31.03x
🐘 PostgresExpress10.918s (~)11.045s (~)0.126s31.03x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro16.812s (+5.2% 🔺)17.864s (+5.6% 🔺)1.052s21.00x
▲ VercelExpress16.985s (+1.1%)17.783s (-0.9%)0.797s21.01x
▲ VercelNext.js (Turbopack)17.249s (+6.6% 🔺)18.776s (+10.2% 🔺)1.527s21.03x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express26.763s (-2.6%)27.049s (-3.6%)0.286s31.00x
🐘 PostgresNitro27.309s (~)28.070s (~)0.762s31.02x
🐘 PostgresExpress27.319s (~)28.069s (~)0.750s31.02x
💻 LocalNitro27.587s (~)28.053s (~)0.466s31.03x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)44.431s (+2.3%)45.959s (+2.8%)1.527s21.00x
▲ VercelExpress44.937s (+5.1% 🔺)46.273s (+4.8%)1.336s21.01x
▲ VercelNitro45.338s (+6.5% 🔺)45.967s (+6.0% 🔺)0.629s21.02x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express54.971s (~)55.099s (~)0.128s21.00x
🐘 PostgresNitro55.087s (~)55.607s (-0.9%)0.521s21.00x
💻 LocalExpress55.663s (-2.7%)56.093s (-3.5%)0.430s21.01x
💻 LocalNitro57.379s (~)58.105s (~)0.726s21.04x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express95.058s (+3.0%)96.094s (+2.8%)1.036s11.00x
▲ VercelNitro99.276s (+7.0% 🔺)100.397s (+7.7% 🔺)1.121s11.04x
▲ VercelNext.js (Turbopack)100.990s (+0.7%)102.638s (+1.3%)1.648s11.06x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.353s (-3.9%)2.005s (~)0.652s151.00x
🐘 PostgresExpress1.366s (~)2.011s (~)0.646s151.01x
🐘 PostgresNitro1.377s (+1.8%)2.010s (~)0.634s151.02x
💻 LocalNitro1.402s (-2.1%)2.006s (~)0.604s151.04x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.150s (-4.7%)2.950s (-19.8% 🟢)0.800s111.00x
▲ VercelNitro2.204s (-13.9% 🟢)3.002s (-14.0% 🟢)0.798s101.03x
▲ VercelNext.js (Turbopack)2.600s (+17.2% 🔺)3.671s (+16.8% 🔺)1.071s91.21x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.009s (+3.6%)2.600s (+5.1% 🔺)0.591s121.00x
🐘 PostgresNitro2.013s (+3.4%)2.514s (~)0.501s121.00x
💻 LocalExpress2.280s (-9.7% 🟢)3.006s (~)0.727s101.13x
💻 LocalNitro2.488s (-4.9%)3.007s (~)0.519s101.24x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.693s (-15.9% 🟢)3.365s (-32.8% 🟢)0.671s91.00x
▲ VercelNext.js (Turbopack)3.022s (-4.2%)3.929s (-3.4%)0.907s81.12x
▲ VercelExpress3.126s (+25.4% 🔺)4.034s (+10.5% 🔺)0.908s81.16x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.627s (+6.1% 🔺)4.266s (+5.8% 🔺)0.639s81.00x
🐘 PostgresExpress3.780s (+14.9% 🔺)4.314s (+10.6% 🔺)0.534s71.04x
💻 LocalExpress6.192s (-17.8% 🟢)7.015s (-12.6% 🟢)0.823s51.71x
💻 LocalNitro7.011s (-5.2% 🟢)7.516s (-6.3% 🟢)0.505s41.93x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.232s (+0.5%)4.512s (-3.8%)1.280s71.00x
▲ VercelExpress3.765s (+20.7% 🔺)4.812s (+10.4% 🔺)1.046s71.16x
▲ VercelNext.js (Turbopack)3.967s (+10.3% 🔺)5.057s (+9.0% 🔺)1.090s61.23x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.355s (-5.2% 🟢)2.005s (~)0.650s151.00x
🐘 PostgresExpress1.374s (+1.1%)2.010s (~)0.636s151.01x
🐘 PostgresNitro1.386s (+1.6%)2.011s (~)0.625s151.02x
💻 LocalNitro1.429s (~)2.005s (~)0.576s151.05x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.188s (+8.1% 🔺)3.172s (+3.4%)0.984s101.00x
▲ VercelExpress2.205s (+4.4%)3.166s (-5.8% 🟢)0.960s101.01x
▲ VercelNitro2.224s (+4.0%)2.970s (-2.2%)0.746s111.02x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.034s (+1.7%)2.600s (+3.5%)0.566s121.00x
🐘 PostgresNitro2.074s (+5.9% 🔺)2.679s (+8.2% 🔺)0.605s121.02x
💻 LocalExpress2.417s (-9.4% 🟢)3.008s (~)0.590s101.19x
💻 LocalNitro2.615s (-5.0%)3.008s (~)0.393s101.29x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.953s (+22.5% 🔺)3.562s (+8.3% 🔺)0.609s91.00x
▲ VercelNext.js (Turbopack)3.370s (+33.5% 🔺)4.422s (+32.5% 🔺)1.051s71.14x
▲ VercelExpress3.438s (+48.8% 🔺)4.189s (+22.3% 🔺)0.752s81.16x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.511s (+9.3% 🔺)4.315s (+10.8% 🔺)0.805s71.00x
🐘 PostgresExpress3.761s (+9.1% 🔺)4.451s (+7.3% 🔺)0.689s71.07x
💻 LocalExpress6.695s (-13.9% 🟢)7.014s (-15.2% 🟢)0.319s51.91x
💻 LocalNitro7.564s (-3.6%)8.019s (-5.9% 🟢)0.454s42.15x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.447s (+6.2% 🔺)4.363s (+4.0%)0.916s71.00x
▲ VercelNext.js (Turbopack)3.976s (+17.7% 🔺)5.020s (+15.8% 🔺)1.044s61.15x
▲ VercelExpress4.801s (+60.2% 🔺)5.773s (+44.3% 🔺)0.972s71.39x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.109s (-37.3% 🟢)1.002s (~)0.009s (-12.8% 🟢)1.014s (~)0.906s101.00x
💻 LocalNitro0.182s (+2.8%)1.002s (~)0.011s (-3.6%)1.016s (~)0.834s101.68x
🐘 PostgresExpress0.189s (-1.8%)0.997s (+0.5%)0.001s (-6.7% 🟢)1.012s (~)0.822s101.74x
🐘 PostgresNitro0.194s (-1.6%)0.996s (~)0.001s (-17.6% 🟢)1.013s (~)0.820s101.78x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.615s (+3.2%)2.237s (+18.6% 🔺)0.101s (-4.4%)2.705s (+10.1% 🔺)1.090s101.00x
▲ VercelNext.js (Turbopack)1.639s (+11.1% 🔺)2.160s (+23.6% 🔺)0.095s (~)2.688s (+20.1% 🔺)1.050s101.01x
▲ VercelNitro1.787s (+26.0% 🔺)2.509s (+47.8% 🔺)0.081s (-28.5% 🟢)2.960s (+35.6% 🔺)1.173s101.11x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress12/12
🐘 PostgresExpress7/12
▲ VercelNitro7/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local7/12
Next.js (Turbopack)▲ Vercel12/12
Nitro🐘 Postgres7/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
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@changeset-bot

changeset-botBot commented Feb 26, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 9fe76fa

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

github-actionsBot commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production523049572
✅ 💻 Local Development556068624
✅ 📦 Local Production556068624
❌ 🐘 Local Postgres555168624
✅ 🪟 Windows490352
❌ 🌍 Community Worlds111459165
✅ 📋 Other135021156
Total2485462862817

❌ Failed Tests

🐘 Local Postgres (1 failed)

astro-stable (1 failed):

  • webhookWorkflow
🌍 Community Worlds (45 failed)

turso (45 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • parallelSleepWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • 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 retry behavior workflow completes despite transient 5xx on step_completed
  • 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 (queue-based) - workflow and step endpoints respond to health check messages
  • 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
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • cancelRun - cancelling a running workflow
  • cancelRun via CLI - cancelling a running workflow
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4705
✅ example4705
✅ express4705
✅ fastify4705
✅ hono4705
✅ nextjs-turbopack5002
✅ nextjs-webpack5002
✅ nitro4705
✅ nuxt4705
✅ sveltekit4705
✅ vite4705
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
❌ 🐘 Local Postgres
AppPassedFailedSkipped
❌ astro-stable4417
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4903
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4903
✅ redis-dev300
✅ redis4903
✅ turso-dev300
❌ turso4453
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4507
✅ e2e-local-postgres-nest-stable4507
✅ e2e-local-prod-nest-stable4507

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: success
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: failure
  • Windows: success

Check the workflow run for details.

The first overload of events.create() accepts string | null, not just
null. Clients can provide their own runId for run_created events.
VaguelySerious
VaguelySerious previously approved these changes Feb 26, 2026

```typescript lineNumbers
import { getWorld} from "workflow/runtime";
import { getWorld, cancelRun } from "@workflow/core/runtime";

@pranaygppranaygpMar 1, 2026

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.

nah the correct way to programmatically cancel a run is await getRun(runId).cancel() - not cancelRun from world. We don't adequately document it though so good call on making this. We should include an example in getRun api reference for cancelling a run so that it's searchable by AI. right now it's not well documented

Also users should almost never be importing from @workflow/core for normal usage. workflow/api should be what people use for normal behavior. using getWorld is an advanced/low level features that will break often as we change things around and not meant to be relied on

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

using getWorld is an advanced/low level features that will break often as we change things around and not meant to be relied on

At least once we actually have a different way of querying the same data, which we won't for a while? In which case it wouldn't hurt to document. Users could already be relying on it

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.

I don't think we should document it and then have to support it

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.

also like I said, for now the fix is simple. we have run.cancel(). let's document that instead of telling people to use @workflow/core/runtime which is never meant to be user facing

@pranaygp
pranaygp dismissed VaguelySerious’s stale reviewMarch 2, 2026 21:36

we shouldn't document and recommend cancelRun from @workflow/core/runtime. it should be run.cancel

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

Good docs audit overall — most fixes here are correct and helpful. The interface updates, typo fixes, run.returnValue, import path corrections, and flightBookingTools rename are all verified against the source.

The main blocker is the cancelRun change (already discussed in the thread) — it needs to use the public API instead of an internal module.


```typescript lineNumbers
import { getWorld} from "workflow/runtime";
import { getWorld, cancelRun } from "@workflow/core/runtime";

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.

As pranaygp noted in the earlier thread, this should use the public API:

import{getRun}from"workflow/runtime";exportasyncfunctionPOST(req: Request){const{ runId }=awaitreq.json();// ...construn=getRun(runId);awaitrun.cancel();returnResponse.json({status: "cancelled"});}

cancelRun from @workflow/core/runtime is an internal function — users should never import from @workflow/core directly. getRun(runId).cancel() is the supported public API for this (exported from workflow/runtime).

events: {
// Create a new workflow run (runId must be null - server generates it)
create(runId: null, data: RunCreatedEventRequest, params?: CreateEventParams): Promise<EventResult>;
// Create a new workflow run (runId may be client-provided or null for server generation)

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.

Nit: The source code doc comment (interfaces.ts:130) says: "The runId may be provided by the client or left as null for the server to generate." Consider matching this wording exactly for consistency between source and docs.

@@ -34,10 +34,13 @@ A World connects workflows to the infrastructure that powers them. The World int
```typescript
interface World extends Storage, Queue, Streamer {
start?(): Promise<void>;

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.

Verified: the close?() and getEncryptionKeyForRun?() additions match the actual World interface in packages/world/src/interfaces.ts exactly. 👍

johnlindquist added a commit that referenced this pull request Apr 6, 2026
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
@johnlindquist

Copy link
Copy Markdown
ContributorAuthor

Closing — fixes have been dispositioned:

  • 3 fixes already on main (ai/index.mdx variable rename, ai/resumable-streams.mdx highlight bracket, ai/sleep-and-delays.mdx import/operator fixes) — these were merged in subsequent PRs.
  • 3 fixes covered by docs: March docs audit and alignment #1466 (get-world.mdx, start-invalid-workflow-function.mdx, astro.mdx) — docs: March docs audit and alignment #1466 has more comprehensive rewrites of these files that include these corrections.
  • 6 unique fixes cherry-picked into docs: March docs audit and alignment #1466 (observability CLI wording, fetch removal from restricted modules, package name fix, stream wording, import path fix, World/Streamer interface updates) — committed to march-docs-audit branch.

No content lost.

johnlindquist added a commit that referenced this pull request Apr 6, 2026
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
johnlindquist added a commit that referenced this pull request Apr 6, 2026
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
pranaygp pushed a commit that referenced this pull request Apr 7, 2026
* docs: clarify Next monorepo setup
Prevent confusion when Next.js apps live below the repository root and workflow code imports sibling workspace packages.
This documents the output tracing root requirement at the point where users configure withWorkflow, so monorepo setups follow the same working patterns as the shipped Next.js integration instead of failing due to unresolved workspace imports.
Ploop-Iter: 1
* ploop: iteration 2 checkpoint
Automated checkpoint commit.
Ploop-Iter: 2
* ploop: iteration 3 checkpoint
Automated checkpoint commit.
Ploop-Iter: 3
* docs: audit recent documentation coverage
Capture recent workflow documentation updates so the public docs and package guidance stay aligned with the implementation and current docs-typecheck behavior.
Ploop-Iter: 1
* docs: align docs-typecheck docs
Document the current docs verification contract so contributors do not assume JavaScript examples are type-checked when only TypeScript snippets are enforced today.
Add regression coverage around the README language and framework integration guidance to keep those docs aligned with the implemented Next.js and docs-typecheck behavior as future changes land.
Ploop-Iter: 2
* docs: add start() troubleshooting guidance
Document the most common causes of the invalid workflow function error so users can resolve start() failures from the API docs and Next.js setup flow without having to infer build-time requirements from runtime behavior.
Keep the new troubleshooting page aligned with the shipped runtime message and add regression coverage so future wording or cross-link changes do not silently break that guidance.
Ploop-Iter: 3
* docs: align NestJS setup docs
Document both supported NestJS module formats and add a regression check so the getting-started guide stays aligned with the package README as the integration evolves.
Ploop-Iter: 1
* docs: tighten NestJS CommonJS guidance
Keep the NestJS getting-started guide consistent across the ESM and CommonJS paths so readers do not mix module settings or import styles mid-setup.
Strengthen the docs regression coverage around the later guide sections so future edits are more likely to preserve the supported CommonJS path documented in the package README.
Ploop-Iter: 2
* docs: align docs with recent workflow guidance
Document the recently added troubleshooting and observability patterns so the public docs stay aligned with the behavior users now encounter in practice.
This keeps the NestJS guide, workflow API reference, and docs regression coverage in sync with the runtime-facing guidance from recent changes.
Ploop-Iter: 3
* docs: audit docs coverage
Why: keep the docs aligned with recent API and runtime behavior changes so examples and reference pages don’t drift from the supported surface.
Ploop-Iter: 1
* test: add docs audit guards
Add regression coverage for doc surfaces that are easy to drift from implementation so docs audits catch mismatches early and keep published guidance aligned with the supported API surface.
Ploop-Iter: 2
* docs: add docs audit guards
Keep new observability and server-testing guidance anchored to machine-readable interfaces so follow-up implementation changes do not silently drift away from the documented agent and automation patterns.
Ploop-Iter: 3
* docs: align observability troubleshooting guidance
Keep the docs consistent so users get the same guidance when debugging hook token collisions and correlating workflow events with platform logs.
This prevents the event-sourcing reference from drifting away from the observability and error docs, and adds guard tests to catch regressions.
Ploop-Iter: 1
* Remove the unreferenced image file img-a-clean-minimal-technical-architecture-d-2026-02-27T14-07-52-1.png from the repo root, workbench/fastify/public/index.html (a Nitro example mistakenly placed in the fastify workbench by a ploop checkpoint), all .claude/worktrees/* submodule references, and all 15 string-presence audit guard tests in packages/docs-typecheck/src/__tests__/ (they only assert keyword presence, not semantic correctness). None of these belong in the docs audit PR.
* Address all PR #1466 review feedback from VaguelySerious, pranaygp, and ijjk:
1. Remove the "Machine-Readable Surfaces" section from docs/content/docs/observability/index.mdx (reviewers say it's unnecessary and already in world docs)
2. Remove all @skip-typecheck annotations from durable-agent.mdx (8) and server-based.mdx (1) — types exist in built packages/ai/dist after pnpm build
3. In durable-agent.mdx, change "machine-readable tool activity" to "tool call details" in the stream() return description
4. In durable-agent.mdx "Aborting Long-Running Streams" section, add a warning callout that abortSignal is not yet supported (blocked by #1301), recommend timeout instead
5. In event-sourcing.mdx, update requestId description: "On Vercel, requestId is the platform request ID when available. Other worlds are not expected to provide a requestId."
6. In get-world.mdx, change "user-friendly names from the machine-readable workflowName field" to "human-readable names from the workflowName field"
7. In start-invalid-workflow-function.mdx, add "// Does NOT work" comment above the bad example line
8. In with-workflow.mdx: reframe outputFileTracingRoot as a workaround (Next.js auto-detects by default per ijjk); change options description from "control local development behavior" to "configure the Next.js integration"; scope the callout to "workflows.local options only affect local development"
9. Drop the withWorkflow() options callout from docs/content/docs/getting-started/next.mdx
10. Remove the Next.js-specific outputFileTracingRoot callout from framework-integrations.mdx
11. Add a Troubleshooting section with the start() invalid-workflow-function error to all 9 non-Next getting-started guides (astro, express, fastify, hono, nestjs, nitro, nuxt, sveltekit, vite), each with framework-appropriate config check in point 2
* docs: absorb unique accuracy fixes from PR #1200
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
* docs: address review feedback on March docs audit
- durable-agent.mdx: "structured tool activity" → "tool call information"
per VaguelySerious's suggestion
- next.mdx: drop monorepo callout from getting-started per pranaygp
(too much context too early; info is in withWorkflow API ref)
* docs: fix 2 typecheck failures in encryption and nestjs guides
- encryption.mdx: add skip-typecheck for interface signature block
(getEncryptionKeyForRun overloads are not runnable code)
- nestjs.mdx: add skip-typecheck for WorkflowModule.forRoot config
snippet (fragment inside callout, full import shown above)
Verified: pnpm vitest run passes 300/300 in docs-typecheck.
VaguelySerious pushed a commit that referenced this pull request Apr 7, 2026
* docs: clarify Next monorepo setup
Prevent confusion when Next.js apps live below the repository root and workflow code imports sibling workspace packages.
This documents the output tracing root requirement at the point where users configure withWorkflow, so monorepo setups follow the same working patterns as the shipped Next.js integration instead of failing due to unresolved workspace imports.
Ploop-Iter: 1
* ploop: iteration 2 checkpoint
Automated checkpoint commit.
Ploop-Iter: 2
* ploop: iteration 3 checkpoint
Automated checkpoint commit.
Ploop-Iter: 3
* docs: audit recent documentation coverage
Capture recent workflow documentation updates so the public docs and package guidance stay aligned with the implementation and current docs-typecheck behavior.
Ploop-Iter: 1
* docs: align docs-typecheck docs
Document the current docs verification contract so contributors do not assume JavaScript examples are type-checked when only TypeScript snippets are enforced today.
Add regression coverage around the README language and framework integration guidance to keep those docs aligned with the implemented Next.js and docs-typecheck behavior as future changes land.
Ploop-Iter: 2
* docs: add start() troubleshooting guidance
Document the most common causes of the invalid workflow function error so users can resolve start() failures from the API docs and Next.js setup flow without having to infer build-time requirements from runtime behavior.
Keep the new troubleshooting page aligned with the shipped runtime message and add regression coverage so future wording or cross-link changes do not silently break that guidance.
Ploop-Iter: 3
* docs: align NestJS setup docs
Document both supported NestJS module formats and add a regression check so the getting-started guide stays aligned with the package README as the integration evolves.
Ploop-Iter: 1
* docs: tighten NestJS CommonJS guidance
Keep the NestJS getting-started guide consistent across the ESM and CommonJS paths so readers do not mix module settings or import styles mid-setup.
Strengthen the docs regression coverage around the later guide sections so future edits are more likely to preserve the supported CommonJS path documented in the package README.
Ploop-Iter: 2
* docs: align docs with recent workflow guidance
Document the recently added troubleshooting and observability patterns so the public docs stay aligned with the behavior users now encounter in practice.
This keeps the NestJS guide, workflow API reference, and docs regression coverage in sync with the runtime-facing guidance from recent changes.
Ploop-Iter: 3
* docs: audit docs coverage
Why: keep the docs aligned with recent API and runtime behavior changes so examples and reference pages don’t drift from the supported surface.
Ploop-Iter: 1
* test: add docs audit guards
Add regression coverage for doc surfaces that are easy to drift from implementation so docs audits catch mismatches early and keep published guidance aligned with the supported API surface.
Ploop-Iter: 2
* docs: add docs audit guards
Keep new observability and server-testing guidance anchored to machine-readable interfaces so follow-up implementation changes do not silently drift away from the documented agent and automation patterns.
Ploop-Iter: 3
* docs: align observability troubleshooting guidance
Keep the docs consistent so users get the same guidance when debugging hook token collisions and correlating workflow events with platform logs.
This prevents the event-sourcing reference from drifting away from the observability and error docs, and adds guard tests to catch regressions.
Ploop-Iter: 1
* Remove the unreferenced image file img-a-clean-minimal-technical-architecture-d-2026-02-27T14-07-52-1.png from the repo root, workbench/fastify/public/index.html (a Nitro example mistakenly placed in the fastify workbench by a ploop checkpoint), all .claude/worktrees/* submodule references, and all 15 string-presence audit guard tests in packages/docs-typecheck/src/__tests__/ (they only assert keyword presence, not semantic correctness). None of these belong in the docs audit PR.
* Address all PR #1466 review feedback from VaguelySerious, pranaygp, and ijjk:
1. Remove the "Machine-Readable Surfaces" section from docs/content/docs/observability/index.mdx (reviewers say it's unnecessary and already in world docs)
2. Remove all @skip-typecheck annotations from durable-agent.mdx (8) and server-based.mdx (1) — types exist in built packages/ai/dist after pnpm build
3. In durable-agent.mdx, change "machine-readable tool activity" to "tool call details" in the stream() return description
4. In durable-agent.mdx "Aborting Long-Running Streams" section, add a warning callout that abortSignal is not yet supported (blocked by #1301), recommend timeout instead
5. In event-sourcing.mdx, update requestId description: "On Vercel, requestId is the platform request ID when available. Other worlds are not expected to provide a requestId."
6. In get-world.mdx, change "user-friendly names from the machine-readable workflowName field" to "human-readable names from the workflowName field"
7. In start-invalid-workflow-function.mdx, add "// Does NOT work" comment above the bad example line
8. In with-workflow.mdx: reframe outputFileTracingRoot as a workaround (Next.js auto-detects by default per ijjk); change options description from "control local development behavior" to "configure the Next.js integration"; scope the callout to "workflows.local options only affect local development"
9. Drop the withWorkflow() options callout from docs/content/docs/getting-started/next.mdx
10. Remove the Next.js-specific outputFileTracingRoot callout from framework-integrations.mdx
11. Add a Troubleshooting section with the start() invalid-workflow-function error to all 9 non-Next getting-started guides (astro, express, fastify, hono, nestjs, nitro, nuxt, sveltekit, vite), each with framework-appropriate config check in point 2
* docs: absorb unique accuracy fixes from PR #1200
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
* docs: address review feedback on March docs audit
- durable-agent.mdx: "structured tool activity" → "tool call information"
per VaguelySerious's suggestion
- next.mdx: drop monorepo callout from getting-started per pranaygp
(too much context too early; info is in withWorkflow API ref)
* docs: fix 2 typecheck failures in encryption and nestjs guides
- encryption.mdx: add skip-typecheck for interface signature block
(getEncryptionKeyForRun overloads are not runnable code)
- nestjs.mdx: add skip-typecheck for WorkflowModule.forRoot config
snippet (fragment inside callout, full import shown above)
Verified: pnpm vitest run passes 300/300 in docs-typecheck.
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

@johnlindquist@pranaygp@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Fix 12 documentation accuracy issues across API reference, foundations, and AI docs by johnlindquist · Pull Request #1200 · vercel/workflow · GitHub
Skip to content

Fix 12 documentation accuracy issues across API reference, foundations, and AI docs - #1200

Closed
johnlindquist wants to merge 5 commits into
mainfrom
worktree-swift-jumping-pizza
Closed

Fix 12 documentation accuracy issues across API reference, foundations, and AI docs#1200
johnlindquist wants to merge 5 commits into
mainfrom
worktree-swift-jumping-pizza

Conversation

@johnlindquist

Copy link
Copy Markdown
Contributor

Summary

Fixes validated documentation issues found during a comprehensive docs audit:

  • API reference: Fix nonexistent world.runs.cancel() in getWorld examples — replaced with cancelRun() from @workflow/core/runtime
  • Streaming guide: Fix import path mismatch (simple vs simple-streaming) and replace nonexistent run.result() with run.returnValue
  • World/Streamer interfaces: Add missing close?() and getEncryptionKeyForRun?() to World, fix runId type from string | Promise<string> to string in Streamer, add missing writeToStreamMulti? method
  • Deploying docs: Fix wrong Postgres world package name (@workflow-worlds/postgres@workflow/world-postgres)
  • AI docs: Fix tools naming mismatch (tools vs flightBookingTools), remove unused getWritable import, fix missing || operator, add missing RetryableError import, fix broken highlight annotation
  • Misc: Fix [!code highlight} typo, correct "Vite root directory" → "Astro project root directory", fix inaccurate npx "install globally" claim, remove fetch from Node.js core modules list

Test plan

  • Verify docs build succeeds
  • Spot-check corrected code examples compile against actual workflow exports
  • Verify getWorld cancel example uses correct cancelRun API
  • Verify World/Streamer interfaces match packages/world/src/interfaces.ts

Update docs examples that referenced outdated or incorrect APIs.
This fixes cancellation usage in get-world, stream import path and run return access in streaming, clarifies stream wording in starting-workflows, and removes fetch from Node.js core module examples.
Verified: node -e '...docs snippet verification passed' (requested old/new snippets checked in 4 files)
How to test: run the same node assertion command from repo root to confirm snippets.
Swarm-Agent: codex-core-docs
Correct World interface docs to include close() and getEncryptionKeyForRun() overloads, and clarify their runtime behavior.
Update Streamer runId types to string, add writeToStreamMulti(), and document it as an optional batching optimization.
Also fix package references from @workflow-worlds/postgres to @workflow/world-postgres.
Verified: pnpm biome check docs/content/docs/deploying/building-a-world.mdx docs/content/docs/deploying/index.mdx (fails because Biome config ignores *.mdx paths)
Verified: node <<'NODE' ... scoped assertions on docs/content/docs/deploying/building-a-world.mdx and docs/content/docs/deploying/index.mdx (pass)
Swarm-Agent: codex-world-interface
Align code examples across AI docs by renaming the tools export, fixing import snippets, restoring a missing logical OR, adding missing RetryableError import context, and repairing a broken highlight annotation.
Verified: git diff --check -- docs/content/docs/ai/index.mdx docs/content/docs/ai/sleep-and-delays.mdx docs/content/docs/ai/resumable-streams.mdx
Verified: set -euo pipefail; rg -n "export const flightBookingTools = \\{" docs/content/docs/ai/index.mdx; rg -n "import \\{ flightBookingTools \\} from \"@/ai/tools\";" docs/content/docs/ai/index.mdx; rg -n "import \\{ sleep \\} from \"workflow\";" docs/content/docs/ai/sleep-and-delays.mdx; rg -n "tool-checkBaggageAllowance\" \\|\\|" docs/content/docs/ai/sleep-and-delays.mdx; rg -n "part.type === \"tool-sleep\"" docs/content/docs/ai/sleep-and-delays.mdx; rg -n "import \\{ RetryableError \\} from \"workflow\";" docs/content/docs/ai/sleep-and-delays.mdx; rg -n "headers: \\{ // \\[!code highlight\\]" docs/content/docs/ai/resumable-streams.mdx
Swarm-Agent: codex-ai-docs
Update three docs files to fix a malformed code-highlight annotation,\nclarify Astro directory wording, and correct npx behavior wording.\n\nVerified: set -e; rg assertions for old/new strings in all 3 files (pass)\nVerified: git diff --check -- docs/content/docs/errors/start-invalid-workflow-function.mdx docs/content/docs/getting-started/astro.mdx docs/content/docs/observability/index.mdx (pass)\nVerified: npx -y prettier@3 --check docs/content/docs/errors/start-invalid-workflow-function.mdx docs/content/docs/getting-started/astro.mdx docs/content/docs/observability/index.mdx (fails: pre-existing formatting style mismatch in docs)\nSwarm-Agent: codex-misc-fixes
@johnlindquist
johnlindquist requested a review from a team as a code ownerFebruary 26, 2026 04:23
@vercel

vercelBot commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Feb 26, 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🥇 Express0.025s (-22.3% 🟢)1.005s (~)0.979s101.00x
💻 LocalNitro0.033s (+2.8%)1.005s (~)0.972s101.31x
🐘 PostgresNitro0.054s (-4.1%)1.010s (~)0.956s102.13x
🐘 PostgresExpress0.056s (+4.3%)1.010s (~)0.955s102.19x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.410s (-23.3% 🟢)1.731s (-4.6%)1.321s101.00x
▲ VercelNext.js (Turbopack)0.458s (-19.1% 🟢)1.907s (-4.3%)1.449s101.12x
▲ VercelExpress0.458s (-28.0% 🟢)1.795s (-9.8% 🟢)1.337s101.12x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.072s (-3.3%)2.005s (~)0.933s101.00x
💻 LocalNitro1.112s (~)2.005s (~)0.893s101.04x
🐘 PostgresExpress1.129s (-0.9%)2.018s (~)0.889s101.05x
🐘 PostgresNitro1.131s (~)2.011s (~)0.880s101.05x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.975s (+1.3%)2.840s (-3.5%)0.865s101.00x
▲ VercelNext.js (Turbopack)2.077s (+6.8% 🔺)3.167s (+2.5%)1.090s101.05x
▲ VercelExpress2.145s (+1.7%)3.042s (-8.5% 🟢)0.897s101.09x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express10.554s (-2.6%)11.020s (~)0.467s31.00x
🐘 PostgresNitro10.841s (-0.5%)11.042s (~)0.201s31.03x
💻 LocalNitro10.861s (~)11.022s (~)0.160s31.03x
🐘 PostgresExpress10.918s (~)11.045s (~)0.126s31.03x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro16.812s (+5.2% 🔺)17.864s (+5.6% 🔺)1.052s21.00x
▲ VercelExpress16.985s (+1.1%)17.783s (-0.9%)0.797s21.01x
▲ VercelNext.js (Turbopack)17.249s (+6.6% 🔺)18.776s (+10.2% 🔺)1.527s21.03x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express26.763s (-2.6%)27.049s (-3.6%)0.286s31.00x
🐘 PostgresNitro27.309s (~)28.070s (~)0.762s31.02x
🐘 PostgresExpress27.319s (~)28.069s (~)0.750s31.02x
💻 LocalNitro27.587s (~)28.053s (~)0.466s31.03x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)44.431s (+2.3%)45.959s (+2.8%)1.527s21.00x
▲ VercelExpress44.937s (+5.1% 🔺)46.273s (+4.8%)1.336s21.01x
▲ VercelNitro45.338s (+6.5% 🔺)45.967s (+6.0% 🔺)0.629s21.02x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express54.971s (~)55.099s (~)0.128s21.00x
🐘 PostgresNitro55.087s (~)55.607s (-0.9%)0.521s21.00x
💻 LocalExpress55.663s (-2.7%)56.093s (-3.5%)0.430s21.01x
💻 LocalNitro57.379s (~)58.105s (~)0.726s21.04x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express95.058s (+3.0%)96.094s (+2.8%)1.036s11.00x
▲ VercelNitro99.276s (+7.0% 🔺)100.397s (+7.7% 🔺)1.121s11.04x
▲ VercelNext.js (Turbopack)100.990s (+0.7%)102.638s (+1.3%)1.648s11.06x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.353s (-3.9%)2.005s (~)0.652s151.00x
🐘 PostgresExpress1.366s (~)2.011s (~)0.646s151.01x
🐘 PostgresNitro1.377s (+1.8%)2.010s (~)0.634s151.02x
💻 LocalNitro1.402s (-2.1%)2.006s (~)0.604s151.04x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.150s (-4.7%)2.950s (-19.8% 🟢)0.800s111.00x
▲ VercelNitro2.204s (-13.9% 🟢)3.002s (-14.0% 🟢)0.798s101.03x
▲ VercelNext.js (Turbopack)2.600s (+17.2% 🔺)3.671s (+16.8% 🔺)1.071s91.21x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.009s (+3.6%)2.600s (+5.1% 🔺)0.591s121.00x
🐘 PostgresNitro2.013s (+3.4%)2.514s (~)0.501s121.00x
💻 LocalExpress2.280s (-9.7% 🟢)3.006s (~)0.727s101.13x
💻 LocalNitro2.488s (-4.9%)3.007s (~)0.519s101.24x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.693s (-15.9% 🟢)3.365s (-32.8% 🟢)0.671s91.00x
▲ VercelNext.js (Turbopack)3.022s (-4.2%)3.929s (-3.4%)0.907s81.12x
▲ VercelExpress3.126s (+25.4% 🔺)4.034s (+10.5% 🔺)0.908s81.16x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.627s (+6.1% 🔺)4.266s (+5.8% 🔺)0.639s81.00x
🐘 PostgresExpress3.780s (+14.9% 🔺)4.314s (+10.6% 🔺)0.534s71.04x
💻 LocalExpress6.192s (-17.8% 🟢)7.015s (-12.6% 🟢)0.823s51.71x
💻 LocalNitro7.011s (-5.2% 🟢)7.516s (-6.3% 🟢)0.505s41.93x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.232s (+0.5%)4.512s (-3.8%)1.280s71.00x
▲ VercelExpress3.765s (+20.7% 🔺)4.812s (+10.4% 🔺)1.046s71.16x
▲ VercelNext.js (Turbopack)3.967s (+10.3% 🔺)5.057s (+9.0% 🔺)1.090s61.23x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.355s (-5.2% 🟢)2.005s (~)0.650s151.00x
🐘 PostgresExpress1.374s (+1.1%)2.010s (~)0.636s151.01x
🐘 PostgresNitro1.386s (+1.6%)2.011s (~)0.625s151.02x
💻 LocalNitro1.429s (~)2.005s (~)0.576s151.05x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.188s (+8.1% 🔺)3.172s (+3.4%)0.984s101.00x
▲ VercelExpress2.205s (+4.4%)3.166s (-5.8% 🟢)0.960s101.01x
▲ VercelNitro2.224s (+4.0%)2.970s (-2.2%)0.746s111.02x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.034s (+1.7%)2.600s (+3.5%)0.566s121.00x
🐘 PostgresNitro2.074s (+5.9% 🔺)2.679s (+8.2% 🔺)0.605s121.02x
💻 LocalExpress2.417s (-9.4% 🟢)3.008s (~)0.590s101.19x
💻 LocalNitro2.615s (-5.0%)3.008s (~)0.393s101.29x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.953s (+22.5% 🔺)3.562s (+8.3% 🔺)0.609s91.00x
▲ VercelNext.js (Turbopack)3.370s (+33.5% 🔺)4.422s (+32.5% 🔺)1.051s71.14x
▲ VercelExpress3.438s (+48.8% 🔺)4.189s (+22.3% 🔺)0.752s81.16x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.511s (+9.3% 🔺)4.315s (+10.8% 🔺)0.805s71.00x
🐘 PostgresExpress3.761s (+9.1% 🔺)4.451s (+7.3% 🔺)0.689s71.07x
💻 LocalExpress6.695s (-13.9% 🟢)7.014s (-15.2% 🟢)0.319s51.91x
💻 LocalNitro7.564s (-3.6%)8.019s (-5.9% 🟢)0.454s42.15x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.447s (+6.2% 🔺)4.363s (+4.0%)0.916s71.00x
▲ VercelNext.js (Turbopack)3.976s (+17.7% 🔺)5.020s (+15.8% 🔺)1.044s61.15x
▲ VercelExpress4.801s (+60.2% 🔺)5.773s (+44.3% 🔺)0.972s71.39x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.109s (-37.3% 🟢)1.002s (~)0.009s (-12.8% 🟢)1.014s (~)0.906s101.00x
💻 LocalNitro0.182s (+2.8%)1.002s (~)0.011s (-3.6%)1.016s (~)0.834s101.68x
🐘 PostgresExpress0.189s (-1.8%)0.997s (+0.5%)0.001s (-6.7% 🟢)1.012s (~)0.822s101.74x
🐘 PostgresNitro0.194s (-1.6%)0.996s (~)0.001s (-17.6% 🟢)1.013s (~)0.820s101.78x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.615s (+3.2%)2.237s (+18.6% 🔺)0.101s (-4.4%)2.705s (+10.1% 🔺)1.090s101.00x
▲ VercelNext.js (Turbopack)1.639s (+11.1% 🔺)2.160s (+23.6% 🔺)0.095s (~)2.688s (+20.1% 🔺)1.050s101.01x
▲ VercelNitro1.787s (+26.0% 🔺)2.509s (+47.8% 🔺)0.081s (-28.5% 🟢)2.960s (+35.6% 🔺)1.173s101.11x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress12/12
🐘 PostgresExpress7/12
▲ VercelNitro7/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local7/12
Next.js (Turbopack)▲ Vercel12/12
Nitro🐘 Postgres7/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
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@changeset-bot

changeset-botBot commented Feb 26, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 9fe76fa

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

github-actionsBot commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production523049572
✅ 💻 Local Development556068624
✅ 📦 Local Production556068624
❌ 🐘 Local Postgres555168624
✅ 🪟 Windows490352
❌ 🌍 Community Worlds111459165
✅ 📋 Other135021156
Total2485462862817

❌ Failed Tests

🐘 Local Postgres (1 failed)

astro-stable (1 failed):

  • webhookWorkflow
🌍 Community Worlds (45 failed)

turso (45 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • parallelSleepWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • 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 retry behavior workflow completes despite transient 5xx on step_completed
  • 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 (queue-based) - workflow and step endpoints respond to health check messages
  • 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
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • cancelRun - cancelling a running workflow
  • cancelRun via CLI - cancelling a running workflow
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4705
✅ example4705
✅ express4705
✅ fastify4705
✅ hono4705
✅ nextjs-turbopack5002
✅ nextjs-webpack5002
✅ nitro4705
✅ nuxt4705
✅ sveltekit4705
✅ vite4705
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
❌ 🐘 Local Postgres
AppPassedFailedSkipped
❌ astro-stable4417
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4903
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4903
✅ redis-dev300
✅ redis4903
✅ turso-dev300
❌ turso4453
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4507
✅ e2e-local-postgres-nest-stable4507
✅ e2e-local-prod-nest-stable4507

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: success
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: failure
  • Windows: success

Check the workflow run for details.

The first overload of events.create() accepts string | null, not just
null. Clients can provide their own runId for run_created events.
VaguelySerious
VaguelySerious previously approved these changes Feb 26, 2026

```typescript lineNumbers
import { getWorld} from "workflow/runtime";
import { getWorld, cancelRun } from "@workflow/core/runtime";

@pranaygppranaygpMar 1, 2026

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.

nah the correct way to programmatically cancel a run is await getRun(runId).cancel() - not cancelRun from world. We don't adequately document it though so good call on making this. We should include an example in getRun api reference for cancelling a run so that it's searchable by AI. right now it's not well documented

Also users should almost never be importing from @workflow/core for normal usage. workflow/api should be what people use for normal behavior. using getWorld is an advanced/low level features that will break often as we change things around and not meant to be relied on

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

using getWorld is an advanced/low level features that will break often as we change things around and not meant to be relied on

At least once we actually have a different way of querying the same data, which we won't for a while? In which case it wouldn't hurt to document. Users could already be relying on it

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.

I don't think we should document it and then have to support it

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.

also like I said, for now the fix is simple. we have run.cancel(). let's document that instead of telling people to use @workflow/core/runtime which is never meant to be user facing

@pranaygp
pranaygp dismissed VaguelySerious’s stale reviewMarch 2, 2026 21:36

we shouldn't document and recommend cancelRun from @workflow/core/runtime. it should be run.cancel

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

Good docs audit overall — most fixes here are correct and helpful. The interface updates, typo fixes, run.returnValue, import path corrections, and flightBookingTools rename are all verified against the source.

The main blocker is the cancelRun change (already discussed in the thread) — it needs to use the public API instead of an internal module.


```typescript lineNumbers
import { getWorld} from "workflow/runtime";
import { getWorld, cancelRun } from "@workflow/core/runtime";

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.

As pranaygp noted in the earlier thread, this should use the public API:

import{getRun}from"workflow/runtime";exportasyncfunctionPOST(req: Request){const{ runId }=awaitreq.json();// ...construn=getRun(runId);awaitrun.cancel();returnResponse.json({status: "cancelled"});}

cancelRun from @workflow/core/runtime is an internal function — users should never import from @workflow/core directly. getRun(runId).cancel() is the supported public API for this (exported from workflow/runtime).

events: {
// Create a new workflow run (runId must be null - server generates it)
create(runId: null, data: RunCreatedEventRequest, params?: CreateEventParams): Promise<EventResult>;
// Create a new workflow run (runId may be client-provided or null for server generation)

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.

Nit: The source code doc comment (interfaces.ts:130) says: "The runId may be provided by the client or left as null for the server to generate." Consider matching this wording exactly for consistency between source and docs.

@@ -34,10 +34,13 @@ A World connects workflows to the infrastructure that powers them. The World int
```typescript
interface World extends Storage, Queue, Streamer {
start?(): Promise<void>;

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.

Verified: the close?() and getEncryptionKeyForRun?() additions match the actual World interface in packages/world/src/interfaces.ts exactly. 👍

johnlindquist added a commit that referenced this pull request Apr 6, 2026
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
@johnlindquist

Copy link
Copy Markdown
ContributorAuthor

Closing — fixes have been dispositioned:

  • 3 fixes already on main (ai/index.mdx variable rename, ai/resumable-streams.mdx highlight bracket, ai/sleep-and-delays.mdx import/operator fixes) — these were merged in subsequent PRs.
  • 3 fixes covered by docs: March docs audit and alignment #1466 (get-world.mdx, start-invalid-workflow-function.mdx, astro.mdx) — docs: March docs audit and alignment #1466 has more comprehensive rewrites of these files that include these corrections.
  • 6 unique fixes cherry-picked into docs: March docs audit and alignment #1466 (observability CLI wording, fetch removal from restricted modules, package name fix, stream wording, import path fix, World/Streamer interface updates) — committed to march-docs-audit branch.

No content lost.

johnlindquist added a commit that referenced this pull request Apr 6, 2026
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
johnlindquist added a commit that referenced this pull request Apr 6, 2026
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
pranaygp pushed a commit that referenced this pull request Apr 7, 2026
* docs: clarify Next monorepo setup
Prevent confusion when Next.js apps live below the repository root and workflow code imports sibling workspace packages.
This documents the output tracing root requirement at the point where users configure withWorkflow, so monorepo setups follow the same working patterns as the shipped Next.js integration instead of failing due to unresolved workspace imports.
Ploop-Iter: 1
* ploop: iteration 2 checkpoint
Automated checkpoint commit.
Ploop-Iter: 2
* ploop: iteration 3 checkpoint
Automated checkpoint commit.
Ploop-Iter: 3
* docs: audit recent documentation coverage
Capture recent workflow documentation updates so the public docs and package guidance stay aligned with the implementation and current docs-typecheck behavior.
Ploop-Iter: 1
* docs: align docs-typecheck docs
Document the current docs verification contract so contributors do not assume JavaScript examples are type-checked when only TypeScript snippets are enforced today.
Add regression coverage around the README language and framework integration guidance to keep those docs aligned with the implemented Next.js and docs-typecheck behavior as future changes land.
Ploop-Iter: 2
* docs: add start() troubleshooting guidance
Document the most common causes of the invalid workflow function error so users can resolve start() failures from the API docs and Next.js setup flow without having to infer build-time requirements from runtime behavior.
Keep the new troubleshooting page aligned with the shipped runtime message and add regression coverage so future wording or cross-link changes do not silently break that guidance.
Ploop-Iter: 3
* docs: align NestJS setup docs
Document both supported NestJS module formats and add a regression check so the getting-started guide stays aligned with the package README as the integration evolves.
Ploop-Iter: 1
* docs: tighten NestJS CommonJS guidance
Keep the NestJS getting-started guide consistent across the ESM and CommonJS paths so readers do not mix module settings or import styles mid-setup.
Strengthen the docs regression coverage around the later guide sections so future edits are more likely to preserve the supported CommonJS path documented in the package README.
Ploop-Iter: 2
* docs: align docs with recent workflow guidance
Document the recently added troubleshooting and observability patterns so the public docs stay aligned with the behavior users now encounter in practice.
This keeps the NestJS guide, workflow API reference, and docs regression coverage in sync with the runtime-facing guidance from recent changes.
Ploop-Iter: 3
* docs: audit docs coverage
Why: keep the docs aligned with recent API and runtime behavior changes so examples and reference pages don’t drift from the supported surface.
Ploop-Iter: 1
* test: add docs audit guards
Add regression coverage for doc surfaces that are easy to drift from implementation so docs audits catch mismatches early and keep published guidance aligned with the supported API surface.
Ploop-Iter: 2
* docs: add docs audit guards
Keep new observability and server-testing guidance anchored to machine-readable interfaces so follow-up implementation changes do not silently drift away from the documented agent and automation patterns.
Ploop-Iter: 3
* docs: align observability troubleshooting guidance
Keep the docs consistent so users get the same guidance when debugging hook token collisions and correlating workflow events with platform logs.
This prevents the event-sourcing reference from drifting away from the observability and error docs, and adds guard tests to catch regressions.
Ploop-Iter: 1
* Remove the unreferenced image file img-a-clean-minimal-technical-architecture-d-2026-02-27T14-07-52-1.png from the repo root, workbench/fastify/public/index.html (a Nitro example mistakenly placed in the fastify workbench by a ploop checkpoint), all .claude/worktrees/* submodule references, and all 15 string-presence audit guard tests in packages/docs-typecheck/src/__tests__/ (they only assert keyword presence, not semantic correctness). None of these belong in the docs audit PR.
* Address all PR #1466 review feedback from VaguelySerious, pranaygp, and ijjk:
1. Remove the "Machine-Readable Surfaces" section from docs/content/docs/observability/index.mdx (reviewers say it's unnecessary and already in world docs)
2. Remove all @skip-typecheck annotations from durable-agent.mdx (8) and server-based.mdx (1) — types exist in built packages/ai/dist after pnpm build
3. In durable-agent.mdx, change "machine-readable tool activity" to "tool call details" in the stream() return description
4. In durable-agent.mdx "Aborting Long-Running Streams" section, add a warning callout that abortSignal is not yet supported (blocked by #1301), recommend timeout instead
5. In event-sourcing.mdx, update requestId description: "On Vercel, requestId is the platform request ID when available. Other worlds are not expected to provide a requestId."
6. In get-world.mdx, change "user-friendly names from the machine-readable workflowName field" to "human-readable names from the workflowName field"
7. In start-invalid-workflow-function.mdx, add "// Does NOT work" comment above the bad example line
8. In with-workflow.mdx: reframe outputFileTracingRoot as a workaround (Next.js auto-detects by default per ijjk); change options description from "control local development behavior" to "configure the Next.js integration"; scope the callout to "workflows.local options only affect local development"
9. Drop the withWorkflow() options callout from docs/content/docs/getting-started/next.mdx
10. Remove the Next.js-specific outputFileTracingRoot callout from framework-integrations.mdx
11. Add a Troubleshooting section with the start() invalid-workflow-function error to all 9 non-Next getting-started guides (astro, express, fastify, hono, nestjs, nitro, nuxt, sveltekit, vite), each with framework-appropriate config check in point 2
* docs: absorb unique accuracy fixes from PR #1200
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
* docs: address review feedback on March docs audit
- durable-agent.mdx: "structured tool activity" → "tool call information"
per VaguelySerious's suggestion
- next.mdx: drop monorepo callout from getting-started per pranaygp
(too much context too early; info is in withWorkflow API ref)
* docs: fix 2 typecheck failures in encryption and nestjs guides
- encryption.mdx: add skip-typecheck for interface signature block
(getEncryptionKeyForRun overloads are not runnable code)
- nestjs.mdx: add skip-typecheck for WorkflowModule.forRoot config
snippet (fragment inside callout, full import shown above)
Verified: pnpm vitest run passes 300/300 in docs-typecheck.
VaguelySerious pushed a commit that referenced this pull request Apr 7, 2026
* docs: clarify Next monorepo setup
Prevent confusion when Next.js apps live below the repository root and workflow code imports sibling workspace packages.
This documents the output tracing root requirement at the point where users configure withWorkflow, so monorepo setups follow the same working patterns as the shipped Next.js integration instead of failing due to unresolved workspace imports.
Ploop-Iter: 1
* ploop: iteration 2 checkpoint
Automated checkpoint commit.
Ploop-Iter: 2
* ploop: iteration 3 checkpoint
Automated checkpoint commit.
Ploop-Iter: 3
* docs: audit recent documentation coverage
Capture recent workflow documentation updates so the public docs and package guidance stay aligned with the implementation and current docs-typecheck behavior.
Ploop-Iter: 1
* docs: align docs-typecheck docs
Document the current docs verification contract so contributors do not assume JavaScript examples are type-checked when only TypeScript snippets are enforced today.
Add regression coverage around the README language and framework integration guidance to keep those docs aligned with the implemented Next.js and docs-typecheck behavior as future changes land.
Ploop-Iter: 2
* docs: add start() troubleshooting guidance
Document the most common causes of the invalid workflow function error so users can resolve start() failures from the API docs and Next.js setup flow without having to infer build-time requirements from runtime behavior.
Keep the new troubleshooting page aligned with the shipped runtime message and add regression coverage so future wording or cross-link changes do not silently break that guidance.
Ploop-Iter: 3
* docs: align NestJS setup docs
Document both supported NestJS module formats and add a regression check so the getting-started guide stays aligned with the package README as the integration evolves.
Ploop-Iter: 1
* docs: tighten NestJS CommonJS guidance
Keep the NestJS getting-started guide consistent across the ESM and CommonJS paths so readers do not mix module settings or import styles mid-setup.
Strengthen the docs regression coverage around the later guide sections so future edits are more likely to preserve the supported CommonJS path documented in the package README.
Ploop-Iter: 2
* docs: align docs with recent workflow guidance
Document the recently added troubleshooting and observability patterns so the public docs stay aligned with the behavior users now encounter in practice.
This keeps the NestJS guide, workflow API reference, and docs regression coverage in sync with the runtime-facing guidance from recent changes.
Ploop-Iter: 3
* docs: audit docs coverage
Why: keep the docs aligned with recent API and runtime behavior changes so examples and reference pages don’t drift from the supported surface.
Ploop-Iter: 1
* test: add docs audit guards
Add regression coverage for doc surfaces that are easy to drift from implementation so docs audits catch mismatches early and keep published guidance aligned with the supported API surface.
Ploop-Iter: 2
* docs: add docs audit guards
Keep new observability and server-testing guidance anchored to machine-readable interfaces so follow-up implementation changes do not silently drift away from the documented agent and automation patterns.
Ploop-Iter: 3
* docs: align observability troubleshooting guidance
Keep the docs consistent so users get the same guidance when debugging hook token collisions and correlating workflow events with platform logs.
This prevents the event-sourcing reference from drifting away from the observability and error docs, and adds guard tests to catch regressions.
Ploop-Iter: 1
* Remove the unreferenced image file img-a-clean-minimal-technical-architecture-d-2026-02-27T14-07-52-1.png from the repo root, workbench/fastify/public/index.html (a Nitro example mistakenly placed in the fastify workbench by a ploop checkpoint), all .claude/worktrees/* submodule references, and all 15 string-presence audit guard tests in packages/docs-typecheck/src/__tests__/ (they only assert keyword presence, not semantic correctness). None of these belong in the docs audit PR.
* Address all PR #1466 review feedback from VaguelySerious, pranaygp, and ijjk:
1. Remove the "Machine-Readable Surfaces" section from docs/content/docs/observability/index.mdx (reviewers say it's unnecessary and already in world docs)
2. Remove all @skip-typecheck annotations from durable-agent.mdx (8) and server-based.mdx (1) — types exist in built packages/ai/dist after pnpm build
3. In durable-agent.mdx, change "machine-readable tool activity" to "tool call details" in the stream() return description
4. In durable-agent.mdx "Aborting Long-Running Streams" section, add a warning callout that abortSignal is not yet supported (blocked by #1301), recommend timeout instead
5. In event-sourcing.mdx, update requestId description: "On Vercel, requestId is the platform request ID when available. Other worlds are not expected to provide a requestId."
6. In get-world.mdx, change "user-friendly names from the machine-readable workflowName field" to "human-readable names from the workflowName field"
7. In start-invalid-workflow-function.mdx, add "// Does NOT work" comment above the bad example line
8. In with-workflow.mdx: reframe outputFileTracingRoot as a workaround (Next.js auto-detects by default per ijjk); change options description from "control local development behavior" to "configure the Next.js integration"; scope the callout to "workflows.local options only affect local development"
9. Drop the withWorkflow() options callout from docs/content/docs/getting-started/next.mdx
10. Remove the Next.js-specific outputFileTracingRoot callout from framework-integrations.mdx
11. Add a Troubleshooting section with the start() invalid-workflow-function error to all 9 non-Next getting-started guides (astro, express, fastify, hono, nestjs, nitro, nuxt, sveltekit, vite), each with framework-appropriate config check in point 2
* docs: absorb unique accuracy fixes from PR #1200
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
* docs: address review feedback on March docs audit
- durable-agent.mdx: "structured tool activity" → "tool call information"
per VaguelySerious's suggestion
- next.mdx: drop monorepo callout from getting-started per pranaygp
(too much context too early; info is in withWorkflow API ref)
* docs: fix 2 typecheck failures in encryption and nestjs guides
- encryption.mdx: add skip-typecheck for interface signature block
(getEncryptionKeyForRun overloads are not runnable code)
- nestjs.mdx: add skip-typecheck for WorkflowModule.forRoot config
snippet (fragment inside callout, full import shown above)
Verified: pnpm vitest run passes 300/300 in docs-typecheck.
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

@johnlindquist@pranaygp@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); })(); Fix 12 documentation accuracy issues across API reference, foundations, and AI docs by johnlindquist · Pull Request #1200 · vercel/workflow · GitHub
Skip to content

Fix 12 documentation accuracy issues across API reference, foundations, and AI docs - #1200

Closed
johnlindquist wants to merge 5 commits into
mainfrom
worktree-swift-jumping-pizza
Closed

Fix 12 documentation accuracy issues across API reference, foundations, and AI docs#1200
johnlindquist wants to merge 5 commits into
mainfrom
worktree-swift-jumping-pizza

Conversation

@johnlindquist

Copy link
Copy Markdown
Contributor

Summary

Fixes validated documentation issues found during a comprehensive docs audit:

  • API reference: Fix nonexistent world.runs.cancel() in getWorld examples — replaced with cancelRun() from @workflow/core/runtime
  • Streaming guide: Fix import path mismatch (simple vs simple-streaming) and replace nonexistent run.result() with run.returnValue
  • World/Streamer interfaces: Add missing close?() and getEncryptionKeyForRun?() to World, fix runId type from string | Promise<string> to string in Streamer, add missing writeToStreamMulti? method
  • Deploying docs: Fix wrong Postgres world package name (@workflow-worlds/postgres@workflow/world-postgres)
  • AI docs: Fix tools naming mismatch (tools vs flightBookingTools), remove unused getWritable import, fix missing || operator, add missing RetryableError import, fix broken highlight annotation
  • Misc: Fix [!code highlight} typo, correct "Vite root directory" → "Astro project root directory", fix inaccurate npx "install globally" claim, remove fetch from Node.js core modules list

Test plan

  • Verify docs build succeeds
  • Spot-check corrected code examples compile against actual workflow exports
  • Verify getWorld cancel example uses correct cancelRun API
  • Verify World/Streamer interfaces match packages/world/src/interfaces.ts

Update docs examples that referenced outdated or incorrect APIs.
This fixes cancellation usage in get-world, stream import path and run return access in streaming, clarifies stream wording in starting-workflows, and removes fetch from Node.js core module examples.
Verified: node -e '...docs snippet verification passed' (requested old/new snippets checked in 4 files)
How to test: run the same node assertion command from repo root to confirm snippets.
Swarm-Agent: codex-core-docs
Correct World interface docs to include close() and getEncryptionKeyForRun() overloads, and clarify their runtime behavior.
Update Streamer runId types to string, add writeToStreamMulti(), and document it as an optional batching optimization.
Also fix package references from @workflow-worlds/postgres to @workflow/world-postgres.
Verified: pnpm biome check docs/content/docs/deploying/building-a-world.mdx docs/content/docs/deploying/index.mdx (fails because Biome config ignores *.mdx paths)
Verified: node <<'NODE' ... scoped assertions on docs/content/docs/deploying/building-a-world.mdx and docs/content/docs/deploying/index.mdx (pass)
Swarm-Agent: codex-world-interface
Align code examples across AI docs by renaming the tools export, fixing import snippets, restoring a missing logical OR, adding missing RetryableError import context, and repairing a broken highlight annotation.
Verified: git diff --check -- docs/content/docs/ai/index.mdx docs/content/docs/ai/sleep-and-delays.mdx docs/content/docs/ai/resumable-streams.mdx
Verified: set -euo pipefail; rg -n "export const flightBookingTools = \\{" docs/content/docs/ai/index.mdx; rg -n "import \\{ flightBookingTools \\} from \"@/ai/tools\";" docs/content/docs/ai/index.mdx; rg -n "import \\{ sleep \\} from \"workflow\";" docs/content/docs/ai/sleep-and-delays.mdx; rg -n "tool-checkBaggageAllowance\" \\|\\|" docs/content/docs/ai/sleep-and-delays.mdx; rg -n "part.type === \"tool-sleep\"" docs/content/docs/ai/sleep-and-delays.mdx; rg -n "import \\{ RetryableError \\} from \"workflow\";" docs/content/docs/ai/sleep-and-delays.mdx; rg -n "headers: \\{ // \\[!code highlight\\]" docs/content/docs/ai/resumable-streams.mdx
Swarm-Agent: codex-ai-docs
Update three docs files to fix a malformed code-highlight annotation,\nclarify Astro directory wording, and correct npx behavior wording.\n\nVerified: set -e; rg assertions for old/new strings in all 3 files (pass)\nVerified: git diff --check -- docs/content/docs/errors/start-invalid-workflow-function.mdx docs/content/docs/getting-started/astro.mdx docs/content/docs/observability/index.mdx (pass)\nVerified: npx -y prettier@3 --check docs/content/docs/errors/start-invalid-workflow-function.mdx docs/content/docs/getting-started/astro.mdx docs/content/docs/observability/index.mdx (fails: pre-existing formatting style mismatch in docs)\nSwarm-Agent: codex-misc-fixes
@johnlindquist
johnlindquist requested a review from a team as a code ownerFebruary 26, 2026 04:23
@vercel

vercelBot commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Feb 26, 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🥇 Express0.025s (-22.3% 🟢)1.005s (~)0.979s101.00x
💻 LocalNitro0.033s (+2.8%)1.005s (~)0.972s101.31x
🐘 PostgresNitro0.054s (-4.1%)1.010s (~)0.956s102.13x
🐘 PostgresExpress0.056s (+4.3%)1.010s (~)0.955s102.19x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.410s (-23.3% 🟢)1.731s (-4.6%)1.321s101.00x
▲ VercelNext.js (Turbopack)0.458s (-19.1% 🟢)1.907s (-4.3%)1.449s101.12x
▲ VercelExpress0.458s (-28.0% 🟢)1.795s (-9.8% 🟢)1.337s101.12x

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

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.072s (-3.3%)2.005s (~)0.933s101.00x
💻 LocalNitro1.112s (~)2.005s (~)0.893s101.04x
🐘 PostgresExpress1.129s (-0.9%)2.018s (~)0.889s101.05x
🐘 PostgresNitro1.131s (~)2.011s (~)0.880s101.05x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.975s (+1.3%)2.840s (-3.5%)0.865s101.00x
▲ VercelNext.js (Turbopack)2.077s (+6.8% 🔺)3.167s (+2.5%)1.090s101.05x
▲ VercelExpress2.145s (+1.7%)3.042s (-8.5% 🟢)0.897s101.09x

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

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express10.554s (-2.6%)11.020s (~)0.467s31.00x
🐘 PostgresNitro10.841s (-0.5%)11.042s (~)0.201s31.03x
💻 LocalNitro10.861s (~)11.022s (~)0.160s31.03x
🐘 PostgresExpress10.918s (~)11.045s (~)0.126s31.03x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro16.812s (+5.2% 🔺)17.864s (+5.6% 🔺)1.052s21.00x
▲ VercelExpress16.985s (+1.1%)17.783s (-0.9%)0.797s21.01x
▲ VercelNext.js (Turbopack)17.249s (+6.6% 🔺)18.776s (+10.2% 🔺)1.527s21.03x

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

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express26.763s (-2.6%)27.049s (-3.6%)0.286s31.00x
🐘 PostgresNitro27.309s (~)28.070s (~)0.762s31.02x
🐘 PostgresExpress27.319s (~)28.069s (~)0.750s31.02x
💻 LocalNitro27.587s (~)28.053s (~)0.466s31.03x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)44.431s (+2.3%)45.959s (+2.8%)1.527s21.00x
▲ VercelExpress44.937s (+5.1% 🔺)46.273s (+4.8%)1.336s21.01x
▲ VercelNitro45.338s (+6.5% 🔺)45.967s (+6.0% 🔺)0.629s21.02x

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

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express54.971s (~)55.099s (~)0.128s21.00x
🐘 PostgresNitro55.087s (~)55.607s (-0.9%)0.521s21.00x
💻 LocalExpress55.663s (-2.7%)56.093s (-3.5%)0.430s21.01x
💻 LocalNitro57.379s (~)58.105s (~)0.726s21.04x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express95.058s (+3.0%)96.094s (+2.8%)1.036s11.00x
▲ VercelNitro99.276s (+7.0% 🔺)100.397s (+7.7% 🔺)1.121s11.04x
▲ VercelNext.js (Turbopack)100.990s (+0.7%)102.638s (+1.3%)1.648s11.06x

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

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.353s (-3.9%)2.005s (~)0.652s151.00x
🐘 PostgresExpress1.366s (~)2.011s (~)0.646s151.01x
🐘 PostgresNitro1.377s (+1.8%)2.010s (~)0.634s151.02x
💻 LocalNitro1.402s (-2.1%)2.006s (~)0.604s151.04x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.150s (-4.7%)2.950s (-19.8% 🟢)0.800s111.00x
▲ VercelNitro2.204s (-13.9% 🟢)3.002s (-14.0% 🟢)0.798s101.03x
▲ VercelNext.js (Turbopack)2.600s (+17.2% 🔺)3.671s (+16.8% 🔺)1.071s91.21x

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

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.009s (+3.6%)2.600s (+5.1% 🔺)0.591s121.00x
🐘 PostgresNitro2.013s (+3.4%)2.514s (~)0.501s121.00x
💻 LocalExpress2.280s (-9.7% 🟢)3.006s (~)0.727s101.13x
💻 LocalNitro2.488s (-4.9%)3.007s (~)0.519s101.24x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.693s (-15.9% 🟢)3.365s (-32.8% 🟢)0.671s91.00x
▲ VercelNext.js (Turbopack)3.022s (-4.2%)3.929s (-3.4%)0.907s81.12x
▲ VercelExpress3.126s (+25.4% 🔺)4.034s (+10.5% 🔺)0.908s81.16x

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

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.627s (+6.1% 🔺)4.266s (+5.8% 🔺)0.639s81.00x
🐘 PostgresExpress3.780s (+14.9% 🔺)4.314s (+10.6% 🔺)0.534s71.04x
💻 LocalExpress6.192s (-17.8% 🟢)7.015s (-12.6% 🟢)0.823s51.71x
💻 LocalNitro7.011s (-5.2% 🟢)7.516s (-6.3% 🟢)0.505s41.93x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.232s (+0.5%)4.512s (-3.8%)1.280s71.00x
▲ VercelExpress3.765s (+20.7% 🔺)4.812s (+10.4% 🔺)1.046s71.16x
▲ VercelNext.js (Turbopack)3.967s (+10.3% 🔺)5.057s (+9.0% 🔺)1.090s61.23x

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

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.355s (-5.2% 🟢)2.005s (~)0.650s151.00x
🐘 PostgresExpress1.374s (+1.1%)2.010s (~)0.636s151.01x
🐘 PostgresNitro1.386s (+1.6%)2.011s (~)0.625s151.02x
💻 LocalNitro1.429s (~)2.005s (~)0.576s151.05x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Next.js (Turbopack)2.188s (+8.1% 🔺)3.172s (+3.4%)0.984s101.00x
▲ VercelExpress2.205s (+4.4%)3.166s (-5.8% 🟢)0.960s101.01x
▲ VercelNitro2.224s (+4.0%)2.970s (-2.2%)0.746s111.02x

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

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express2.034s (+1.7%)2.600s (+3.5%)0.566s121.00x
🐘 PostgresNitro2.074s (+5.9% 🔺)2.679s (+8.2% 🔺)0.605s121.02x
💻 LocalExpress2.417s (-9.4% 🟢)3.008s (~)0.590s101.19x
💻 LocalNitro2.615s (-5.0%)3.008s (~)0.393s101.29x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.953s (+22.5% 🔺)3.562s (+8.3% 🔺)0.609s91.00x
▲ VercelNext.js (Turbopack)3.370s (+33.5% 🔺)4.422s (+32.5% 🔺)1.051s71.14x
▲ VercelExpress3.438s (+48.8% 🔺)4.189s (+22.3% 🔺)0.752s81.16x

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

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro3.511s (+9.3% 🔺)4.315s (+10.8% 🔺)0.805s71.00x
🐘 PostgresExpress3.761s (+9.1% 🔺)4.451s (+7.3% 🔺)0.689s71.07x
💻 LocalExpress6.695s (-13.9% 🟢)7.014s (-15.2% 🟢)0.319s51.91x
💻 LocalNitro7.564s (-3.6%)8.019s (-5.9% 🟢)0.454s42.15x
💻 LocalNext.js (Turbopack)⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.447s (+6.2% 🔺)4.363s (+4.0%)0.916s71.00x
▲ VercelNext.js (Turbopack)3.976s (+17.7% 🔺)5.020s (+15.8% 🔺)1.044s61.15x
▲ VercelExpress4.801s (+60.2% 🔺)5.773s (+44.3% 🔺)0.972s71.39x

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

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express0.109s (-37.3% 🟢)1.002s (~)0.009s (-12.8% 🟢)1.014s (~)0.906s101.00x
💻 LocalNitro0.182s (+2.8%)1.002s (~)0.011s (-3.6%)1.016s (~)0.834s101.68x
🐘 PostgresExpress0.189s (-1.8%)0.997s (+0.5%)0.001s (-6.7% 🟢)1.012s (~)0.822s101.74x
🐘 PostgresNitro0.194s (-1.6%)0.996s (~)0.001s (-17.6% 🟢)1.013s (~)0.820s101.78x
💻 LocalNext.js (Turbopack)⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.615s (+3.2%)2.237s (+18.6% 🔺)0.101s (-4.4%)2.705s (+10.1% 🔺)1.090s101.00x
▲ VercelNext.js (Turbopack)1.639s (+11.1% 🔺)2.160s (+23.6% 🔺)0.095s (~)2.688s (+20.1% 🔺)1.050s101.01x
▲ VercelNitro1.787s (+26.0% 🔺)2.509s (+47.8% 🔺)0.081s (-28.5% 🟢)2.960s (+35.6% 🔺)1.173s101.11x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress12/12
🐘 PostgresExpress7/12
▲ VercelNitro7/12
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local7/12
Next.js (Turbopack)▲ Vercel12/12
Nitro🐘 Postgres7/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
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@changeset-bot

changeset-botBot commented Feb 26, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 9fe76fa

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

github-actionsBot commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production523049572
✅ 💻 Local Development556068624
✅ 📦 Local Production556068624
❌ 🐘 Local Postgres555168624
✅ 🪟 Windows490352
❌ 🌍 Community Worlds111459165
✅ 📋 Other135021156
Total2485462862817

❌ Failed Tests

🐘 Local Postgres (1 failed)

astro-stable (1 failed):

  • webhookWorkflow
🌍 Community Worlds (45 failed)

turso (45 failed):

  • addTenWorkflow
  • addTenWorkflow
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • hookWorkflow
  • webhookWorkflow
  • sleepingWorkflow
  • parallelSleepWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • 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 retry behavior workflow completes despite transient 5xx on step_completed
  • 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 (queue-based) - workflow and step endpoints respond to health check messages
  • 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
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • cancelRun - cancelling a running workflow
  • cancelRun via CLI - cancelling a running workflow
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro4705
✅ example4705
✅ express4705
✅ fastify4705
✅ hono4705
✅ nextjs-turbopack5002
✅ nextjs-webpack5002
✅ nitro4705
✅ nuxt4705
✅ sveltekit4705
✅ vite4705
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable4507
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
❌ 🐘 Local Postgres
AppPassedFailedSkipped
❌ astro-stable4417
✅ express-stable4507
✅ fastify-stable4507
✅ hono-stable4507
✅ nextjs-turbopack-canary4903
✅ nextjs-turbopack-stable4903
✅ nextjs-webpack-canary4903
✅ nextjs-webpack-stable4903
✅ nitro-stable4507
✅ nuxt-stable4507
✅ sveltekit-stable4507
✅ vite-stable4507
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack4903
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev300
✅ mongodb4903
✅ redis-dev300
✅ redis4903
✅ turso-dev300
❌ turso4453
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable4507
✅ e2e-local-postgres-nest-stable4507
✅ e2e-local-prod-nest-stable4507

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: success
  • Local Dev: success
  • Local Prod: success
  • Local Postgres: failure
  • Windows: success

Check the workflow run for details.

The first overload of events.create() accepts string | null, not just
null. Clients can provide their own runId for run_created events.
VaguelySerious
VaguelySerious previously approved these changes Feb 26, 2026

```typescript lineNumbers
import { getWorld} from "workflow/runtime";
import { getWorld, cancelRun } from "@workflow/core/runtime";

@pranaygppranaygpMar 1, 2026

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.

nah the correct way to programmatically cancel a run is await getRun(runId).cancel() - not cancelRun from world. We don't adequately document it though so good call on making this. We should include an example in getRun api reference for cancelling a run so that it's searchable by AI. right now it's not well documented

Also users should almost never be importing from @workflow/core for normal usage. workflow/api should be what people use for normal behavior. using getWorld is an advanced/low level features that will break often as we change things around and not meant to be relied on

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

using getWorld is an advanced/low level features that will break often as we change things around and not meant to be relied on

At least once we actually have a different way of querying the same data, which we won't for a while? In which case it wouldn't hurt to document. Users could already be relying on it

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.

I don't think we should document it and then have to support it

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.

also like I said, for now the fix is simple. we have run.cancel(). let's document that instead of telling people to use @workflow/core/runtime which is never meant to be user facing

@pranaygp
pranaygp dismissed VaguelySerious’s stale reviewMarch 2, 2026 21:36

we shouldn't document and recommend cancelRun from @workflow/core/runtime. it should be run.cancel

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

Good docs audit overall — most fixes here are correct and helpful. The interface updates, typo fixes, run.returnValue, import path corrections, and flightBookingTools rename are all verified against the source.

The main blocker is the cancelRun change (already discussed in the thread) — it needs to use the public API instead of an internal module.


```typescript lineNumbers
import { getWorld} from "workflow/runtime";
import { getWorld, cancelRun } from "@workflow/core/runtime";

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.

As pranaygp noted in the earlier thread, this should use the public API:

import{getRun}from"workflow/runtime";exportasyncfunctionPOST(req: Request){const{ runId }=awaitreq.json();// ...construn=getRun(runId);awaitrun.cancel();returnResponse.json({status: "cancelled"});}

cancelRun from @workflow/core/runtime is an internal function — users should never import from @workflow/core directly. getRun(runId).cancel() is the supported public API for this (exported from workflow/runtime).

events: {
// Create a new workflow run (runId must be null - server generates it)
create(runId: null, data: RunCreatedEventRequest, params?: CreateEventParams): Promise<EventResult>;
// Create a new workflow run (runId may be client-provided or null for server generation)

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.

Nit: The source code doc comment (interfaces.ts:130) says: "The runId may be provided by the client or left as null for the server to generate." Consider matching this wording exactly for consistency between source and docs.

@@ -34,10 +34,13 @@ A World connects workflows to the infrastructure that powers them. The World int
```typescript
interface World extends Storage, Queue, Streamer {
start?(): Promise<void>;

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.

Verified: the close?() and getEncryptionKeyForRun?() additions match the actual World interface in packages/world/src/interfaces.ts exactly. 👍

johnlindquist added a commit that referenced this pull request Apr 6, 2026
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
@johnlindquist

Copy link
Copy Markdown
ContributorAuthor

Closing — fixes have been dispositioned:

  • 3 fixes already on main (ai/index.mdx variable rename, ai/resumable-streams.mdx highlight bracket, ai/sleep-and-delays.mdx import/operator fixes) — these were merged in subsequent PRs.
  • 3 fixes covered by docs: March docs audit and alignment #1466 (get-world.mdx, start-invalid-workflow-function.mdx, astro.mdx) — docs: March docs audit and alignment #1466 has more comprehensive rewrites of these files that include these corrections.
  • 6 unique fixes cherry-picked into docs: March docs audit and alignment #1466 (observability CLI wording, fetch removal from restricted modules, package name fix, stream wording, import path fix, World/Streamer interface updates) — committed to march-docs-audit branch.

No content lost.

johnlindquist added a commit that referenced this pull request Apr 6, 2026
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
johnlindquist added a commit that referenced this pull request Apr 6, 2026
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
pranaygp pushed a commit that referenced this pull request Apr 7, 2026
* docs: clarify Next monorepo setup
Prevent confusion when Next.js apps live below the repository root and workflow code imports sibling workspace packages.
This documents the output tracing root requirement at the point where users configure withWorkflow, so monorepo setups follow the same working patterns as the shipped Next.js integration instead of failing due to unresolved workspace imports.
Ploop-Iter: 1
* ploop: iteration 2 checkpoint
Automated checkpoint commit.
Ploop-Iter: 2
* ploop: iteration 3 checkpoint
Automated checkpoint commit.
Ploop-Iter: 3
* docs: audit recent documentation coverage
Capture recent workflow documentation updates so the public docs and package guidance stay aligned with the implementation and current docs-typecheck behavior.
Ploop-Iter: 1
* docs: align docs-typecheck docs
Document the current docs verification contract so contributors do not assume JavaScript examples are type-checked when only TypeScript snippets are enforced today.
Add regression coverage around the README language and framework integration guidance to keep those docs aligned with the implemented Next.js and docs-typecheck behavior as future changes land.
Ploop-Iter: 2
* docs: add start() troubleshooting guidance
Document the most common causes of the invalid workflow function error so users can resolve start() failures from the API docs and Next.js setup flow without having to infer build-time requirements from runtime behavior.
Keep the new troubleshooting page aligned with the shipped runtime message and add regression coverage so future wording or cross-link changes do not silently break that guidance.
Ploop-Iter: 3
* docs: align NestJS setup docs
Document both supported NestJS module formats and add a regression check so the getting-started guide stays aligned with the package README as the integration evolves.
Ploop-Iter: 1
* docs: tighten NestJS CommonJS guidance
Keep the NestJS getting-started guide consistent across the ESM and CommonJS paths so readers do not mix module settings or import styles mid-setup.
Strengthen the docs regression coverage around the later guide sections so future edits are more likely to preserve the supported CommonJS path documented in the package README.
Ploop-Iter: 2
* docs: align docs with recent workflow guidance
Document the recently added troubleshooting and observability patterns so the public docs stay aligned with the behavior users now encounter in practice.
This keeps the NestJS guide, workflow API reference, and docs regression coverage in sync with the runtime-facing guidance from recent changes.
Ploop-Iter: 3
* docs: audit docs coverage
Why: keep the docs aligned with recent API and runtime behavior changes so examples and reference pages don’t drift from the supported surface.
Ploop-Iter: 1
* test: add docs audit guards
Add regression coverage for doc surfaces that are easy to drift from implementation so docs audits catch mismatches early and keep published guidance aligned with the supported API surface.
Ploop-Iter: 2
* docs: add docs audit guards
Keep new observability and server-testing guidance anchored to machine-readable interfaces so follow-up implementation changes do not silently drift away from the documented agent and automation patterns.
Ploop-Iter: 3
* docs: align observability troubleshooting guidance
Keep the docs consistent so users get the same guidance when debugging hook token collisions and correlating workflow events with platform logs.
This prevents the event-sourcing reference from drifting away from the observability and error docs, and adds guard tests to catch regressions.
Ploop-Iter: 1
* Remove the unreferenced image file img-a-clean-minimal-technical-architecture-d-2026-02-27T14-07-52-1.png from the repo root, workbench/fastify/public/index.html (a Nitro example mistakenly placed in the fastify workbench by a ploop checkpoint), all .claude/worktrees/* submodule references, and all 15 string-presence audit guard tests in packages/docs-typecheck/src/__tests__/ (they only assert keyword presence, not semantic correctness). None of these belong in the docs audit PR.
* Address all PR #1466 review feedback from VaguelySerious, pranaygp, and ijjk:
1. Remove the "Machine-Readable Surfaces" section from docs/content/docs/observability/index.mdx (reviewers say it's unnecessary and already in world docs)
2. Remove all @skip-typecheck annotations from durable-agent.mdx (8) and server-based.mdx (1) — types exist in built packages/ai/dist after pnpm build
3. In durable-agent.mdx, change "machine-readable tool activity" to "tool call details" in the stream() return description
4. In durable-agent.mdx "Aborting Long-Running Streams" section, add a warning callout that abortSignal is not yet supported (blocked by #1301), recommend timeout instead
5. In event-sourcing.mdx, update requestId description: "On Vercel, requestId is the platform request ID when available. Other worlds are not expected to provide a requestId."
6. In get-world.mdx, change "user-friendly names from the machine-readable workflowName field" to "human-readable names from the workflowName field"
7. In start-invalid-workflow-function.mdx, add "// Does NOT work" comment above the bad example line
8. In with-workflow.mdx: reframe outputFileTracingRoot as a workaround (Next.js auto-detects by default per ijjk); change options description from "control local development behavior" to "configure the Next.js integration"; scope the callout to "workflows.local options only affect local development"
9. Drop the withWorkflow() options callout from docs/content/docs/getting-started/next.mdx
10. Remove the Next.js-specific outputFileTracingRoot callout from framework-integrations.mdx
11. Add a Troubleshooting section with the start() invalid-workflow-function error to all 9 non-Next getting-started guides (astro, express, fastify, hono, nestjs, nitro, nuxt, sveltekit, vite), each with framework-appropriate config check in point 2
* docs: absorb unique accuracy fixes from PR #1200
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
* docs: address review feedback on March docs audit
- durable-agent.mdx: "structured tool activity" → "tool call information"
per VaguelySerious's suggestion
- next.mdx: drop monorepo callout from getting-started per pranaygp
(too much context too early; info is in withWorkflow API ref)
* docs: fix 2 typecheck failures in encryption and nestjs guides
- encryption.mdx: add skip-typecheck for interface signature block
(getEncryptionKeyForRun overloads are not runnable code)
- nestjs.mdx: add skip-typecheck for WorkflowModule.forRoot config
snippet (fragment inside callout, full import shown above)
Verified: pnpm vitest run passes 300/300 in docs-typecheck.
VaguelySerious pushed a commit that referenced this pull request Apr 7, 2026
* docs: clarify Next monorepo setup
Prevent confusion when Next.js apps live below the repository root and workflow code imports sibling workspace packages.
This documents the output tracing root requirement at the point where users configure withWorkflow, so monorepo setups follow the same working patterns as the shipped Next.js integration instead of failing due to unresolved workspace imports.
Ploop-Iter: 1
* ploop: iteration 2 checkpoint
Automated checkpoint commit.
Ploop-Iter: 2
* ploop: iteration 3 checkpoint
Automated checkpoint commit.
Ploop-Iter: 3
* docs: audit recent documentation coverage
Capture recent workflow documentation updates so the public docs and package guidance stay aligned with the implementation and current docs-typecheck behavior.
Ploop-Iter: 1
* docs: align docs-typecheck docs
Document the current docs verification contract so contributors do not assume JavaScript examples are type-checked when only TypeScript snippets are enforced today.
Add regression coverage around the README language and framework integration guidance to keep those docs aligned with the implemented Next.js and docs-typecheck behavior as future changes land.
Ploop-Iter: 2
* docs: add start() troubleshooting guidance
Document the most common causes of the invalid workflow function error so users can resolve start() failures from the API docs and Next.js setup flow without having to infer build-time requirements from runtime behavior.
Keep the new troubleshooting page aligned with the shipped runtime message and add regression coverage so future wording or cross-link changes do not silently break that guidance.
Ploop-Iter: 3
* docs: align NestJS setup docs
Document both supported NestJS module formats and add a regression check so the getting-started guide stays aligned with the package README as the integration evolves.
Ploop-Iter: 1
* docs: tighten NestJS CommonJS guidance
Keep the NestJS getting-started guide consistent across the ESM and CommonJS paths so readers do not mix module settings or import styles mid-setup.
Strengthen the docs regression coverage around the later guide sections so future edits are more likely to preserve the supported CommonJS path documented in the package README.
Ploop-Iter: 2
* docs: align docs with recent workflow guidance
Document the recently added troubleshooting and observability patterns so the public docs stay aligned with the behavior users now encounter in practice.
This keeps the NestJS guide, workflow API reference, and docs regression coverage in sync with the runtime-facing guidance from recent changes.
Ploop-Iter: 3
* docs: audit docs coverage
Why: keep the docs aligned with recent API and runtime behavior changes so examples and reference pages don’t drift from the supported surface.
Ploop-Iter: 1
* test: add docs audit guards
Add regression coverage for doc surfaces that are easy to drift from implementation so docs audits catch mismatches early and keep published guidance aligned with the supported API surface.
Ploop-Iter: 2
* docs: add docs audit guards
Keep new observability and server-testing guidance anchored to machine-readable interfaces so follow-up implementation changes do not silently drift away from the documented agent and automation patterns.
Ploop-Iter: 3
* docs: align observability troubleshooting guidance
Keep the docs consistent so users get the same guidance when debugging hook token collisions and correlating workflow events with platform logs.
This prevents the event-sourcing reference from drifting away from the observability and error docs, and adds guard tests to catch regressions.
Ploop-Iter: 1
* Remove the unreferenced image file img-a-clean-minimal-technical-architecture-d-2026-02-27T14-07-52-1.png from the repo root, workbench/fastify/public/index.html (a Nitro example mistakenly placed in the fastify workbench by a ploop checkpoint), all .claude/worktrees/* submodule references, and all 15 string-presence audit guard tests in packages/docs-typecheck/src/__tests__/ (they only assert keyword presence, not semantic correctness). None of these belong in the docs audit PR.
* Address all PR #1466 review feedback from VaguelySerious, pranaygp, and ijjk:
1. Remove the "Machine-Readable Surfaces" section from docs/content/docs/observability/index.mdx (reviewers say it's unnecessary and already in world docs)
2. Remove all @skip-typecheck annotations from durable-agent.mdx (8) and server-based.mdx (1) — types exist in built packages/ai/dist after pnpm build
3. In durable-agent.mdx, change "machine-readable tool activity" to "tool call details" in the stream() return description
4. In durable-agent.mdx "Aborting Long-Running Streams" section, add a warning callout that abortSignal is not yet supported (blocked by #1301), recommend timeout instead
5. In event-sourcing.mdx, update requestId description: "On Vercel, requestId is the platform request ID when available. Other worlds are not expected to provide a requestId."
6. In get-world.mdx, change "user-friendly names from the machine-readable workflowName field" to "human-readable names from the workflowName field"
7. In start-invalid-workflow-function.mdx, add "// Does NOT work" comment above the bad example line
8. In with-workflow.mdx: reframe outputFileTracingRoot as a workaround (Next.js auto-detects by default per ijjk); change options description from "control local development behavior" to "configure the Next.js integration"; scope the callout to "workflows.local options only affect local development"
9. Drop the withWorkflow() options callout from docs/content/docs/getting-started/next.mdx
10. Remove the Next.js-specific outputFileTracingRoot callout from framework-integrations.mdx
11. Add a Troubleshooting section with the start() invalid-workflow-function error to all 9 non-Next getting-started guides (astro, express, fastify, hono, nestjs, nitro, nuxt, sveltekit, vite), each with framework-appropriate config check in point 2
* docs: absorb unique accuracy fixes from PR #1200
Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
update create() and streamer signatures (deploying/building-a-world)
* docs: address review feedback on March docs audit
- durable-agent.mdx: "structured tool activity" → "tool call information"
per VaguelySerious's suggestion
- next.mdx: drop monorepo callout from getting-started per pranaygp
(too much context too early; info is in withWorkflow API ref)
* docs: fix 2 typecheck failures in encryption and nestjs guides
- encryption.mdx: add skip-typecheck for interface signature block
(getEncryptionKeyForRun overloads are not runnable code)
- nestjs.mdx: add skip-typecheck for WorkflowModule.forRoot config
snippet (fragment inside callout, full import shown above)
Verified: pnpm vitest run passes 300/300 in docs-typecheck.
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

@johnlindquist@pranaygp@VaguelySerious