Skip to content

[docs] Document the srvx server returned by @workflow/web/server - #4449

Merged
pranaygp merged 2 commits into
mainfrom
workflow-docs-cleanup-mon-28-sept
Sep 29, 2026
Merged

pranaygp merged 2 commits into
mainfrom
workflow-docs-cleanup-mon-28-sept

Conversation

@pranaygp

@pranaygp pranaygp commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Docs follow-up for #3193, which landed without docs: @workflow/web switched from Express to srvx (major changeset), so startServer() from @workflow/web/server now resolves a srvx Server. Adds a row to the v5 breaking-changes table for apps that self-host the observability UI.

Docs Preview

Page v5
What's new in v5 Breaking changes: Application code

🤖 Generated with Claude Code

@pranaygp
pranaygp requested a review from a team as a code owner September 28, 2026 16:05
Copilot AI lite review requested due to automatic review settings September 28, 2026 16:05

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@changeset-bot

changeset-bot Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 573d00f

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

This PR includes changesets to release 0 packages

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

Not sure what this means? Click here to learn what changesets are.

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

@vercel

vercel Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
example-nextjs-workflow-turbopack Ready Ready Preview, v0 Sep 29, 2026 4:03am UTC
example-nextjs-workflow-webpack Ready Ready Preview, v0 Sep 29, 2026 4:03am UTC
example-workflow Ready Ready Preview, v0 Sep 29, 2026 4:03am UTC
workbench-astro-workflow Ready Ready Preview, v0 Sep 29, 2026 4:03am UTC
workbench-express-workflow Ready Ready Preview, v0 Sep 29, 2026 4:03am UTC
workbench-fastify-workflow Ready Ready Preview, v0 Sep 29, 2026 4:03am UTC
workbench-hono-workflow Ready Ready Preview, v0 Sep 29, 2026 4:03am UTC
workbench-nestjs-workflow Ready Ready Preview, v0 Sep 29, 2026 4:03am UTC
workbench-nitro-workflow Ready Ready Preview, v0 Sep 29, 2026 4:03am UTC
workbench-nuxt-workflow Ready Ready Preview, v0 Sep 29, 2026 4:03am UTC
workbench-python-workflow Ready Ready Preview, v0 Sep 29, 2026 4:03am UTC
workbench-sveltekit-workflow Ready Ready Preview, v0 Sep 29, 2026 4:03am UTC
workbench-tanstack-start-workflow Ready Ready Preview, v0 Sep 29, 2026 4:03am UTC
workbench-vite-workflow Ready Ready Preview, v0 Sep 29, 2026 4:03am UTC
workflow-docs Ready Ready Preview, v0 Sep 29, 2026 4:03am UTC
workflow-swc-playground Ready Ready Preview, v0 Sep 29, 2026 4:03am UTC
workflow-tarballs Ready Ready Preview, v0 Sep 29, 2026 4:03am UTC
workflow-web Ready Ready Preview, v0 Sep 29, 2026 4:03am UTC

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Sim World

Simulated world deterministic testing for races. Traces

🟠 world-sim scenario book — 1 fail of 42 total

fence=per-spec

scenario outcome events virt replay violations
✅ smoke-no-steps completed 3 0ms ok 0
✅ smoke-one-step completed 6 0ms ok 0
✅ hook-at-step-started completed 12 0ms ok 0
✅ hook-at-step-completed completed 12 0ms ok 0
✅ hook-at-hook-created completed 12 0ms ok 0
✅ deadline-hook-wins completed 7 1.0h ok 0
✅ deadline-expires completed 7 1.0h ok 0
✅ step-vs-timer-early-settlement completed 8 1.0h ok 0
✅ long-sleep completed 11 30.0d ok 0
✅ hook-never-arrives stalled 3 0ms skipped 0
✅ step-retries-twice completed 10 2.0s ok 0
✅ parallel-steps completed 9 0ms ok 0
✅ hook-on-execution-state completed 12 0ms ok 0
✅ peek-hook-before-branch completed 12 0ms ok 0
✅ peek-hook-after-branch completed 12 0ms ok 0
✅ peek-hook-at-registration completed 12 0ms ok 0
✅ race-hook-before-probe completed 12 0ms ok 0
✅ race-hook-after-probe completed 12 0ms ok 0
✅ race-duplicate-delivery completed 13 0ms ok 0
✅ attr-hook-before-step completed 11 0ms ok 0
✅ attr-hook-after-step completed 11 0ms ok 0
✅ attr-from-step-body completed 13 0ms ok 0
✅ fork-hook-after-timeout completed 14 1.0m ok 0
✅ fork-hook-before-timeout completed 14 1.0m ok 0
✅ count-hook-after-timeout completed 17 1.0m ok 0
✅ count-hook-before-timeout completed 20 1.0m ok 0
✅ stale-read-step-count-fork completed 20 1.0m ok 0
✅ stale-read-equal-step-counts completed 14 1.0m ok 0
✅ step-vs-step-fork completed 12 0ms ok 0
✅ step-vs-step-fork-fenced completed 12 0ms ok 0
✅ fence-catches-benign-direction completed 12 5ms ok 0
✅ in-flight-before-decision completed 17 1.0m ok 0
❌ in-flight-before-decision-counted completed 17 1.0m ok 0
✅ in-flight-after-decision completed 19 2.0m ok 0
✅ stale-read-step-count-fork-fenced completed 20 1.0m ok 0
✅ fork-hook-wins completed 13 1.0m ok 0
✅ fork-timeout-wins completed 13 1.0m ok 0
✅ unclaimed-payload-under-fork completed 17 1.0m ok 0
✅ claimed-payload-under-fork completed 17 1.0m ok 0
✅ writers-independent-step-bodies completed 12 0ms ok 0
✅ writers-scripted-tempo completed 12 0ms ok 0
✅ cancel-mid-step cancelled 7 0ms skipped 0

Full trace: world-sim.txt

* Each call to `start()` creates a new workflow run. If retried requests must route to one active workflow, have the workflow create a deterministic hook token and use [`getHookByToken()`](/docs/api-reference/workflow-api/get-hook-by-token) to reuse an already-registered active hook. The lookup is not atomic with `start()`, so concurrent callers can still create extra runs before the hook is registered. Handle that race inside the workflow by checking `await hook.getConflict()` before duplicate-sensitive work. On a conflict, it resolves with the run that owns the token, so the duplicate can return the active owner to the caller. If duplicates must be rejected before a workflow body runs, keep a durable request record until native atomic start-and-hook registration exists. See [Idempotency](/docs/foundations/idempotency#run-idempotency).
* All arguments must be [serializable](/docs/foundations/serialization).
* When you provide `deploymentId`, the argument types and return type become `unknown` because the workflow function's types may differ across deployments.
* A concrete `deploymentId` also works from a process that is not itself a deployment, such as a script, a CI job, or **Replay Run** in the web UI, and the run starts on the named deployment. Omitting `deploymentId` or passing `"latest"` needs the current deployment, so those fail in a World that cannot report one.

@pranaygp pranaygp Sep 29, 2026 •

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.

unnecessary tbh, but could go either way

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.

Dropped the bullet; the PR now only documents the srvx server change.

vercel Bot and others added 2 commits September 29, 2026 04:00
…e srvx web server

Co-Authored-By: Claude <noreply@anthropic.com>

Co-Authored-By: Pranay Prakash <1797812+pranaygp@users.noreply.github.com>
Co-Authored-By: Claude <noreply@anthropic.com>

Co-Authored-By: Pranay Prakash <1797812+pranaygp@users.noreply.github.com>
@pranaygp
pranaygp force-pushed the workflow-docs-cleanup-mon-28-sept branch from 54606b7 to 573d00f Compare September 29, 2026 04:00
@pranaygp pranaygp changed the title [docs] Document start() with deploymentId outside a deployment and the srvx web server [docs] Document the srvx server returned by @workflow/web/server Sep 29, 2026
@pranaygp
pranaygp merged commit 37a3744 into main Sep 29, 2026
47 of 66 checks passed
@pranaygp
pranaygp deleted the workflow-docs-cleanup-mon-28-sept branch September 29, 2026 04:01
@github-actions

Copy link
Copy Markdown
Contributor

No backport to stable for 37a3744 (AI decision).

The only substantive change is a new row in docs/content/docs/v5/whats-new.mdx, which does not exist on stable (git ls-tree origin/stable -- docs/content/docs/v5/ shows only api-reference and errors), so there is nothing to patch there. It also documents a v5-only breaking change (@workflow/web switching from Express to srvx in #3193) that is not present on the maintenance line, and the rest of the commit is an empty changeset.

To override, re-run the Backport to stable workflow manually via workflow_dispatch and paste this commit SHA into the ref input:

37a3744b06205aa46466335c4f9a85773e61d0be

This branch was successfully deployed

1 active deployment
Preview – workflow-docs — 573d00fb Deployed Sep 29, 2026 by vercel[bot]
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.

3 participants