Skip to content

Fix non-faithful backport of #2305 to stable - #2344

Merged
VaguelySerious merged 3 commits into
stablefrom
fix/stable-lockfile
Jun 11, 2026
Merged

Fix non-faithful backport of #2305 to stable#2344
VaguelySerious merged 3 commits into
stablefrom
fix/stable-lockfile

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Jun 11, 2026

Copy link
Copy Markdown
Member

Summary

The automated backport of #2305 to stable (#2341, merged as 9c667e0) was not a faithful port of the original PR. This PR fixes the three issues found after auditing the backport against the original merge commit on main (4670c4b).

Issues fixed

1. Stale pnpm lockfile

The backport left pnpm-lock.yaml inconsistent with the workspace manifests.

2. Build error in @workflow/core

The backport removed the @vercel/functions import from resume-hook.ts but left a dangling waitUntil usage, breaking the build. Fixed by importing from the new ./wait-until.js module.

3. Incomplete lazy waitUntil conversion

The original PR bundled fix#2340, whose "Avoid loading Vercel functions during runtime import" commit moved allwaitUntil usage in the core runtime to a new lazy-loading wait-until.ts module. The backport added the module and the enforcement test (runtime-import.test.ts, which mocks @vercel/functions to throw if statically loaded), but only rewired one of five call sites — so the backported test was failing on stable. This PR completes the conversion:

  • packages/core/src/runtime/start.ts — static @vercel/functions import removed; waitUntil/waitedUntil now from ./wait-until.js
  • packages/core/src/runtime/step-handler.ts — same conversion, plus Biome formatting the backport left broken (long getWorkflowQueueName(workflowName, stepNamespace) lines were failing biome check)
  • packages/core/src/runtime/suspension-handler.ts — same conversion
  • packages/core/src/util.ts — removed now-dead waitedUntil and its @vercel/functions import (matching main)

Audited and confirmed as legitimate stable/main divergence (no action needed)

  • step-executor.ts — doesn't exist on stable (split out of step-handler.ts later on main); the namespace logic was correctly adapted into stable's monolithic step handler
  • next/builder-deferred.ts — untouched by the backport, but stable's Next.js routes go through base-builder.ts, which did receive createWorkflowEntrypointOptionsCode()
  • builders/request-converter.ts — backport-only change, needed for stable's regex-based route rewriting (astro/sveltekit)
  • createStepQueueTrigger in builders constants — correct adaptation for stable's separate step routes
  • world/world-local/world-postgres queue files are byte-identical to main aside from pre-existing divergences (queue concurrency default, attributes module)

Verification

  • runtime-import.test.ts now passes (was failing on stable)
  • @workflow/core: 670/670 tests pass; build + typecheck clean
  • @workflow/builders (150) and @workflow/world-local (396) tests pass
  • Remaining pnpm lint failures are pre-existing on stable (.github/ scripts), unrelated to the backport

@TooTallNate
TooTallNate requested a review from a team as a code ownerJune 11, 2026 06:10
@changeset-bot

changeset-botBot commented Jun 11, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3673f1b

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

vercelBot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
example-nextjs-workflow-turbopackReadyReadyPreview, CommentJun 11, 2026 6:42am
example-nextjs-workflow-webpackReadyReadyPreview, CommentJun 11, 2026 6:42am
example-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-astro-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-express-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-fastify-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-hono-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-nitro-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-nuxt-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-sveltekit-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-tanstack-start-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-vite-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workflow-swc-playgroundReadyReadyPreview, CommentJun 11, 2026 6:42am
workflow-tarballsReadyReadyPreview, CommentJun 11, 2026 6:42am
workflow-webReadyReadyPreview, CommentJun 11, 2026 6:42am
1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
workflow-docsSkippedSkippedJun 11, 2026 6:42am

@github-actions

github-actionsBot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production923067990
✅ 💻 Local Development904086990
✅ 📦 Local Production9940861080
✅ 🐘 Local Postgres9940861080
✅ 🪟 Windows900090
❌ 🌍 Community Worlds130926228
✅ 📋 Other420030450
Total4455923614908

❌ Failed Tests

🌍 Community Worlds (92 failed)

mongodb (14 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KTTPK02PMBS00NKVXR54GVS2
  • webhookWorkflow | wrun_01KTTPK5TEXWGBER7SGBY0QVVE
  • sleepingWorkflow | wrun_01KTTPKCNBC3NCQAGPT6T6D5BJ
  • outputStreamWorkflow no startIndex (reads all chunks)
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions | wrun_01KTTPPEMPN26SM2V3K65MWMVD
  • writableForwardedFromWorkflowWorkflow | wrun_01KTTPPVN3S9PNXQ57K9EFHJ0W
  • writableForwardedFromStepWorkflow | wrun_01KTTPPZTXSN5NFBEG6PB064J4
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KTTPV634SEH8PJXBP5JJE5PF
  • pages router sleepingWorkflow via pages router
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KTTQ1KXV1E33QYV52MA861G2

redis (10 failed):

  • hookWorkflow | wrun_01KTTPJQZCSK61R6F0HDW5HVZR
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KTTPK02PMBS00NKVXR54GVS2
  • sleepingWorkflow | wrun_01KTTPKCNBC3NCQAGPT6T6D5BJ
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KTTPV634SEH8PJXBP5JJE5PF
  • pages router sleepingWorkflow via pages router
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KTTQ1KXV1E33QYV52MA861G2

turso (68 failed):

  • addTenWorkflow | wrun_01KTTPHM423E68YPH1Q0KF2WFC
  • addTenWorkflow | wrun_01KTTPHM423E68YPH1Q0KF2WFC
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KTTPJV5ZGMBV3MKKGX4H9175
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KTTPHWV9B70N05ZZ0NHQV9VK
  • promiseRaceWorkflow | wrun_01KTTPJ34V4MJ7GHQ6RAWR6NMY
  • promiseAnyWorkflow | wrun_01KTTPJ81YS4J5BP3CS4K3RS0T
  • importedStepOnlyWorkflow | wrun_01KTTPK9E45WQNMZ0V8W9HAA8T
  • readableStreamWorkflow | wrun_01KTTPJABAK96CEYFQTZ6GYYMB
  • hookWorkflow | wrun_01KTTPJQZCSK61R6F0HDW5HVZR
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KTTPK02PMBS00NKVXR54GVS2
  • webhookWorkflow | wrun_01KTTPK5TEXWGBER7SGBY0QVVE
  • sleepingWorkflow | wrun_01KTTPKCNBC3NCQAGPT6T6D5BJ
  • parallelSleepWorkflow | wrun_01KTTPKX2H65GGQ8HGFE3GAG1B
  • nullByteWorkflow | wrun_01KTTPM0JVACZPCJ4QS97MPVDH
  • workflowAndStepMetadataWorkflow | wrun_01KTTPM2TEHMK0BPEKV08KR1C7
  • outputStreamWorkflow no startIndex (reads all chunks)
  • outputStreamWorkflow positive startIndex (skips first chunk)
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions | wrun_01KTTPPEMPN26SM2V3K65MWMVD
  • writableForwardedFromWorkflowWorkflow | wrun_01KTTPPVN3S9PNXQ57K9EFHJ0W
  • writableForwardedFromStepWorkflow | wrun_01KTTPPZTXSN5NFBEG6PB064J4
  • fetchWorkflow | wrun_01KTTPQ3FRB3ZYB2HWX92YEP2M
  • promiseRaceStressTestWorkflow | wrun_01KTTPQ70TMGW2CX2FRNQ99XM8
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • 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
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KTTPTRK0SRFSWGCNZ0V99R8C
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KTTPV634SEH8PJXBP5JJE5PF
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KTTPVQQCKRTPT4PKCJGQ608X
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KTTPW8G5DJHNKPSBRTBKJ289
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KTTPWJ0P8TBRA71R2TMNGDJP
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KTTPWRGA6653NV344QVK9T35
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KTTPWVVQMJYQNE6ZT6G5Z7J1
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KTTPXCGVPR5Y0J412D78PP45
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KTTPXJXM1HBPRJAGK1T67KKW
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KTTPXS12EVCPQHXY5K28WCGM
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KTTPY0KFN6R0HP9TBFV3QK9N
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KTTPY7P1Q889RSFYYDQFX99X
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KTTPYEV39AP8R7Y631E5AAV3
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KTTPYNYPY60V212HDZ0NN5BB
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KTTPZ3FCHWW4KCXH9XBPZJB1
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KTTPZBXTX333P00017G765Z9
  • cancelRun - cancelling a running workflow | wrun_01KTTPZKADQNX007A97AY3HXDK
  • cancelRun via CLI - cancelling a running workflow | wrun_01KTTPZXR3R8C4XG2K7E6M579M
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KTTQ0AD165JXBF5SGYAPMQMA
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KTTQ0WJY29Q45T6WMJW3HMC8
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KTTQ17DB3GF61RDVF4G4RKB7
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KTTQ1F8AEE76T421AXSNDPRH
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KTTQ1HJKT4B8DRHCE3JAP3KZ
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KTTQ1KXV1E33QYV52MA861G2

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro8307
✅ example8307
✅ express8307
✅ fastify8307
✅ hono8307
✅ nextjs-turbopack8802
✅ nextjs-webpack8802
✅ nitro8307
✅ nuxt8307
✅ sveltekit8307
✅ vite8307
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack9000
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev302
❌ mongodb57140
✅ redis-dev302
❌ redis61100
✅ turso-dev302
❌ turso3680
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable8406
✅ e2e-local-dev-tanstack-start-stable8406
✅ e2e-local-postgres-nest-stable8406
✅ e2e-local-prod-nest-stable8406
✅ e2e-local-prod-tanstack-start-stable8406

📋 View full workflow run


Some E2E test jobs failed:

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

Check the workflow run for details.

⚠️Community world tests failed (non-blocking):

  • Community Worlds: failure

Check the workflow run for details.

The #2341 backport added wait-until.ts and runtime-import.test.ts but
left static '@vercel/functions' imports in start.ts, step-handler.ts,
suspension-handler.ts, and util.ts, causing the test to fail. Convert
the remaining call sites to the lazy wait-until module, remove the
now-dead waitedUntil from util.ts, and fix Biome formatting in
step-handler.ts.
@TooTallNateTooTallNate changed the title Fix lockfileFix non-faithful backport of #2305 to stableJun 11, 2026
@vercel
vercelBottemporarily deployed to Preview – workflow-docs June 11, 2026 06:38 Inactive

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

Verified end-to-end — this fixes the stable-wide breakage from the #2305 backport. We independently hit all three issues today and had opened #2347 (resume-hook import) and #2349 (the identical lockfile line) before finding this PR; both are closed in favor of this one.

Local verification on this branch: pnpm install --frozen-lockfile --ignore-scripts exits 0; pnpm --filter "@workflow/core..." build green; and notably runtime-import.test.ts (the no-@vercel/functions-at-module-eval invariant) goes red→green vs origin/stable HEAD. CI confirms the install step now succeeds across all jobs; the remaining E2E community/matrix failures fail in test execution, not setup, and can't be baselined against stable HEAD (which can't install at all).

One sequencing note: #2346 (ack-ordering backport) removes the only waitUntil call in suspension-handler.ts, so after both land, the import this PR adds there becomes unused — flagged on #2346 to handle in its rebase.

import { getWorkflowQueueName } from './helpers.js';
import { Run } from './run.js';
import { waitedUntil} from '../util.js';
import { waitedUntil, waitUntil } from './wait-until.js';

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.

Non-blocking observation: switching these call sites from the static @vercel/functions import to the lazy wrapper changes waitUntil registration from synchronous to asynchronous — wait-until.ts does void import('@vercel/functions').then(({waitUntil}) => waitUntil(promise)), so on a cold module the platform learns about the background promise only after the dynamic import resolves. If a handler returns before that microtask+module-load completes, the promise may go unregistered. The module is cached after first use so the window is tiny and this matches what main does — just worth knowing this is a (slightly) weaker guarantee than the static import for the start/step-handler/suspension-handler sites that previously had it.

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.

Agreed, your analysis is correct. wait-until.ts registers the keep-alive via import('@vercel/functions').then(({ waitUntil }) => waitUntil(promise)), so on a cold module the platform only learns about the background promise after the dynamic import resolves — a strictly weaker guarantee than the previous static import at the start/step-handler/suspension-handler sites.

That said, this PR's goal is to make the stable backport faithful to main, and main uses exactly this lazy wrapper, so this is an intentional, pre-existing tradeoff rather than something introduced here. The race window is bounded to the first call per module instance (the dynamic import is cached afterward), and the runtime sites that use it generally await other work after registering, so the response rarely resolves within that microtask. I'd leave it as-is for this PR to keep parity with main; if the cold-start window is a concern, a follow-up could eagerly warm the import (e.g. kick off import('@vercel/functions') at module load) — but that's orthogonal to fixing the backport.

@VaguelySerious
VaguelySerious merged commit 32bebaf into stableJun 11, 2026
91 of 97 checks passed
@VaguelySerious
VaguelySerious deleted the fix/stable-lockfile branch June 11, 2026 07:47
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

@TooTallNate@pranaygp@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Fix non-faithful backport of #2305 to stable by TooTallNate · Pull Request #2344 · vercel/workflow · GitHub
Skip to content

Fix non-faithful backport of #2305 to stable - #2344

Merged
VaguelySerious merged 3 commits into
stablefrom
fix/stable-lockfile
Jun 11, 2026
Merged

Fix non-faithful backport of #2305 to stable#2344
VaguelySerious merged 3 commits into
stablefrom
fix/stable-lockfile

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Jun 11, 2026

Copy link
Copy Markdown
Member

Summary

The automated backport of #2305 to stable (#2341, merged as 9c667e0) was not a faithful port of the original PR. This PR fixes the three issues found after auditing the backport against the original merge commit on main (4670c4b).

Issues fixed

1. Stale pnpm lockfile

The backport left pnpm-lock.yaml inconsistent with the workspace manifests.

2. Build error in @workflow/core

The backport removed the @vercel/functions import from resume-hook.ts but left a dangling waitUntil usage, breaking the build. Fixed by importing from the new ./wait-until.js module.

3. Incomplete lazy waitUntil conversion

The original PR bundled fix#2340, whose "Avoid loading Vercel functions during runtime import" commit moved allwaitUntil usage in the core runtime to a new lazy-loading wait-until.ts module. The backport added the module and the enforcement test (runtime-import.test.ts, which mocks @vercel/functions to throw if statically loaded), but only rewired one of five call sites — so the backported test was failing on stable. This PR completes the conversion:

  • packages/core/src/runtime/start.ts — static @vercel/functions import removed; waitUntil/waitedUntil now from ./wait-until.js
  • packages/core/src/runtime/step-handler.ts — same conversion, plus Biome formatting the backport left broken (long getWorkflowQueueName(workflowName, stepNamespace) lines were failing biome check)
  • packages/core/src/runtime/suspension-handler.ts — same conversion
  • packages/core/src/util.ts — removed now-dead waitedUntil and its @vercel/functions import (matching main)

Audited and confirmed as legitimate stable/main divergence (no action needed)

  • step-executor.ts — doesn't exist on stable (split out of step-handler.ts later on main); the namespace logic was correctly adapted into stable's monolithic step handler
  • next/builder-deferred.ts — untouched by the backport, but stable's Next.js routes go through base-builder.ts, which did receive createWorkflowEntrypointOptionsCode()
  • builders/request-converter.ts — backport-only change, needed for stable's regex-based route rewriting (astro/sveltekit)
  • createStepQueueTrigger in builders constants — correct adaptation for stable's separate step routes
  • world/world-local/world-postgres queue files are byte-identical to main aside from pre-existing divergences (queue concurrency default, attributes module)

Verification

  • runtime-import.test.ts now passes (was failing on stable)
  • @workflow/core: 670/670 tests pass; build + typecheck clean
  • @workflow/builders (150) and @workflow/world-local (396) tests pass
  • Remaining pnpm lint failures are pre-existing on stable (.github/ scripts), unrelated to the backport

@TooTallNate
TooTallNate requested a review from a team as a code ownerJune 11, 2026 06:10
@changeset-bot

changeset-botBot commented Jun 11, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3673f1b

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

vercelBot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
example-nextjs-workflow-turbopackReadyReadyPreview, CommentJun 11, 2026 6:42am
example-nextjs-workflow-webpackReadyReadyPreview, CommentJun 11, 2026 6:42am
example-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-astro-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-express-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-fastify-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-hono-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-nitro-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-nuxt-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-sveltekit-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-tanstack-start-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-vite-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workflow-swc-playgroundReadyReadyPreview, CommentJun 11, 2026 6:42am
workflow-tarballsReadyReadyPreview, CommentJun 11, 2026 6:42am
workflow-webReadyReadyPreview, CommentJun 11, 2026 6:42am
1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
workflow-docsSkippedSkippedJun 11, 2026 6:42am

@github-actions

github-actionsBot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production923067990
✅ 💻 Local Development904086990
✅ 📦 Local Production9940861080
✅ 🐘 Local Postgres9940861080
✅ 🪟 Windows900090
❌ 🌍 Community Worlds130926228
✅ 📋 Other420030450
Total4455923614908

❌ Failed Tests

🌍 Community Worlds (92 failed)

mongodb (14 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KTTPK02PMBS00NKVXR54GVS2
  • webhookWorkflow | wrun_01KTTPK5TEXWGBER7SGBY0QVVE
  • sleepingWorkflow | wrun_01KTTPKCNBC3NCQAGPT6T6D5BJ
  • outputStreamWorkflow no startIndex (reads all chunks)
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions | wrun_01KTTPPEMPN26SM2V3K65MWMVD
  • writableForwardedFromWorkflowWorkflow | wrun_01KTTPPVN3S9PNXQ57K9EFHJ0W
  • writableForwardedFromStepWorkflow | wrun_01KTTPPZTXSN5NFBEG6PB064J4
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KTTPV634SEH8PJXBP5JJE5PF
  • pages router sleepingWorkflow via pages router
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KTTQ1KXV1E33QYV52MA861G2

redis (10 failed):

  • hookWorkflow | wrun_01KTTPJQZCSK61R6F0HDW5HVZR
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KTTPK02PMBS00NKVXR54GVS2
  • sleepingWorkflow | wrun_01KTTPKCNBC3NCQAGPT6T6D5BJ
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KTTPV634SEH8PJXBP5JJE5PF
  • pages router sleepingWorkflow via pages router
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KTTQ1KXV1E33QYV52MA861G2

turso (68 failed):

  • addTenWorkflow | wrun_01KTTPHM423E68YPH1Q0KF2WFC
  • addTenWorkflow | wrun_01KTTPHM423E68YPH1Q0KF2WFC
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KTTPJV5ZGMBV3MKKGX4H9175
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KTTPHWV9B70N05ZZ0NHQV9VK
  • promiseRaceWorkflow | wrun_01KTTPJ34V4MJ7GHQ6RAWR6NMY
  • promiseAnyWorkflow | wrun_01KTTPJ81YS4J5BP3CS4K3RS0T
  • importedStepOnlyWorkflow | wrun_01KTTPK9E45WQNMZ0V8W9HAA8T
  • readableStreamWorkflow | wrun_01KTTPJABAK96CEYFQTZ6GYYMB
  • hookWorkflow | wrun_01KTTPJQZCSK61R6F0HDW5HVZR
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KTTPK02PMBS00NKVXR54GVS2
  • webhookWorkflow | wrun_01KTTPK5TEXWGBER7SGBY0QVVE
  • sleepingWorkflow | wrun_01KTTPKCNBC3NCQAGPT6T6D5BJ
  • parallelSleepWorkflow | wrun_01KTTPKX2H65GGQ8HGFE3GAG1B
  • nullByteWorkflow | wrun_01KTTPM0JVACZPCJ4QS97MPVDH
  • workflowAndStepMetadataWorkflow | wrun_01KTTPM2TEHMK0BPEKV08KR1C7
  • outputStreamWorkflow no startIndex (reads all chunks)
  • outputStreamWorkflow positive startIndex (skips first chunk)
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions | wrun_01KTTPPEMPN26SM2V3K65MWMVD
  • writableForwardedFromWorkflowWorkflow | wrun_01KTTPPVN3S9PNXQ57K9EFHJ0W
  • writableForwardedFromStepWorkflow | wrun_01KTTPPZTXSN5NFBEG6PB064J4
  • fetchWorkflow | wrun_01KTTPQ3FRB3ZYB2HWX92YEP2M
  • promiseRaceStressTestWorkflow | wrun_01KTTPQ70TMGW2CX2FRNQ99XM8
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • 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
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KTTPTRK0SRFSWGCNZ0V99R8C
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KTTPV634SEH8PJXBP5JJE5PF
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KTTPVQQCKRTPT4PKCJGQ608X
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KTTPW8G5DJHNKPSBRTBKJ289
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KTTPWJ0P8TBRA71R2TMNGDJP
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KTTPWRGA6653NV344QVK9T35
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KTTPWVVQMJYQNE6ZT6G5Z7J1
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KTTPXCGVPR5Y0J412D78PP45
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KTTPXJXM1HBPRJAGK1T67KKW
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KTTPXS12EVCPQHXY5K28WCGM
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KTTPY0KFN6R0HP9TBFV3QK9N
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KTTPY7P1Q889RSFYYDQFX99X
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KTTPYEV39AP8R7Y631E5AAV3
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KTTPYNYPY60V212HDZ0NN5BB
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KTTPZ3FCHWW4KCXH9XBPZJB1
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KTTPZBXTX333P00017G765Z9
  • cancelRun - cancelling a running workflow | wrun_01KTTPZKADQNX007A97AY3HXDK
  • cancelRun via CLI - cancelling a running workflow | wrun_01KTTPZXR3R8C4XG2K7E6M579M
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KTTQ0AD165JXBF5SGYAPMQMA
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KTTQ0WJY29Q45T6WMJW3HMC8
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KTTQ17DB3GF61RDVF4G4RKB7
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KTTQ1F8AEE76T421AXSNDPRH
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KTTQ1HJKT4B8DRHCE3JAP3KZ
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KTTQ1KXV1E33QYV52MA861G2

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro8307
✅ example8307
✅ express8307
✅ fastify8307
✅ hono8307
✅ nextjs-turbopack8802
✅ nextjs-webpack8802
✅ nitro8307
✅ nuxt8307
✅ sveltekit8307
✅ vite8307
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack9000
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev302
❌ mongodb57140
✅ redis-dev302
❌ redis61100
✅ turso-dev302
❌ turso3680
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable8406
✅ e2e-local-dev-tanstack-start-stable8406
✅ e2e-local-postgres-nest-stable8406
✅ e2e-local-prod-nest-stable8406
✅ e2e-local-prod-tanstack-start-stable8406

📋 View full workflow run


Some E2E test jobs failed:

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

Check the workflow run for details.

⚠️Community world tests failed (non-blocking):

  • Community Worlds: failure

Check the workflow run for details.

The #2341 backport added wait-until.ts and runtime-import.test.ts but
left static '@vercel/functions' imports in start.ts, step-handler.ts,
suspension-handler.ts, and util.ts, causing the test to fail. Convert
the remaining call sites to the lazy wait-until module, remove the
now-dead waitedUntil from util.ts, and fix Biome formatting in
step-handler.ts.
@TooTallNateTooTallNate changed the title Fix lockfileFix non-faithful backport of #2305 to stableJun 11, 2026
@vercel
vercelBottemporarily deployed to Preview – workflow-docs June 11, 2026 06:38 Inactive

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

Verified end-to-end — this fixes the stable-wide breakage from the #2305 backport. We independently hit all three issues today and had opened #2347 (resume-hook import) and #2349 (the identical lockfile line) before finding this PR; both are closed in favor of this one.

Local verification on this branch: pnpm install --frozen-lockfile --ignore-scripts exits 0; pnpm --filter "@workflow/core..." build green; and notably runtime-import.test.ts (the no-@vercel/functions-at-module-eval invariant) goes red→green vs origin/stable HEAD. CI confirms the install step now succeeds across all jobs; the remaining E2E community/matrix failures fail in test execution, not setup, and can't be baselined against stable HEAD (which can't install at all).

One sequencing note: #2346 (ack-ordering backport) removes the only waitUntil call in suspension-handler.ts, so after both land, the import this PR adds there becomes unused — flagged on #2346 to handle in its rebase.

import { getWorkflowQueueName } from './helpers.js';
import { Run } from './run.js';
import { waitedUntil} from '../util.js';
import { waitedUntil, waitUntil } from './wait-until.js';

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.

Non-blocking observation: switching these call sites from the static @vercel/functions import to the lazy wrapper changes waitUntil registration from synchronous to asynchronous — wait-until.ts does void import('@vercel/functions').then(({waitUntil}) => waitUntil(promise)), so on a cold module the platform learns about the background promise only after the dynamic import resolves. If a handler returns before that microtask+module-load completes, the promise may go unregistered. The module is cached after first use so the window is tiny and this matches what main does — just worth knowing this is a (slightly) weaker guarantee than the static import for the start/step-handler/suspension-handler sites that previously had it.

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.

Agreed, your analysis is correct. wait-until.ts registers the keep-alive via import('@vercel/functions').then(({ waitUntil }) => waitUntil(promise)), so on a cold module the platform only learns about the background promise after the dynamic import resolves — a strictly weaker guarantee than the previous static import at the start/step-handler/suspension-handler sites.

That said, this PR's goal is to make the stable backport faithful to main, and main uses exactly this lazy wrapper, so this is an intentional, pre-existing tradeoff rather than something introduced here. The race window is bounded to the first call per module instance (the dynamic import is cached afterward), and the runtime sites that use it generally await other work after registering, so the response rarely resolves within that microtask. I'd leave it as-is for this PR to keep parity with main; if the cold-start window is a concern, a follow-up could eagerly warm the import (e.g. kick off import('@vercel/functions') at module load) — but that's orthogonal to fixing the backport.

@VaguelySerious
VaguelySerious merged commit 32bebaf into stableJun 11, 2026
91 of 97 checks passed
@VaguelySerious
VaguelySerious deleted the fix/stable-lockfile branch June 11, 2026 07:47
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

@TooTallNate@pranaygp@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Fix non-faithful backport of #2305 to stable by TooTallNate · Pull Request #2344 · vercel/workflow · GitHub
Skip to content

Fix non-faithful backport of #2305 to stable - #2344

Merged
VaguelySerious merged 3 commits into
stablefrom
fix/stable-lockfile
Jun 11, 2026
Merged

Fix non-faithful backport of #2305 to stable#2344
VaguelySerious merged 3 commits into
stablefrom
fix/stable-lockfile

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Jun 11, 2026

Copy link
Copy Markdown
Member

Summary

The automated backport of #2305 to stable (#2341, merged as 9c667e0) was not a faithful port of the original PR. This PR fixes the three issues found after auditing the backport against the original merge commit on main (4670c4b).

Issues fixed

1. Stale pnpm lockfile

The backport left pnpm-lock.yaml inconsistent with the workspace manifests.

2. Build error in @workflow/core

The backport removed the @vercel/functions import from resume-hook.ts but left a dangling waitUntil usage, breaking the build. Fixed by importing from the new ./wait-until.js module.

3. Incomplete lazy waitUntil conversion

The original PR bundled fix#2340, whose "Avoid loading Vercel functions during runtime import" commit moved allwaitUntil usage in the core runtime to a new lazy-loading wait-until.ts module. The backport added the module and the enforcement test (runtime-import.test.ts, which mocks @vercel/functions to throw if statically loaded), but only rewired one of five call sites — so the backported test was failing on stable. This PR completes the conversion:

  • packages/core/src/runtime/start.ts — static @vercel/functions import removed; waitUntil/waitedUntil now from ./wait-until.js
  • packages/core/src/runtime/step-handler.ts — same conversion, plus Biome formatting the backport left broken (long getWorkflowQueueName(workflowName, stepNamespace) lines were failing biome check)
  • packages/core/src/runtime/suspension-handler.ts — same conversion
  • packages/core/src/util.ts — removed now-dead waitedUntil and its @vercel/functions import (matching main)

Audited and confirmed as legitimate stable/main divergence (no action needed)

  • step-executor.ts — doesn't exist on stable (split out of step-handler.ts later on main); the namespace logic was correctly adapted into stable's monolithic step handler
  • next/builder-deferred.ts — untouched by the backport, but stable's Next.js routes go through base-builder.ts, which did receive createWorkflowEntrypointOptionsCode()
  • builders/request-converter.ts — backport-only change, needed for stable's regex-based route rewriting (astro/sveltekit)
  • createStepQueueTrigger in builders constants — correct adaptation for stable's separate step routes
  • world/world-local/world-postgres queue files are byte-identical to main aside from pre-existing divergences (queue concurrency default, attributes module)

Verification

  • runtime-import.test.ts now passes (was failing on stable)
  • @workflow/core: 670/670 tests pass; build + typecheck clean
  • @workflow/builders (150) and @workflow/world-local (396) tests pass
  • Remaining pnpm lint failures are pre-existing on stable (.github/ scripts), unrelated to the backport

@TooTallNate
TooTallNate requested a review from a team as a code ownerJune 11, 2026 06:10
@changeset-bot

changeset-botBot commented Jun 11, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3673f1b

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

vercelBot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
example-nextjs-workflow-turbopackReadyReadyPreview, CommentJun 11, 2026 6:42am
example-nextjs-workflow-webpackReadyReadyPreview, CommentJun 11, 2026 6:42am
example-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-astro-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-express-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-fastify-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-hono-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-nitro-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-nuxt-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-sveltekit-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-tanstack-start-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-vite-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workflow-swc-playgroundReadyReadyPreview, CommentJun 11, 2026 6:42am
workflow-tarballsReadyReadyPreview, CommentJun 11, 2026 6:42am
workflow-webReadyReadyPreview, CommentJun 11, 2026 6:42am
1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
workflow-docsSkippedSkippedJun 11, 2026 6:42am

@github-actions

github-actionsBot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production923067990
✅ 💻 Local Development904086990
✅ 📦 Local Production9940861080
✅ 🐘 Local Postgres9940861080
✅ 🪟 Windows900090
❌ 🌍 Community Worlds130926228
✅ 📋 Other420030450
Total4455923614908

❌ Failed Tests

🌍 Community Worlds (92 failed)

mongodb (14 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KTTPK02PMBS00NKVXR54GVS2
  • webhookWorkflow | wrun_01KTTPK5TEXWGBER7SGBY0QVVE
  • sleepingWorkflow | wrun_01KTTPKCNBC3NCQAGPT6T6D5BJ
  • outputStreamWorkflow no startIndex (reads all chunks)
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions | wrun_01KTTPPEMPN26SM2V3K65MWMVD
  • writableForwardedFromWorkflowWorkflow | wrun_01KTTPPVN3S9PNXQ57K9EFHJ0W
  • writableForwardedFromStepWorkflow | wrun_01KTTPPZTXSN5NFBEG6PB064J4
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KTTPV634SEH8PJXBP5JJE5PF
  • pages router sleepingWorkflow via pages router
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KTTQ1KXV1E33QYV52MA861G2

redis (10 failed):

  • hookWorkflow | wrun_01KTTPJQZCSK61R6F0HDW5HVZR
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KTTPK02PMBS00NKVXR54GVS2
  • sleepingWorkflow | wrun_01KTTPKCNBC3NCQAGPT6T6D5BJ
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KTTPV634SEH8PJXBP5JJE5PF
  • pages router sleepingWorkflow via pages router
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KTTQ1KXV1E33QYV52MA861G2

turso (68 failed):

  • addTenWorkflow | wrun_01KTTPHM423E68YPH1Q0KF2WFC
  • addTenWorkflow | wrun_01KTTPHM423E68YPH1Q0KF2WFC
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KTTPJV5ZGMBV3MKKGX4H9175
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KTTPHWV9B70N05ZZ0NHQV9VK
  • promiseRaceWorkflow | wrun_01KTTPJ34V4MJ7GHQ6RAWR6NMY
  • promiseAnyWorkflow | wrun_01KTTPJ81YS4J5BP3CS4K3RS0T
  • importedStepOnlyWorkflow | wrun_01KTTPK9E45WQNMZ0V8W9HAA8T
  • readableStreamWorkflow | wrun_01KTTPJABAK96CEYFQTZ6GYYMB
  • hookWorkflow | wrun_01KTTPJQZCSK61R6F0HDW5HVZR
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KTTPK02PMBS00NKVXR54GVS2
  • webhookWorkflow | wrun_01KTTPK5TEXWGBER7SGBY0QVVE
  • sleepingWorkflow | wrun_01KTTPKCNBC3NCQAGPT6T6D5BJ
  • parallelSleepWorkflow | wrun_01KTTPKX2H65GGQ8HGFE3GAG1B
  • nullByteWorkflow | wrun_01KTTPM0JVACZPCJ4QS97MPVDH
  • workflowAndStepMetadataWorkflow | wrun_01KTTPM2TEHMK0BPEKV08KR1C7
  • outputStreamWorkflow no startIndex (reads all chunks)
  • outputStreamWorkflow positive startIndex (skips first chunk)
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions | wrun_01KTTPPEMPN26SM2V3K65MWMVD
  • writableForwardedFromWorkflowWorkflow | wrun_01KTTPPVN3S9PNXQ57K9EFHJ0W
  • writableForwardedFromStepWorkflow | wrun_01KTTPPZTXSN5NFBEG6PB064J4
  • fetchWorkflow | wrun_01KTTPQ3FRB3ZYB2HWX92YEP2M
  • promiseRaceStressTestWorkflow | wrun_01KTTPQ70TMGW2CX2FRNQ99XM8
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • 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
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KTTPTRK0SRFSWGCNZ0V99R8C
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KTTPV634SEH8PJXBP5JJE5PF
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KTTPVQQCKRTPT4PKCJGQ608X
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KTTPW8G5DJHNKPSBRTBKJ289
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KTTPWJ0P8TBRA71R2TMNGDJP
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KTTPWRGA6653NV344QVK9T35
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KTTPWVVQMJYQNE6ZT6G5Z7J1
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KTTPXCGVPR5Y0J412D78PP45
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KTTPXJXM1HBPRJAGK1T67KKW
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KTTPXS12EVCPQHXY5K28WCGM
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KTTPY0KFN6R0HP9TBFV3QK9N
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KTTPY7P1Q889RSFYYDQFX99X
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KTTPYEV39AP8R7Y631E5AAV3
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KTTPYNYPY60V212HDZ0NN5BB
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KTTPZ3FCHWW4KCXH9XBPZJB1
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KTTPZBXTX333P00017G765Z9
  • cancelRun - cancelling a running workflow | wrun_01KTTPZKADQNX007A97AY3HXDK
  • cancelRun via CLI - cancelling a running workflow | wrun_01KTTPZXR3R8C4XG2K7E6M579M
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KTTQ0AD165JXBF5SGYAPMQMA
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KTTQ0WJY29Q45T6WMJW3HMC8
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KTTQ17DB3GF61RDVF4G4RKB7
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KTTQ1F8AEE76T421AXSNDPRH
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KTTQ1HJKT4B8DRHCE3JAP3KZ
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KTTQ1KXV1E33QYV52MA861G2

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro8307
✅ example8307
✅ express8307
✅ fastify8307
✅ hono8307
✅ nextjs-turbopack8802
✅ nextjs-webpack8802
✅ nitro8307
✅ nuxt8307
✅ sveltekit8307
✅ vite8307
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack9000
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev302
❌ mongodb57140
✅ redis-dev302
❌ redis61100
✅ turso-dev302
❌ turso3680
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable8406
✅ e2e-local-dev-tanstack-start-stable8406
✅ e2e-local-postgres-nest-stable8406
✅ e2e-local-prod-nest-stable8406
✅ e2e-local-prod-tanstack-start-stable8406

📋 View full workflow run


Some E2E test jobs failed:

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

Check the workflow run for details.

⚠️Community world tests failed (non-blocking):

  • Community Worlds: failure

Check the workflow run for details.

The #2341 backport added wait-until.ts and runtime-import.test.ts but
left static '@vercel/functions' imports in start.ts, step-handler.ts,
suspension-handler.ts, and util.ts, causing the test to fail. Convert
the remaining call sites to the lazy wait-until module, remove the
now-dead waitedUntil from util.ts, and fix Biome formatting in
step-handler.ts.
@TooTallNateTooTallNate changed the title Fix lockfileFix non-faithful backport of #2305 to stableJun 11, 2026
@vercel
vercelBottemporarily deployed to Preview – workflow-docs June 11, 2026 06:38 Inactive

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

Verified end-to-end — this fixes the stable-wide breakage from the #2305 backport. We independently hit all three issues today and had opened #2347 (resume-hook import) and #2349 (the identical lockfile line) before finding this PR; both are closed in favor of this one.

Local verification on this branch: pnpm install --frozen-lockfile --ignore-scripts exits 0; pnpm --filter "@workflow/core..." build green; and notably runtime-import.test.ts (the no-@vercel/functions-at-module-eval invariant) goes red→green vs origin/stable HEAD. CI confirms the install step now succeeds across all jobs; the remaining E2E community/matrix failures fail in test execution, not setup, and can't be baselined against stable HEAD (which can't install at all).

One sequencing note: #2346 (ack-ordering backport) removes the only waitUntil call in suspension-handler.ts, so after both land, the import this PR adds there becomes unused — flagged on #2346 to handle in its rebase.

import { getWorkflowQueueName } from './helpers.js';
import { Run } from './run.js';
import { waitedUntil} from '../util.js';
import { waitedUntil, waitUntil } from './wait-until.js';

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.

Non-blocking observation: switching these call sites from the static @vercel/functions import to the lazy wrapper changes waitUntil registration from synchronous to asynchronous — wait-until.ts does void import('@vercel/functions').then(({waitUntil}) => waitUntil(promise)), so on a cold module the platform learns about the background promise only after the dynamic import resolves. If a handler returns before that microtask+module-load completes, the promise may go unregistered. The module is cached after first use so the window is tiny and this matches what main does — just worth knowing this is a (slightly) weaker guarantee than the static import for the start/step-handler/suspension-handler sites that previously had it.

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.

Agreed, your analysis is correct. wait-until.ts registers the keep-alive via import('@vercel/functions').then(({ waitUntil }) => waitUntil(promise)), so on a cold module the platform only learns about the background promise after the dynamic import resolves — a strictly weaker guarantee than the previous static import at the start/step-handler/suspension-handler sites.

That said, this PR's goal is to make the stable backport faithful to main, and main uses exactly this lazy wrapper, so this is an intentional, pre-existing tradeoff rather than something introduced here. The race window is bounded to the first call per module instance (the dynamic import is cached afterward), and the runtime sites that use it generally await other work after registering, so the response rarely resolves within that microtask. I'd leave it as-is for this PR to keep parity with main; if the cold-start window is a concern, a follow-up could eagerly warm the import (e.g. kick off import('@vercel/functions') at module load) — but that's orthogonal to fixing the backport.

@VaguelySerious
VaguelySerious merged commit 32bebaf into stableJun 11, 2026
91 of 97 checks passed
@VaguelySerious
VaguelySerious deleted the fix/stable-lockfile branch June 11, 2026 07:47
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

@TooTallNate@pranaygp@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Fix non-faithful backport of #2305 to stable by TooTallNate · Pull Request #2344 · vercel/workflow · GitHub
Skip to content

Fix non-faithful backport of #2305 to stable - #2344

Merged
VaguelySerious merged 3 commits into
stablefrom
fix/stable-lockfile
Jun 11, 2026
Merged

Fix non-faithful backport of #2305 to stable#2344
VaguelySerious merged 3 commits into
stablefrom
fix/stable-lockfile

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Jun 11, 2026

Copy link
Copy Markdown
Member

Summary

The automated backport of #2305 to stable (#2341, merged as 9c667e0) was not a faithful port of the original PR. This PR fixes the three issues found after auditing the backport against the original merge commit on main (4670c4b).

Issues fixed

1. Stale pnpm lockfile

The backport left pnpm-lock.yaml inconsistent with the workspace manifests.

2. Build error in @workflow/core

The backport removed the @vercel/functions import from resume-hook.ts but left a dangling waitUntil usage, breaking the build. Fixed by importing from the new ./wait-until.js module.

3. Incomplete lazy waitUntil conversion

The original PR bundled fix#2340, whose "Avoid loading Vercel functions during runtime import" commit moved allwaitUntil usage in the core runtime to a new lazy-loading wait-until.ts module. The backport added the module and the enforcement test (runtime-import.test.ts, which mocks @vercel/functions to throw if statically loaded), but only rewired one of five call sites — so the backported test was failing on stable. This PR completes the conversion:

  • packages/core/src/runtime/start.ts — static @vercel/functions import removed; waitUntil/waitedUntil now from ./wait-until.js
  • packages/core/src/runtime/step-handler.ts — same conversion, plus Biome formatting the backport left broken (long getWorkflowQueueName(workflowName, stepNamespace) lines were failing biome check)
  • packages/core/src/runtime/suspension-handler.ts — same conversion
  • packages/core/src/util.ts — removed now-dead waitedUntil and its @vercel/functions import (matching main)

Audited and confirmed as legitimate stable/main divergence (no action needed)

  • step-executor.ts — doesn't exist on stable (split out of step-handler.ts later on main); the namespace logic was correctly adapted into stable's monolithic step handler
  • next/builder-deferred.ts — untouched by the backport, but stable's Next.js routes go through base-builder.ts, which did receive createWorkflowEntrypointOptionsCode()
  • builders/request-converter.ts — backport-only change, needed for stable's regex-based route rewriting (astro/sveltekit)
  • createStepQueueTrigger in builders constants — correct adaptation for stable's separate step routes
  • world/world-local/world-postgres queue files are byte-identical to main aside from pre-existing divergences (queue concurrency default, attributes module)

Verification

  • runtime-import.test.ts now passes (was failing on stable)
  • @workflow/core: 670/670 tests pass; build + typecheck clean
  • @workflow/builders (150) and @workflow/world-local (396) tests pass
  • Remaining pnpm lint failures are pre-existing on stable (.github/ scripts), unrelated to the backport

@TooTallNate
TooTallNate requested a review from a team as a code ownerJune 11, 2026 06:10
@changeset-bot

changeset-botBot commented Jun 11, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3673f1b

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

vercelBot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
example-nextjs-workflow-turbopackReadyReadyPreview, CommentJun 11, 2026 6:42am
example-nextjs-workflow-webpackReadyReadyPreview, CommentJun 11, 2026 6:42am
example-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-astro-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-express-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-fastify-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-hono-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-nitro-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-nuxt-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-sveltekit-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-tanstack-start-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-vite-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workflow-swc-playgroundReadyReadyPreview, CommentJun 11, 2026 6:42am
workflow-tarballsReadyReadyPreview, CommentJun 11, 2026 6:42am
workflow-webReadyReadyPreview, CommentJun 11, 2026 6:42am
1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
workflow-docsSkippedSkippedJun 11, 2026 6:42am

@github-actions

github-actionsBot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production923067990
✅ 💻 Local Development904086990
✅ 📦 Local Production9940861080
✅ 🐘 Local Postgres9940861080
✅ 🪟 Windows900090
❌ 🌍 Community Worlds130926228
✅ 📋 Other420030450
Total4455923614908

❌ Failed Tests

🌍 Community Worlds (92 failed)

mongodb (14 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KTTPK02PMBS00NKVXR54GVS2
  • webhookWorkflow | wrun_01KTTPK5TEXWGBER7SGBY0QVVE
  • sleepingWorkflow | wrun_01KTTPKCNBC3NCQAGPT6T6D5BJ
  • outputStreamWorkflow no startIndex (reads all chunks)
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions | wrun_01KTTPPEMPN26SM2V3K65MWMVD
  • writableForwardedFromWorkflowWorkflow | wrun_01KTTPPVN3S9PNXQ57K9EFHJ0W
  • writableForwardedFromStepWorkflow | wrun_01KTTPPZTXSN5NFBEG6PB064J4
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KTTPV634SEH8PJXBP5JJE5PF
  • pages router sleepingWorkflow via pages router
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KTTQ1KXV1E33QYV52MA861G2

redis (10 failed):

  • hookWorkflow | wrun_01KTTPJQZCSK61R6F0HDW5HVZR
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KTTPK02PMBS00NKVXR54GVS2
  • sleepingWorkflow | wrun_01KTTPKCNBC3NCQAGPT6T6D5BJ
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KTTPV634SEH8PJXBP5JJE5PF
  • pages router sleepingWorkflow via pages router
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KTTQ1KXV1E33QYV52MA861G2

turso (68 failed):

  • addTenWorkflow | wrun_01KTTPHM423E68YPH1Q0KF2WFC
  • addTenWorkflow | wrun_01KTTPHM423E68YPH1Q0KF2WFC
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KTTPJV5ZGMBV3MKKGX4H9175
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KTTPHWV9B70N05ZZ0NHQV9VK
  • promiseRaceWorkflow | wrun_01KTTPJ34V4MJ7GHQ6RAWR6NMY
  • promiseAnyWorkflow | wrun_01KTTPJ81YS4J5BP3CS4K3RS0T
  • importedStepOnlyWorkflow | wrun_01KTTPK9E45WQNMZ0V8W9HAA8T
  • readableStreamWorkflow | wrun_01KTTPJABAK96CEYFQTZ6GYYMB
  • hookWorkflow | wrun_01KTTPJQZCSK61R6F0HDW5HVZR
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KTTPK02PMBS00NKVXR54GVS2
  • webhookWorkflow | wrun_01KTTPK5TEXWGBER7SGBY0QVVE
  • sleepingWorkflow | wrun_01KTTPKCNBC3NCQAGPT6T6D5BJ
  • parallelSleepWorkflow | wrun_01KTTPKX2H65GGQ8HGFE3GAG1B
  • nullByteWorkflow | wrun_01KTTPM0JVACZPCJ4QS97MPVDH
  • workflowAndStepMetadataWorkflow | wrun_01KTTPM2TEHMK0BPEKV08KR1C7
  • outputStreamWorkflow no startIndex (reads all chunks)
  • outputStreamWorkflow positive startIndex (skips first chunk)
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions | wrun_01KTTPPEMPN26SM2V3K65MWMVD
  • writableForwardedFromWorkflowWorkflow | wrun_01KTTPPVN3S9PNXQ57K9EFHJ0W
  • writableForwardedFromStepWorkflow | wrun_01KTTPPZTXSN5NFBEG6PB064J4
  • fetchWorkflow | wrun_01KTTPQ3FRB3ZYB2HWX92YEP2M
  • promiseRaceStressTestWorkflow | wrun_01KTTPQ70TMGW2CX2FRNQ99XM8
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • 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
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KTTPTRK0SRFSWGCNZ0V99R8C
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KTTPV634SEH8PJXBP5JJE5PF
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KTTPVQQCKRTPT4PKCJGQ608X
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KTTPW8G5DJHNKPSBRTBKJ289
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KTTPWJ0P8TBRA71R2TMNGDJP
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KTTPWRGA6653NV344QVK9T35
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KTTPWVVQMJYQNE6ZT6G5Z7J1
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KTTPXCGVPR5Y0J412D78PP45
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KTTPXJXM1HBPRJAGK1T67KKW
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KTTPXS12EVCPQHXY5K28WCGM
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KTTPY0KFN6R0HP9TBFV3QK9N
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KTTPY7P1Q889RSFYYDQFX99X
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KTTPYEV39AP8R7Y631E5AAV3
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KTTPYNYPY60V212HDZ0NN5BB
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KTTPZ3FCHWW4KCXH9XBPZJB1
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KTTPZBXTX333P00017G765Z9
  • cancelRun - cancelling a running workflow | wrun_01KTTPZKADQNX007A97AY3HXDK
  • cancelRun via CLI - cancelling a running workflow | wrun_01KTTPZXR3R8C4XG2K7E6M579M
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KTTQ0AD165JXBF5SGYAPMQMA
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KTTQ0WJY29Q45T6WMJW3HMC8
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KTTQ17DB3GF61RDVF4G4RKB7
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KTTQ1F8AEE76T421AXSNDPRH
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KTTQ1HJKT4B8DRHCE3JAP3KZ
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KTTQ1KXV1E33QYV52MA861G2

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro8307
✅ example8307
✅ express8307
✅ fastify8307
✅ hono8307
✅ nextjs-turbopack8802
✅ nextjs-webpack8802
✅ nitro8307
✅ nuxt8307
✅ sveltekit8307
✅ vite8307
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack9000
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev302
❌ mongodb57140
✅ redis-dev302
❌ redis61100
✅ turso-dev302
❌ turso3680
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable8406
✅ e2e-local-dev-tanstack-start-stable8406
✅ e2e-local-postgres-nest-stable8406
✅ e2e-local-prod-nest-stable8406
✅ e2e-local-prod-tanstack-start-stable8406

📋 View full workflow run


Some E2E test jobs failed:

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

Check the workflow run for details.

⚠️Community world tests failed (non-blocking):

  • Community Worlds: failure

Check the workflow run for details.

The #2341 backport added wait-until.ts and runtime-import.test.ts but
left static '@vercel/functions' imports in start.ts, step-handler.ts,
suspension-handler.ts, and util.ts, causing the test to fail. Convert
the remaining call sites to the lazy wait-until module, remove the
now-dead waitedUntil from util.ts, and fix Biome formatting in
step-handler.ts.
@TooTallNateTooTallNate changed the title Fix lockfileFix non-faithful backport of #2305 to stableJun 11, 2026
@vercel
vercelBottemporarily deployed to Preview – workflow-docs June 11, 2026 06:38 Inactive

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

Verified end-to-end — this fixes the stable-wide breakage from the #2305 backport. We independently hit all three issues today and had opened #2347 (resume-hook import) and #2349 (the identical lockfile line) before finding this PR; both are closed in favor of this one.

Local verification on this branch: pnpm install --frozen-lockfile --ignore-scripts exits 0; pnpm --filter "@workflow/core..." build green; and notably runtime-import.test.ts (the no-@vercel/functions-at-module-eval invariant) goes red→green vs origin/stable HEAD. CI confirms the install step now succeeds across all jobs; the remaining E2E community/matrix failures fail in test execution, not setup, and can't be baselined against stable HEAD (which can't install at all).

One sequencing note: #2346 (ack-ordering backport) removes the only waitUntil call in suspension-handler.ts, so after both land, the import this PR adds there becomes unused — flagged on #2346 to handle in its rebase.

import { getWorkflowQueueName } from './helpers.js';
import { Run } from './run.js';
import { waitedUntil} from '../util.js';
import { waitedUntil, waitUntil } from './wait-until.js';

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.

Non-blocking observation: switching these call sites from the static @vercel/functions import to the lazy wrapper changes waitUntil registration from synchronous to asynchronous — wait-until.ts does void import('@vercel/functions').then(({waitUntil}) => waitUntil(promise)), so on a cold module the platform learns about the background promise only after the dynamic import resolves. If a handler returns before that microtask+module-load completes, the promise may go unregistered. The module is cached after first use so the window is tiny and this matches what main does — just worth knowing this is a (slightly) weaker guarantee than the static import for the start/step-handler/suspension-handler sites that previously had it.

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.

Agreed, your analysis is correct. wait-until.ts registers the keep-alive via import('@vercel/functions').then(({ waitUntil }) => waitUntil(promise)), so on a cold module the platform only learns about the background promise after the dynamic import resolves — a strictly weaker guarantee than the previous static import at the start/step-handler/suspension-handler sites.

That said, this PR's goal is to make the stable backport faithful to main, and main uses exactly this lazy wrapper, so this is an intentional, pre-existing tradeoff rather than something introduced here. The race window is bounded to the first call per module instance (the dynamic import is cached afterward), and the runtime sites that use it generally await other work after registering, so the response rarely resolves within that microtask. I'd leave it as-is for this PR to keep parity with main; if the cold-start window is a concern, a follow-up could eagerly warm the import (e.g. kick off import('@vercel/functions') at module load) — but that's orthogonal to fixing the backport.

@VaguelySerious
VaguelySerious merged commit 32bebaf into stableJun 11, 2026
91 of 97 checks passed
@VaguelySerious
VaguelySerious deleted the fix/stable-lockfile branch June 11, 2026 07:47
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

@TooTallNate@pranaygp@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' Fix non-faithful backport of #2305 to stable by TooTallNate · Pull Request #2344 · vercel/workflow · GitHub
Skip to content

Fix non-faithful backport of #2305 to stable - #2344

Merged
VaguelySerious merged 3 commits into
stablefrom
fix/stable-lockfile
Jun 11, 2026
Merged

Fix non-faithful backport of #2305 to stable#2344
VaguelySerious merged 3 commits into
stablefrom
fix/stable-lockfile

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Jun 11, 2026

Copy link
Copy Markdown
Member

Summary

The automated backport of #2305 to stable (#2341, merged as 9c667e0) was not a faithful port of the original PR. This PR fixes the three issues found after auditing the backport against the original merge commit on main (4670c4b).

Issues fixed

1. Stale pnpm lockfile

The backport left pnpm-lock.yaml inconsistent with the workspace manifests.

2. Build error in @workflow/core

The backport removed the @vercel/functions import from resume-hook.ts but left a dangling waitUntil usage, breaking the build. Fixed by importing from the new ./wait-until.js module.

3. Incomplete lazy waitUntil conversion

The original PR bundled fix#2340, whose "Avoid loading Vercel functions during runtime import" commit moved allwaitUntil usage in the core runtime to a new lazy-loading wait-until.ts module. The backport added the module and the enforcement test (runtime-import.test.ts, which mocks @vercel/functions to throw if statically loaded), but only rewired one of five call sites — so the backported test was failing on stable. This PR completes the conversion:

  • packages/core/src/runtime/start.ts — static @vercel/functions import removed; waitUntil/waitedUntil now from ./wait-until.js
  • packages/core/src/runtime/step-handler.ts — same conversion, plus Biome formatting the backport left broken (long getWorkflowQueueName(workflowName, stepNamespace) lines were failing biome check)
  • packages/core/src/runtime/suspension-handler.ts — same conversion
  • packages/core/src/util.ts — removed now-dead waitedUntil and its @vercel/functions import (matching main)

Audited and confirmed as legitimate stable/main divergence (no action needed)

  • step-executor.ts — doesn't exist on stable (split out of step-handler.ts later on main); the namespace logic was correctly adapted into stable's monolithic step handler
  • next/builder-deferred.ts — untouched by the backport, but stable's Next.js routes go through base-builder.ts, which did receive createWorkflowEntrypointOptionsCode()
  • builders/request-converter.ts — backport-only change, needed for stable's regex-based route rewriting (astro/sveltekit)
  • createStepQueueTrigger in builders constants — correct adaptation for stable's separate step routes
  • world/world-local/world-postgres queue files are byte-identical to main aside from pre-existing divergences (queue concurrency default, attributes module)

Verification

  • runtime-import.test.ts now passes (was failing on stable)
  • @workflow/core: 670/670 tests pass; build + typecheck clean
  • @workflow/builders (150) and @workflow/world-local (396) tests pass
  • Remaining pnpm lint failures are pre-existing on stable (.github/ scripts), unrelated to the backport

@TooTallNate
TooTallNate requested a review from a team as a code ownerJune 11, 2026 06:10
@changeset-bot

changeset-botBot commented Jun 11, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3673f1b

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

vercelBot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
example-nextjs-workflow-turbopackReadyReadyPreview, CommentJun 11, 2026 6:42am
example-nextjs-workflow-webpackReadyReadyPreview, CommentJun 11, 2026 6:42am
example-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-astro-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-express-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-fastify-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-hono-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-nitro-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-nuxt-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-sveltekit-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-tanstack-start-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-vite-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workflow-swc-playgroundReadyReadyPreview, CommentJun 11, 2026 6:42am
workflow-tarballsReadyReadyPreview, CommentJun 11, 2026 6:42am
workflow-webReadyReadyPreview, CommentJun 11, 2026 6:42am
1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
workflow-docsSkippedSkippedJun 11, 2026 6:42am

@github-actions

github-actionsBot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production923067990
✅ 💻 Local Development904086990
✅ 📦 Local Production9940861080
✅ 🐘 Local Postgres9940861080
✅ 🪟 Windows900090
❌ 🌍 Community Worlds130926228
✅ 📋 Other420030450
Total4455923614908

❌ Failed Tests

🌍 Community Worlds (92 failed)

mongodb (14 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KTTPK02PMBS00NKVXR54GVS2
  • webhookWorkflow | wrun_01KTTPK5TEXWGBER7SGBY0QVVE
  • sleepingWorkflow | wrun_01KTTPKCNBC3NCQAGPT6T6D5BJ
  • outputStreamWorkflow no startIndex (reads all chunks)
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions | wrun_01KTTPPEMPN26SM2V3K65MWMVD
  • writableForwardedFromWorkflowWorkflow | wrun_01KTTPPVN3S9PNXQ57K9EFHJ0W
  • writableForwardedFromStepWorkflow | wrun_01KTTPPZTXSN5NFBEG6PB064J4
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KTTPV634SEH8PJXBP5JJE5PF
  • pages router sleepingWorkflow via pages router
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KTTQ1KXV1E33QYV52MA861G2

redis (10 failed):

  • hookWorkflow | wrun_01KTTPJQZCSK61R6F0HDW5HVZR
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KTTPK02PMBS00NKVXR54GVS2
  • sleepingWorkflow | wrun_01KTTPKCNBC3NCQAGPT6T6D5BJ
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KTTPV634SEH8PJXBP5JJE5PF
  • pages router sleepingWorkflow via pages router
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KTTQ1KXV1E33QYV52MA861G2

turso (68 failed):

  • addTenWorkflow | wrun_01KTTPHM423E68YPH1Q0KF2WFC
  • addTenWorkflow | wrun_01KTTPHM423E68YPH1Q0KF2WFC
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KTTPJV5ZGMBV3MKKGX4H9175
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KTTPHWV9B70N05ZZ0NHQV9VK
  • promiseRaceWorkflow | wrun_01KTTPJ34V4MJ7GHQ6RAWR6NMY
  • promiseAnyWorkflow | wrun_01KTTPJ81YS4J5BP3CS4K3RS0T
  • importedStepOnlyWorkflow | wrun_01KTTPK9E45WQNMZ0V8W9HAA8T
  • readableStreamWorkflow | wrun_01KTTPJABAK96CEYFQTZ6GYYMB
  • hookWorkflow | wrun_01KTTPJQZCSK61R6F0HDW5HVZR
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KTTPK02PMBS00NKVXR54GVS2
  • webhookWorkflow | wrun_01KTTPK5TEXWGBER7SGBY0QVVE
  • sleepingWorkflow | wrun_01KTTPKCNBC3NCQAGPT6T6D5BJ
  • parallelSleepWorkflow | wrun_01KTTPKX2H65GGQ8HGFE3GAG1B
  • nullByteWorkflow | wrun_01KTTPM0JVACZPCJ4QS97MPVDH
  • workflowAndStepMetadataWorkflow | wrun_01KTTPM2TEHMK0BPEKV08KR1C7
  • outputStreamWorkflow no startIndex (reads all chunks)
  • outputStreamWorkflow positive startIndex (skips first chunk)
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions | wrun_01KTTPPEMPN26SM2V3K65MWMVD
  • writableForwardedFromWorkflowWorkflow | wrun_01KTTPPVN3S9PNXQ57K9EFHJ0W
  • writableForwardedFromStepWorkflow | wrun_01KTTPPZTXSN5NFBEG6PB064J4
  • fetchWorkflow | wrun_01KTTPQ3FRB3ZYB2HWX92YEP2M
  • promiseRaceStressTestWorkflow | wrun_01KTTPQ70TMGW2CX2FRNQ99XM8
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • 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
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KTTPTRK0SRFSWGCNZ0V99R8C
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KTTPV634SEH8PJXBP5JJE5PF
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KTTPVQQCKRTPT4PKCJGQ608X
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KTTPW8G5DJHNKPSBRTBKJ289
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KTTPWJ0P8TBRA71R2TMNGDJP
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KTTPWRGA6653NV344QVK9T35
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KTTPWVVQMJYQNE6ZT6G5Z7J1
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KTTPXCGVPR5Y0J412D78PP45
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KTTPXJXM1HBPRJAGK1T67KKW
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KTTPXS12EVCPQHXY5K28WCGM
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KTTPY0KFN6R0HP9TBFV3QK9N
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KTTPY7P1Q889RSFYYDQFX99X
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KTTPYEV39AP8R7Y631E5AAV3
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KTTPYNYPY60V212HDZ0NN5BB
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KTTPZ3FCHWW4KCXH9XBPZJB1
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KTTPZBXTX333P00017G765Z9
  • cancelRun - cancelling a running workflow | wrun_01KTTPZKADQNX007A97AY3HXDK
  • cancelRun via CLI - cancelling a running workflow | wrun_01KTTPZXR3R8C4XG2K7E6M579M
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KTTQ0AD165JXBF5SGYAPMQMA
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KTTQ0WJY29Q45T6WMJW3HMC8
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KTTQ17DB3GF61RDVF4G4RKB7
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KTTQ1F8AEE76T421AXSNDPRH
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KTTQ1HJKT4B8DRHCE3JAP3KZ
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KTTQ1KXV1E33QYV52MA861G2

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro8307
✅ example8307
✅ express8307
✅ fastify8307
✅ hono8307
✅ nextjs-turbopack8802
✅ nextjs-webpack8802
✅ nitro8307
✅ nuxt8307
✅ sveltekit8307
✅ vite8307
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack9000
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev302
❌ mongodb57140
✅ redis-dev302
❌ redis61100
✅ turso-dev302
❌ turso3680
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable8406
✅ e2e-local-dev-tanstack-start-stable8406
✅ e2e-local-postgres-nest-stable8406
✅ e2e-local-prod-nest-stable8406
✅ e2e-local-prod-tanstack-start-stable8406

📋 View full workflow run


Some E2E test jobs failed:

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

Check the workflow run for details.

⚠️Community world tests failed (non-blocking):

  • Community Worlds: failure

Check the workflow run for details.

The #2341 backport added wait-until.ts and runtime-import.test.ts but
left static '@vercel/functions' imports in start.ts, step-handler.ts,
suspension-handler.ts, and util.ts, causing the test to fail. Convert
the remaining call sites to the lazy wait-until module, remove the
now-dead waitedUntil from util.ts, and fix Biome formatting in
step-handler.ts.
@TooTallNateTooTallNate changed the title Fix lockfileFix non-faithful backport of #2305 to stableJun 11, 2026
@vercel
vercelBottemporarily deployed to Preview – workflow-docs June 11, 2026 06:38 Inactive

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

Verified end-to-end — this fixes the stable-wide breakage from the #2305 backport. We independently hit all three issues today and had opened #2347 (resume-hook import) and #2349 (the identical lockfile line) before finding this PR; both are closed in favor of this one.

Local verification on this branch: pnpm install --frozen-lockfile --ignore-scripts exits 0; pnpm --filter "@workflow/core..." build green; and notably runtime-import.test.ts (the no-@vercel/functions-at-module-eval invariant) goes red→green vs origin/stable HEAD. CI confirms the install step now succeeds across all jobs; the remaining E2E community/matrix failures fail in test execution, not setup, and can't be baselined against stable HEAD (which can't install at all).

One sequencing note: #2346 (ack-ordering backport) removes the only waitUntil call in suspension-handler.ts, so after both land, the import this PR adds there becomes unused — flagged on #2346 to handle in its rebase.

import { getWorkflowQueueName } from './helpers.js';
import { Run } from './run.js';
import { waitedUntil} from '../util.js';
import { waitedUntil, waitUntil } from './wait-until.js';

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.

Non-blocking observation: switching these call sites from the static @vercel/functions import to the lazy wrapper changes waitUntil registration from synchronous to asynchronous — wait-until.ts does void import('@vercel/functions').then(({waitUntil}) => waitUntil(promise)), so on a cold module the platform learns about the background promise only after the dynamic import resolves. If a handler returns before that microtask+module-load completes, the promise may go unregistered. The module is cached after first use so the window is tiny and this matches what main does — just worth knowing this is a (slightly) weaker guarantee than the static import for the start/step-handler/suspension-handler sites that previously had it.

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.

Agreed, your analysis is correct. wait-until.ts registers the keep-alive via import('@vercel/functions').then(({ waitUntil }) => waitUntil(promise)), so on a cold module the platform only learns about the background promise after the dynamic import resolves — a strictly weaker guarantee than the previous static import at the start/step-handler/suspension-handler sites.

That said, this PR's goal is to make the stable backport faithful to main, and main uses exactly this lazy wrapper, so this is an intentional, pre-existing tradeoff rather than something introduced here. The race window is bounded to the first call per module instance (the dynamic import is cached afterward), and the runtime sites that use it generally await other work after registering, so the response rarely resolves within that microtask. I'd leave it as-is for this PR to keep parity with main; if the cold-start window is a concern, a follow-up could eagerly warm the import (e.g. kick off import('@vercel/functions') at module load) — but that's orthogonal to fixing the backport.

@VaguelySerious
VaguelySerious merged commit 32bebaf into stableJun 11, 2026
91 of 97 checks passed
@VaguelySerious
VaguelySerious deleted the fix/stable-lockfile branch June 11, 2026 07:47
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

@TooTallNate@pranaygp@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Fix non-faithful backport of #2305 to stable by TooTallNate · Pull Request #2344 · vercel/workflow · GitHub
Skip to content

Fix non-faithful backport of #2305 to stable - #2344

Merged
VaguelySerious merged 3 commits into
stablefrom
fix/stable-lockfile
Jun 11, 2026
Merged

Fix non-faithful backport of #2305 to stable#2344
VaguelySerious merged 3 commits into
stablefrom
fix/stable-lockfile

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Jun 11, 2026

Copy link
Copy Markdown
Member

Summary

The automated backport of #2305 to stable (#2341, merged as 9c667e0) was not a faithful port of the original PR. This PR fixes the three issues found after auditing the backport against the original merge commit on main (4670c4b).

Issues fixed

1. Stale pnpm lockfile

The backport left pnpm-lock.yaml inconsistent with the workspace manifests.

2. Build error in @workflow/core

The backport removed the @vercel/functions import from resume-hook.ts but left a dangling waitUntil usage, breaking the build. Fixed by importing from the new ./wait-until.js module.

3. Incomplete lazy waitUntil conversion

The original PR bundled fix#2340, whose "Avoid loading Vercel functions during runtime import" commit moved allwaitUntil usage in the core runtime to a new lazy-loading wait-until.ts module. The backport added the module and the enforcement test (runtime-import.test.ts, which mocks @vercel/functions to throw if statically loaded), but only rewired one of five call sites — so the backported test was failing on stable. This PR completes the conversion:

  • packages/core/src/runtime/start.ts — static @vercel/functions import removed; waitUntil/waitedUntil now from ./wait-until.js
  • packages/core/src/runtime/step-handler.ts — same conversion, plus Biome formatting the backport left broken (long getWorkflowQueueName(workflowName, stepNamespace) lines were failing biome check)
  • packages/core/src/runtime/suspension-handler.ts — same conversion
  • packages/core/src/util.ts — removed now-dead waitedUntil and its @vercel/functions import (matching main)

Audited and confirmed as legitimate stable/main divergence (no action needed)

  • step-executor.ts — doesn't exist on stable (split out of step-handler.ts later on main); the namespace logic was correctly adapted into stable's monolithic step handler
  • next/builder-deferred.ts — untouched by the backport, but stable's Next.js routes go through base-builder.ts, which did receive createWorkflowEntrypointOptionsCode()
  • builders/request-converter.ts — backport-only change, needed for stable's regex-based route rewriting (astro/sveltekit)
  • createStepQueueTrigger in builders constants — correct adaptation for stable's separate step routes
  • world/world-local/world-postgres queue files are byte-identical to main aside from pre-existing divergences (queue concurrency default, attributes module)

Verification

  • runtime-import.test.ts now passes (was failing on stable)
  • @workflow/core: 670/670 tests pass; build + typecheck clean
  • @workflow/builders (150) and @workflow/world-local (396) tests pass
  • Remaining pnpm lint failures are pre-existing on stable (.github/ scripts), unrelated to the backport

@TooTallNate
TooTallNate requested a review from a team as a code ownerJune 11, 2026 06:10
@changeset-bot

changeset-botBot commented Jun 11, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3673f1b

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

vercelBot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
example-nextjs-workflow-turbopackReadyReadyPreview, CommentJun 11, 2026 6:42am
example-nextjs-workflow-webpackReadyReadyPreview, CommentJun 11, 2026 6:42am
example-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-astro-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-express-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-fastify-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-hono-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-nitro-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-nuxt-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-sveltekit-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-tanstack-start-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-vite-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workflow-swc-playgroundReadyReadyPreview, CommentJun 11, 2026 6:42am
workflow-tarballsReadyReadyPreview, CommentJun 11, 2026 6:42am
workflow-webReadyReadyPreview, CommentJun 11, 2026 6:42am
1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
workflow-docsSkippedSkippedJun 11, 2026 6:42am

@github-actions

github-actionsBot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production923067990
✅ 💻 Local Development904086990
✅ 📦 Local Production9940861080
✅ 🐘 Local Postgres9940861080
✅ 🪟 Windows900090
❌ 🌍 Community Worlds130926228
✅ 📋 Other420030450
Total4455923614908

❌ Failed Tests

🌍 Community Worlds (92 failed)

mongodb (14 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KTTPK02PMBS00NKVXR54GVS2
  • webhookWorkflow | wrun_01KTTPK5TEXWGBER7SGBY0QVVE
  • sleepingWorkflow | wrun_01KTTPKCNBC3NCQAGPT6T6D5BJ
  • outputStreamWorkflow no startIndex (reads all chunks)
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions | wrun_01KTTPPEMPN26SM2V3K65MWMVD
  • writableForwardedFromWorkflowWorkflow | wrun_01KTTPPVN3S9PNXQ57K9EFHJ0W
  • writableForwardedFromStepWorkflow | wrun_01KTTPPZTXSN5NFBEG6PB064J4
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KTTPV634SEH8PJXBP5JJE5PF
  • pages router sleepingWorkflow via pages router
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KTTQ1KXV1E33QYV52MA861G2

redis (10 failed):

  • hookWorkflow | wrun_01KTTPJQZCSK61R6F0HDW5HVZR
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KTTPK02PMBS00NKVXR54GVS2
  • sleepingWorkflow | wrun_01KTTPKCNBC3NCQAGPT6T6D5BJ
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KTTPV634SEH8PJXBP5JJE5PF
  • pages router sleepingWorkflow via pages router
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KTTQ1KXV1E33QYV52MA861G2

turso (68 failed):

  • addTenWorkflow | wrun_01KTTPHM423E68YPH1Q0KF2WFC
  • addTenWorkflow | wrun_01KTTPHM423E68YPH1Q0KF2WFC
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KTTPJV5ZGMBV3MKKGX4H9175
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KTTPHWV9B70N05ZZ0NHQV9VK
  • promiseRaceWorkflow | wrun_01KTTPJ34V4MJ7GHQ6RAWR6NMY
  • promiseAnyWorkflow | wrun_01KTTPJ81YS4J5BP3CS4K3RS0T
  • importedStepOnlyWorkflow | wrun_01KTTPK9E45WQNMZ0V8W9HAA8T
  • readableStreamWorkflow | wrun_01KTTPJABAK96CEYFQTZ6GYYMB
  • hookWorkflow | wrun_01KTTPJQZCSK61R6F0HDW5HVZR
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KTTPK02PMBS00NKVXR54GVS2
  • webhookWorkflow | wrun_01KTTPK5TEXWGBER7SGBY0QVVE
  • sleepingWorkflow | wrun_01KTTPKCNBC3NCQAGPT6T6D5BJ
  • parallelSleepWorkflow | wrun_01KTTPKX2H65GGQ8HGFE3GAG1B
  • nullByteWorkflow | wrun_01KTTPM0JVACZPCJ4QS97MPVDH
  • workflowAndStepMetadataWorkflow | wrun_01KTTPM2TEHMK0BPEKV08KR1C7
  • outputStreamWorkflow no startIndex (reads all chunks)
  • outputStreamWorkflow positive startIndex (skips first chunk)
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions | wrun_01KTTPPEMPN26SM2V3K65MWMVD
  • writableForwardedFromWorkflowWorkflow | wrun_01KTTPPVN3S9PNXQ57K9EFHJ0W
  • writableForwardedFromStepWorkflow | wrun_01KTTPPZTXSN5NFBEG6PB064J4
  • fetchWorkflow | wrun_01KTTPQ3FRB3ZYB2HWX92YEP2M
  • promiseRaceStressTestWorkflow | wrun_01KTTPQ70TMGW2CX2FRNQ99XM8
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • 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
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KTTPTRK0SRFSWGCNZ0V99R8C
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KTTPV634SEH8PJXBP5JJE5PF
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KTTPVQQCKRTPT4PKCJGQ608X
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KTTPW8G5DJHNKPSBRTBKJ289
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KTTPWJ0P8TBRA71R2TMNGDJP
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KTTPWRGA6653NV344QVK9T35
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KTTPWVVQMJYQNE6ZT6G5Z7J1
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KTTPXCGVPR5Y0J412D78PP45
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KTTPXJXM1HBPRJAGK1T67KKW
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KTTPXS12EVCPQHXY5K28WCGM
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KTTPY0KFN6R0HP9TBFV3QK9N
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KTTPY7P1Q889RSFYYDQFX99X
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KTTPYEV39AP8R7Y631E5AAV3
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KTTPYNYPY60V212HDZ0NN5BB
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KTTPZ3FCHWW4KCXH9XBPZJB1
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KTTPZBXTX333P00017G765Z9
  • cancelRun - cancelling a running workflow | wrun_01KTTPZKADQNX007A97AY3HXDK
  • cancelRun via CLI - cancelling a running workflow | wrun_01KTTPZXR3R8C4XG2K7E6M579M
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KTTQ0AD165JXBF5SGYAPMQMA
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KTTQ0WJY29Q45T6WMJW3HMC8
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KTTQ17DB3GF61RDVF4G4RKB7
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KTTQ1F8AEE76T421AXSNDPRH
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KTTQ1HJKT4B8DRHCE3JAP3KZ
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KTTQ1KXV1E33QYV52MA861G2

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro8307
✅ example8307
✅ express8307
✅ fastify8307
✅ hono8307
✅ nextjs-turbopack8802
✅ nextjs-webpack8802
✅ nitro8307
✅ nuxt8307
✅ sveltekit8307
✅ vite8307
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack9000
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev302
❌ mongodb57140
✅ redis-dev302
❌ redis61100
✅ turso-dev302
❌ turso3680
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable8406
✅ e2e-local-dev-tanstack-start-stable8406
✅ e2e-local-postgres-nest-stable8406
✅ e2e-local-prod-nest-stable8406
✅ e2e-local-prod-tanstack-start-stable8406

📋 View full workflow run


Some E2E test jobs failed:

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

Check the workflow run for details.

⚠️Community world tests failed (non-blocking):

  • Community Worlds: failure

Check the workflow run for details.

The #2341 backport added wait-until.ts and runtime-import.test.ts but
left static '@vercel/functions' imports in start.ts, step-handler.ts,
suspension-handler.ts, and util.ts, causing the test to fail. Convert
the remaining call sites to the lazy wait-until module, remove the
now-dead waitedUntil from util.ts, and fix Biome formatting in
step-handler.ts.
@TooTallNateTooTallNate changed the title Fix lockfileFix non-faithful backport of #2305 to stableJun 11, 2026
@vercel
vercelBottemporarily deployed to Preview – workflow-docs June 11, 2026 06:38 Inactive

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

Verified end-to-end — this fixes the stable-wide breakage from the #2305 backport. We independently hit all three issues today and had opened #2347 (resume-hook import) and #2349 (the identical lockfile line) before finding this PR; both are closed in favor of this one.

Local verification on this branch: pnpm install --frozen-lockfile --ignore-scripts exits 0; pnpm --filter "@workflow/core..." build green; and notably runtime-import.test.ts (the no-@vercel/functions-at-module-eval invariant) goes red→green vs origin/stable HEAD. CI confirms the install step now succeeds across all jobs; the remaining E2E community/matrix failures fail in test execution, not setup, and can't be baselined against stable HEAD (which can't install at all).

One sequencing note: #2346 (ack-ordering backport) removes the only waitUntil call in suspension-handler.ts, so after both land, the import this PR adds there becomes unused — flagged on #2346 to handle in its rebase.

import { getWorkflowQueueName } from './helpers.js';
import { Run } from './run.js';
import { waitedUntil} from '../util.js';
import { waitedUntil, waitUntil } from './wait-until.js';

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.

Non-blocking observation: switching these call sites from the static @vercel/functions import to the lazy wrapper changes waitUntil registration from synchronous to asynchronous — wait-until.ts does void import('@vercel/functions').then(({waitUntil}) => waitUntil(promise)), so on a cold module the platform learns about the background promise only after the dynamic import resolves. If a handler returns before that microtask+module-load completes, the promise may go unregistered. The module is cached after first use so the window is tiny and this matches what main does — just worth knowing this is a (slightly) weaker guarantee than the static import for the start/step-handler/suspension-handler sites that previously had it.

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.

Agreed, your analysis is correct. wait-until.ts registers the keep-alive via import('@vercel/functions').then(({ waitUntil }) => waitUntil(promise)), so on a cold module the platform only learns about the background promise after the dynamic import resolves — a strictly weaker guarantee than the previous static import at the start/step-handler/suspension-handler sites.

That said, this PR's goal is to make the stable backport faithful to main, and main uses exactly this lazy wrapper, so this is an intentional, pre-existing tradeoff rather than something introduced here. The race window is bounded to the first call per module instance (the dynamic import is cached afterward), and the runtime sites that use it generally await other work after registering, so the response rarely resolves within that microtask. I'd leave it as-is for this PR to keep parity with main; if the cold-start window is a concern, a follow-up could eagerly warm the import (e.g. kick off import('@vercel/functions') at module load) — but that's orthogonal to fixing the backport.

@VaguelySerious
VaguelySerious merged commit 32bebaf into stableJun 11, 2026
91 of 97 checks passed
@VaguelySerious
VaguelySerious deleted the fix/stable-lockfile branch June 11, 2026 07:47
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

@TooTallNate@pranaygp@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Fix non-faithful backport of #2305 to stable by TooTallNate · Pull Request #2344 · vercel/workflow · GitHub
Skip to content

Fix non-faithful backport of #2305 to stable - #2344

Merged
VaguelySerious merged 3 commits into
stablefrom
fix/stable-lockfile
Jun 11, 2026
Merged

Fix non-faithful backport of #2305 to stable#2344
VaguelySerious merged 3 commits into
stablefrom
fix/stable-lockfile

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Jun 11, 2026

Copy link
Copy Markdown
Member

Summary

The automated backport of #2305 to stable (#2341, merged as 9c667e0) was not a faithful port of the original PR. This PR fixes the three issues found after auditing the backport against the original merge commit on main (4670c4b).

Issues fixed

1. Stale pnpm lockfile

The backport left pnpm-lock.yaml inconsistent with the workspace manifests.

2. Build error in @workflow/core

The backport removed the @vercel/functions import from resume-hook.ts but left a dangling waitUntil usage, breaking the build. Fixed by importing from the new ./wait-until.js module.

3. Incomplete lazy waitUntil conversion

The original PR bundled fix#2340, whose "Avoid loading Vercel functions during runtime import" commit moved allwaitUntil usage in the core runtime to a new lazy-loading wait-until.ts module. The backport added the module and the enforcement test (runtime-import.test.ts, which mocks @vercel/functions to throw if statically loaded), but only rewired one of five call sites — so the backported test was failing on stable. This PR completes the conversion:

  • packages/core/src/runtime/start.ts — static @vercel/functions import removed; waitUntil/waitedUntil now from ./wait-until.js
  • packages/core/src/runtime/step-handler.ts — same conversion, plus Biome formatting the backport left broken (long getWorkflowQueueName(workflowName, stepNamespace) lines were failing biome check)
  • packages/core/src/runtime/suspension-handler.ts — same conversion
  • packages/core/src/util.ts — removed now-dead waitedUntil and its @vercel/functions import (matching main)

Audited and confirmed as legitimate stable/main divergence (no action needed)

  • step-executor.ts — doesn't exist on stable (split out of step-handler.ts later on main); the namespace logic was correctly adapted into stable's monolithic step handler
  • next/builder-deferred.ts — untouched by the backport, but stable's Next.js routes go through base-builder.ts, which did receive createWorkflowEntrypointOptionsCode()
  • builders/request-converter.ts — backport-only change, needed for stable's regex-based route rewriting (astro/sveltekit)
  • createStepQueueTrigger in builders constants — correct adaptation for stable's separate step routes
  • world/world-local/world-postgres queue files are byte-identical to main aside from pre-existing divergences (queue concurrency default, attributes module)

Verification

  • runtime-import.test.ts now passes (was failing on stable)
  • @workflow/core: 670/670 tests pass; build + typecheck clean
  • @workflow/builders (150) and @workflow/world-local (396) tests pass
  • Remaining pnpm lint failures are pre-existing on stable (.github/ scripts), unrelated to the backport

@TooTallNate
TooTallNate requested a review from a team as a code ownerJune 11, 2026 06:10
@changeset-bot

changeset-botBot commented Jun 11, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3673f1b

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

vercelBot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
example-nextjs-workflow-turbopackReadyReadyPreview, CommentJun 11, 2026 6:42am
example-nextjs-workflow-webpackReadyReadyPreview, CommentJun 11, 2026 6:42am
example-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-astro-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-express-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-fastify-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-hono-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-nitro-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-nuxt-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-sveltekit-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-tanstack-start-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-vite-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workflow-swc-playgroundReadyReadyPreview, CommentJun 11, 2026 6:42am
workflow-tarballsReadyReadyPreview, CommentJun 11, 2026 6:42am
workflow-webReadyReadyPreview, CommentJun 11, 2026 6:42am
1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
workflow-docsSkippedSkippedJun 11, 2026 6:42am

@github-actions

github-actionsBot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production923067990
✅ 💻 Local Development904086990
✅ 📦 Local Production9940861080
✅ 🐘 Local Postgres9940861080
✅ 🪟 Windows900090
❌ 🌍 Community Worlds130926228
✅ 📋 Other420030450
Total4455923614908

❌ Failed Tests

🌍 Community Worlds (92 failed)

mongodb (14 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KTTPK02PMBS00NKVXR54GVS2
  • webhookWorkflow | wrun_01KTTPK5TEXWGBER7SGBY0QVVE
  • sleepingWorkflow | wrun_01KTTPKCNBC3NCQAGPT6T6D5BJ
  • outputStreamWorkflow no startIndex (reads all chunks)
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions | wrun_01KTTPPEMPN26SM2V3K65MWMVD
  • writableForwardedFromWorkflowWorkflow | wrun_01KTTPPVN3S9PNXQ57K9EFHJ0W
  • writableForwardedFromStepWorkflow | wrun_01KTTPPZTXSN5NFBEG6PB064J4
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KTTPV634SEH8PJXBP5JJE5PF
  • pages router sleepingWorkflow via pages router
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KTTQ1KXV1E33QYV52MA861G2

redis (10 failed):

  • hookWorkflow | wrun_01KTTPJQZCSK61R6F0HDW5HVZR
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KTTPK02PMBS00NKVXR54GVS2
  • sleepingWorkflow | wrun_01KTTPKCNBC3NCQAGPT6T6D5BJ
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KTTPV634SEH8PJXBP5JJE5PF
  • pages router sleepingWorkflow via pages router
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KTTQ1KXV1E33QYV52MA861G2

turso (68 failed):

  • addTenWorkflow | wrun_01KTTPHM423E68YPH1Q0KF2WFC
  • addTenWorkflow | wrun_01KTTPHM423E68YPH1Q0KF2WFC
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KTTPJV5ZGMBV3MKKGX4H9175
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KTTPHWV9B70N05ZZ0NHQV9VK
  • promiseRaceWorkflow | wrun_01KTTPJ34V4MJ7GHQ6RAWR6NMY
  • promiseAnyWorkflow | wrun_01KTTPJ81YS4J5BP3CS4K3RS0T
  • importedStepOnlyWorkflow | wrun_01KTTPK9E45WQNMZ0V8W9HAA8T
  • readableStreamWorkflow | wrun_01KTTPJABAK96CEYFQTZ6GYYMB
  • hookWorkflow | wrun_01KTTPJQZCSK61R6F0HDW5HVZR
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KTTPK02PMBS00NKVXR54GVS2
  • webhookWorkflow | wrun_01KTTPK5TEXWGBER7SGBY0QVVE
  • sleepingWorkflow | wrun_01KTTPKCNBC3NCQAGPT6T6D5BJ
  • parallelSleepWorkflow | wrun_01KTTPKX2H65GGQ8HGFE3GAG1B
  • nullByteWorkflow | wrun_01KTTPM0JVACZPCJ4QS97MPVDH
  • workflowAndStepMetadataWorkflow | wrun_01KTTPM2TEHMK0BPEKV08KR1C7
  • outputStreamWorkflow no startIndex (reads all chunks)
  • outputStreamWorkflow positive startIndex (skips first chunk)
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions | wrun_01KTTPPEMPN26SM2V3K65MWMVD
  • writableForwardedFromWorkflowWorkflow | wrun_01KTTPPVN3S9PNXQ57K9EFHJ0W
  • writableForwardedFromStepWorkflow | wrun_01KTTPPZTXSN5NFBEG6PB064J4
  • fetchWorkflow | wrun_01KTTPQ3FRB3ZYB2HWX92YEP2M
  • promiseRaceStressTestWorkflow | wrun_01KTTPQ70TMGW2CX2FRNQ99XM8
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • 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
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KTTPTRK0SRFSWGCNZ0V99R8C
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KTTPV634SEH8PJXBP5JJE5PF
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KTTPVQQCKRTPT4PKCJGQ608X
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KTTPW8G5DJHNKPSBRTBKJ289
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KTTPWJ0P8TBRA71R2TMNGDJP
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KTTPWRGA6653NV344QVK9T35
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KTTPWVVQMJYQNE6ZT6G5Z7J1
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KTTPXCGVPR5Y0J412D78PP45
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KTTPXJXM1HBPRJAGK1T67KKW
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KTTPXS12EVCPQHXY5K28WCGM
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KTTPY0KFN6R0HP9TBFV3QK9N
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KTTPY7P1Q889RSFYYDQFX99X
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KTTPYEV39AP8R7Y631E5AAV3
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KTTPYNYPY60V212HDZ0NN5BB
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KTTPZ3FCHWW4KCXH9XBPZJB1
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KTTPZBXTX333P00017G765Z9
  • cancelRun - cancelling a running workflow | wrun_01KTTPZKADQNX007A97AY3HXDK
  • cancelRun via CLI - cancelling a running workflow | wrun_01KTTPZXR3R8C4XG2K7E6M579M
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KTTQ0AD165JXBF5SGYAPMQMA
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KTTQ0WJY29Q45T6WMJW3HMC8
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KTTQ17DB3GF61RDVF4G4RKB7
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KTTQ1F8AEE76T421AXSNDPRH
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KTTQ1HJKT4B8DRHCE3JAP3KZ
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KTTQ1KXV1E33QYV52MA861G2

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro8307
✅ example8307
✅ express8307
✅ fastify8307
✅ hono8307
✅ nextjs-turbopack8802
✅ nextjs-webpack8802
✅ nitro8307
✅ nuxt8307
✅ sveltekit8307
✅ vite8307
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack9000
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev302
❌ mongodb57140
✅ redis-dev302
❌ redis61100
✅ turso-dev302
❌ turso3680
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable8406
✅ e2e-local-dev-tanstack-start-stable8406
✅ e2e-local-postgres-nest-stable8406
✅ e2e-local-prod-nest-stable8406
✅ e2e-local-prod-tanstack-start-stable8406

📋 View full workflow run


Some E2E test jobs failed:

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

Check the workflow run for details.

⚠️Community world tests failed (non-blocking):

  • Community Worlds: failure

Check the workflow run for details.

The #2341 backport added wait-until.ts and runtime-import.test.ts but
left static '@vercel/functions' imports in start.ts, step-handler.ts,
suspension-handler.ts, and util.ts, causing the test to fail. Convert
the remaining call sites to the lazy wait-until module, remove the
now-dead waitedUntil from util.ts, and fix Biome formatting in
step-handler.ts.
@TooTallNateTooTallNate changed the title Fix lockfileFix non-faithful backport of #2305 to stableJun 11, 2026
@vercel
vercelBottemporarily deployed to Preview – workflow-docs June 11, 2026 06:38 Inactive

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

Verified end-to-end — this fixes the stable-wide breakage from the #2305 backport. We independently hit all three issues today and had opened #2347 (resume-hook import) and #2349 (the identical lockfile line) before finding this PR; both are closed in favor of this one.

Local verification on this branch: pnpm install --frozen-lockfile --ignore-scripts exits 0; pnpm --filter "@workflow/core..." build green; and notably runtime-import.test.ts (the no-@vercel/functions-at-module-eval invariant) goes red→green vs origin/stable HEAD. CI confirms the install step now succeeds across all jobs; the remaining E2E community/matrix failures fail in test execution, not setup, and can't be baselined against stable HEAD (which can't install at all).

One sequencing note: #2346 (ack-ordering backport) removes the only waitUntil call in suspension-handler.ts, so after both land, the import this PR adds there becomes unused — flagged on #2346 to handle in its rebase.

import { getWorkflowQueueName } from './helpers.js';
import { Run } from './run.js';
import { waitedUntil} from '../util.js';
import { waitedUntil, waitUntil } from './wait-until.js';

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.

Non-blocking observation: switching these call sites from the static @vercel/functions import to the lazy wrapper changes waitUntil registration from synchronous to asynchronous — wait-until.ts does void import('@vercel/functions').then(({waitUntil}) => waitUntil(promise)), so on a cold module the platform learns about the background promise only after the dynamic import resolves. If a handler returns before that microtask+module-load completes, the promise may go unregistered. The module is cached after first use so the window is tiny and this matches what main does — just worth knowing this is a (slightly) weaker guarantee than the static import for the start/step-handler/suspension-handler sites that previously had it.

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.

Agreed, your analysis is correct. wait-until.ts registers the keep-alive via import('@vercel/functions').then(({ waitUntil }) => waitUntil(promise)), so on a cold module the platform only learns about the background promise after the dynamic import resolves — a strictly weaker guarantee than the previous static import at the start/step-handler/suspension-handler sites.

That said, this PR's goal is to make the stable backport faithful to main, and main uses exactly this lazy wrapper, so this is an intentional, pre-existing tradeoff rather than something introduced here. The race window is bounded to the first call per module instance (the dynamic import is cached afterward), and the runtime sites that use it generally await other work after registering, so the response rarely resolves within that microtask. I'd leave it as-is for this PR to keep parity with main; if the cold-start window is a concern, a follow-up could eagerly warm the import (e.g. kick off import('@vercel/functions') at module load) — but that's orthogonal to fixing the backport.

@VaguelySerious
VaguelySerious merged commit 32bebaf into stableJun 11, 2026
91 of 97 checks passed
@VaguelySerious
VaguelySerious deleted the fix/stable-lockfile branch June 11, 2026 07:47
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

@TooTallNate@pranaygp@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })(); Fix non-faithful backport of #2305 to stable by TooTallNate · Pull Request #2344 · vercel/workflow · GitHub
Skip to content

Fix non-faithful backport of #2305 to stable - #2344

Merged
VaguelySerious merged 3 commits into
stablefrom
fix/stable-lockfile
Jun 11, 2026
Merged

Fix non-faithful backport of #2305 to stable#2344
VaguelySerious merged 3 commits into
stablefrom
fix/stable-lockfile

Conversation

@TooTallNate

@TooTallNateTooTallNate commented Jun 11, 2026

Copy link
Copy Markdown
Member

Summary

The automated backport of #2305 to stable (#2341, merged as 9c667e0) was not a faithful port of the original PR. This PR fixes the three issues found after auditing the backport against the original merge commit on main (4670c4b).

Issues fixed

1. Stale pnpm lockfile

The backport left pnpm-lock.yaml inconsistent with the workspace manifests.

2. Build error in @workflow/core

The backport removed the @vercel/functions import from resume-hook.ts but left a dangling waitUntil usage, breaking the build. Fixed by importing from the new ./wait-until.js module.

3. Incomplete lazy waitUntil conversion

The original PR bundled fix#2340, whose "Avoid loading Vercel functions during runtime import" commit moved allwaitUntil usage in the core runtime to a new lazy-loading wait-until.ts module. The backport added the module and the enforcement test (runtime-import.test.ts, which mocks @vercel/functions to throw if statically loaded), but only rewired one of five call sites — so the backported test was failing on stable. This PR completes the conversion:

  • packages/core/src/runtime/start.ts — static @vercel/functions import removed; waitUntil/waitedUntil now from ./wait-until.js
  • packages/core/src/runtime/step-handler.ts — same conversion, plus Biome formatting the backport left broken (long getWorkflowQueueName(workflowName, stepNamespace) lines were failing biome check)
  • packages/core/src/runtime/suspension-handler.ts — same conversion
  • packages/core/src/util.ts — removed now-dead waitedUntil and its @vercel/functions import (matching main)

Audited and confirmed as legitimate stable/main divergence (no action needed)

  • step-executor.ts — doesn't exist on stable (split out of step-handler.ts later on main); the namespace logic was correctly adapted into stable's monolithic step handler
  • next/builder-deferred.ts — untouched by the backport, but stable's Next.js routes go through base-builder.ts, which did receive createWorkflowEntrypointOptionsCode()
  • builders/request-converter.ts — backport-only change, needed for stable's regex-based route rewriting (astro/sveltekit)
  • createStepQueueTrigger in builders constants — correct adaptation for stable's separate step routes
  • world/world-local/world-postgres queue files are byte-identical to main aside from pre-existing divergences (queue concurrency default, attributes module)

Verification

  • runtime-import.test.ts now passes (was failing on stable)
  • @workflow/core: 670/670 tests pass; build + typecheck clean
  • @workflow/builders (150) and @workflow/world-local (396) tests pass
  • Remaining pnpm lint failures are pre-existing on stable (.github/ scripts), unrelated to the backport

@TooTallNate
TooTallNate requested a review from a team as a code ownerJune 11, 2026 06:10
@changeset-bot

changeset-botBot commented Jun 11, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3673f1b

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

vercelBot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
example-nextjs-workflow-turbopackReadyReadyPreview, CommentJun 11, 2026 6:42am
example-nextjs-workflow-webpackReadyReadyPreview, CommentJun 11, 2026 6:42am
example-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-astro-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-express-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-fastify-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-hono-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-nitro-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-nuxt-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-sveltekit-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-tanstack-start-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workbench-vite-workflowReadyReadyPreview, CommentJun 11, 2026 6:42am
workflow-swc-playgroundReadyReadyPreview, CommentJun 11, 2026 6:42am
workflow-tarballsReadyReadyPreview, CommentJun 11, 2026 6:42am
workflow-webReadyReadyPreview, CommentJun 11, 2026 6:42am
1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
workflow-docsSkippedSkippedJun 11, 2026 6:42am

@github-actions

github-actionsBot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production923067990
✅ 💻 Local Development904086990
✅ 📦 Local Production9940861080
✅ 🐘 Local Postgres9940861080
✅ 🪟 Windows900090
❌ 🌍 Community Worlds130926228
✅ 📋 Other420030450
Total4455923614908

❌ Failed Tests

🌍 Community Worlds (92 failed)

mongodb (14 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KTTPK02PMBS00NKVXR54GVS2
  • webhookWorkflow | wrun_01KTTPK5TEXWGBER7SGBY0QVVE
  • sleepingWorkflow | wrun_01KTTPKCNBC3NCQAGPT6T6D5BJ
  • outputStreamWorkflow no startIndex (reads all chunks)
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions | wrun_01KTTPPEMPN26SM2V3K65MWMVD
  • writableForwardedFromWorkflowWorkflow | wrun_01KTTPPVN3S9PNXQ57K9EFHJ0W
  • writableForwardedFromStepWorkflow | wrun_01KTTPPZTXSN5NFBEG6PB064J4
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KTTPV634SEH8PJXBP5JJE5PF
  • pages router sleepingWorkflow via pages router
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KTTQ1KXV1E33QYV52MA861G2

redis (10 failed):

  • hookWorkflow | wrun_01KTTPJQZCSK61R6F0HDW5HVZR
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KTTPK02PMBS00NKVXR54GVS2
  • sleepingWorkflow | wrun_01KTTPKCNBC3NCQAGPT6T6D5BJ
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KTTPV634SEH8PJXBP5JJE5PF
  • pages router sleepingWorkflow via pages router
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KTTQ1KXV1E33QYV52MA861G2

turso (68 failed):

  • addTenWorkflow | wrun_01KTTPHM423E68YPH1Q0KF2WFC
  • addTenWorkflow | wrun_01KTTPHM423E68YPH1Q0KF2WFC
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KTTPJV5ZGMBV3MKKGX4H9175
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KTTPHWV9B70N05ZZ0NHQV9VK
  • promiseRaceWorkflow | wrun_01KTTPJ34V4MJ7GHQ6RAWR6NMY
  • promiseAnyWorkflow | wrun_01KTTPJ81YS4J5BP3CS4K3RS0T
  • importedStepOnlyWorkflow | wrun_01KTTPK9E45WQNMZ0V8W9HAA8T
  • readableStreamWorkflow | wrun_01KTTPJABAK96CEYFQTZ6GYYMB
  • hookWorkflow | wrun_01KTTPJQZCSK61R6F0HDW5HVZR
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KTTPK02PMBS00NKVXR54GVS2
  • webhookWorkflow | wrun_01KTTPK5TEXWGBER7SGBY0QVVE
  • sleepingWorkflow | wrun_01KTTPKCNBC3NCQAGPT6T6D5BJ
  • parallelSleepWorkflow | wrun_01KTTPKX2H65GGQ8HGFE3GAG1B
  • nullByteWorkflow | wrun_01KTTPM0JVACZPCJ4QS97MPVDH
  • workflowAndStepMetadataWorkflow | wrun_01KTTPM2TEHMK0BPEKV08KR1C7
  • outputStreamWorkflow no startIndex (reads all chunks)
  • outputStreamWorkflow positive startIndex (skips first chunk)
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions | wrun_01KTTPPEMPN26SM2V3K65MWMVD
  • writableForwardedFromWorkflowWorkflow | wrun_01KTTPPVN3S9PNXQ57K9EFHJ0W
  • writableForwardedFromStepWorkflow | wrun_01KTTPPZTXSN5NFBEG6PB064J4
  • fetchWorkflow | wrun_01KTTPQ3FRB3ZYB2HWX92YEP2M
  • promiseRaceStressTestWorkflow | wrun_01KTTPQ70TMGW2CX2FRNQ99XM8
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • 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
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KTTPTRK0SRFSWGCNZ0V99R8C
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KTTPV634SEH8PJXBP5JJE5PF
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KTTPVQQCKRTPT4PKCJGQ608X
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KTTPW8G5DJHNKPSBRTBKJ289
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KTTPWJ0P8TBRA71R2TMNGDJP
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KTTPWRGA6653NV344QVK9T35
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KTTPWVVQMJYQNE6ZT6G5Z7J1
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KTTPXCGVPR5Y0J412D78PP45
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KTTPXJXM1HBPRJAGK1T67KKW
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KTTPXS12EVCPQHXY5K28WCGM
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KTTPY0KFN6R0HP9TBFV3QK9N
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KTTPY7P1Q889RSFYYDQFX99X
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KTTPYEV39AP8R7Y631E5AAV3
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KTTPYNYPY60V212HDZ0NN5BB
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KTTPZ3FCHWW4KCXH9XBPZJB1
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KTTPZBXTX333P00017G765Z9
  • cancelRun - cancelling a running workflow | wrun_01KTTPZKADQNX007A97AY3HXDK
  • cancelRun via CLI - cancelling a running workflow | wrun_01KTTPZXR3R8C4XG2K7E6M579M
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KTTQ0AD165JXBF5SGYAPMQMA
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KTTQ0WJY29Q45T6WMJW3HMC8
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KTTQ17DB3GF61RDVF4G4RKB7
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KTTQ1F8AEE76T421AXSNDPRH
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KTTQ1HJKT4B8DRHCE3JAP3KZ
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KTTQ1KXV1E33QYV52MA861G2

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro8307
✅ example8307
✅ express8307
✅ fastify8307
✅ hono8307
✅ nextjs-turbopack8802
✅ nextjs-webpack8802
✅ nitro8307
✅ nuxt8307
✅ sveltekit8307
✅ vite8307
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable8406
✅ express-stable8406
✅ fastify-stable8406
✅ hono-stable8406
✅ nextjs-turbopack-canary71019
✅ nextjs-turbopack-stable9000
✅ nextjs-webpack-canary71019
✅ nextjs-webpack-stable9000
✅ nitro-stable8406
✅ nuxt-stable8406
✅ sveltekit-stable8406
✅ vite-stable8406
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack9000
❌ 🌍 Community Worlds
AppPassedFailedSkipped
✅ mongodb-dev302
❌ mongodb57140
✅ redis-dev302
❌ redis61100
✅ turso-dev302
❌ turso3680
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable8406
✅ e2e-local-dev-tanstack-start-stable8406
✅ e2e-local-postgres-nest-stable8406
✅ e2e-local-prod-nest-stable8406
✅ e2e-local-prod-tanstack-start-stable8406

📋 View full workflow run


Some E2E test jobs failed:

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

Check the workflow run for details.

⚠️Community world tests failed (non-blocking):

  • Community Worlds: failure

Check the workflow run for details.

The #2341 backport added wait-until.ts and runtime-import.test.ts but
left static '@vercel/functions' imports in start.ts, step-handler.ts,
suspension-handler.ts, and util.ts, causing the test to fail. Convert
the remaining call sites to the lazy wait-until module, remove the
now-dead waitedUntil from util.ts, and fix Biome formatting in
step-handler.ts.
@TooTallNateTooTallNate changed the title Fix lockfileFix non-faithful backport of #2305 to stableJun 11, 2026
@vercel
vercelBottemporarily deployed to Preview – workflow-docs June 11, 2026 06:38 Inactive

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

Verified end-to-end — this fixes the stable-wide breakage from the #2305 backport. We independently hit all three issues today and had opened #2347 (resume-hook import) and #2349 (the identical lockfile line) before finding this PR; both are closed in favor of this one.

Local verification on this branch: pnpm install --frozen-lockfile --ignore-scripts exits 0; pnpm --filter "@workflow/core..." build green; and notably runtime-import.test.ts (the no-@vercel/functions-at-module-eval invariant) goes red→green vs origin/stable HEAD. CI confirms the install step now succeeds across all jobs; the remaining E2E community/matrix failures fail in test execution, not setup, and can't be baselined against stable HEAD (which can't install at all).

One sequencing note: #2346 (ack-ordering backport) removes the only waitUntil call in suspension-handler.ts, so after both land, the import this PR adds there becomes unused — flagged on #2346 to handle in its rebase.

import { getWorkflowQueueName } from './helpers.js';
import { Run } from './run.js';
import { waitedUntil} from '../util.js';
import { waitedUntil, waitUntil } from './wait-until.js';

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.

Non-blocking observation: switching these call sites from the static @vercel/functions import to the lazy wrapper changes waitUntil registration from synchronous to asynchronous — wait-until.ts does void import('@vercel/functions').then(({waitUntil}) => waitUntil(promise)), so on a cold module the platform learns about the background promise only after the dynamic import resolves. If a handler returns before that microtask+module-load completes, the promise may go unregistered. The module is cached after first use so the window is tiny and this matches what main does — just worth knowing this is a (slightly) weaker guarantee than the static import for the start/step-handler/suspension-handler sites that previously had it.

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.

Agreed, your analysis is correct. wait-until.ts registers the keep-alive via import('@vercel/functions').then(({ waitUntil }) => waitUntil(promise)), so on a cold module the platform only learns about the background promise after the dynamic import resolves — a strictly weaker guarantee than the previous static import at the start/step-handler/suspension-handler sites.

That said, this PR's goal is to make the stable backport faithful to main, and main uses exactly this lazy wrapper, so this is an intentional, pre-existing tradeoff rather than something introduced here. The race window is bounded to the first call per module instance (the dynamic import is cached afterward), and the runtime sites that use it generally await other work after registering, so the response rarely resolves within that microtask. I'd leave it as-is for this PR to keep parity with main; if the cold-start window is a concern, a follow-up could eagerly warm the import (e.g. kick off import('@vercel/functions') at module load) — but that's orthogonal to fixing the backport.

@VaguelySerious
VaguelySerious merged commit 32bebaf into stableJun 11, 2026
91 of 97 checks passed
@VaguelySerious
VaguelySerious deleted the fix/stable-lockfile branch June 11, 2026 07:47
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

@TooTallNate@pranaygp@VaguelySerious