docs: add notifications & email patterns recipe#1113
docs: add notifications & email patterns recipe#1113johnlindquist wants to merge 8 commits intomainfrom
Conversation
Replaces the placeholder @workflow/next README with a complete package-level reference. The new content documents installation, withWorkflow() API usage/signature, configuration examples, internal behavior, env vars, exports, generated files, runtime routing, public manifest exposure, and troubleshooting. Verified: rg -n "^## Install|^### Type signature|^### Example: object config|^### Example: async config function|^## What .* does|^## Serving the manifest publicly|^## Troubleshooting" packages/next/README.md Verified: rg -n "WORKFLOW_TARGET_WORLD|WORKFLOW_LOCAL_DATA_DIR|PORT|WORKFLOW_NEXT_PRIVATE_BUILT|WORKFLOW_PUBLIC_MANIFEST|WATCHPACK_WATCHER_LIMIT" packages/next/README.md Verified: rg -n "@workflow/next|@workflow/next/loader|@workflow/next/runtime|\.well-known/workflow/v1/flow/route\.js|\.well-known/workflow/v1/step/route\.js|\.well-known/workflow/v1/webhook/\[token\]/route\.js" packages/next/README.md How to test: open packages/next/README.md and confirm all required sections and tables render correctly.
Update spec.md to resolve the static/instance method contradiction, document forbidden step-expression validation errors, and add import compatibility guidance for serialization-file discovery. Verified: git diff --check -- packages/swc-plugin-workflow/spec.md Verified: npx --yes markdownlint-cli@0.41.0 packages/swc-plugin-workflow/spec.md --disable MD013 (fails with pre-existing file-wide markdown style issues unrelated to this change)
Add the requested blog markdown file at .blog/durable-execution-layer.md\nwith exact content and preserved formatting/code blocks.\n\nVerified: diff -u <(cat <<'EOF' ... ) .blog/durable-execution-layer.md (no diff; exact match)\nVerified: pnpm exec biome check .blog/durable-execution-layer.md (file is ignored by repo biome config)
Add the requested blog draft as an exact markdown copy for agent reliability content. Verified: cat <<'EOF' | cmp -s - .blog/stateless-retries-multiply-agent-side-effects.md && echo "Exact content match verified" Verified: git status --short -- .blog/stateless-retries-multiply-agent-side-effects.md
Overwrite .blog/durable-execution-layer.md with the exact requested markdown content, including code blocks and section structure. Verified: git diff --check -- .blog/durable-execution-layer.md Verified: git diff -- .blog/durable-execution-layer.md
Overwrite the blog markdown with the exact provided copy for Workflow DevKit deterministic replay behavior and code patterns. Verified: diff -u .blog/how-deterministic-replay-works-for-ai-agents.md <(cat <<'EOF' ... EOF) (no differences) Verified: pnpm exec biome check .blog/how-deterministic-replay-works-for-ai-agents.md (path ignored by biome config; no file-level lint available)
Overwrite the target blog file with the exact markdown content provided for this task.\n\nThis preserves all headings, prose, and fenced code examples verbatim.\n\nVerified: cat <<'EOF' | diff -u - .blog/stateless-retries-multiply-agent-side-effects.md (no diff; exit 0)\nVerified: repository Biome config does not include Markdown files (.md), so no project-scoped markdown linter applies
|
📊 Benchmark Results
workflow with no steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) | Nitro workflow with 1 step💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) | Nitro workflow with 10 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) | Express workflow with 25 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) workflow with 50 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) | Nitro | Express Promise.all with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) | Nitro | Express Promise.all with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) | Nitro | Express Promise.all with 50 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) | Nitro Promise.race with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) | Nitro | Express Promise.race with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) Promise.race with 50 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) Stream Benchmarks (includes TTFB metrics)workflow with stream💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) | Nitro | Express SummaryFastest Framework by WorldWinner determined by most benchmark wins
Fastest World by FrameworkWinner determined by most benchmark wins
Column Definitions
Worlds:
|
🧪 E2E Test Results❌ Some tests failed Summary
❌ Failed Tests▲ Vercel Production (1 failed)fastify (1 failed):
🌍 Community Worlds (46 failed)mongodb (1 failed):
turso (45 failed):
Details by Category❌ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
✅ 🪟 Windows
❌ 🌍 Community Worlds
✅ 📋 Other
❌ Some E2E test jobs failed:
Check the workflow run for details. |
|
Superseded by #1116 which consolidates all recipes into a single PR. |
Summary
sleep()delayscreateWebhook()+Promise.racesleep()withDateTest plan
bun run lint:links- 0 errors)pnpm test:docs- all notifications-email samples pass)