Skip to content

Remove retired v1 step route plumbing - #3061

Merged
NathanColosimo merged 1 commit into
mainfrom
codex/retire-v1-step-route
Jul 24, 2026
Merged

Remove retired v1 step route plumbing#3061
NathanColosimo merged 1 commit into
mainfrom
codex/retire-v1-step-route

Conversation

@NathanColosimo

@NathanColosimoNathanColosimo commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • delete the unused standalone step runtime and its dedicated test suite
  • remove legacy step queue prefixes, payload schemas, URL types, health-check targets, and CLI/UI options
  • keep queued step invocations on the workflow topic and combined /flow handler
  • clean stale cached step-route artifacts from standalone, Next.js, and Vercel Build Output API builds
  • update current V5 architecture documentation and comments while preserving V4 history

Why

The combined flow handler has executed steps inline or from workflow-queue continuations since the framework builders stopped emitting a standalone /step route. The old handler, queue kind, and adapter branches remained in the repository despite having no current first-party producer and no deployable route target.

Postgres still registered both workflow_flows and workflow_steps, selected /flow or /step from the queue prefix, and tested both paths. Current runtime messages only use __wkf_workflow_*; queued step work is represented by runId, stepId, and stepName on WorkflowInvokePayload. This removes the unreachable workflow_steps task and always delivers through /flow. Step messages remain independently executable rather than being serialized with workflow replay messages.

Impact

This removes published legacy types and options, including QueueKind, StepInvokePayload, HealthCheckEndpoint, the step workflow URL route, and workflow health --endpoint. Changesets are included as required by the repository release process.

Validation

  • pnpm typecheck — 46 packages passed
  • pnpm --filter @workflow/core test — 1,473 passed, 3 expected failures
  • pnpm --filter @workflow/builders test — 228 passed
  • pnpm --filter @workflow/next test — 26 passed
  • pnpm --filter @workflow/utils test — 109 passed
  • pnpm --filter @workflow/world-local test — 478 passed
  • pnpm --filter @workflow/world-vercel test — 296 passed
  • Postgres queue and recovery tests — 13 passed
  • cache-seeded standalone and Build Output API builds verified stale step artifacts are removed
  • pnpm test:docs — 964 passed; two unrelated existing Sandbox.sandboxId sample failures remain in the V4/V5 sandbox cookbook

Docs Preview

Changed pagePreview
AIPreview
Runtime health checkPreview
World queue APIPreview
AstroPreview
ExpressPreview
FastifyPreview
HonoPreview
NestJSPreview
Next.jsPreview
NitroPreview
NuxtPreview
SvelteKitPreview
TanStack StartPreview
VitePreview
CancellationPreview
Code transformationPreview
Framework integrationsPreview
Building a WorldPreview
Local WorldPreview
Postgres WorldPreview
Vercel WorldPreview

@vercel

vercelBot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented Jul 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 636f5bf

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

This PR includes changesets to release 22 packages
NameType
@workflow/buildersPatch
@workflow/cliMajor
@workflow/world-testingPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/utilsMajor
@workflow/webMajor
@workflow/web-sharedMajor
@workflow/worldMajor
@workflow/world-localMajor
@workflow/world-postgresMajor
@workflow/world-vercelMajor
@workflow/coreMajor
workflowMajor
@workflow/errorsPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/nuxtPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/vitestPatch

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

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

@github-actions

github-actionsBot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

E2E Test Summary

Summary
PassedFailedSkippedTotal
✅ ▲ Vercel Production145502391694
✅ 💻 Local Development162102271848
✅ 📦 Local Production162102271848
✅ 🐘 Local Postgres162102271848
✅ 🪟 Windows15400154
✅ 📋 Other102002121232
✅ vercel-multi-region270027
Total7519011328651
Details by Category

✅ ▲ Vercel Production

AppPassedFailedSkipped
✅ astro126028
✅ example126028
✅ express126028
✅ fastify126028
✅ hono126028
✅ nextjs-turbopack15103
✅ nextjs-webpack15103
✅ nitro126028
✅ nuxt126028
✅ sveltekit14509
✅ vite126028

✅ 💻 Local Development

AppPassedFailedSkipped
✅ astro-stable128026
✅ express-stable128026
✅ fastify-stable128026
✅ hono-stable128026
✅ nextjs-turbopack-canary135019
✅ nextjs-turbopack-stable15400
✅ nextjs-webpack-canary135019
✅ nextjs-webpack-stable15400
✅ nitro-stable128026
✅ nuxt-stable128026
✅ sveltekit-stable14707
✅ vite-stable128026

✅ 📦 Local Production

AppPassedFailedSkipped
✅ astro-stable128026
✅ express-stable128026
✅ fastify-stable128026
✅ hono-stable128026
✅ nextjs-turbopack-canary135019
✅ nextjs-turbopack-stable15400
✅ nextjs-webpack-canary135019
✅ nextjs-webpack-stable15400
✅ nitro-stable128026
✅ nuxt-stable128026
✅ sveltekit-stable14707
✅ vite-stable128026

✅ 🐘 Local Postgres

AppPassedFailedSkipped
✅ astro-stable128026
✅ express-stable128026
✅ fastify-stable128026
✅ hono-stable128026
✅ nextjs-turbopack-canary135019
✅ nextjs-turbopack-stable15400
✅ nextjs-webpack-canary135019
✅ nextjs-webpack-stable15400
✅ nitro-stable128026
✅ nuxt-stable128026
✅ sveltekit-stable14707
✅ vite-stable128026

✅ 🪟 Windows

AppPassedFailedSkipped
✅ nextjs-turbopack15400

✅ 📋 Other

AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable128026
✅ e2e-local-dev-tanstack-start-128026
✅ e2e-local-postgres-nest-stable128026
✅ e2e-local-postgres-tanstack-start-128026
✅ e2e-local-prod-nest-stable128026
✅ e2e-local-prod-tanstack-start-128026
✅ e2e-vercel-prod-nest126028
✅ e2e-vercel-prod-tanstack-start126028

✅ vercel-multi-region

AppPassedFailedSkipped
✅ nextjs-turbopack2700

📋 View full workflow run

@github-actions

github-actionsBot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

📊 Workflow Benchmarks

commit 636f5bf · Fri, 24 Jul 2026 23:37:30 GMT · run logs

Backend: vercel · app: nextjs-turbopack

MetricScenarioBest (ms)P75 (ms)P90 (ms)P99 (ms)Samples
TTFSstep1067 (+8.3%)1355 🔴 (+24%) 🔻1364 🔴 (+18%) 🔻1411 🔴 (+17%) 🔻30
TTFSstream1241 (+437%) 🔻1319 🔴 (+21%) 🔻1326 🔴 (+17%) 🔻1423 🔴 (±0%)30
TTFShook + stream1456 (+48%) 🔻1545 🔴 (+7.0%)1561 🔴 (+3.4%)1832 🔴 (+11%)30
STSO1020 steps (1-20)171 (-16%) 💚262 🔴 (-5.8%)431 🔴 (+14%)523 🔴 (+15%) 🔻19
STSO1020 steps (101-120)191 (-17%) 💚287 🔴 (-13%)312 🔴 (-23%) 💚2071 🔴 (+75%) 🔻19
STSO1020 steps (1001-1020)463 (-8.5%)565 🔴 (-3.1%)605 🔴 (-3.4%)636 🔴 (-7.4%)19
WO1020 steps397618 (-6.3%)397618 (-6.3%)397618 (-6.3%)397618 (-6.3%)1
SLstream latency90 (-17%) 💚152 🔴 (-5.6%)165 🔴 (-11%)399 🔴 (+60%) 🔻30
SOstream overhead (text)119 (-21%) 💚188 (-22%) 💚245 (-6.1%)298 (-19%) 💚30
SOstream overhead (structured)111 (-28%) 💚174 (-24%) 💚262 (+8.3%)607 (+91%) 🔻30
📜 Previous results (4)

c5c2d02

Fri, 24 Jul 2026 07:01:04 GMT · run logs

vercel / nextjs-turbopack

MetricScenarioBest (ms)P75 (ms)P90 (ms)P99 (ms)Samples
TTFSstep1278 (+37%) 🔻1504 🔴 (+33%) 🔻1581 🔴 (+35%) 🔻1915 🔴 (+41%) 🔻30
TTFSstream219 (-79%) 💚1457 🔴 (+26%) 🔻1467 🔴 (+26%) 🔻1573 🔴 (+28%) 🔻30
TTFShook + stream1442 (+243%) 🔻1715 🔴 (+19%) 🔻1787 🔴 (+22%) 🔻1848 🔴 (+17%) 🔻30
STSO1020 steps (1-20)184 (-0.5%)343 🔴 (-6.0%)370 🔴 (-22%) 💚578 🔴 (-15%) 💚19
STSO1020 steps (101-120)187 (-24%) 💚295 🔴 (-26%) 💚400 🔴 (-50%) 💚444 🔴 (-54%) 💚19
STSO1020 steps (1001-1020)497 (+0.6%)584 🔴 (±0%)625 🔴 (±0%)671 🔴 (-2.9%)19
WO1020 steps426289 (-4.2%)426289 (-4.2%)426289 (-4.2%)426289 (-4.2%)1
SLstream latency135 (+35%) 🔻182 🔴 (+26%) 🔻213 🔴 (+32%) 🔻329 🔴 (+68%) 🔻30
SOstream overhead (text)134 (-5.6%)194 (-29%) 💚200 (-39%) 💚214 (-57%) 💚30
SOstream overhead (structured)138 (+8.7%)186 (-26%) 💚213 (-29%) 💚456 (+5.6%)30

8a4d0ce

Fri, 24 Jul 2026 00:12:33 GMT · run logs

vercel / nextjs-turbopack

MetricScenarioBest (ms)P75 (ms)P90 (ms)P99 (ms)Samples
TTFSstep256 (-27%) 💚1305 🔴 (+28%) 🔻1343 🔴 (+30%) 🔻1513 🔴 (+8.9%)30
TTFSstream207 (-77%) 💚1498 🔴 (+43%) 🔻1523 🔴 (+44%) 🔻1691 🔴 (+17%) 🔻30
TTFShook + stream406 (-64%) 💚1726 🔴 (+29%) 🔻1773 🔴 (+25%) 🔻2006 🔴 (+32%) 🔻30
STSO1020 steps (1-20)180 (+2.3%)383 🔴 (+38%) 🔻538 🔴 (+20%) 🔻655 🔴 (+46%) 🔻19
STSO1020 steps (101-120)219 (+16%) 🔻340 🔴 (+23%) 🔻443 🔴 (+37%) 🔻492 🔴 (+47%) 🔻19
STSO1020 steps (1001-1020)477 (+5.3%)592 🔴 (+4.2%)618 🔴 (-11%)629 🔴 (-25%) 💚19
WO1020 steps423038 (+7.7%)423038 (+7.7%)423038 (+7.7%)423038 (+7.7%)1
SLstream latency95 (+19%) 🔻178 🔴 (+41%) 🔻196 🔴 (+34%) 🔻314 🔴 (-26%) 💚30

411e693

Thu, 23 Jul 2026 23:45:45 GMT · run logs

vercel / nextjs-turbopack

MetricScenarioBest (ms)P75 (ms)P90 (ms)P99 (ms)Samples
TTFSstep224 (-36%) 💚1306 🔴 (+28%) 🔻1350 🔴 (+30%) 🔻3688 🔴 (+166%) 🔻30
TTFSstream237 (-74%) 💚1306 🔴 (+25%) 🔻1330 🔴 (+25%) 🔻1484 🔴 (+3.0%)30
TTFShook + stream419 (-63%) 💚1510 🔴 (+13%)1527 🔴 (+7.8%)1571 🔴 (+3.6%)30
STSO1020 steps (1-20)181 (+2.8%)283 🔴 (+2.2%)344 🔴 (-23%) 💚355 🔴 (-21%) 💚19
STSO1020 steps (101-120)217 (+15%) 🔻309 🔴 (+12%)493 🔴 (+52%) 🔻520 🔴 (+56%) 🔻19
STSO1020 steps (1001-1020)478 (+5.5%)549 🔴 (-3.3%)578 🔴 (-16%) 💚598 🔴 (-28%) 💚19
WO1020 steps403101 (+2.6%)403101 (+2.6%)403101 (+2.6%)403101 (+2.6%)1
SLstream latency95 (+19%) 🔻170 🔴 (+35%) 🔻213 🔴 (+46%) 🔻256 🔴 (-39%) 💚30

1e21d3c

Thu, 23 Jul 2026 04:55:15 GMT · run logs

vercel / nextjs-turbopack

MetricScenarioBest (ms)P75 (ms)P90 (ms)P99 (ms)Samples
TTFSstep235 (+47%) 🔻1261 🔴 (+211%) 🔻1278 🔴 (+175%) 🔻1626 🔴 (+210%) 🔻30
TTFSstream276 (+66%) 🔻1265 🔴 (+381%) 🔻1285 🔴 (+330%) 🔻1290 🔴 (+156%) 🔻30
TTFShook + stream476 (+43%) 🔻1472 🔴 (+167%) 🔻1506 🔴 (+141%) 🔻1724 🔴 (+111%) 🔻30
STSO1020 steps (1-20)181 (-5.7%)286 🔴 (-5.3%)606 🔴 (+73%) 🔻663 🔴 (-4.3%)19
STSO1020 steps (101-120)198 (-20%) 💚268 🔴 (-29%) 💚293 🔴 (-42%) 💚322 🔴 (-49%) 💚19
STSO1020 steps (1001-1020)462 (-33%) 💚528 🔴 (-40%) 💚540 🔴 (-47%) 💚544 🔴 (-47%) 💚19
WO1020 steps406334 (-39%) 💚406334 (-39%) 💚406334 (-39%) 💚406334 (-39%) 💚1
SLstream latency93 (+12%)153 🔴 (+28%) 🔻196 🔴 (+7.7%)380 🔴 (+11%)30
ℹ️ Metric definitions & methodology

Best/P75/P90/P99 deltas compare against the most recent benchmark run on main at the time of this run. 🔻 flags a delta worse than +15%, 💚 one better than −15%.

Metrics — TTFS: time to first step body (in-deployment start() → first step body, deployment clocks) · STSO: step-to-step overhead (gap between consecutive step bodies) · WO: workflow overhead (whole-run time outside step bodies, in-deployment anchored) · SL: stream latency (in-deployment write → read propagation, readAt - writtenAt) · SO: stream overhead (end-to-end write+consume time beyond the modelled generation window)

Scenarios — step: one trivial no-op step, no stream; no hooks, so the run stays in turbo mode (in-process fast path) · stream: one streaming step; no hooks, so the run stays in turbo mode (in-process fast path) · hook + stream: registers a hook before one step, which exits turbo mode (dispatch path) · 1020 steps: 1020 trivial sequential steps; STSO is measured between consecutive steps in the given step ranges, and WO is the whole-run overhead outside step bodies · stream latency: parallel reader/writer steps on a dedicated stream; SL is the in-deployment write->read propagation (readAt - writtenAt) · stream overhead (text): writer streams 300 variable-length text token deltas paced at 100/s for 3s (a haiku-size LLM's token throughput) while a parallel reader drains the whole stream; SO is the end-to-end write+consume time beyond the 3s generation window (overhead/backpressure) · stream overhead (structured): same workload as stream overhead (text), but each delta is an AI-SDK-style structured object ({ type: 'text-delta', id, text }) instead of a raw string, so the SO gap vs the text scenario is the added serialization cost

🔴 marks a percentile over its target (within target is left unmarked). Targets (p75/p90/p99, ms) — TTFS 200/300/600 · SL 50/60/125 · SO 250/500/1000 · STSO (1-20) 20/30/60 · STSO (101-120) 30/45/90 · STSO (1001-1020) 40/60/120

All metrics are measured from deployment-side timestamps only. Runs are triggered by an in-deployment route that stamps the anchor (clientStart) right before start(), so the CI runner’s request and its path through api.vercel.com sit outside every measured window. TTFS = in-deployment start() → first step body (turbo uses the in-process fast path, non-turbo the dispatch path), and includes the VQS dispatch hop plus any /flow cold start. STSO/WO are measured between step bodies on the deployment. SL is measured inside the workflow (parallel reader/writer steps), so it no longer includes the api.vercel.com read path.

Cold starts are kept in the numbers on purpose — they are part of real bursty-workload latency. The workbench deployment cold-starts the /flow invocation for a large fraction of runs, inflating P75+; the Best column shows the fastest (warm-start) sample for comparison.

@NathanColosimo
NathanColosimoforce-pushed the codex/retire-v1-step-route branch from 1e21d3c to bb7fb14CompareJuly 23, 2026 23:27
@NathanColosimo
NathanColosimoforce-pushed the codex/retire-v1-step-route branch from 411e693 to 8a4d0ceCompareJuly 23, 2026 23:56

@TooTallNateTooTallNate left a comment

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.

Reviewed this as a reachability audit — for a −3,800-line retirement the question is whether anything still depends on the removed plumbing — and everything checks out. Approving.

The no-producer claim verified against main, not just asserted:

  • world-vercel's topic discovery already excluded *_wkf_step_* topics on main ("intentionally excluded" — pre-existing), and no first-party code path enqueues to a step prefix. The producers went away when the combined handler shipped; this PR removes only the stranded consumer/plumbing side.
  • The 1,180-line step-handler.ts deletion is genuinely dead code: the combined flow route executes queued step messages (workflow-topic payloads carrying stepId) through executeStep — the same background-step path the inline-ownership work built on — so queued steps remain independently executable exactly as the description says. The runtime.ts diff is correspondingly surgical: dead re-exports, the health-check endpoint parameter, and comment wording; the live inline/background execution paths are untouched.
  • The CI-matrix change is the honest rename (generatedStepPathgeneratedStepRegistrationPath) reflecting what the artifact now is — step registrations inside the flow route, not a route.

Semver discipline is right: majors on every package losing published API (QueueKind, StepInvokePayload, HealthCheckEndpoint, the step route type, the CLI flag), patches where only internals changed. On the pre-release line these fold into the next beta, but the majors carry the correct signal into the v5 graduation math.

Verified locally: full build; core 1472 (+3 pre-existing expected-fails), builders 460, utils 109, world 73, world-local 478, world-postgres 162 (including the Testcontainers queue/recovery suites), world-vercel 296, next 26 — all green. CI is 100/100 with zero failures, including every e2e lane across dev/prod/postgres/Vercel-prod — which is the strongest possible empirical proof that no framework's build or runtime reaches the removed code.

Two asks, neither blocking:

  1. world-postgres upgrade note: removing the workflow_steps graphile task means a self-hosted operator upgrading across this boundary with ancient workflow_steps jobs still queued gets handler-not-found failures on those jobs. The window is small (producers stopped many betas ago), but postgres worlds are the one place old jobs can persist indefinitely. A release-note line ("drain or clear workflow_steps jobs before upgrading") — or a one-release no-op tombstone task that logs-and-completes — would make the boundary operator-safe.
  2. Do not backport. Stable 4.x still runs separate step routes; the backport bot should decline this on its own criteria (builds on main-only combined-handler architecture), but given a mistaken backport would sever stable's step execution entirely, an explicit no-backport note on the PR is cheap insurance.

One micro-note: createWorkflowUrl traded the never-based exhaustiveness check for a runtime throw — fine with a single variant, just worth restoring the compile-time pattern if a second route type ever returns.

@VaguelySeriousVaguelySerious left a comment

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.

LGTM

his removes published legacy types and options, including QueueKind, StepInvokePayload, HealthCheckEndpoint, the step workflow URL route, and workflow health --endpoint

We should keep the QueueKind IMO and the rest is fine to remove

@github-actions

Copy link
Copy Markdown
Contributor

No backport to stable for 62d570e (AI decision).

This is a large breaking refactor that deletes the v1 step route runtime, step queue topics, StepInvokePayload/QueueKind/HealthCheckEndpoint types, the healthCheck(world, endpoint, ...) signature, and the workflow health --endpoint flag — carrying major changesets for @workflow/core, workflow, @workflow/world*, @workflow/utils, @workflow/cli, and @workflow/web-shared. Removing published API surface and legacy plumbing is next-major cleanup work, not a stability fix, and stable users would lose APIs they may still depend on. The only fix-flavored parts (cleaning stale step.func/step.mjs build artifacts) are incidental to the removal and would need to be split out and forced through if desired.

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

62d570ed4bf38db333ae9fe9ba513c0d6a9d6b91

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

@NathanColosimo@TooTallNate@VaguelySerious