Skip to content

fix(core): make deploymentId 'latest' a no-op in non-Vercel worlds#2397

Open
pranaygp wants to merge 2 commits into
mainfrom
pgp/deployment-id-latest
Open

fix(core): make deploymentId 'latest' a no-op in non-Vercel worlds#2397
pranaygp wants to merge 2 commits into
mainfrom
pgp/deployment-id-latest

Conversation

@pranaygp

@pranaygp pranaygp commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Summary

start({ deploymentId: 'latest' }) previously threw a WorkflowRuntimeError in any World that doesn't implement resolveLatestDeploymentId() — i.e. local dev and Postgres. That meant a workflow which opts into 'latest' to target the newest deployment on Vercel would fail outright in local development, even though there's nothing for it to do there.

Resolving 'latest' only means something in worlds with atomic, immutable deployments (currently Vercel). Other worlds have no notion of multiple deployments to resolve between. So instead of throwing, the SDK now logs a warning (once per process) and falls back to the current deployment, making 'latest' an effective no-op outside Vercel.

[workflow-sdk] deploymentId: 'latest' has no effect in this world and was ignored.
It is only supported by worlds with atomic deployments, such as Vercel.
The run will target the current deployment.

Changes

  • packages/core/src/runtime/start.ts — when deploymentId === 'latest' and the World has no resolveLatestDeploymentId(), warn via runtimeLogger.warn and fall back to currentDeploymentId instead of throwing. The warning is gated behind a once-per-process guard (hasWarnedLatestNoOp, mirroring the warnOnce pattern in constants.ts) so tight local/Postgres dev loops aren't flooded. Updated the StartOptionsWithDeploymentId JSDoc.
  • packages/core/src/runtime/start.test.ts — replaced the "should throw" unit test with one asserting the warning is logged and the run falls back to the current deployment ID (in both the run_created event and the queue dispatch); added a test asserting the warning fires exactly once across repeated 'latest' starts. Spies are now restored in afterEach via vi.restoreAllMocks() so a throwing assertion can't leak the runtimeLogger.warn spy into later tests.
  • packages/core/e2e/e2e.test.ts — new test gated to non-Vercel worlds (skipIf(WORKFLOW_VERCEL_ENV)) that starts a workflow with deploymentId: 'latest' and asserts it completes — directly exercising the no-op against the real local/Postgres worlds. (This is the e2e coverage that was previously missing for this option.)
  • docs — added a note to the deploymentId: "latest" section of both v4 and v5 start.mdx describing the no-op-with-warning behavior in non-Vercel worlds.

Implementation note

The fallback assigns deploymentId = currentDeploymentId (rather than leaving the 'latest' sentinel in place). This is deliberate: the downstream if (deploymentId === currentDeploymentId) gate then takes the same-deployment fast path — byte-stream framing + compression enabled, no cross-deployment health-probe round-trip — which is exactly right for local/Postgres, where 'latest' semantically means "right here." (h/t @TooTallNate for calling this out.)

Behavior matrix

World Before After
Vercel resolves via API resolves via API (unchanged)
local ❌ throws ⚠️ warns once, targets current deployment
Postgres ❌ throws ⚠️ warns once, targets current deployment

Testing

  • pnpm vitest run src/runtime/start.test.ts → 28/28 pass (incl. warn+fallback and warn-once tests)
  • pnpm --filter @workflow/core typecheck → clean
  • New e2e test runs on non-Vercel matrix entries in CI.

Docs Preview

Page v4 v5
start — Using deploymentId: "latest" /docs/…/start#using-deploymentid-latest /v5/docs/…/start#using-deploymentid-latest

(Behind deployment protection — requires Vercel team access.)

🤖 Generated with Claude Code

Previously, start({ deploymentId: 'latest' }) threw a WorkflowRuntimeError
in any World that doesn't implement resolveLatestDeploymentId() (local dev,
Postgres). That meant a workflow which opts into 'latest' on Vercel would
fail outright in local development.

Resolving 'latest' only means something in worlds with atomic, immutable
deployments. In other worlds there is nothing to resolve between, so instead
of throwing we now log a warning and fall back to the current deployment,
making 'latest' an effective no-op there.

- start.ts: warn + fall back to currentDeploymentId instead of throwing
- start.test.ts: replace the "should throw" test with a warn + fallback test
- e2e.test.ts: assert 'latest' completes (no-op) on non-Vercel worlds
- docs: note the no-op behavior in v4 + v5 start.mdx

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@pranaygp pranaygp requested a review from a team as a code owner June 13, 2026 06:27
Copilot AI review requested due to automatic review settings June 13, 2026 06:27
@changeset-bot

changeset-bot Bot commented Jun 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 17604c2

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

This PR includes changesets to release 16 packages
Name Type
@workflow/core Patch
@workflow/builders Patch
@workflow/cli Patch
@workflow/next Patch
@workflow/nitro Patch
@workflow/vitest Patch
@workflow/web-shared Patch
@workflow/web Patch
workflow Patch
@workflow/world-testing Patch
@workflow/astro Patch
@workflow/nest Patch
@workflow/rollup Patch
@workflow/sveltekit Patch
@workflow/vite Patch
@workflow/nuxt Patch

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 Jun 13, 2026

Copy link
Copy Markdown
Contributor

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 Jun 14, 2026 8:14am
example-nextjs-workflow-webpack Ready Ready Preview, Comment Jun 14, 2026 8:14am
example-workflow Ready Ready Preview, Comment Jun 14, 2026 8:14am
workbench-astro-workflow Ready Ready Preview, Comment Jun 14, 2026 8:14am
workbench-express-workflow Ready Ready Preview, Comment Jun 14, 2026 8:14am
workbench-fastify-workflow Ready Ready Preview, Comment Jun 14, 2026 8:14am
workbench-hono-workflow Ready Ready Preview, Comment Jun 14, 2026 8:14am
workbench-nitro-workflow Ready Ready Preview, Comment Jun 14, 2026 8:14am
workbench-nuxt-workflow Ready Ready Preview, Comment Jun 14, 2026 8:14am
workbench-sveltekit-workflow Ready Ready Preview, Comment Jun 14, 2026 8:14am
workbench-tanstack-start-workflow Ready Ready Preview, Comment Jun 14, 2026 8:14am
workbench-vite-workflow Ready Ready Preview, Comment Jun 14, 2026 8:14am
workflow-docs Ready Ready Preview, Comment, Open in v0 Jun 14, 2026 8:14am
workflow-swc-playground Ready Ready Preview, Comment Jun 14, 2026 8:14am
workflow-tarballs Ready Ready Preview, Comment Jun 14, 2026 8:14am
workflow-web Ready Ready Preview, Comment Jun 14, 2026 8:14am

@github-actions

github-actions Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

📊 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 🥇 Nitro 0.042s (-12.1% 🟢) 1.007s (~) 0.965s 10 1.00x
💻 Local Express 0.045s (+5.2% 🔺) 1.006s (~) 0.962s 10 1.07x
🐘 Postgres Express 0.063s (+3.0%) 1.012s (~) 0.950s 10 1.49x
💻 Local Next.js (Turbopack) 0.063s (+2.9%) 1.005s (~) 0.942s 10 1.51x
🐘 Postgres Nitro 0.064s (~) 1.012s (~) 0.948s 10 1.53x
🐘 Postgres Next.js (Turbopack) 0.069s (+3.0%) 1.012s (~) 0.943s 10 1.64x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 0.289s (-9.7% 🟢) 1.938s (-15.3% 🟢) 1.649s 10 1.00x
▲ Vercel Nitro 0.381s (+45.2% 🔺) 2.017s (-14.5% 🟢) 1.635s 10 1.32x
▲ Vercel Next.js (Turbopack) 0.400s (~) 2.662s (+4.5%) 2.261s 10 1.38x

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

workflow with 1 step

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 1.093s (-0.8%) 2.007s (~) 0.914s 10 1.00x
💻 Local Nitro 1.097s (~) 2.007s (~) 0.909s 10 1.00x
🐘 Postgres Express 1.105s (~) 2.009s (~) 0.904s 10 1.01x
🐘 Postgres Nitro 1.111s (~) 2.010s (~) 0.899s 10 1.02x
💻 Local Next.js (Turbopack) 1.132s (-1.3%) 2.006s (~) 0.874s 10 1.04x
🐘 Postgres Next.js (Turbopack) 1.142s (-1.2%) 2.010s (~) 0.868s 10 1.04x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 1.820s (+11.1% 🔺) 3.723s (-2.0%) 1.903s 10 1.00x
▲ Vercel Next.js (Turbopack) 1.856s (+12.6% 🔺) 3.793s (-1.0%) 1.937s 10 1.02x
▲ Vercel Express 1.927s (+15.2% 🔺) 3.688s (~) 1.761s 10 1.06x

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

workflow with 10 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 10.505s (~) 11.022s (~) 0.517s 3 1.00x
🐘 Postgres Express 10.515s (~) 11.014s (~) 0.499s 3 1.00x
🐘 Postgres Nitro 10.553s (~) 11.015s (~) 0.462s 3 1.00x
💻 Local Nitro 10.568s (~) 11.023s (~) 0.455s 3 1.01x
💻 Local Next.js (Turbopack) 10.799s (~) 11.023s (~) 0.224s 3 1.03x
🐘 Postgres Next.js (Turbopack) 10.816s (-1.2%) 11.019s (-2.9%) 0.203s 3 1.03x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 14.040s (-8.2% 🟢) 16.179s (-6.8% 🟢) 2.140s 2 1.00x
▲ Vercel Express 14.438s (+2.1%) 16.457s (+5.7% 🔺) 2.019s 2 1.03x
▲ Vercel Nitro 15.509s (-37.5% 🟢) 16.979s (-35.0% 🟢) 1.470s 2 1.10x

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

workflow with 25 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 13.702s (~) 14.028s (~) 0.326s 5 1.00x
💻 Local Nitro 13.802s (~) 14.028s (~) 0.227s 5 1.01x
🐘 Postgres Nitro 13.949s (~) 14.022s (-1.4%) 0.073s 5 1.02x
🐘 Postgres Express 13.969s (+1.4%) 14.219s (+1.4%) 0.250s 5 1.02x
🐘 Postgres Next.js (Turbopack) 14.432s (-2.2%) 15.018s (-1.7%) 0.586s 4 1.05x
💻 Local Next.js (Turbopack) 14.541s (~) 15.031s (~) 0.489s 4 1.06x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 23.047s (+2.3%) 25.243s (+3.5%) 2.196s 3 1.00x
▲ Vercel Nitro 23.615s (+12.0% 🔺) 26.037s (+13.4% 🔺) 2.422s 3 1.02x
▲ Vercel Next.js (Turbopack) 23.625s (+13.3% 🔺) 26.023s (+14.4% 🔺) 2.397s 3 1.03x

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

workflow with 50 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 12.414s (-0.5%) 13.024s (~) 0.610s 7 1.00x
🐘 Postgres Express 12.420s (~) 13.019s (~) 0.600s 7 1.00x
🐘 Postgres Nitro 12.474s (~) 13.021s (~) 0.547s 7 1.00x
💻 Local Nitro 12.559s (~) 13.026s (~) 0.467s 7 1.01x
🐘 Postgres Next.js (Turbopack) 13.874s (~) 14.304s (~) 0.429s 7 1.12x
💻 Local Next.js (Turbopack) 13.920s (+2.3%) 14.314s (+2.1%) 0.394s 7 1.12x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 34.386s (+13.1% 🔺) 36.932s (+13.5% 🔺) 2.546s 3 1.00x
▲ Vercel Express 36.345s (-4.7%) 38.493s (-2.7%) 2.148s 3 1.06x
▲ Vercel Nitro 36.506s (+21.6% 🔺) 38.979s (+20.7% 🔺) 2.473s 3 1.06x

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

Promise.all with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 1.197s (-2.8%) 2.006s (~) 0.809s 15 1.00x
💻 Local Nitro 1.198s (+0.7%) 2.007s (~) 0.809s 15 1.00x
🐘 Postgres Express 1.204s (~) 2.008s (~) 0.804s 15 1.01x
🐘 Postgres Nitro 1.206s (~) 2.007s (~) 0.801s 15 1.01x
🐘 Postgres Next.js (Turbopack) 1.267s (~) 2.008s (~) 0.741s 15 1.06x
💻 Local Next.js (Turbopack) 1.305s (~) 2.006s (~) 0.701s 15 1.09x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 3.024s (-33.7% 🟢) 4.581s (-23.8% 🟢) 1.558s 7 1.00x
▲ Vercel Nitro 3.331s (+36.8% 🔺) 4.801s (+18.7% 🔺) 1.470s 7 1.10x
▲ Vercel Next.js (Turbopack) 3.717s (+39.8% 🔺) 5.207s (+18.9% 🔺) 1.490s 6 1.23x

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

Promise.all with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.353s (~) 2.393s (~) 1.041s 13 1.00x
🐘 Postgres Nitro 1.379s (~) 2.392s (~) 1.013s 13 1.02x
🐘 Postgres Next.js (Turbopack) 1.595s (+1.4%) 2.222s (-3.1%) 0.627s 14 1.18x
💻 Local Express 1.732s (+6.6% 🔺) 2.006s (~) 0.274s 15 1.28x
💻 Local Next.js (Turbopack) 1.813s (+2.4%) 2.149s (+7.1% 🔺) 0.336s 14 1.34x
💻 Local Nitro 1.975s (+0.7%) 2.316s (~) 0.341s 13 1.46x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 4.139s (+15.0% 🔺) 5.923s (+8.7% 🔺) 1.784s 6 1.00x
▲ Vercel Express 4.759s (+32.3% 🔺) 6.326s (+24.2% 🔺) 1.567s 5 1.15x
▲ Vercel Next.js (Turbopack) 4.769s (+53.5% 🔺) 6.799s (+31.2% 🔺) 2.030s 5 1.15x

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

Promise.all with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.682s (+6.2% 🔺) 4.011s (~) 2.329s 8 1.00x
🐘 Postgres Nitro 1.704s (+5.9% 🔺) 3.887s (-6.2% 🟢) 2.183s 8 1.01x
🐘 Postgres Next.js (Turbopack) 3.303s (+0.9%) 4.442s (+10.6% 🔺) 1.138s 7 1.96x
💻 Local Next.js (Turbopack) 4.241s (-12.5% 🟢) 5.013s (-6.2% 🟢) 0.772s 6 2.52x
💻 Local Express 4.609s (+8.8% 🔺) 5.012s (+6.1% 🔺) 0.403s 6 2.74x
💻 Local Nitro 5.412s (-1.6%) 5.848s (-2.8%) 0.435s 6 3.22x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 4.298s (-5.4% 🟢) 6.683s (+6.2% 🔺) 2.385s 5 1.00x
▲ Vercel Express 4.606s (+9.5% 🔺) 6.346s (+4.8%) 1.740s 5 1.07x
▲ Vercel Next.js (Turbopack) 5.523s (+6.3% 🔺) 7.579s (+8.4% 🔺) 2.056s 4 1.29x

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

Promise.race with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.197s (~) 2.007s (~) 0.811s 15 1.00x
🐘 Postgres Nitro 1.221s (~) 2.007s (~) 0.786s 15 1.02x
🐘 Postgres Next.js (Turbopack) 1.295s (+0.7%) 2.007s (~) 0.712s 15 1.08x
💻 Local Next.js (Turbopack) 1.430s (+3.5%) 2.006s (~) 0.577s 15 1.19x
💻 Local Express 1.543s (+2.1%) 2.006s (~) 0.463s 15 1.29x
💻 Local Nitro 1.553s (-6.3% 🟢) 2.007s (~) 0.454s 15 1.30x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.956s (+22.1% 🔺) 4.659s (+12.1% 🔺) 1.703s 7 1.00x
▲ Vercel Next.js (Turbopack) 2.981s (-14.1% 🟢) 4.801s (-5.4% 🟢) 1.819s 7 1.01x
▲ Vercel Nitro 3.212s (+9.1% 🔺) 5.022s (+3.3%) 1.811s 6 1.09x

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

Promise.race with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.335s (-1.2%) 2.222s (-14.2% 🟢) 0.887s 14 1.00x
🐘 Postgres Express 1.383s (-2.1%) 2.151s (-7.1% 🟢) 0.769s 14 1.04x
🐘 Postgres Next.js (Turbopack) 1.543s (-4.8%) 2.294s (~) 0.751s 14 1.16x
💻 Local Next.js (Turbopack) 2.057s (-0.7%) 2.826s (~) 0.769s 11 1.54x
💻 Local Express 2.142s (+22.7% 🔺) 2.593s (+20.6% 🔺) 0.451s 12 1.60x
💻 Local Nitro 2.218s (+3.9%) 2.735s (+5.5% 🔺) 0.517s 11 1.66x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 4.108s (+36.1% 🔺) 5.772s (+29.5% 🔺) 1.664s 6 1.00x
▲ Vercel Nitro 4.164s (+58.6% 🔺) 6.252s (+54.3% 🔺) 2.087s 5 1.01x
▲ Vercel Next.js (Turbopack) 4.509s (+72.0% 🔺) 6.513s (+51.2% 🔺) 2.004s 5 1.10x

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

Promise.race with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.550s (-1.3%) 3.884s (-3.2%) 2.334s 8 1.00x
🐘 Postgres Nitro 1.716s (+6.5% 🔺) 4.015s (+6.7% 🔺) 2.299s 8 1.11x
🐘 Postgres Next.js (Turbopack) 3.691s (+35.0% 🔺) 4.586s (+32.6% 🔺) 0.895s 7 2.38x
💻 Local Next.js (Turbopack) 4.943s (+0.6%) 5.513s (+6.4% 🔺) 0.570s 6 3.19x
💻 Local Express 5.553s (+18.5% 🔺) 6.015s (+16.2% 🔺) 0.462s 6 3.58x
💻 Local Nitro 6.409s (+9.5% 🔺) 7.218s (+12.5% 🔺) 0.809s 5 4.13x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 4.556s (+1.9%) 6.729s (+11.7% 🔺) 2.173s 5 1.00x
▲ Vercel Express 6.433s (+86.1% 🔺) 8.146s (+59.4% 🔺) 1.713s 4 1.41x
▲ Vercel Next.js (Turbopack) 6.640s (+87.9% 🔺) 8.445s (+55.5% 🔺) 1.805s 4 1.46x

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

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.563s (-2.0%) 1.006s (-1.7%) 0.443s 60 1.00x
🐘 Postgres Express 0.578s (+2.8%) 1.023s (+1.7%) 0.445s 59 1.03x
💻 Local Express 0.602s (-3.7%) 1.005s (-1.6%) 0.403s 60 1.07x
💻 Local Nitro 0.614s (-2.2%) 1.005s (~) 0.391s 60 1.09x
🐘 Postgres Next.js (Turbopack) 0.822s (-3.1%) 1.006s (-5.0%) 0.184s 60 1.46x
💻 Local Next.js (Turbopack) 0.885s (+0.6%) 1.039s (~) 0.154s 58 1.57x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 7.161s (+16.8% 🔺) 9.054s (+16.2% 🔺) 1.893s 7 1.00x
▲ Vercel Nitro 7.477s (+46.0% 🔺) 9.473s (+38.7% 🔺) 1.996s 7 1.04x
▲ Vercel Express 8.012s (+45.3% 🔺) 9.787s (+34.9% 🔺) 1.776s 7 1.12x

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

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 1.349s (~) 2.007s (-1.1%) 0.658s 45 1.00x
🐘 Postgres Nitro 1.380s (+1.9%) 2.007s (~) 0.628s 45 1.02x
💻 Local Express 1.503s (+0.6%) 2.006s (~) 0.503s 45 1.11x
💻 Local Nitro 1.579s (+1.3%) 2.007s (~) 0.427s 45 1.17x
🐘 Postgres Next.js (Turbopack) 1.938s (-2.8%) 2.123s (-11.6% 🟢) 0.186s 43 1.44x
💻 Local Next.js (Turbopack) 2.147s (-0.6%) 3.008s (+1.1%) 0.860s 30 1.59x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 15.945s (+9.6% 🔺) 18.225s (+10.9% 🔺) 2.280s 5 1.00x
▲ Vercel Express 16.730s (+9.3% 🔺) 18.719s (+8.3% 🔺) 1.989s 5 1.05x
▲ Vercel Next.js (Turbopack) 17.182s (+4.5%) 19.574s (+5.7% 🔺) 2.391s 5 1.08x

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

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 2.637s (-3.1%) 3.059s (-1.7%) 0.422s 40 1.00x
🐘 Postgres Nitro 2.787s (+3.3%) 3.086s (~) 0.298s 39 1.06x
💻 Local Express 3.161s (-0.8%) 4.010s (+0.8%) 0.849s 30 1.20x
💻 Local Nitro 3.346s (-0.9%) 4.010s (~) 0.664s 30 1.27x
🐘 Postgres Next.js (Turbopack) 3.818s (-1.0%) 4.009s (-0.8%) 0.191s 30 1.45x
💻 Local Next.js (Turbopack) 4.381s (+1.7%) 5.011s (~) 0.629s 24 1.66x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 29.306s (+10.1% 🔺) 31.686s (+11.0% 🔺) 2.380s 4 1.00x
▲ Vercel Nitro 30.203s (+11.9% 🔺) 32.911s (+13.8% 🔺) 2.707s 4 1.03x
▲ Vercel Next.js (Turbopack) 31.012s (+4.1%) 33.232s (+4.0%) 2.220s 4 1.06x

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

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 0.253s (+3.8%) 1.006s (~) 0.754s 60 1.00x
🐘 Postgres Nitro 0.270s (+11.5% 🔺) 1.007s (~) 0.737s 60 1.07x
🐘 Postgres Next.js (Turbopack) 0.293s (-0.7%) 1.006s (~) 0.713s 60 1.16x
💻 Local Express 0.396s (~) 1.004s (~) 0.609s 60 1.57x
💻 Local Nitro 0.438s (+5.3% 🔺) 1.005s (~) 0.567s 60 1.73x
💻 Local Next.js (Turbopack) 0.587s (-0.8%) 1.058s (+1.8%) 0.470s 57 2.33x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 1.803s (-3.9%) 3.935s (+8.0% 🔺) 2.132s 16 1.00x
▲ Vercel Express 1.881s (-8.2% 🟢) 3.879s (+1.8%) 1.998s 16 1.04x
▲ Vercel Next.js (Turbopack) 1.912s (-5.9% 🟢) 3.755s (-4.1%) 1.843s 16 1.06x

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

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 0.402s (+0.8%) 1.029s (+1.1%) 0.627s 88 1.00x
🐘 Postgres Nitro 0.441s (+9.4% 🔺) 1.104s (+8.6% 🔺) 0.663s 82 1.10x
🐘 Postgres Next.js (Turbopack) 0.620s (-6.7% 🟢) 1.161s (-7.4% 🟢) 0.541s 78 1.54x
💻 Local Express 2.094s (+2.1%) 2.564s (-1.7%) 0.469s 36 5.21x
💻 Local Nitro 2.145s (-2.1%) 2.767s (-3.0%) 0.622s 33 5.34x
💻 Local Next.js (Turbopack) 2.471s (+6.8% 🔺) 3.183s (+1.1%) 0.712s 29 6.15x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.627s (-7.9% 🟢) 4.404s (-11.7% 🟢) 1.777s 21 1.00x
▲ Vercel Express 2.764s (+6.3% 🔺) 4.537s (+9.9% 🔺) 1.773s 20 1.05x
▲ Vercel Next.js (Turbopack) 3.389s (+3.2%) 5.003s (-5.5% 🟢) 1.615s 18 1.29x

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

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 0.789s (+3.9%) 1.453s (+3.6%) 0.665s 83 1.00x
🐘 Postgres Nitro 0.854s (+8.8% 🔺) 1.546s (+9.7% 🔺) 0.693s 78 1.08x
🐘 Postgres Next.js (Turbopack) 3.030s (-2.7%) 3.795s (-5.5% 🟢) 0.765s 32 3.84x
💻 Local Express 9.486s (+6.7% 🔺) 10.027s (+5.7% 🔺) 0.542s 12 12.03x
💻 Local Nitro 9.883s (~) 10.360s (-0.8%) 0.476s 12 12.53x
💻 Local Next.js (Turbopack) 10.725s (+2.1%) 11.756s (+3.2%) 1.031s 11 13.60x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 5.862s (-4.7%) 7.749s (-1.8%) 1.886s 16 1.00x
▲ Vercel Express 6.242s (-20.5% 🟢) 8.034s (-15.4% 🟢) 1.791s 15 1.06x
▲ Vercel Next.js (Turbopack) 7.802s (-15.0% 🟢) 9.743s (-14.0% 🟢) 1.940s 13 1.33x

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

Stream Benchmarks (includes TTFB metrics)
workflow with stream

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 1.161s (+0.8%) 2.005s (~) 0.010s (+1.0%) 2.017s (~) 0.856s 10 1.00x
🐘 Postgres Express 1.169s (+0.7%) 1.998s (~) 0.001s (+22.2% 🔺) 2.010s (~) 0.841s 10 1.01x
🐘 Postgres Nitro 1.170s (~) 1.997s (~) 0.002s (+50.0% 🔺) 2.011s (~) 0.841s 10 1.01x
💻 Local Nitro 1.172s (~) 2.006s (~) 0.012s (-2.4%) 2.020s (~) 0.848s 10 1.01x
💻 Local Next.js (Turbopack) 1.209s (-0.7%) 2.003s (~) 0.010s (-1.0%) 2.018s (~) 0.809s 10 1.04x
🐘 Postgres Next.js (Turbopack) 1.221s (-1.0%) 2.001s (~) 0.001s (+7.7% 🔺) 2.010s (~) 0.789s 10 1.05x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.921s (+29.4% 🔺) 4.114s (+18.3% 🔺) 0.763s (-26.3% 🟢) 5.494s (+11.2% 🔺) 2.573s 10 1.00x
▲ Vercel Next.js (Turbopack) 3.276s (+44.6% 🔺) 4.001s (+10.1% 🔺) 0.975s (+8.3% 🔺) 6.086s (+20.2% 🔺) 2.809s 10 1.12x
▲ Vercel Nitro 3.285s (+36.6% 🔺) 4.299s (+22.4% 🔺) 0.675s (-49.7% 🟢) 5.851s (+10.2% 🔺) 2.566s 10 1.12x

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

stream pipeline with 5 transform steps (1MB)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 1.564s (-0.9%) 2.011s (~) 0.013s (+7.9% 🔺) 2.026s (~) 0.462s 30 1.00x
🐘 Postgres Express 1.576s (~) 2.004s (~) 0.005s (-1.9%) 2.027s (~) 0.450s 30 1.01x
💻 Local Nitro 1.600s (~) 2.010s (~) 0.013s (+4.6%) 2.026s (~) 0.426s 30 1.02x
🐘 Postgres Nitro 1.638s (+3.6%) 2.007s (~) 0.005s (-3.8%) 2.028s (~) 0.390s 30 1.05x
💻 Local Next.js (Turbopack) 1.723s (~) 2.009s (~) 0.012s (+9.3% 🔺) 2.025s (~) 0.302s 30 1.10x
🐘 Postgres Next.js (Turbopack) 1.752s (-1.9%) 2.010s (~) 0.005s (-9.6% 🟢) 2.025s (~) 0.273s 30 1.12x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 5.862s (-2.6%) 7.273s (~) 0.579s (+117.0% 🔺) 8.399s (+2.8%) 2.537s 8 1.00x
▲ Vercel Express 6.080s (-4.0%) 7.435s (-0.5%) 0.225s (-58.0% 🟢) 8.206s (-3.5%) 2.126s 8 1.04x
▲ Vercel Next.js (Turbopack) 6.167s (-22.3% 🟢) 7.415s (-20.7% 🟢) 0.525s (+51.6% 🔺) 8.463s (-18.2% 🟢) 2.296s 8 1.05x

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

10 parallel streams (1MB each)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 0.733s (-4.3%) 1.046s (~) 0.000s (+50.0% 🔺) 1.060s (~) 0.327s 57 1.00x
🐘 Postgres Nitro 0.852s (+14.5% 🔺) 1.105s (+5.8% 🔺) 0.000s (+5.6% 🔺) 1.120s (+4.9%) 0.268s 54 1.16x
🐘 Postgres Next.js (Turbopack) 1.034s (-1.2%) 1.463s (-4.1%) 0.000s (+Infinity% 🔺) 1.471s (-4.1%) 0.437s 41 1.41x
💻 Local Express 1.411s (+1.9%) 2.014s (~) 0.001s (+128.6% 🔺) 2.017s (~) 0.606s 30 1.93x
💻 Local Nitro 1.425s (~) 2.014s (~) 0.000s (-21.4% 🟢) 2.016s (~) 0.592s 30 1.94x
💻 Local Next.js (Turbopack) 1.493s (+3.3%) 2.013s (~) 0.001s (+166.7% 🔺) 2.017s (~) 0.523s 30 2.04x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.798s (-15.3% 🟢) 4.389s (-9.8% 🟢) 0.000s (-100.0% 🟢) 4.882s (-9.2% 🟢) 2.084s 13 1.00x
▲ Vercel Express 2.833s (-7.5% 🟢) 4.483s (+7.0% 🔺) 0.000s (NaN%) 4.977s (+7.5% 🔺) 2.144s 13 1.01x
▲ Vercel Next.js (Turbopack) 2.921s (-32.5% 🟢) 4.524s (-22.0% 🟢) 0.000s (+Infinity% 🔺) 4.980s (-21.2% 🟢) 2.059s 13 1.04x

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

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.595s (-3.3%) 2.139s (~) 0.000s (+Infinity% 🔺) 2.153s (-1.8%) 0.558s 28 1.00x
🐘 Postgres Nitro 1.761s (+2.0%) 2.182s (-3.3%) 0.000s (+Infinity% 🔺) 2.203s (-2.9%) 0.442s 28 1.10x
🐘 Postgres Next.js (Turbopack) 2.150s (-1.3%) 2.571s (-1.6%) 0.000s (-100.0% 🟢) 2.618s (~) 0.468s 23 1.35x
💻 Local Next.js (Turbopack) 3.094s (+5.8% 🔺) 3.675s (+3.4%) 0.001s (+15.4% 🔺) 3.679s (+3.4%) 0.585s 17 1.94x
💻 Local Express 3.106s (+2.1%) 3.732s (~) 0.001s (+12.5% 🔺) 3.736s (~) 0.630s 17 1.95x
💻 Local Nitro 3.147s (~) 3.776s (-1.6%) 0.001s (+9.1% 🔺) 3.779s (-1.7%) 0.632s 16 1.97x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 4.350s (-20.9% 🟢) 6.036s (-14.9% 🟢) 0.000s (-11.1% 🟢) 6.747s (-10.9% 🟢) 2.397s 9 1.00x
▲ Vercel Next.js (Turbopack) 4.733s (-28.1% 🟢) 6.277s (-24.6% 🟢) 0.000s (NaN%) 6.724s (-24.1% 🟢) 1.990s 9 1.09x
▲ Vercel Express 4.999s (-22.8% 🟢) 6.368s (-16.9% 🟢) 0.000s (-100.0% 🟢) 7.008s (-14.7% 🟢) 2.009s 9 1.15x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World 🥇 Fastest Framework Wins
💻 Local Express 15/21
🐘 Postgres Express 18/21
▲ Vercel Nitro 11/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework 🥇 Fastest World Wins
Express 🐘 Postgres 13/21
Next.js (Turbopack) 🐘 Postgres 16/21
Nitro 🐘 Postgres 16/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)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)

📋 View full workflow run

@github-actions

github-actions Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

Passed Failed Skipped Total
❌ ▲ Vercel Production 1441 1 230 1672
✅ 💻 Local Development 1909 0 219 2128
✅ 📦 Local Production 1909 0 219 2128
✅ 🐘 Local Postgres 1895 0 233 2128
✅ 🪟 Windows 152 0 0 152
✅ 📋 Other 885 0 179 1064
Total 8191 1 1080 9272

❌ Failed Tests

▲ Vercel Production (1 failed)

hono (1 failed):

  • distributedAbortController - TTL expiration triggers signal | wrun_01KV2KS5Q8FWGQK0G5QRTCTT1G | 🔍 observability

Details by Category

❌ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 125 0 27
✅ example 125 0 27
✅ express 125 0 27
✅ fastify 125 0 27
❌ hono 124 1 27
✅ nextjs-turbopack 149 0 3
✅ nextjs-webpack 149 0 3
✅ nitro 125 0 27
✅ nuxt 125 0 27
✅ sveltekit 144 0 8
✅ vite 125 0 27
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 127 0 25
✅ express-stable 127 0 25
✅ fastify-stable 127 0 25
✅ hono-stable 127 0 25
✅ nextjs-turbopack-canary 133 0 19
✅ nextjs-turbopack-stable-lazy-discovery-disabled 152 0 0
✅ nextjs-turbopack-stable-lazy-discovery-enabled 152 0 0
✅ nextjs-webpack-canary 133 0 19
✅ nextjs-webpack-stable-lazy-discovery-disabled 152 0 0
✅ nextjs-webpack-stable-lazy-discovery-enabled 152 0 0
✅ nitro-stable 127 0 25
✅ nuxt-stable 127 0 25
✅ sveltekit-stable 146 0 6
✅ vite-stable 127 0 25
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 127 0 25
✅ express-stable 127 0 25
✅ fastify-stable 127 0 25
✅ hono-stable 127 0 25
✅ nextjs-turbopack-canary 133 0 19
✅ nextjs-turbopack-stable-lazy-discovery-disabled 152 0 0
✅ nextjs-turbopack-stable-lazy-discovery-enabled 152 0 0
✅ nextjs-webpack-canary 133 0 19
✅ nextjs-webpack-stable-lazy-discovery-disabled 152 0 0
✅ nextjs-webpack-stable-lazy-discovery-enabled 152 0 0
✅ nitro-stable 127 0 25
✅ nuxt-stable 127 0 25
✅ sveltekit-stable 146 0 6
✅ vite-stable 127 0 25
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 126 0 26
✅ express-stable 126 0 26
✅ fastify-stable 126 0 26
✅ hono-stable 126 0 26
✅ nextjs-turbopack-canary 132 0 20
✅ nextjs-turbopack-stable-lazy-discovery-disabled 151 0 1
✅ nextjs-turbopack-stable-lazy-discovery-enabled 151 0 1
✅ nextjs-webpack-canary 132 0 20
✅ nextjs-webpack-stable-lazy-discovery-disabled 151 0 1
✅ nextjs-webpack-stable-lazy-discovery-enabled 151 0 1
✅ nitro-stable 126 0 26
✅ nuxt-stable 126 0 26
✅ sveltekit-stable 145 0 7
✅ vite-stable 126 0 26
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 152 0 0
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 127 0 25
✅ e2e-local-dev-tanstack-start- 127 0 25
✅ e2e-local-postgres-nest-stable 126 0 26
✅ e2e-local-postgres-tanstack-start- 126 0 26
✅ e2e-local-prod-nest-stable 127 0 25
✅ e2e-local-prod-tanstack-start- 127 0 25
✅ e2e-vercel-prod-tanstack-start 125 0 27

📋 View full workflow run


Some E2E test jobs failed:

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

Check the workflow run for details.

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.

Pull request overview

This PR adjusts start({ deploymentId: 'latest' }) behavior so it no longer throws in Worlds that don’t implement resolveLatestDeploymentId() (e.g. local dev and Postgres). Instead, it logs a warning and targets the current deployment, making 'latest' an intentional no-op outside atomic-deployment platforms like Vercel.

Changes:

  • Updated start() to resolve 'latest' when supported, otherwise warn + fall back to currentDeploymentId instead of throwing.
  • Reworked unit coverage to assert warn + fallback behavior, and added an e2e test ensuring non-Vercel worlds can start/complete runs using deploymentId: 'latest'.
  • Updated v4/v5 docs and added a changeset documenting the no-op-with-warning behavior.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/core/src/runtime/start.ts Warn + fall back to current deployment when 'latest' is used in Worlds without resolveLatestDeploymentId().
packages/core/src/runtime/start.test.ts Replaces the previous “throws” expectation with a warn + fallback assertion (event payload + queue dispatch).
packages/core/e2e/e2e.test.ts Adds a non-Vercel-gated e2e test verifying 'latest' doesn’t break local/Postgres runs.
docs/content/docs/v5/api-reference/workflow-api/start.mdx Documents 'latest' being a no-op (with warning) outside atomic-deployment worlds.
docs/content/docs/v4/api-reference/workflow-api/start.mdx Same documentation update for v4 docs.
.changeset/deployment-id-latest-noop-non-vercel.md Patch changeset describing the behavior change.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +518 to +522
it('should warn and fall back to the current deployment ID when "latest" is used with a World that does not implement resolveLatestDeploymentId', async () => {
const warnSpy = vi
.spyOn(runtimeLogger, 'warn')
.mockImplementation(() => {});

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 in 17604c2. The block's afterEach now calls vi.restoreAllMocks() (in addition to vi.clearAllMocks()), so the runtimeLogger.warn spy is restored even if an assertion throws before the test's own cleanup. Dropped the manual warnSpy.mockRestore(), and the guard is reset in beforeEach so the warn path is exercisable regardless of test order.

Comment thread packages/core/src/runtime/start.ts Outdated
Comment on lines +207 to +213
runtimeLogger.warn(
"deploymentId: 'latest' has no effect in this world and was ignored. " +
'It is only supported by worlds with atomic deployments, such as Vercel. ' +
'The run will target the current deployment.',
{ currentDeploymentId }
);
deploymentId = currentDeploymentId;

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.

Good call — done in 17604c2. The warning is now gated behind a once-per-process guard (hasWarnedLatestNoOp), mirroring the warnOnce pattern already used in constants.ts. Users still get the nudge that 'latest' is a no-op here, but a workflow that hardcodes 'latest' for Vercel won't flood a tight local/Postgres dev loop. Exposed _resetLatestNoOpWarnForTests() (@internal) so the warn path stays testable, and added a test asserting it fires exactly once across repeated 'latest' starts.

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

Approve — correct behavior change, and it quietly fixes a second bug too

Turning deploymentId: 'latest' from a hard throw into a warn-and-fall-back is the right call: a workflow that opts into 'latest' to target the newest Vercel deployment shouldn't be unrunnable in local dev or Postgres, where there's no deployment set to resolve between. The fix is minimal and the reasoning in both the code comment and the JSDoc is clear about why it's a no-op rather than just that it is.

What I verified:

  • WorkflowRuntimeError import is not orphaned — still used at 8 other sites in start.ts; runtimeLogger and currentDeploymentId are both already in scope above the check.
  • The fallback also fixes a downstream interaction the PR doesn't mention. Setting deploymentId = currentDeploymentId (not leaving it as the 'latest' sentinel) means the later if (deploymentId === currentDeploymentId) gate takes the same-deployment fast path — framing + compression enabled, no health-probe round-trip. That's exactly right for local/Postgres, where 'latest' semantically means "right here." Had it fallen through with the sentinel still set, it would have taken the cross-deployment branch and either probed a nonexistent target or disabled framing. Worth a sentence in the PR body, but the code does the correct thing.
  • The unit test is the right replacement — asserts the warning (message + currentDeploymentId context) and that the fallback lands on both payloads (run_created eventData and the queue dispatch's deploymentId), not just that it didn't throw. 27/27 pass locally; typecheck clean.
  • The e2e test is well-scoped: reuses addTenWorkflow (no new workbench files), correctly skipIf(WORKFLOW_VERCEL_ENV) so it exercises the real no-op on local/Postgres while leaving Vercel's actual resolve-API path alone, and asserts both the return value and the CLI-inspected run record. This is genuinely new coverage — 'latest' previously had no e2e exercise on non-Vercel worlds.
  • Docs (v4 + v5) accurately describe the no-op-with-warning behavior and the "still runs unchanged locally" implication. Changeset is a correctly-scoped patch on @workflow/core.

One small note (non-blocking)

The warning fires on every start({ deploymentId: 'latest' }) call in local dev — which, for a workflow that hardcodes 'latest' for its Vercel deployment, means every single local run logs it. That's arguably the intended nudge ("this option does nothing here"), but for a tight dev loop it could get noisy. Not worth gating or deduping for this PR; flagging only in case repeated-warning noise comes up — runtimeLogger.warn once-per-process would be a trivial follow-up if it does.

CI

The three red lanes are all unrelated to this change: E2E Windows Tests aborted in dev.test.ts on a "Next.js dev server unhealthy / Turbopack" startup failure (the new test never ran — the suite bailed before it), and Benchmark Vercel (express) + the E2E Required Check cascade are this cycle's known baseline flakes. The new test is gated off Vercel anyway. Nothing here implicates the PR.

LGTM.

…anup

Address PR review:
- Gate the 'latest'-has-no-effect warning behind a once-per-process guard
  (mirrors the warnOnce pattern in constants.ts) so a workflow that hardcodes
  'latest' for Vercel doesn't flood local/Postgres dev logs on every run.
  Exposes _resetLatestNoOpWarnForTests() (@internal) for unit tests.
- start.test.ts: reset the guard in beforeEach and restore spies in afterEach
  via vi.restoreAllMocks() so a throwing assertion can't leak the
  runtimeLogger.warn spy into later tests; drop the manual mockRestore().
- Add a test asserting the warning fires exactly once across repeated
  'latest' starts while every run still falls back to the current deployment.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

4 participants