Skip to content

docs: audit and align API reference with source#1516

Open
johnlindquist wants to merge 15 commits intomainfrom
api-reference-audit
Open

docs: audit and align API reference with source#1516
johnlindquist wants to merge 15 commits intomainfrom
api-reference-audit

Conversation

@johnlindquist
Copy link
Copy Markdown
Contributor

Summary

  • Audited 17 API reference docs against source code to eliminate documentation drift
  • Fixed stale signatures, incorrect retry semantics, and wrong runtime behavior descriptions across workflow, workflow-api, workflow-next, and workflow-ai packages
  • Documented accurate API boundaries (workflow-only vs step-only helpers), withWorkflow env var behavior, hook token generation, and resumeWebhook response semantics

Test plan

  • Verify docs site builds cleanly (pnpm build in docs/)
  • Spot-check corrected pages render correctly
  • Confirm no broken links in API reference section

@johnlindquist johnlindquist requested a review from a team as a code owner March 25, 2026 14:42
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 25, 2026

⚠️ No Changeset found

Latest commit: 5627d29

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

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Mar 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview, Comment Apr 28, 2026 9:13pm
example-nextjs-workflow-webpack Ready Ready Preview, Comment Apr 28, 2026 9:13pm
example-workflow Ready Ready Preview, Comment Apr 28, 2026 9:13pm
workbench-astro-workflow Ready Ready Preview, Comment Apr 28, 2026 9:13pm
workbench-express-workflow Ready Ready Preview, Comment Apr 28, 2026 9:13pm
workbench-fastify-workflow Ready Ready Preview, Comment Apr 28, 2026 9:13pm
workbench-hono-workflow Ready Ready Preview, Comment Apr 28, 2026 9:13pm
workbench-nitro-workflow Ready Ready Preview, Comment Apr 28, 2026 9:13pm
workbench-nuxt-workflow Ready Ready Preview, Comment Apr 28, 2026 9:13pm
workbench-sveltekit-workflow Ready Ready Preview, Comment Apr 28, 2026 9:13pm
workbench-vite-workflow Ready Ready Preview, Comment Apr 28, 2026 9:13pm
workflow-docs Ready Ready Preview, Comment, Open in v0 Apr 28, 2026 9:13pm
workflow-swc-playground Ready Ready Preview, Comment Apr 28, 2026 9:13pm
workflow-web Ready Ready Preview, Comment Apr 28, 2026 9:13pm

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 25, 2026

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 0.041s 1.005s 0.964s 10 1.00x
💻 Local Express 0.043s (-3.6%) 1.005s (~) 0.962s 10 1.05x
💻 Local Nitro 0.043s (~) 1.005s (~) 0.961s 10 1.06x
🐘 Postgres Next.js (Turbopack) 0.058s 1.010s 0.953s 10 1.41x
🐘 Postgres Nitro 0.058s (-39.2% 🟢) 1.010s (-3.2%) 0.952s 10 1.42x
🐘 Postgres Express 0.059s (+1.0%) 1.013s (~) 0.954s 10 1.44x
workflow with 1 step

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 1.102s 2.006s 0.904s 10 1.00x
💻 Local Express 1.128s (~) 2.006s (~) 0.878s 10 1.02x
💻 Local Nitro 1.129s (~) 2.006s (~) 0.878s 10 1.02x
🐘 Postgres Next.js (Turbopack) 1.136s 2.010s 0.874s 10 1.03x
🐘 Postgres Nitro 1.144s (~) 2.010s (~) 0.866s 10 1.04x
🐘 Postgres Express 1.147s (~) 2.010s (~) 0.862s 10 1.04x
workflow with 10 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 10.631s 11.022s 0.391s 3 1.00x
🐘 Postgres Next.js (Turbopack) 10.858s 11.020s 0.161s 3 1.02x
🐘 Postgres Express 10.886s (-0.7%) 11.022s (~) 0.136s 3 1.02x
💻 Local Express 10.910s (~) 11.024s (~) 0.114s 3 1.03x
💻 Local Nitro 10.929s (~) 11.023s (~) 0.093s 3 1.03x
🐘 Postgres Nitro 10.932s (+0.6%) 11.021s (~) 0.089s 3 1.03x
workflow with 25 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 14.183s 15.029s 0.846s 4 1.00x
🐘 Postgres Next.js (Turbopack) 14.485s 15.021s 0.536s 4 1.02x
🐘 Postgres Express 14.563s (~) 15.028s (~) 0.466s 4 1.03x
🐘 Postgres Nitro 14.610s (~) 15.025s (~) 0.415s 4 1.03x
💻 Local Nitro 14.948s (-0.8%) 15.029s (-6.2% 🟢) 0.081s 4 1.05x
💻 Local Express 14.991s (~) 15.279s (+1.7%) 0.288s 4 1.06x
workflow with 50 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 13.857s 14.020s 0.163s 7 1.00x
🐘 Postgres Nitro 13.997s (~) 14.595s (+2.0%) 0.598s 7 1.01x
🐘 Postgres Express 14.005s (~) 14.449s (-1.0%) 0.444s 7 1.01x
💻 Local Next.js (Turbopack) 14.870s 15.027s 0.157s 6 1.07x
💻 Local Nitro 16.320s (-2.8%) 17.030s (~) 0.711s 6 1.18x
💻 Local Express 16.611s (~) 17.030s (~) 0.419s 6 1.20x
Promise.all with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 1.225s 2.009s 0.783s 15 1.00x
🐘 Postgres Nitro 1.255s (-1.6%) 2.011s (~) 0.757s 15 1.02x
🐘 Postgres Express 1.269s (+0.7%) 2.009s (~) 0.740s 15 1.04x
💻 Local Next.js (Turbopack) 1.487s 2.005s 0.518s 15 1.21x
💻 Local Nitro 1.511s (-7.4% 🟢) 2.006s (-3.3%) 0.495s 15 1.23x
💻 Local Express 1.512s (+1.5%) 2.006s (~) 0.494s 15 1.23x
Promise.all with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 2.335s (-1.1%) 3.008s (~) 0.673s 10 1.00x
🐘 Postgres Nitro 2.339s (-0.5%) 3.009s (~) 0.670s 10 1.00x
🐘 Postgres Next.js (Turbopack) 2.380s 3.008s 0.628s 10 1.02x
💻 Local Next.js (Turbopack) 2.663s 3.008s 0.345s 10 1.14x
💻 Local Nitro 2.792s (-11.2% 🟢) 3.108s (-20.0% 🟢) 0.316s 10 1.20x
💻 Local Express 2.960s (~) 3.453s (~) 0.493s 9 1.27x
Promise.all with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 3.465s (-0.6%) 4.011s (~) 0.547s 8 1.00x
🐘 Postgres Nitro 3.471s (~) 4.013s (~) 0.542s 8 1.00x
🐘 Postgres Next.js (Turbopack) 3.648s 4.012s 0.364s 8 1.05x
💻 Local Next.js (Turbopack) 6.726s 7.414s 0.689s 5 1.94x
💻 Local Nitro 7.188s (-13.9% 🟢) 8.017s (-11.1% 🟢) 0.830s 4 2.07x
💻 Local Express 8.234s (-1.3%) 9.024s (~) 0.790s 4 2.38x
Promise.race with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 1.228s 2.009s 0.781s 15 1.00x
🐘 Postgres Express 1.269s (+0.9%) 2.008s (~) 0.739s 15 1.03x
🐘 Postgres Nitro 1.275s (+1.4%) 2.009s (~) 0.734s 15 1.04x
💻 Local Nitro 1.506s (-19.3% 🟢) 2.006s (-14.3% 🟢) 0.500s 15 1.23x
💻 Local Next.js (Turbopack) 1.508s 2.006s 0.497s 15 1.23x
💻 Local Express 1.553s (-18.0% 🟢) 2.006s (-15.1% 🟢) 0.454s 15 1.26x
Promise.race with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 2.310s (-1.3%) 3.010s (~) 0.700s 10 1.00x
🐘 Postgres Nitro 2.355s (+0.6%) 3.010s (~) 0.655s 10 1.02x
🐘 Postgres Next.js (Turbopack) 2.379s 3.009s 0.630s 10 1.03x
💻 Local Next.js (Turbopack) 2.831s 3.008s 0.177s 10 1.23x
💻 Local Nitro 2.885s (-5.9% 🟢) 3.108s (-20.0% 🟢) 0.223s 10 1.25x
💻 Local Express 2.983s (-4.8%) 3.762s (~) 0.779s 8 1.29x
Promise.race with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 3.446s (-1.5%) 4.011s (~) 0.565s 8 1.00x
🐘 Postgres Nitro 3.481s (~) 4.009s (~) 0.528s 8 1.01x
🐘 Postgres Next.js (Turbopack) 3.661s 4.013s 0.351s 8 1.06x
💻 Local Next.js (Turbopack) 6.872s 7.522s 0.649s 4 1.99x
💻 Local Nitro 7.683s (-16.0% 🟢) 8.018s (-20.0% 🟢) 0.335s 4 2.23x
💻 Local Express 8.743s (-0.7%) 9.023s (-2.7%) 0.279s 4 2.54x
workflow with 10 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 0.693s 1.004s 0.312s 60 1.00x
🐘 Postgres Next.js (Turbopack) 0.751s 1.006s 0.255s 60 1.08x
🐘 Postgres Express 0.810s (-3.4%) 1.006s (-1.7%) 0.196s 60 1.17x
🐘 Postgres Nitro 0.816s (-0.6%) 1.006s (~) 0.190s 60 1.18x
💻 Local Express 1.002s (+1.8%) 1.457s (+35.5% 🔺) 0.456s 42 1.45x
💻 Local Nitro 1.003s (+2.3%) 1.468s (+34.2% 🔺) 0.466s 41 1.45x
workflow with 25 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 1.849s 2.029s 0.180s 45 1.00x
🐘 Postgres Nitro 1.935s (~) 2.151s (+2.4%) 0.216s 42 1.05x
🐘 Postgres Express 1.975s (~) 2.308s (+2.2%) 0.333s 40 1.07x
💻 Local Next.js (Turbopack) 2.238s 3.007s 0.770s 30 1.21x
💻 Local Nitro 3.006s (-1.0%) 3.508s (-6.7% 🟢) 0.502s 26 1.63x
💻 Local Express 3.036s (+0.7%) 3.689s (+2.9%) 0.653s 25 1.64x
workflow with 50 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 3.806s 4.042s 0.236s 30 1.00x
🐘 Postgres Express 3.897s (-2.4%) 4.148s (-5.1% 🟢) 0.251s 29 1.02x
🐘 Postgres Nitro 4.046s (-1.4%) 4.627s (+0.5%) 0.581s 26 1.06x
💻 Local Next.js (Turbopack) 7.400s 8.015s 0.615s 15 1.94x
💻 Local Nitro 8.932s (-3.9%) 9.324s (-6.9% 🟢) 0.393s 13 2.35x
💻 Local Express 9.191s (~) 9.788s (-2.3%) 0.597s 13 2.41x
workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 0.247s 1.007s 0.760s 60 1.00x
🐘 Postgres Express 0.274s (-3.1%) 1.007s (~) 0.733s 60 1.11x
🐘 Postgres Nitro 0.283s (~) 1.008s (~) 0.725s 60 1.15x
💻 Local Nitro 0.556s (-8.0% 🟢) 1.004s (-1.7%) 0.448s 60 2.25x
💻 Local Express 0.582s (+3.8%) 1.004s (~) 0.423s 60 2.35x
💻 Local Next.js (Turbopack) 0.583s 1.004s 0.421s 60 2.36x
workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 0.486s (-4.7%) 1.007s (~) 0.521s 90 1.00x
🐘 Postgres Next.js (Turbopack) 0.489s 1.007s 0.518s 90 1.01x
🐘 Postgres Nitro 0.516s (+4.0%) 1.007s (~) 0.491s 90 1.06x
💻 Local Nitro 2.342s (-7.7% 🟢) 3.009s (~) 0.666s 30 4.82x
💻 Local Express 2.437s (-3.0%) 3.008s (~) 0.571s 30 5.01x
💻 Local Next.js (Turbopack) 2.539s 2.975s 0.436s 31 5.22x
workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 0.763s 1.006s 0.244s 120 1.00x
🐘 Postgres Express 0.775s (-5.4% 🟢) 1.007s (-1.0%) 0.232s 120 1.02x
🐘 Postgres Nitro 0.827s (+4.6%) 1.010s (~) 0.184s 119 1.08x
💻 Local Next.js (Turbopack) 9.732s 10.359s 0.626s 12 12.76x
💻 Local Nitro 10.324s (-7.7% 🟢) 10.861s (-6.9% 🟢) 0.537s 12 13.53x
💻 Local Express 10.817s (-3.3%) 11.300s (-5.4% 🟢) 0.483s 11 14.18x
Stream Benchmarks (includes TTFB metrics)
workflow with stream

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 0.141s 1.002s 0.010s 1.015s 0.874s 10 1.00x
🐘 Postgres Next.js (Turbopack) 0.188s 1.001s 0.002s 1.011s 0.823s 10 1.33x
💻 Local Express 0.203s (+1.9%) 1.004s (~) 0.012s (-2.5%) 1.018s (~) 0.815s 10 1.43x
🐘 Postgres Express 0.203s (-1.0%) 0.998s (~) 0.001s (-37.5% 🟢) 1.010s (~) 0.807s 10 1.44x
💻 Local Nitro 0.206s (-3.5%) 1.004s (~) 0.010s (-18.4% 🟢) 1.016s (~) 0.810s 10 1.46x
🐘 Postgres Nitro 0.208s (+1.7%) 0.998s (~) 0.002s (~) 1.011s (~) 0.803s 10 1.47x
stream pipeline with 5 transform steps (1MB)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 0.587s 1.012s 0.009s 1.024s 0.436s 59 1.00x
🐘 Postgres Next.js (Turbopack) 0.608s 1.009s 0.004s 1.022s 0.414s 59 1.03x
🐘 Postgres Express 0.631s (~) 1.041s (+3.4%) 0.004s (~) 1.057s (+3.3%) 0.426s 57 1.07x
🐘 Postgres Nitro 0.648s (+3.8%) 1.021s (+1.4%) 0.004s (-2.4%) 1.043s (+2.0%) 0.395s 58 1.10x
💻 Local Express 0.739s (-2.4%) 1.011s (-1.7%) 0.009s (-3.9%) 1.022s (-1.7%) 0.283s 59 1.26x
💻 Local Nitro 0.849s (+1.2%) 1.012s (~) 0.008s (-11.3% 🟢) 1.115s (~) 0.266s 54 1.44x
10 parallel streams (1MB each)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 0.920s (-4.3%) 1.068s (-16.5% 🟢) 0.000s (-100.0% 🟢) 1.079s (-17.4% 🟢) 0.159s 56 1.00x
🐘 Postgres Next.js (Turbopack) 0.926s 1.112s 0.000s 1.119s 0.193s 54 1.01x
🐘 Postgres Nitro 1.005s (+3.7%) 1.353s (+8.5% 🔺) 0.000s (-46.7% 🟢) 1.364s (+8.5% 🔺) 0.359s 45 1.09x
💻 Local Nitro 1.192s (-2.5%) 2.019s (~) 0.000s (+133.3% 🔺) 2.021s (~) 0.828s 30 1.30x
💻 Local Express 1.221s (~) 2.020s (~) 0.000s (~) 2.022s (~) 0.801s 30 1.33x
💻 Local Next.js (Turbopack) 1.236s 2.017s 0.000s 2.020s 0.784s 30 1.34x
fan-out fan-in 10 streams (1MB each)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.696s (-4.3%) 2.103s (-3.4%) 0.000s (NaN%) 2.136s (-2.8%) 0.441s 29 1.00x
🐘 Postgres Nitro 1.767s (-1.3%) 2.141s (~) 0.000s (-100.0% 🟢) 2.153s (-1.0%) 0.386s 28 1.04x
🐘 Postgres Next.js (Turbopack) 1.826s 2.072s 0.000s 2.110s 0.284s 29 1.08x
💻 Local Nitro 3.369s (-0.6%) 4.035s (~) 0.001s (+25.0% 🔺) 4.038s (~) 0.669s 15 1.99x
💻 Local Express 3.401s (-1.9%) 4.099s (+1.6%) 0.001s (+50.0% 🔺) 4.102s (+1.6%) 0.702s 15 2.01x
💻 Local Next.js (Turbopack) 3.814s 4.164s 0.000s 4.168s 0.354s 15 2.25x

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World 🥇 Fastest Framework Wins
💻 Local Next.js (Turbopack) 16/21
🐘 Postgres Next.js (Turbopack) 14/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework 🥇 Fastest World Wins
Express 🐘 Postgres 18/21
Next.js (Turbopack) 🐘 Postgres 14/21
Nitro 🐘 Postgres 17/21
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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 25, 2026

🧪 E2E Test Results

Some tests failed

Summary

Passed Failed Skipped Total
❌ 💻 Local Development 1052 2 86 1140
✅ 📦 Local Production 1054 0 86 1140
✅ 🐘 Local Postgres 1054 0 86 1140
✅ 📋 Other 267 0 18 285
Total 3427 2 276 3705

❌ Failed Tests

💻 Local Development (2 failed)

vite-stable (2 failed):

  • 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

Details by Category

❌ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 89 0 6
✅ express-stable 89 0 6
✅ fastify-stable 89 0 6
✅ hono-stable 89 0 6
✅ nextjs-turbopack-canary 76 0 19
✅ nextjs-turbopack-stable 95 0 0
✅ nextjs-webpack-canary 76 0 19
✅ nextjs-webpack-stable 95 0 0
✅ nitro-stable 89 0 6
✅ nuxt-stable 89 0 6
✅ sveltekit-stable 89 0 6
❌ vite-stable 87 2 6
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 89 0 6
✅ express-stable 89 0 6
✅ fastify-stable 89 0 6
✅ hono-stable 89 0 6
✅ nextjs-turbopack-canary 76 0 19
✅ nextjs-turbopack-stable 95 0 0
✅ nextjs-webpack-canary 76 0 19
✅ nextjs-webpack-stable 95 0 0
✅ nitro-stable 89 0 6
✅ nuxt-stable 89 0 6
✅ sveltekit-stable 89 0 6
✅ vite-stable 89 0 6
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 89 0 6
✅ express-stable 89 0 6
✅ fastify-stable 89 0 6
✅ hono-stable 89 0 6
✅ nextjs-turbopack-canary 76 0 19
✅ nextjs-turbopack-stable 95 0 0
✅ nextjs-webpack-canary 76 0 19
✅ nextjs-webpack-stable 95 0 0
✅ nitro-stable 89 0 6
✅ nuxt-stable 89 0 6
✅ sveltekit-stable 89 0 6
✅ vite-stable 89 0 6
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 89 0 6
✅ e2e-local-postgres-nest-stable 89 0 6
✅ e2e-local-prod-nest-stable 89 0 6

📋 View full workflow run


Some E2E test jobs failed:

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

Check the workflow run for details.

Copy link
Copy Markdown
Member

@VaguelySerious VaguelySerious left a comment

Choose a reason for hiding this comment

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

AI review: blocking issues found

interface Error {
/**
```typescript
new FatalError(message: string)
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.

AI Review: Blocking Note

This code block (and the one at line 53) uses ```typescript but contains a type signature, not valid TypeScript. The existing docs.test.ts typecheck suite tries to compile all ```typescript blocks and fails on 4 blocks introduced by this PR:

  • fatal-error.mdx lines 35, 53
  • retryable-error.mdx lines 39, 64

Fix: either add a skip annotation or change the language tag to avoid typecheck compilation.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed — removed the type signature code blocks entirely. Other API ref pages (sleep, create-hook, etc.) use tables for constructor/parameters instead of code blocks, so now these match that pattern.

});
} catch (error) {
return new Response("Hook not found", { status: 404 });
if (error instanceof Error && error.name === "HookNotFoundError") {
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.

AI Review: Note

HookNotFoundError is exported from workflow/errors and has a static HookNotFoundError.is(error) method (the idiomatic pattern per its own JSDoc). The string-based error.name === "HookNotFoundError" check used here (and in 3 other examples) is fragile. Consider:

import { HookNotFoundError } from "workflow/errors";
if (HookNotFoundError.is(error)) { ... }

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed — all 4 occurrences now use HookNotFoundError.is(error) with import { HookNotFoundError } from "workflow/internal/errors". Each catch block also distinguishes 404 (not found) from 500 (other failures).

return Response.json({ error: "Hook not found" }, { status: 404 });
return Response.json({ success: true, runId: result.runId });
} catch (error) {
return Response.json({ error: "Hook not found or invalid payload" }, { status: 400 });
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.

AI Review: Note

This catch-all returns 400 for both "Hook not found" and "invalid payload". The resumeHook docs page teaches distinguishing HookNotFoundError (404) from other failures (500). Since defineHook().resume() wraps resumeHook(), the same error types apply. Consider aligning the error handling pattern here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed — catch block now distinguishes HookNotFoundError (404) from other errors (500), matching the pattern in resume-hook.mdx.

|---|---|---|
| `workflows.lazyDiscovery` | `boolean` | Enable lazy discovery mode. Sets the `WORKFLOW_NEXT_LAZY_DISCOVERY` flag. Deferred discovery only activates on Next.js `>= 16.2.0-canary.48`; on older versions, Workflow logs a warning and falls back to eager scanning. |
| `workflows.local.port` | `number` | Override the local development server port. Sets the `PORT` environment variable when running locally (no `VERCEL_DEPLOYMENT_ID`). |
| `workflows.local.dataDir` | `string` | Currently typed but ignored by `withWorkflow()`. In local mode, when `WORKFLOW_TARGET_WORLD` is unset, the implementation hardcodes `WORKFLOW_LOCAL_DATA_DIR` to `'.next/workflow-data'`. |
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.

AI Review: Note

Documenting a parameter as "typed but ignored" with the hardcoded path exposed may confuse users. Consider either omitting dataDir from the options table until it's functional, or marking it as "Reserved for future use" without exposing the hardcoded internal default.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed — removed dataDir from the options table. Also opened #1619 to remove the dead type from packages/next/src/index.ts (the option was accepted but never read).

'docs/content/docs/api-reference/workflow-api/resume-hook.mdx'
);

expect(source).toContain('hook.metadata = await hydrateStepArguments');
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.

AI Review: Note

These assertions match exact source code strings (e.g., hook.metadata = await hydrateStepArguments). If the implementation is refactored (variable renamed, extracted to helper, whitespace changed), this test breaks even when docs remain accurate. Consider testing exported types or runtime behavior rather than grepping source text.

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.
Keep the API reference aligned with the current hook and webhook runtime behavior so readers do not rely on stale token, overload, or validation semantics.

These docs changes clarify the intended runtime story for deterministic hooks versus public webhooks and document the current typed-hook contract exposed by the public API.

Ploop-Iter: 1
Why: the runtime API docs were implying an incorrect import surface and incomplete resumeHook behavior, which can mislead users integrating hook resumption and world access. Recording these fixes with a regression test helps keep the docs aligned with the actual runtime entrypoints and overloads as the packages evolve.

Ploop-Iter: 2
Why: the runtime API docs had drifted from current resumeHook behavior, which risks misleading users about return values and failure handling. This update keeps the reference aligned with the runtime contract so external integrations can handle hook resumption correctly and distinguish missing hooks from operational failures.

Ploop-Iter: 3
Keep the oldest workflow API reference pages aligned with the current public exports so developers do not rely on stale signatures, runtime behavior, or retry semantics.\n\nThis captures the current workflow metadata surface and error/fetch/sleep behavior in the docs, reducing drift in the most stale reference pages before broader API auditing continues.\n\nPloop-Iter: 1
Keep the workflow API reference aligned with current runtime behavior so developers do not rely on stale retry semantics or error guarantees. Accurate docs here matter because these pages are used as normative guidance for step failure handling and fetch behavior inside workflows.

Ploop-Iter: 2
Keep the API reference aligned with the real workflow fetch wrapper so readers do not accidentally recurse into the documented helper when writing custom step-based wrappers.

Ploop-Iter: 3
Automated checkpoint commit.

Ploop-Iter: 1
Align the withWorkflow API reference with the current Next.js integration so developers are not misled about environment variables, lazy discovery behavior, or unsupported options while configuring workflow apps.\n\nPloop-Iter: 2
Keep the Next.js API reference aligned with the current implementation so readers do not rely on a config option shape or environment behavior that no longer reflects runtime behavior.

This preserves the API audit effort by documenting the typed-but-ignored local dataDir option accurately and by showing a supported workflow config example instead of an empty placeholder.

Ploop-Iter: 3
Keep the workflow API reference aligned with the current core package so developers do not rely on stale runtime constraints or examples.

Document the current workflow-only, step-only, and shared API boundaries to reduce misuse of context-sensitive helpers.

Ploop-Iter: 1
Align the workflow package overview with the current hook API boundaries so readers are not misled about where hook helpers can be created or resumed.

Ploop-Iter: 2
Update the hook API reference docs so they match current runtime semantics and reduce confusion around token generation and execution-context boundaries. This keeps existing guidance accurate for users integrating hook creation and resumption across workflow and runtime code.

Ploop-Iter: 3
Keep the API reference aligned with the current public package surface and runtime response behavior so developers are not guided toward stale imports or incorrect webhook handling assumptions.

Ploop-Iter: 1
- Remove type signature code blocks from fatal-error.mdx and
  retryable-error.mdx (match pattern used by other API ref pages)
- Use HookNotFoundError.is() static method instead of fragile
  string-based error.name checks in resume-hook.mdx examples
- Distinguish 404 (hook not found) from 500 (other errors) in
  define-hook.mdx resume example
- Remove dataDir from with-workflow.mdx options table (unused option,
  removal PR: #1619)
- Replace internal error imports in docs examples with public workflow/errors
- Remove brittle source-string assertions from docs runtime checks
- Add API reference public contract coverage against exported declarations
- Map documented workflow runtime, Next, and utils imports in docs typechecking
- Align stale invalid-start error text with the runtime message

Oracle-Session: pr-docs-final-review
Sign up for free to 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.

2 participants