Skip to content

fix(core): lazy-load built-in worlds in runtime#1751

Open
ijjk wants to merge 10 commits intoijjk/eager-testingfrom
ijjk/fix-eager-mode
Open

fix(core): lazy-load built-in worlds in runtime#1751
ijjk wants to merge 10 commits intoijjk/eager-testingfrom
ijjk/fix-eager-mode

Conversation

@ijjk
Copy link
Copy Markdown
Member

@ijjk ijjk commented Apr 15, 2026

Summary

  • lazy-load the built-in local and vercel world modules instead of statically importing them
  • stop using a top-level project-root createRequire in core runtime world loading
  • preserve custom world fallback resolution while keeping eager Next.js step routes out of world implementation graphs

Validation

  • WORKFLOW_NEXT_LAZY_DISCOVERY=0 APP_NAME=nextjs-turbopack pnpm vitest run packages/core/e2e/local-build.test.ts
  • WORKFLOW_NEXT_LAZY_DISCOVERY=0 APP_NAME=nextjs-webpack pnpm vitest run packages/core/e2e/local-build.test.ts

Stacked on #1747.

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 15, 2026

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

Project Deployment Actions Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview, Comment Apr 16, 2026 6:05am
example-nextjs-workflow-webpack Ready Ready Preview, Comment Apr 16, 2026 6:05am
example-workflow Ready Ready Preview, Comment Apr 16, 2026 6:05am
workbench-astro-workflow Ready Ready Preview, Comment Apr 16, 2026 6:05am
workbench-express-workflow Ready Ready Preview, Comment Apr 16, 2026 6:05am
workbench-fastify-workflow Ready Ready Preview, Comment Apr 16, 2026 6:05am
workbench-hono-workflow Ready Ready Preview, Comment Apr 16, 2026 6:05am
workbench-nitro-workflow Ready Ready Preview, Comment Apr 16, 2026 6:05am
workbench-nuxt-workflow Ready Ready Preview, Comment Apr 16, 2026 6:05am
workbench-sveltekit-workflow Ready Ready Preview, Comment Apr 16, 2026 6:05am
workbench-vite-workflow Ready Ready Preview, Comment Apr 16, 2026 6:05am
workflow-swc-playground Ready Ready Preview, Comment Apr 16, 2026 6:05am
workflow-web Ready Ready Preview, Comment Apr 16, 2026 6:05am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
workflow-docs Skipped Skipped Apr 16, 2026 6:05am

@ijjk ijjk requested a review from a team as a code owner April 15, 2026 19:54
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 15, 2026

⚠️ No Changeset found

Latest commit: 1cedeaa

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 15, 2026

🧪 E2E Test Results

Some tests failed

Summary

Passed Failed Skipped Total
✅ 💻 Local Development 1062 0 198 1260
✅ 📦 Local Production 1062 0 198 1260
✅ 🐘 Local Postgres 1062 0 198 1260
❌ 🪟 Windows 62 20 8 90
❌ 🌍 Community Worlds 133 74 24 231
✅ 📋 Other 228 0 42 270
Total 3609 94 668 4371

❌ Failed Tests

🪟 Windows (20 failed)

nextjs-turbopack (20 failed):

  • DurableAgent e2e core basic text response
  • DurableAgent e2e core single tool call
  • DurableAgent e2e core multiple sequential tool calls
  • DurableAgent e2e core tool error recovery
  • DurableAgent e2e provider tools provider tool identity preserved across step boundaries
  • DurableAgent e2e provider tools mixed provider and function tools
  • DurableAgent e2e onStepFinish fires constructor + stream callbacks in order with step data
  • DurableAgent e2e onFinish fires constructor + stream callbacks in order with event data
  • DurableAgent e2e instructions string instructions are passed to the model
  • DurableAgent e2e timeout completes within timeout
  • DurableAgent e2e experimental_onStart (GAP) completes but callbacks are not called (GAP)
  • DurableAgent e2e experimental_onStepStart (GAP) completes but callbacks are not called (GAP)
  • DurableAgent e2e experimental_onToolCallStart (GAP) completes but callbacks are not called (GAP)
  • DurableAgent e2e experimental_onToolCallFinish (GAP) completes but callbacks are not called (GAP)
  • DurableAgent e2e prepareCall (GAP) completes but prepareCall is not applied (GAP)
  • DurableAgent e2e prepareStep on constructor agent-level prepareStep is called for each LLM step
  • DurableAgent e2e prepareStep on constructor stream-level prepareStep overrides constructor-level
  • DurableAgent e2e multimodal tool results passes through LanguageModelV3ToolResultOutput from tools
  • DurableAgent e2e tool approval (GAP) completes but needsApproval is not checked (GAP)
  • fetchWorkflow
🌍 Community Worlds (74 failed)

mongodb (7 failed):

  • hookWorkflow is not resumable via public webhook endpoint
  • webhookWorkflow
  • fetchWorkflow
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • resilient start: addTenWorkflow completes when run_created returns 500

redis (7 failed):

  • hookWorkflow is not resumable via public webhook endpoint
  • webhookWorkflow
  • fetchWorkflow
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • resilient start: addTenWorkflow completes when run_created returns 500

turso (60 failed):

  • addTenWorkflow
  • addTenWorkflow
  • wellKnownAgentWorkflow (.well-known/agent)
  • should work with react rendering in step
  • promiseAllWorkflow
  • promiseRaceWorkflow
  • promiseAnyWorkflow
  • importedStepOnlyWorkflow
  • hookWorkflow
  • hookWorkflow is not resumable via public webhook endpoint
  • webhookWorkflow
  • sleepingWorkflow
  • parallelSleepWorkflow
  • nullByteWorkflow
  • workflowAndStepMetadataWorkflow
  • fetchWorkflow
  • promiseRaceStressTestWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • closureVariableWorkflow - nested step functions with closure variables
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • runClassSerializationWorkflow - Run instances serialize across workflow/step boundaries
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • health check (CLI) - workflow health command reports healthy endpoints
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods
  • ChainableService.processWithThis - static step methods using this to reference the class
  • thisSerializationWorkflow - step function invoked with .call() and .apply()
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE
  • instanceMethodStepWorkflow - instance methods with "use step" directive
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument
  • cancelRun - cancelling a running workflow
  • cancelRun via CLI - cancelling a running workflow
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control)
  • importMetaUrlWorkflow - import.meta.url is available in step bundles
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577)
  • resilient start: addTenWorkflow completes when run_created returns 500
  • getterStepWorkflow - getter functions with "use step" directive

Details by Category

✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 76 0 14
✅ express-stable 76 0 14
✅ fastify-stable 76 0 14
✅ hono-stable 76 0 14
✅ nextjs-turbopack-canary 63 0 27
✅ nextjs-turbopack-stable-lazy-discovery-disabled 82 0 8
✅ nextjs-turbopack-stable-lazy-discovery-enabled 82 0 8
✅ nextjs-webpack-canary 63 0 27
✅ nextjs-webpack-stable-lazy-discovery-disabled 82 0 8
✅ nextjs-webpack-stable-lazy-discovery-enabled 82 0 8
✅ nitro-stable 76 0 14
✅ nuxt-stable 76 0 14
✅ sveltekit-stable 76 0 14
✅ vite-stable 76 0 14
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 76 0 14
✅ express-stable 76 0 14
✅ fastify-stable 76 0 14
✅ hono-stable 76 0 14
✅ nextjs-turbopack-canary 63 0 27
✅ nextjs-turbopack-stable-lazy-discovery-disabled 82 0 8
✅ nextjs-turbopack-stable-lazy-discovery-enabled 82 0 8
✅ nextjs-webpack-canary 63 0 27
✅ nextjs-webpack-stable-lazy-discovery-disabled 82 0 8
✅ nextjs-webpack-stable-lazy-discovery-enabled 82 0 8
✅ nitro-stable 76 0 14
✅ nuxt-stable 76 0 14
✅ sveltekit-stable 76 0 14
✅ vite-stable 76 0 14
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 76 0 14
✅ express-stable 76 0 14
✅ fastify-stable 76 0 14
✅ hono-stable 76 0 14
✅ nextjs-turbopack-canary 63 0 27
✅ nextjs-turbopack-stable-lazy-discovery-disabled 82 0 8
✅ nextjs-turbopack-stable-lazy-discovery-enabled 82 0 8
✅ nextjs-webpack-canary 63 0 27
✅ nextjs-webpack-stable-lazy-discovery-disabled 82 0 8
✅ nextjs-webpack-stable-lazy-discovery-enabled 82 0 8
✅ nitro-stable 76 0 14
✅ nuxt-stable 76 0 14
✅ sveltekit-stable 76 0 14
✅ vite-stable 76 0 14
❌ 🪟 Windows
App Passed Failed Skipped
❌ nextjs-turbopack 62 20 8
❌ 🌍 Community Worlds
App Passed Failed Skipped
✅ mongodb-dev 6 0 0
❌ mongodb 56 7 8
✅ redis-dev 6 0 0
❌ redis 56 7 8
✅ turso-dev 6 0 0
❌ turso 3 60 8
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 76 0 14
✅ e2e-local-postgres-nest-stable 76 0 14
✅ e2e-local-prod-nest-stable 76 0 14

📋 View full workflow run


Some E2E test jobs failed:

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

Check the workflow run for details.

Comment thread workbench/scripts/generate-workflows-registry.js Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant