Skip to content

Prevent local tests from hanging - #2338

Merged
pranaygp merged 2 commits into
vercel:mainfrom
xujustinj:local-tests
Jun 11, 2026
Merged

Prevent local tests from hanging#2338
pranaygp merged 2 commits into
vercel:mainfrom
xujustinj:local-tests

Conversation

@xujustinj

@xujustinjxujustinj commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

This commit fixes the ability to manually run pnpm test:

  • use vitest run to stop world-vercel and world-testing when complete
  • disable Nuxt telemetry to prevent interactive telemetry prompt

Background

On a fresh clone of this repo on my own machine, I ran setup with pnpm i. Then I ran pnpm test, and the tests hung on three workers:

  • nuxt
  • world-testing
  • world-vercel

The world-vercel test passed but hung on the following:

 Test Files 9 passed (9)
Tests 131 passed (131)
Start at 16:43:36
Duration 20.31s (transform 23.92s, setup 0ms, import 47.11s, tests 2.21s, environment 1ms)
PASS Waiting for file changes...
press h to show help, press q to quit

Likewise for world-testing.

Meanwhile nuxt hung because of an interactive prompt asking for telemetry:

> @workflow/nuxt@5.0.0-beta.13 build /home/j437xu/projects/vercel/workflow/packages/nuxt
> nuxt-module-build prepare && nuxt-module-build build
ℹ Nuxt collects completely anonymous data about usage. 5:01:40 p.m.
This will help us improve Nuxt developer experience over time.
Read more on https://github.com/nuxt/telemetry
❯ Are you interested in participating?
○ Yes / ● No

I encountered this because I have never configured Nuxt on my machine, and this will occur to anyone else in the same situation. You can reproduce this by deleting the telemetry.enabled line in ~/.nuxtrc.

For various reasons I don't understand these hangs do not occur in CI.

Changes

  • Using vitest run instead of vitest (watch mode) so that world-testing and world-vercel both stop when tests pass
  • Using NUXT_TELEMETRY_DISABLED=1 to prevent telemetry during the build for testing (I'm less sure about this one, maybe it's undesirable)

After these tests pnpm test runs to completion as expected.

@xujustinj
xujustinj requested a review from a team as a code ownerJune 10, 2026 23:48
@changeset-bot

changeset-botBot commented Jun 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7e1db60

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

This PR includes changesets to release 17 packages
NameType
@workflow/world-testingPatch
@workflow/world-vercelPatch
@workflow/cliPatch
@workflow/corePatch
@workflow/webPatch
workflowPatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

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

@vercel

vercelBot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

@xujustinj is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@xujustinj
xujustinjforce-pushed the local-tests branch 2 times, most recently from 96bfcc2 to 83a2a77CompareJune 11, 2026 00:24
This commit allows manually running pnpm test:
- use vitest run to stop world-vercel and world-testing when complete
- disable Nuxt telemetry to prevent interactive telemetry prompt
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>

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

Reviewed and verified locally on this branch: world-vercel (131 tests) and world-testing (10 tests, via pnpm test --filter @workflow/world-testing so turbo builds deps first) both pass and exit cleanly, and the @workflow/nuxt build works with the env var set. The vitest run change matches what every other package in the repo already does (world-testing correctly omits the src filter since its tests live in test/), and there's no CI impact — vitest auto-disables watch mode and Nuxt skips the consent prompt when CI is set, which is why these hangs never showed up in CI. One non-blocking suggestion inline.

Comment threadpackages/nuxt/package.json Outdated
Comment on lines +33 to +34
"build": "NUXT_TELEMETRY_DISABLED=1 nuxt-module-build prepare && NUXT_TELEMETRY_DISABLED=1 nuxt-module-build build",
"dev": "NUXT_TELEMETRY_DISABLED=1 nuxt-module-build build --stub && NUXT_TELEMETRY_DISABLED=1 nuxt-module-build prepare",

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.

Two related notes on the env-var approach (non-blocking):

  1. Inline VAR=1 cmd syntax doesn't work on Windows — pnpm runs scripts through cmd.exe by default (this repo doesn't enable pnpm's shell emulator), so NUXT_TELEMETRY_DISABLED=1 would be treated as a command and the build would fail. Other scripts in this repo use cross-env for exactly this (see packages/core's test script).

  2. An alternative that solves both problems at once: add a repo-root .nuxtrc with telemetry.enabled=false. @nuxt/kit loads .nuxtrc from the workspace root (c12's globalRc option resolves it via findWorkspaceDir, keyed off pnpm-workspace.yaml), so it's cross-platform, keeps these scripts untouched, and would also cover workbench/nuxt's nuxt build/nuxt dev — which hit the same first-run consent prompt in a fresh environment and aren't addressed by this PR.

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.

Addressed in 7e1db60: reverted the inline env vars and added a workspace-root .nuxtrc with telemetry.enabled=false instead. Verified that both packages/nuxt (nuxt-module-build) and workbench/nuxt resolve it from the workspace root (tested with HOME pointed at an empty dir so no user-level ~/.nuxtrc could mask it), and the @workflow/nuxt build completes cleanly. Also dropped @workflow/nuxt from the changeset since that package is no longer modified.

The inline NUXT_TELEMETRY_DISABLED=1 in package.json scripts doesn't work
on Windows (pnpm runs scripts through cmd.exe). A workspace-root .nuxtrc
is cross-platform, and @nuxt/kit resolves it from the pnpm workspace root,
so it also covers workbench/nuxt's build/dev, which hit the same
first-run consent prompt.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@pranaygp
pranaygp merged commit 95d7009 into vercel:mainJun 11, 2026
12 of 30 checks passed
github-actionsBot added a commit that referenced this pull request Jun 11, 2026
* Prevent local tests from hanging
This commit allows manually running pnpm test:
- use vitest run to stop world-vercel and world-testing when complete
- disable Nuxt telemetry to prevent interactive telemetry prompt
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>
* Disable Nuxt telemetry via workspace .nuxtrc instead of inline env vars
The inline NUXT_TELEMETRY_DISABLED=1 in package.json scripts doesn't work
on Windows (pnpm runs scripts through cmd.exe). A workspace-root .nuxtrc
is cross-platform, and @nuxt/kit resolves it from the pnpm workspace root,
so it also covers workbench/nuxt's build/dev, which hit the same
first-run consent prompt.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>
Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2342. (backport job run)

@xujustinj
xujustinj deleted the local-tests branch June 11, 2026 08:06
VaguelySerious pushed a commit that referenced this pull request Jun 11, 2026
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>
Co-authored-by: Justin Xu <xu.justin.j@gmail.com>
@github-actionsgithub-actionsBot mentioned this pull request Jun 11, 2026
pranaygp added a commit that referenced this pull request Jun 11, 2026
…hook-ready
* origin-https/main: (119 commits)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
Patch vulnerable package dependencies (#2301)
Deprecate DurableAgent and update it with WorkflowAgent in v5 docs (#2285)
[codex] Fix partial world-local exclusive writes (#2296)
...
# Conflicts:
#	packages/core/src/runtime.ts
#	packages/core/src/runtime/suspension-handler.ts
pranaygp added a commit that referenced this pull request Jun 11, 2026
…docs-run-idempotency
* origin-https/main: (115 commits)
[core] V2: unify wait+step queue dispatch in suspension processing (#1925)
fix(world-local,world-postgres): make duplicate hook_created idempotent (#2295)
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
...
# Conflicts:
#	docs/content/docs/v4/cookbook/advanced/child-workflows.mdx
#	docs/content/docs/v5/cookbook/advanced/child-workflows.mdx
#	docs/content/docs/v5/cookbook/agent-patterns/durable-agent.mdx
pranaygp added a commit that referenced this pull request Jun 11, 2026
* origin/main:
[core] V2: unify wait+step queue dispatch in suspension processing (#1925)
fix(world-local,world-postgres): make duplicate hook_created idempotent (#2295)
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
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.

2 participants

@xujustinj@pranaygp
, '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" + '
Prevent local tests from hanging by xujustinj · Pull Request #2338 · vercel/workflow · GitHub
Skip to content

Prevent local tests from hanging - #2338

Merged
pranaygp merged 2 commits into
vercel:mainfrom
xujustinj:local-tests
Jun 11, 2026
Merged

Prevent local tests from hanging#2338
pranaygp merged 2 commits into
vercel:mainfrom
xujustinj:local-tests

Conversation

@xujustinj

@xujustinjxujustinj commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

This commit fixes the ability to manually run pnpm test:

  • use vitest run to stop world-vercel and world-testing when complete
  • disable Nuxt telemetry to prevent interactive telemetry prompt

Background

On a fresh clone of this repo on my own machine, I ran setup with pnpm i. Then I ran pnpm test, and the tests hung on three workers:

  • nuxt
  • world-testing
  • world-vercel

The world-vercel test passed but hung on the following:

 Test Files 9 passed (9)
Tests 131 passed (131)
Start at 16:43:36
Duration 20.31s (transform 23.92s, setup 0ms, import 47.11s, tests 2.21s, environment 1ms)
PASS Waiting for file changes...
press h to show help, press q to quit

Likewise for world-testing.

Meanwhile nuxt hung because of an interactive prompt asking for telemetry:

> @workflow/nuxt@5.0.0-beta.13 build /home/j437xu/projects/vercel/workflow/packages/nuxt
> nuxt-module-build prepare && nuxt-module-build build
ℹ Nuxt collects completely anonymous data about usage. 5:01:40 p.m.
This will help us improve Nuxt developer experience over time.
Read more on https://github.com/nuxt/telemetry
❯ Are you interested in participating?
○ Yes / ● No

I encountered this because I have never configured Nuxt on my machine, and this will occur to anyone else in the same situation. You can reproduce this by deleting the telemetry.enabled line in ~/.nuxtrc.

For various reasons I don't understand these hangs do not occur in CI.

Changes

  • Using vitest run instead of vitest (watch mode) so that world-testing and world-vercel both stop when tests pass
  • Using NUXT_TELEMETRY_DISABLED=1 to prevent telemetry during the build for testing (I'm less sure about this one, maybe it's undesirable)

After these tests pnpm test runs to completion as expected.

@xujustinj
xujustinj requested a review from a team as a code ownerJune 10, 2026 23:48
@changeset-bot

changeset-botBot commented Jun 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7e1db60

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

This PR includes changesets to release 17 packages
NameType
@workflow/world-testingPatch
@workflow/world-vercelPatch
@workflow/cliPatch
@workflow/corePatch
@workflow/webPatch
workflowPatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

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

@vercel

vercelBot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

@xujustinj is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@xujustinj
xujustinjforce-pushed the local-tests branch 2 times, most recently from 96bfcc2 to 83a2a77CompareJune 11, 2026 00:24
This commit allows manually running pnpm test:
- use vitest run to stop world-vercel and world-testing when complete
- disable Nuxt telemetry to prevent interactive telemetry prompt
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>

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

Reviewed and verified locally on this branch: world-vercel (131 tests) and world-testing (10 tests, via pnpm test --filter @workflow/world-testing so turbo builds deps first) both pass and exit cleanly, and the @workflow/nuxt build works with the env var set. The vitest run change matches what every other package in the repo already does (world-testing correctly omits the src filter since its tests live in test/), and there's no CI impact — vitest auto-disables watch mode and Nuxt skips the consent prompt when CI is set, which is why these hangs never showed up in CI. One non-blocking suggestion inline.

Comment threadpackages/nuxt/package.json Outdated
Comment on lines +33 to +34
"build": "NUXT_TELEMETRY_DISABLED=1 nuxt-module-build prepare && NUXT_TELEMETRY_DISABLED=1 nuxt-module-build build",
"dev": "NUXT_TELEMETRY_DISABLED=1 nuxt-module-build build --stub && NUXT_TELEMETRY_DISABLED=1 nuxt-module-build prepare",

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.

Two related notes on the env-var approach (non-blocking):

  1. Inline VAR=1 cmd syntax doesn't work on Windows — pnpm runs scripts through cmd.exe by default (this repo doesn't enable pnpm's shell emulator), so NUXT_TELEMETRY_DISABLED=1 would be treated as a command and the build would fail. Other scripts in this repo use cross-env for exactly this (see packages/core's test script).

  2. An alternative that solves both problems at once: add a repo-root .nuxtrc with telemetry.enabled=false. @nuxt/kit loads .nuxtrc from the workspace root (c12's globalRc option resolves it via findWorkspaceDir, keyed off pnpm-workspace.yaml), so it's cross-platform, keeps these scripts untouched, and would also cover workbench/nuxt's nuxt build/nuxt dev — which hit the same first-run consent prompt in a fresh environment and aren't addressed by this PR.

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.

Addressed in 7e1db60: reverted the inline env vars and added a workspace-root .nuxtrc with telemetry.enabled=false instead. Verified that both packages/nuxt (nuxt-module-build) and workbench/nuxt resolve it from the workspace root (tested with HOME pointed at an empty dir so no user-level ~/.nuxtrc could mask it), and the @workflow/nuxt build completes cleanly. Also dropped @workflow/nuxt from the changeset since that package is no longer modified.

The inline NUXT_TELEMETRY_DISABLED=1 in package.json scripts doesn't work
on Windows (pnpm runs scripts through cmd.exe). A workspace-root .nuxtrc
is cross-platform, and @nuxt/kit resolves it from the pnpm workspace root,
so it also covers workbench/nuxt's build/dev, which hit the same
first-run consent prompt.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@pranaygp
pranaygp merged commit 95d7009 into vercel:mainJun 11, 2026
12 of 30 checks passed
github-actionsBot added a commit that referenced this pull request Jun 11, 2026
* Prevent local tests from hanging
This commit allows manually running pnpm test:
- use vitest run to stop world-vercel and world-testing when complete
- disable Nuxt telemetry to prevent interactive telemetry prompt
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>
* Disable Nuxt telemetry via workspace .nuxtrc instead of inline env vars
The inline NUXT_TELEMETRY_DISABLED=1 in package.json scripts doesn't work
on Windows (pnpm runs scripts through cmd.exe). A workspace-root .nuxtrc
is cross-platform, and @nuxt/kit resolves it from the pnpm workspace root,
so it also covers workbench/nuxt's build/dev, which hit the same
first-run consent prompt.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>
Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2342. (backport job run)

@xujustinj
xujustinj deleted the local-tests branch June 11, 2026 08:06
VaguelySerious pushed a commit that referenced this pull request Jun 11, 2026
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>
Co-authored-by: Justin Xu <xu.justin.j@gmail.com>
@github-actionsgithub-actionsBot mentioned this pull request Jun 11, 2026
pranaygp added a commit that referenced this pull request Jun 11, 2026
…hook-ready
* origin-https/main: (119 commits)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
Patch vulnerable package dependencies (#2301)
Deprecate DurableAgent and update it with WorkflowAgent in v5 docs (#2285)
[codex] Fix partial world-local exclusive writes (#2296)
...
# Conflicts:
#	packages/core/src/runtime.ts
#	packages/core/src/runtime/suspension-handler.ts
pranaygp added a commit that referenced this pull request Jun 11, 2026
…docs-run-idempotency
* origin-https/main: (115 commits)
[core] V2: unify wait+step queue dispatch in suspension processing (#1925)
fix(world-local,world-postgres): make duplicate hook_created idempotent (#2295)
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
...
# Conflicts:
#	docs/content/docs/v4/cookbook/advanced/child-workflows.mdx
#	docs/content/docs/v5/cookbook/advanced/child-workflows.mdx
#	docs/content/docs/v5/cookbook/agent-patterns/durable-agent.mdx
pranaygp added a commit that referenced this pull request Jun 11, 2026
* origin/main:
[core] V2: unify wait+step queue dispatch in suspension processing (#1925)
fix(world-local,world-postgres): make duplicate hook_created idempotent (#2295)
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
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.

2 participants

@xujustinj@pranaygp
, '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('^' + ".*" + ' Prevent local tests from hanging by xujustinj · Pull Request #2338 · vercel/workflow · GitHub
Skip to content

Prevent local tests from hanging - #2338

Merged
pranaygp merged 2 commits into
vercel:mainfrom
xujustinj:local-tests
Jun 11, 2026
Merged

Prevent local tests from hanging#2338
pranaygp merged 2 commits into
vercel:mainfrom
xujustinj:local-tests

Conversation

@xujustinj

@xujustinjxujustinj commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

This commit fixes the ability to manually run pnpm test:

  • use vitest run to stop world-vercel and world-testing when complete
  • disable Nuxt telemetry to prevent interactive telemetry prompt

Background

On a fresh clone of this repo on my own machine, I ran setup with pnpm i. Then I ran pnpm test, and the tests hung on three workers:

  • nuxt
  • world-testing
  • world-vercel

The world-vercel test passed but hung on the following:

 Test Files 9 passed (9)
Tests 131 passed (131)
Start at 16:43:36
Duration 20.31s (transform 23.92s, setup 0ms, import 47.11s, tests 2.21s, environment 1ms)
PASS Waiting for file changes...
press h to show help, press q to quit

Likewise for world-testing.

Meanwhile nuxt hung because of an interactive prompt asking for telemetry:

> @workflow/nuxt@5.0.0-beta.13 build /home/j437xu/projects/vercel/workflow/packages/nuxt
> nuxt-module-build prepare && nuxt-module-build build
ℹ Nuxt collects completely anonymous data about usage. 5:01:40 p.m.
This will help us improve Nuxt developer experience over time.
Read more on https://github.com/nuxt/telemetry
❯ Are you interested in participating?
○ Yes / ● No

I encountered this because I have never configured Nuxt on my machine, and this will occur to anyone else in the same situation. You can reproduce this by deleting the telemetry.enabled line in ~/.nuxtrc.

For various reasons I don't understand these hangs do not occur in CI.

Changes

  • Using vitest run instead of vitest (watch mode) so that world-testing and world-vercel both stop when tests pass
  • Using NUXT_TELEMETRY_DISABLED=1 to prevent telemetry during the build for testing (I'm less sure about this one, maybe it's undesirable)

After these tests pnpm test runs to completion as expected.

@xujustinj
xujustinj requested a review from a team as a code ownerJune 10, 2026 23:48
@changeset-bot

changeset-botBot commented Jun 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7e1db60

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

This PR includes changesets to release 17 packages
NameType
@workflow/world-testingPatch
@workflow/world-vercelPatch
@workflow/cliPatch
@workflow/corePatch
@workflow/webPatch
workflowPatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

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

@vercel

vercelBot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

@xujustinj is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@xujustinj
xujustinjforce-pushed the local-tests branch 2 times, most recently from 96bfcc2 to 83a2a77CompareJune 11, 2026 00:24
This commit allows manually running pnpm test:
- use vitest run to stop world-vercel and world-testing when complete
- disable Nuxt telemetry to prevent interactive telemetry prompt
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>

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

Reviewed and verified locally on this branch: world-vercel (131 tests) and world-testing (10 tests, via pnpm test --filter @workflow/world-testing so turbo builds deps first) both pass and exit cleanly, and the @workflow/nuxt build works with the env var set. The vitest run change matches what every other package in the repo already does (world-testing correctly omits the src filter since its tests live in test/), and there's no CI impact — vitest auto-disables watch mode and Nuxt skips the consent prompt when CI is set, which is why these hangs never showed up in CI. One non-blocking suggestion inline.

Comment threadpackages/nuxt/package.json Outdated
Comment on lines +33 to +34
"build": "NUXT_TELEMETRY_DISABLED=1 nuxt-module-build prepare && NUXT_TELEMETRY_DISABLED=1 nuxt-module-build build",
"dev": "NUXT_TELEMETRY_DISABLED=1 nuxt-module-build build --stub && NUXT_TELEMETRY_DISABLED=1 nuxt-module-build prepare",

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.

Two related notes on the env-var approach (non-blocking):

  1. Inline VAR=1 cmd syntax doesn't work on Windows — pnpm runs scripts through cmd.exe by default (this repo doesn't enable pnpm's shell emulator), so NUXT_TELEMETRY_DISABLED=1 would be treated as a command and the build would fail. Other scripts in this repo use cross-env for exactly this (see packages/core's test script).

  2. An alternative that solves both problems at once: add a repo-root .nuxtrc with telemetry.enabled=false. @nuxt/kit loads .nuxtrc from the workspace root (c12's globalRc option resolves it via findWorkspaceDir, keyed off pnpm-workspace.yaml), so it's cross-platform, keeps these scripts untouched, and would also cover workbench/nuxt's nuxt build/nuxt dev — which hit the same first-run consent prompt in a fresh environment and aren't addressed by this PR.

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.

Addressed in 7e1db60: reverted the inline env vars and added a workspace-root .nuxtrc with telemetry.enabled=false instead. Verified that both packages/nuxt (nuxt-module-build) and workbench/nuxt resolve it from the workspace root (tested with HOME pointed at an empty dir so no user-level ~/.nuxtrc could mask it), and the @workflow/nuxt build completes cleanly. Also dropped @workflow/nuxt from the changeset since that package is no longer modified.

The inline NUXT_TELEMETRY_DISABLED=1 in package.json scripts doesn't work
on Windows (pnpm runs scripts through cmd.exe). A workspace-root .nuxtrc
is cross-platform, and @nuxt/kit resolves it from the pnpm workspace root,
so it also covers workbench/nuxt's build/dev, which hit the same
first-run consent prompt.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@pranaygp
pranaygp merged commit 95d7009 into vercel:mainJun 11, 2026
12 of 30 checks passed
github-actionsBot added a commit that referenced this pull request Jun 11, 2026
* Prevent local tests from hanging
This commit allows manually running pnpm test:
- use vitest run to stop world-vercel and world-testing when complete
- disable Nuxt telemetry to prevent interactive telemetry prompt
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>
* Disable Nuxt telemetry via workspace .nuxtrc instead of inline env vars
The inline NUXT_TELEMETRY_DISABLED=1 in package.json scripts doesn't work
on Windows (pnpm runs scripts through cmd.exe). A workspace-root .nuxtrc
is cross-platform, and @nuxt/kit resolves it from the pnpm workspace root,
so it also covers workbench/nuxt's build/dev, which hit the same
first-run consent prompt.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>
Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2342. (backport job run)

@xujustinj
xujustinj deleted the local-tests branch June 11, 2026 08:06
VaguelySerious pushed a commit that referenced this pull request Jun 11, 2026
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>
Co-authored-by: Justin Xu <xu.justin.j@gmail.com>
@github-actionsgithub-actionsBot mentioned this pull request Jun 11, 2026
pranaygp added a commit that referenced this pull request Jun 11, 2026
…hook-ready
* origin-https/main: (119 commits)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
Patch vulnerable package dependencies (#2301)
Deprecate DurableAgent and update it with WorkflowAgent in v5 docs (#2285)
[codex] Fix partial world-local exclusive writes (#2296)
...
# Conflicts:
#	packages/core/src/runtime.ts
#	packages/core/src/runtime/suspension-handler.ts
pranaygp added a commit that referenced this pull request Jun 11, 2026
…docs-run-idempotency
* origin-https/main: (115 commits)
[core] V2: unify wait+step queue dispatch in suspension processing (#1925)
fix(world-local,world-postgres): make duplicate hook_created idempotent (#2295)
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
...
# Conflicts:
#	docs/content/docs/v4/cookbook/advanced/child-workflows.mdx
#	docs/content/docs/v5/cookbook/advanced/child-workflows.mdx
#	docs/content/docs/v5/cookbook/agent-patterns/durable-agent.mdx
pranaygp added a commit that referenced this pull request Jun 11, 2026
* origin/main:
[core] V2: unify wait+step queue dispatch in suspension processing (#1925)
fix(world-local,world-postgres): make duplicate hook_created idempotent (#2295)
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
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.

2 participants

@xujustinj@pranaygp
, '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('^' + ".*" + ' Prevent local tests from hanging by xujustinj · Pull Request #2338 · vercel/workflow · GitHub
Skip to content

Prevent local tests from hanging - #2338

Merged
pranaygp merged 2 commits into
vercel:mainfrom
xujustinj:local-tests
Jun 11, 2026
Merged

Prevent local tests from hanging#2338
pranaygp merged 2 commits into
vercel:mainfrom
xujustinj:local-tests

Conversation

@xujustinj

@xujustinjxujustinj commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

This commit fixes the ability to manually run pnpm test:

  • use vitest run to stop world-vercel and world-testing when complete
  • disable Nuxt telemetry to prevent interactive telemetry prompt

Background

On a fresh clone of this repo on my own machine, I ran setup with pnpm i. Then I ran pnpm test, and the tests hung on three workers:

  • nuxt
  • world-testing
  • world-vercel

The world-vercel test passed but hung on the following:

 Test Files 9 passed (9)
Tests 131 passed (131)
Start at 16:43:36
Duration 20.31s (transform 23.92s, setup 0ms, import 47.11s, tests 2.21s, environment 1ms)
PASS Waiting for file changes...
press h to show help, press q to quit

Likewise for world-testing.

Meanwhile nuxt hung because of an interactive prompt asking for telemetry:

> @workflow/nuxt@5.0.0-beta.13 build /home/j437xu/projects/vercel/workflow/packages/nuxt
> nuxt-module-build prepare && nuxt-module-build build
ℹ Nuxt collects completely anonymous data about usage. 5:01:40 p.m.
This will help us improve Nuxt developer experience over time.
Read more on https://github.com/nuxt/telemetry
❯ Are you interested in participating?
○ Yes / ● No

I encountered this because I have never configured Nuxt on my machine, and this will occur to anyone else in the same situation. You can reproduce this by deleting the telemetry.enabled line in ~/.nuxtrc.

For various reasons I don't understand these hangs do not occur in CI.

Changes

  • Using vitest run instead of vitest (watch mode) so that world-testing and world-vercel both stop when tests pass
  • Using NUXT_TELEMETRY_DISABLED=1 to prevent telemetry during the build for testing (I'm less sure about this one, maybe it's undesirable)

After these tests pnpm test runs to completion as expected.

@xujustinj
xujustinj requested a review from a team as a code ownerJune 10, 2026 23:48
@changeset-bot

changeset-botBot commented Jun 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7e1db60

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

This PR includes changesets to release 17 packages
NameType
@workflow/world-testingPatch
@workflow/world-vercelPatch
@workflow/cliPatch
@workflow/corePatch
@workflow/webPatch
workflowPatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

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

@vercel

vercelBot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

@xujustinj is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@xujustinj
xujustinjforce-pushed the local-tests branch 2 times, most recently from 96bfcc2 to 83a2a77CompareJune 11, 2026 00:24
This commit allows manually running pnpm test:
- use vitest run to stop world-vercel and world-testing when complete
- disable Nuxt telemetry to prevent interactive telemetry prompt
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>

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

Reviewed and verified locally on this branch: world-vercel (131 tests) and world-testing (10 tests, via pnpm test --filter @workflow/world-testing so turbo builds deps first) both pass and exit cleanly, and the @workflow/nuxt build works with the env var set. The vitest run change matches what every other package in the repo already does (world-testing correctly omits the src filter since its tests live in test/), and there's no CI impact — vitest auto-disables watch mode and Nuxt skips the consent prompt when CI is set, which is why these hangs never showed up in CI. One non-blocking suggestion inline.

Comment threadpackages/nuxt/package.json Outdated
Comment on lines +33 to +34
"build": "NUXT_TELEMETRY_DISABLED=1 nuxt-module-build prepare && NUXT_TELEMETRY_DISABLED=1 nuxt-module-build build",
"dev": "NUXT_TELEMETRY_DISABLED=1 nuxt-module-build build --stub && NUXT_TELEMETRY_DISABLED=1 nuxt-module-build prepare",

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.

Two related notes on the env-var approach (non-blocking):

  1. Inline VAR=1 cmd syntax doesn't work on Windows — pnpm runs scripts through cmd.exe by default (this repo doesn't enable pnpm's shell emulator), so NUXT_TELEMETRY_DISABLED=1 would be treated as a command and the build would fail. Other scripts in this repo use cross-env for exactly this (see packages/core's test script).

  2. An alternative that solves both problems at once: add a repo-root .nuxtrc with telemetry.enabled=false. @nuxt/kit loads .nuxtrc from the workspace root (c12's globalRc option resolves it via findWorkspaceDir, keyed off pnpm-workspace.yaml), so it's cross-platform, keeps these scripts untouched, and would also cover workbench/nuxt's nuxt build/nuxt dev — which hit the same first-run consent prompt in a fresh environment and aren't addressed by this PR.

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.

Addressed in 7e1db60: reverted the inline env vars and added a workspace-root .nuxtrc with telemetry.enabled=false instead. Verified that both packages/nuxt (nuxt-module-build) and workbench/nuxt resolve it from the workspace root (tested with HOME pointed at an empty dir so no user-level ~/.nuxtrc could mask it), and the @workflow/nuxt build completes cleanly. Also dropped @workflow/nuxt from the changeset since that package is no longer modified.

The inline NUXT_TELEMETRY_DISABLED=1 in package.json scripts doesn't work
on Windows (pnpm runs scripts through cmd.exe). A workspace-root .nuxtrc
is cross-platform, and @nuxt/kit resolves it from the pnpm workspace root,
so it also covers workbench/nuxt's build/dev, which hit the same
first-run consent prompt.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@pranaygp
pranaygp merged commit 95d7009 into vercel:mainJun 11, 2026
12 of 30 checks passed
github-actionsBot added a commit that referenced this pull request Jun 11, 2026
* Prevent local tests from hanging
This commit allows manually running pnpm test:
- use vitest run to stop world-vercel and world-testing when complete
- disable Nuxt telemetry to prevent interactive telemetry prompt
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>
* Disable Nuxt telemetry via workspace .nuxtrc instead of inline env vars
The inline NUXT_TELEMETRY_DISABLED=1 in package.json scripts doesn't work
on Windows (pnpm runs scripts through cmd.exe). A workspace-root .nuxtrc
is cross-platform, and @nuxt/kit resolves it from the pnpm workspace root,
so it also covers workbench/nuxt's build/dev, which hit the same
first-run consent prompt.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>
Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2342. (backport job run)

@xujustinj
xujustinj deleted the local-tests branch June 11, 2026 08:06
VaguelySerious pushed a commit that referenced this pull request Jun 11, 2026
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>
Co-authored-by: Justin Xu <xu.justin.j@gmail.com>
@github-actionsgithub-actionsBot mentioned this pull request Jun 11, 2026
pranaygp added a commit that referenced this pull request Jun 11, 2026
…hook-ready
* origin-https/main: (119 commits)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
Patch vulnerable package dependencies (#2301)
Deprecate DurableAgent and update it with WorkflowAgent in v5 docs (#2285)
[codex] Fix partial world-local exclusive writes (#2296)
...
# Conflicts:
#	packages/core/src/runtime.ts
#	packages/core/src/runtime/suspension-handler.ts
pranaygp added a commit that referenced this pull request Jun 11, 2026
…docs-run-idempotency
* origin-https/main: (115 commits)
[core] V2: unify wait+step queue dispatch in suspension processing (#1925)
fix(world-local,world-postgres): make duplicate hook_created idempotent (#2295)
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
...
# Conflicts:
#	docs/content/docs/v4/cookbook/advanced/child-workflows.mdx
#	docs/content/docs/v5/cookbook/advanced/child-workflows.mdx
#	docs/content/docs/v5/cookbook/agent-patterns/durable-agent.mdx
pranaygp added a commit that referenced this pull request Jun 11, 2026
* origin/main:
[core] V2: unify wait+step queue dispatch in suspension processing (#1925)
fix(world-local,world-postgres): make duplicate hook_created idempotent (#2295)
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
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.

2 participants

@xujustinj@pranaygp
, '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" + ' Prevent local tests from hanging by xujustinj · Pull Request #2338 · vercel/workflow · GitHub
Skip to content

Prevent local tests from hanging - #2338

Merged
pranaygp merged 2 commits into
vercel:mainfrom
xujustinj:local-tests
Jun 11, 2026
Merged

Prevent local tests from hanging#2338
pranaygp merged 2 commits into
vercel:mainfrom
xujustinj:local-tests

Conversation

@xujustinj

@xujustinjxujustinj commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

This commit fixes the ability to manually run pnpm test:

  • use vitest run to stop world-vercel and world-testing when complete
  • disable Nuxt telemetry to prevent interactive telemetry prompt

Background

On a fresh clone of this repo on my own machine, I ran setup with pnpm i. Then I ran pnpm test, and the tests hung on three workers:

  • nuxt
  • world-testing
  • world-vercel

The world-vercel test passed but hung on the following:

 Test Files 9 passed (9)
Tests 131 passed (131)
Start at 16:43:36
Duration 20.31s (transform 23.92s, setup 0ms, import 47.11s, tests 2.21s, environment 1ms)
PASS Waiting for file changes...
press h to show help, press q to quit

Likewise for world-testing.

Meanwhile nuxt hung because of an interactive prompt asking for telemetry:

> @workflow/nuxt@5.0.0-beta.13 build /home/j437xu/projects/vercel/workflow/packages/nuxt
> nuxt-module-build prepare && nuxt-module-build build
ℹ Nuxt collects completely anonymous data about usage. 5:01:40 p.m.
This will help us improve Nuxt developer experience over time.
Read more on https://github.com/nuxt/telemetry
❯ Are you interested in participating?
○ Yes / ● No

I encountered this because I have never configured Nuxt on my machine, and this will occur to anyone else in the same situation. You can reproduce this by deleting the telemetry.enabled line in ~/.nuxtrc.

For various reasons I don't understand these hangs do not occur in CI.

Changes

  • Using vitest run instead of vitest (watch mode) so that world-testing and world-vercel both stop when tests pass
  • Using NUXT_TELEMETRY_DISABLED=1 to prevent telemetry during the build for testing (I'm less sure about this one, maybe it's undesirable)

After these tests pnpm test runs to completion as expected.

@xujustinj
xujustinj requested a review from a team as a code ownerJune 10, 2026 23:48
@changeset-bot

changeset-botBot commented Jun 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7e1db60

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

This PR includes changesets to release 17 packages
NameType
@workflow/world-testingPatch
@workflow/world-vercelPatch
@workflow/cliPatch
@workflow/corePatch
@workflow/webPatch
workflowPatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

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

@vercel

vercelBot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

@xujustinj is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@xujustinj
xujustinjforce-pushed the local-tests branch 2 times, most recently from 96bfcc2 to 83a2a77CompareJune 11, 2026 00:24
This commit allows manually running pnpm test:
- use vitest run to stop world-vercel and world-testing when complete
- disable Nuxt telemetry to prevent interactive telemetry prompt
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>

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

Reviewed and verified locally on this branch: world-vercel (131 tests) and world-testing (10 tests, via pnpm test --filter @workflow/world-testing so turbo builds deps first) both pass and exit cleanly, and the @workflow/nuxt build works with the env var set. The vitest run change matches what every other package in the repo already does (world-testing correctly omits the src filter since its tests live in test/), and there's no CI impact — vitest auto-disables watch mode and Nuxt skips the consent prompt when CI is set, which is why these hangs never showed up in CI. One non-blocking suggestion inline.

Comment threadpackages/nuxt/package.json Outdated
Comment on lines +33 to +34
"build": "NUXT_TELEMETRY_DISABLED=1 nuxt-module-build prepare && NUXT_TELEMETRY_DISABLED=1 nuxt-module-build build",
"dev": "NUXT_TELEMETRY_DISABLED=1 nuxt-module-build build --stub && NUXT_TELEMETRY_DISABLED=1 nuxt-module-build prepare",

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.

Two related notes on the env-var approach (non-blocking):

  1. Inline VAR=1 cmd syntax doesn't work on Windows — pnpm runs scripts through cmd.exe by default (this repo doesn't enable pnpm's shell emulator), so NUXT_TELEMETRY_DISABLED=1 would be treated as a command and the build would fail. Other scripts in this repo use cross-env for exactly this (see packages/core's test script).

  2. An alternative that solves both problems at once: add a repo-root .nuxtrc with telemetry.enabled=false. @nuxt/kit loads .nuxtrc from the workspace root (c12's globalRc option resolves it via findWorkspaceDir, keyed off pnpm-workspace.yaml), so it's cross-platform, keeps these scripts untouched, and would also cover workbench/nuxt's nuxt build/nuxt dev — which hit the same first-run consent prompt in a fresh environment and aren't addressed by this PR.

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.

Addressed in 7e1db60: reverted the inline env vars and added a workspace-root .nuxtrc with telemetry.enabled=false instead. Verified that both packages/nuxt (nuxt-module-build) and workbench/nuxt resolve it from the workspace root (tested with HOME pointed at an empty dir so no user-level ~/.nuxtrc could mask it), and the @workflow/nuxt build completes cleanly. Also dropped @workflow/nuxt from the changeset since that package is no longer modified.

The inline NUXT_TELEMETRY_DISABLED=1 in package.json scripts doesn't work
on Windows (pnpm runs scripts through cmd.exe). A workspace-root .nuxtrc
is cross-platform, and @nuxt/kit resolves it from the pnpm workspace root,
so it also covers workbench/nuxt's build/dev, which hit the same
first-run consent prompt.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@pranaygp
pranaygp merged commit 95d7009 into vercel:mainJun 11, 2026
12 of 30 checks passed
github-actionsBot added a commit that referenced this pull request Jun 11, 2026
* Prevent local tests from hanging
This commit allows manually running pnpm test:
- use vitest run to stop world-vercel and world-testing when complete
- disable Nuxt telemetry to prevent interactive telemetry prompt
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>
* Disable Nuxt telemetry via workspace .nuxtrc instead of inline env vars
The inline NUXT_TELEMETRY_DISABLED=1 in package.json scripts doesn't work
on Windows (pnpm runs scripts through cmd.exe). A workspace-root .nuxtrc
is cross-platform, and @nuxt/kit resolves it from the pnpm workspace root,
so it also covers workbench/nuxt's build/dev, which hit the same
first-run consent prompt.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>
Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2342. (backport job run)

@xujustinj
xujustinj deleted the local-tests branch June 11, 2026 08:06
VaguelySerious pushed a commit that referenced this pull request Jun 11, 2026
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>
Co-authored-by: Justin Xu <xu.justin.j@gmail.com>
@github-actionsgithub-actionsBot mentioned this pull request Jun 11, 2026
pranaygp added a commit that referenced this pull request Jun 11, 2026
…hook-ready
* origin-https/main: (119 commits)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
Patch vulnerable package dependencies (#2301)
Deprecate DurableAgent and update it with WorkflowAgent in v5 docs (#2285)
[codex] Fix partial world-local exclusive writes (#2296)
...
# Conflicts:
#	packages/core/src/runtime.ts
#	packages/core/src/runtime/suspension-handler.ts
pranaygp added a commit that referenced this pull request Jun 11, 2026
…docs-run-idempotency
* origin-https/main: (115 commits)
[core] V2: unify wait+step queue dispatch in suspension processing (#1925)
fix(world-local,world-postgres): make duplicate hook_created idempotent (#2295)
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
...
# Conflicts:
#	docs/content/docs/v4/cookbook/advanced/child-workflows.mdx
#	docs/content/docs/v5/cookbook/advanced/child-workflows.mdx
#	docs/content/docs/v5/cookbook/agent-patterns/durable-agent.mdx
pranaygp added a commit that referenced this pull request Jun 11, 2026
* origin/main:
[core] V2: unify wait+step queue dispatch in suspension processing (#1925)
fix(world-local,world-postgres): make duplicate hook_created idempotent (#2295)
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
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.

2 participants

@xujustinj@pranaygp
, '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('^' + ".*" + ' Prevent local tests from hanging by xujustinj · Pull Request #2338 · vercel/workflow · GitHub
Skip to content

Prevent local tests from hanging - #2338

Merged
pranaygp merged 2 commits into
vercel:mainfrom
xujustinj:local-tests
Jun 11, 2026
Merged

Prevent local tests from hanging#2338
pranaygp merged 2 commits into
vercel:mainfrom
xujustinj:local-tests

Conversation

@xujustinj

@xujustinjxujustinj commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

This commit fixes the ability to manually run pnpm test:

  • use vitest run to stop world-vercel and world-testing when complete
  • disable Nuxt telemetry to prevent interactive telemetry prompt

Background

On a fresh clone of this repo on my own machine, I ran setup with pnpm i. Then I ran pnpm test, and the tests hung on three workers:

  • nuxt
  • world-testing
  • world-vercel

The world-vercel test passed but hung on the following:

 Test Files 9 passed (9)
Tests 131 passed (131)
Start at 16:43:36
Duration 20.31s (transform 23.92s, setup 0ms, import 47.11s, tests 2.21s, environment 1ms)
PASS Waiting for file changes...
press h to show help, press q to quit

Likewise for world-testing.

Meanwhile nuxt hung because of an interactive prompt asking for telemetry:

> @workflow/nuxt@5.0.0-beta.13 build /home/j437xu/projects/vercel/workflow/packages/nuxt
> nuxt-module-build prepare && nuxt-module-build build
ℹ Nuxt collects completely anonymous data about usage. 5:01:40 p.m.
This will help us improve Nuxt developer experience over time.
Read more on https://github.com/nuxt/telemetry
❯ Are you interested in participating?
○ Yes / ● No

I encountered this because I have never configured Nuxt on my machine, and this will occur to anyone else in the same situation. You can reproduce this by deleting the telemetry.enabled line in ~/.nuxtrc.

For various reasons I don't understand these hangs do not occur in CI.

Changes

  • Using vitest run instead of vitest (watch mode) so that world-testing and world-vercel both stop when tests pass
  • Using NUXT_TELEMETRY_DISABLED=1 to prevent telemetry during the build for testing (I'm less sure about this one, maybe it's undesirable)

After these tests pnpm test runs to completion as expected.

@xujustinj
xujustinj requested a review from a team as a code ownerJune 10, 2026 23:48
@changeset-bot

changeset-botBot commented Jun 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7e1db60

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

This PR includes changesets to release 17 packages
NameType
@workflow/world-testingPatch
@workflow/world-vercelPatch
@workflow/cliPatch
@workflow/corePatch
@workflow/webPatch
workflowPatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

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

@vercel

vercelBot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

@xujustinj is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@xujustinj
xujustinjforce-pushed the local-tests branch 2 times, most recently from 96bfcc2 to 83a2a77CompareJune 11, 2026 00:24
This commit allows manually running pnpm test:
- use vitest run to stop world-vercel and world-testing when complete
- disable Nuxt telemetry to prevent interactive telemetry prompt
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>

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

Reviewed and verified locally on this branch: world-vercel (131 tests) and world-testing (10 tests, via pnpm test --filter @workflow/world-testing so turbo builds deps first) both pass and exit cleanly, and the @workflow/nuxt build works with the env var set. The vitest run change matches what every other package in the repo already does (world-testing correctly omits the src filter since its tests live in test/), and there's no CI impact — vitest auto-disables watch mode and Nuxt skips the consent prompt when CI is set, which is why these hangs never showed up in CI. One non-blocking suggestion inline.

Comment threadpackages/nuxt/package.json Outdated
Comment on lines +33 to +34
"build": "NUXT_TELEMETRY_DISABLED=1 nuxt-module-build prepare && NUXT_TELEMETRY_DISABLED=1 nuxt-module-build build",
"dev": "NUXT_TELEMETRY_DISABLED=1 nuxt-module-build build --stub && NUXT_TELEMETRY_DISABLED=1 nuxt-module-build prepare",

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.

Two related notes on the env-var approach (non-blocking):

  1. Inline VAR=1 cmd syntax doesn't work on Windows — pnpm runs scripts through cmd.exe by default (this repo doesn't enable pnpm's shell emulator), so NUXT_TELEMETRY_DISABLED=1 would be treated as a command and the build would fail. Other scripts in this repo use cross-env for exactly this (see packages/core's test script).

  2. An alternative that solves both problems at once: add a repo-root .nuxtrc with telemetry.enabled=false. @nuxt/kit loads .nuxtrc from the workspace root (c12's globalRc option resolves it via findWorkspaceDir, keyed off pnpm-workspace.yaml), so it's cross-platform, keeps these scripts untouched, and would also cover workbench/nuxt's nuxt build/nuxt dev — which hit the same first-run consent prompt in a fresh environment and aren't addressed by this PR.

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.

Addressed in 7e1db60: reverted the inline env vars and added a workspace-root .nuxtrc with telemetry.enabled=false instead. Verified that both packages/nuxt (nuxt-module-build) and workbench/nuxt resolve it from the workspace root (tested with HOME pointed at an empty dir so no user-level ~/.nuxtrc could mask it), and the @workflow/nuxt build completes cleanly. Also dropped @workflow/nuxt from the changeset since that package is no longer modified.

The inline NUXT_TELEMETRY_DISABLED=1 in package.json scripts doesn't work
on Windows (pnpm runs scripts through cmd.exe). A workspace-root .nuxtrc
is cross-platform, and @nuxt/kit resolves it from the pnpm workspace root,
so it also covers workbench/nuxt's build/dev, which hit the same
first-run consent prompt.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@pranaygp
pranaygp merged commit 95d7009 into vercel:mainJun 11, 2026
12 of 30 checks passed
github-actionsBot added a commit that referenced this pull request Jun 11, 2026
* Prevent local tests from hanging
This commit allows manually running pnpm test:
- use vitest run to stop world-vercel and world-testing when complete
- disable Nuxt telemetry to prevent interactive telemetry prompt
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>
* Disable Nuxt telemetry via workspace .nuxtrc instead of inline env vars
The inline NUXT_TELEMETRY_DISABLED=1 in package.json scripts doesn't work
on Windows (pnpm runs scripts through cmd.exe). A workspace-root .nuxtrc
is cross-platform, and @nuxt/kit resolves it from the pnpm workspace root,
so it also covers workbench/nuxt's build/dev, which hit the same
first-run consent prompt.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>
Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2342. (backport job run)

@xujustinj
xujustinj deleted the local-tests branch June 11, 2026 08:06
VaguelySerious pushed a commit that referenced this pull request Jun 11, 2026
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>
Co-authored-by: Justin Xu <xu.justin.j@gmail.com>
@github-actionsgithub-actionsBot mentioned this pull request Jun 11, 2026
pranaygp added a commit that referenced this pull request Jun 11, 2026
…hook-ready
* origin-https/main: (119 commits)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
Patch vulnerable package dependencies (#2301)
Deprecate DurableAgent and update it with WorkflowAgent in v5 docs (#2285)
[codex] Fix partial world-local exclusive writes (#2296)
...
# Conflicts:
#	packages/core/src/runtime.ts
#	packages/core/src/runtime/suspension-handler.ts
pranaygp added a commit that referenced this pull request Jun 11, 2026
…docs-run-idempotency
* origin-https/main: (115 commits)
[core] V2: unify wait+step queue dispatch in suspension processing (#1925)
fix(world-local,world-postgres): make duplicate hook_created idempotent (#2295)
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
...
# Conflicts:
#	docs/content/docs/v4/cookbook/advanced/child-workflows.mdx
#	docs/content/docs/v5/cookbook/advanced/child-workflows.mdx
#	docs/content/docs/v5/cookbook/agent-patterns/durable-agent.mdx
pranaygp added a commit that referenced this pull request Jun 11, 2026
* origin/main:
[core] V2: unify wait+step queue dispatch in suspension processing (#1925)
fix(world-local,world-postgres): make duplicate hook_created idempotent (#2295)
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
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.

2 participants

@xujustinj@pranaygp
, '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); } })(); })(); Prevent local tests from hanging by xujustinj · Pull Request #2338 · vercel/workflow · GitHub
Skip to content

Prevent local tests from hanging - #2338

Merged
pranaygp merged 2 commits into
vercel:mainfrom
xujustinj:local-tests
Jun 11, 2026
Merged

Prevent local tests from hanging#2338
pranaygp merged 2 commits into
vercel:mainfrom
xujustinj:local-tests

Conversation

@xujustinj

@xujustinjxujustinj commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

This commit fixes the ability to manually run pnpm test:

  • use vitest run to stop world-vercel and world-testing when complete
  • disable Nuxt telemetry to prevent interactive telemetry prompt

Background

On a fresh clone of this repo on my own machine, I ran setup with pnpm i. Then I ran pnpm test, and the tests hung on three workers:

  • nuxt
  • world-testing
  • world-vercel

The world-vercel test passed but hung on the following:

 Test Files 9 passed (9)
Tests 131 passed (131)
Start at 16:43:36
Duration 20.31s (transform 23.92s, setup 0ms, import 47.11s, tests 2.21s, environment 1ms)
PASS Waiting for file changes...
press h to show help, press q to quit

Likewise for world-testing.

Meanwhile nuxt hung because of an interactive prompt asking for telemetry:

> @workflow/nuxt@5.0.0-beta.13 build /home/j437xu/projects/vercel/workflow/packages/nuxt
> nuxt-module-build prepare && nuxt-module-build build
ℹ Nuxt collects completely anonymous data about usage. 5:01:40 p.m.
This will help us improve Nuxt developer experience over time.
Read more on https://github.com/nuxt/telemetry
❯ Are you interested in participating?
○ Yes / ● No

I encountered this because I have never configured Nuxt on my machine, and this will occur to anyone else in the same situation. You can reproduce this by deleting the telemetry.enabled line in ~/.nuxtrc.

For various reasons I don't understand these hangs do not occur in CI.

Changes

  • Using vitest run instead of vitest (watch mode) so that world-testing and world-vercel both stop when tests pass
  • Using NUXT_TELEMETRY_DISABLED=1 to prevent telemetry during the build for testing (I'm less sure about this one, maybe it's undesirable)

After these tests pnpm test runs to completion as expected.

@xujustinj
xujustinj requested a review from a team as a code ownerJune 10, 2026 23:48
@changeset-bot

changeset-botBot commented Jun 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7e1db60

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

This PR includes changesets to release 17 packages
NameType
@workflow/world-testingPatch
@workflow/world-vercelPatch
@workflow/cliPatch
@workflow/corePatch
@workflow/webPatch
workflowPatch
@workflow/buildersPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/vitestPatch
@workflow/web-sharedPatch
@workflow/astroPatch
@workflow/nestPatch
@workflow/rollupPatch
@workflow/sveltekitPatch
@workflow/vitePatch
@workflow/nuxtPatch

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

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

@vercel

vercelBot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

@xujustinj is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@xujustinj
xujustinjforce-pushed the local-tests branch 2 times, most recently from 96bfcc2 to 83a2a77CompareJune 11, 2026 00:24
This commit allows manually running pnpm test:
- use vitest run to stop world-vercel and world-testing when complete
- disable Nuxt telemetry to prevent interactive telemetry prompt
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>

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

Reviewed and verified locally on this branch: world-vercel (131 tests) and world-testing (10 tests, via pnpm test --filter @workflow/world-testing so turbo builds deps first) both pass and exit cleanly, and the @workflow/nuxt build works with the env var set. The vitest run change matches what every other package in the repo already does (world-testing correctly omits the src filter since its tests live in test/), and there's no CI impact — vitest auto-disables watch mode and Nuxt skips the consent prompt when CI is set, which is why these hangs never showed up in CI. One non-blocking suggestion inline.

Comment threadpackages/nuxt/package.json Outdated
Comment on lines +33 to +34
"build": "NUXT_TELEMETRY_DISABLED=1 nuxt-module-build prepare && NUXT_TELEMETRY_DISABLED=1 nuxt-module-build build",
"dev": "NUXT_TELEMETRY_DISABLED=1 nuxt-module-build build --stub && NUXT_TELEMETRY_DISABLED=1 nuxt-module-build prepare",

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.

Two related notes on the env-var approach (non-blocking):

  1. Inline VAR=1 cmd syntax doesn't work on Windows — pnpm runs scripts through cmd.exe by default (this repo doesn't enable pnpm's shell emulator), so NUXT_TELEMETRY_DISABLED=1 would be treated as a command and the build would fail. Other scripts in this repo use cross-env for exactly this (see packages/core's test script).

  2. An alternative that solves both problems at once: add a repo-root .nuxtrc with telemetry.enabled=false. @nuxt/kit loads .nuxtrc from the workspace root (c12's globalRc option resolves it via findWorkspaceDir, keyed off pnpm-workspace.yaml), so it's cross-platform, keeps these scripts untouched, and would also cover workbench/nuxt's nuxt build/nuxt dev — which hit the same first-run consent prompt in a fresh environment and aren't addressed by this PR.

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.

Addressed in 7e1db60: reverted the inline env vars and added a workspace-root .nuxtrc with telemetry.enabled=false instead. Verified that both packages/nuxt (nuxt-module-build) and workbench/nuxt resolve it from the workspace root (tested with HOME pointed at an empty dir so no user-level ~/.nuxtrc could mask it), and the @workflow/nuxt build completes cleanly. Also dropped @workflow/nuxt from the changeset since that package is no longer modified.

The inline NUXT_TELEMETRY_DISABLED=1 in package.json scripts doesn't work
on Windows (pnpm runs scripts through cmd.exe). A workspace-root .nuxtrc
is cross-platform, and @nuxt/kit resolves it from the pnpm workspace root,
so it also covers workbench/nuxt's build/dev, which hit the same
first-run consent prompt.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@pranaygp
pranaygp merged commit 95d7009 into vercel:mainJun 11, 2026
12 of 30 checks passed
github-actionsBot added a commit that referenced this pull request Jun 11, 2026
* Prevent local tests from hanging
This commit allows manually running pnpm test:
- use vitest run to stop world-vercel and world-testing when complete
- disable Nuxt telemetry to prevent interactive telemetry prompt
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>
* Disable Nuxt telemetry via workspace .nuxtrc instead of inline env vars
The inline NUXT_TELEMETRY_DISABLED=1 in package.json scripts doesn't work
on Windows (pnpm runs scripts through cmd.exe). A workspace-root .nuxtrc
is cross-platform, and @nuxt/kit resolves it from the pnpm workspace root,
so it also covers workbench/nuxt's build/dev, which hit the same
first-run consent prompt.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>
Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2342. (backport job run)

@xujustinj
xujustinj deleted the local-tests branch June 11, 2026 08:06
VaguelySerious pushed a commit that referenced this pull request Jun 11, 2026
Signed-off-by: Justin Xu <xu.justin.j@gmail.com>
Co-authored-by: Justin Xu <xu.justin.j@gmail.com>
@github-actionsgithub-actionsBot mentioned this pull request Jun 11, 2026
pranaygp added a commit that referenced this pull request Jun 11, 2026
…hook-ready
* origin-https/main: (119 commits)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
Patch vulnerable package dependencies (#2301)
Deprecate DurableAgent and update it with WorkflowAgent in v5 docs (#2285)
[codex] Fix partial world-local exclusive writes (#2296)
...
# Conflicts:
#	packages/core/src/runtime.ts
#	packages/core/src/runtime/suspension-handler.ts
pranaygp added a commit that referenced this pull request Jun 11, 2026
…docs-run-idempotency
* origin-https/main: (115 commits)
[core] V2: unify wait+step queue dispatch in suspension processing (#1925)
fix(world-local,world-postgres): make duplicate hook_created idempotent (#2295)
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
...
# Conflicts:
#	docs/content/docs/v4/cookbook/advanced/child-workflows.mdx
#	docs/content/docs/v5/cookbook/advanced/child-workflows.mdx
#	docs/content/docs/v5/cookbook/agent-patterns/durable-agent.mdx
pranaygp added a commit that referenced this pull request Jun 11, 2026
* origin/main:
[core] V2: unify wait+step queue dispatch in suspension processing (#1925)
fix(world-local,world-postgres): make duplicate hook_created idempotent (#2295)
docs(observability): remove MVP implementation detail bullet (#2367)
fix: settle aborted parallel steps before completing abortParallelWorkflow (#2244)
Add native v4 workflow attribute events (#2226)
Version Packages (beta) (#2326)
[ci] Fix flaky windows unit tests (#2359)
Capture Vercel runtime logs when e2e Vercel Prod lanes fail (#2356)
Fix e2e failure reporting under vitest 4 and preserve fetch error causes (#2355)
[core] Fix process crash from rejected waitUntil promises (#2336)
[core] Remove duplicate `waitUntil` for suspension handler async operations (#2345)
Prevent local tests from hanging (#2338)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
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.

2 participants

@xujustinj@pranaygp