Make QuickJS the default workflow VM engine - #3253
Draft
TooTallNate wants to merge 1 commit into
Draft
Conversation
…ck into node:vm) - useQuickJSVm defaults to the QuickJS engine when neither the run's stamped executionContext.workflowVm nor WORKFLOW_VM specifies one; WORKFLOW_VM=node is the explicit node:vm opt-in. - CI matrix inverted to match: quickjs legs leave WORKFLOW_VM unset so the default-selection path is exercised end to end; node legs opt in explicitly (labels/artifacts unchanged via MATRIX_VM). - Entrypoint tests that assert node replay-loop internals against mock worlds pin WORKFLOW_VM=node (the quickjs path would instantiate a WASM VM per call). - Docs + changeset updated. Runs keep the engine stamped at start().
🦋 Changeset detectedLatest commit: f57fd88 The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
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 |
Contributor
Contributor
🧪 E2E Test Results❌ Some tests failed ❌ Failed E2E Testsvercel-multi-region (24 failed)nextjs-turbopack (24 failed):
E2E Test SummarySummary
Details by Category✅ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
✅ 🪟 Windows
✅ 📋 Other
❌ vercel-multi-region
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Flips the default workflow VM engine to QuickJS (WASM). The
node:vmengine remains fully supported as an explicit opt-in viaWORKFLOW_VM=node— the inverse of the previous arrangement.Changes
vm-mode.ts):useQuickJSVmnow defaults to QuickJS when neither the run's stampedexecutionContext.workflowVmnorWORKFLOW_VMspecifies an engine. Run affinity is unchanged: existing runs keep executing on the engine stamped atstart().WORKFLOW_VMunset, so they exercise the real default-selection path end to end; node legs opt in explicitly withWORKFLOW_VM=node. Job names and artifact files are unchanged (labels carried viaMATRIX_VM). Applies to the script-generated legs (local dev/prod/postgres + vercel prod) and the hardcoded Vitest-plugin / Windows matrices.runtime.test.ts,runtime-trace-mode.test.ts,precondition-guard-replay.test.ts,wait-completion-replay.test.ts) pinWORKFLOW_VM=node— under the new default they'd instantiate a QuickJS WASM VM per entrypoint call.WORKFLOW_VMdefault updated in runtime-tuning; changeset (minor) included.Verification
vm-mode.test.ts: default → quickjs, empty value → quickjs,node→ node:vm, run-stamp precedence unchanged (23 tests)WORKFLOW_VMunset: dev server logsUsing QuickJS VM engine, tests green; withWORKFLOW_VM=node: zero quickjs engine logs, tests greenvm: "") + 14 explicit-node legs, snapshot leg included