Skip to content

Conversation

@pranaygp
Copy link
Collaborator

@pranaygp pranaygp commented Nov 12, 2025

=== TEST 1: crossFileErrorWorkflow (Workflow Error in VM Context) ===

Starting "crossFileErrorWorkflow" workflow with args:

Error while running "wrun_01K9VGB8JZCJYY0KC7VGTWH8KS" workflow:

Error: Error from workflow helper
at throwWorkflowError (../example/workflows/98_workflow_error_test.ts:4:10)
at workflowErrorHelper (../example/workflows/98_workflow_error_test.ts:7:4)
at crossFileErrorWorkflow (../example/workflows/99_e2e.ts:290:4)
at \<anonymous> (/Users/pranaygp/github/vercel/workflow/packages/core/src/workflow.ts:574:7)
at async \<anonymous> (/Users/pranaygp/github/vercel/workflow/packages/core/src/telemetry.ts:94:22)
at async \<anonymous> (/Users/pranaygp/github/vercel/workflow/packages/core/src/runtime.ts:362:28)
at async \<anonymous> (/Users/pranaygp/github/vercel/workflow/packages/core/src/telemetry.ts:94:22)
at async \<anonymous> (/Users/pranaygp/github/vercel/workflow/packages/core/src/telemetry.ts:57:58)
at async \<anonymous> (/Users/pranaygp/github/vercel/workflow/packages/core/src/runtime.ts:280:14)
at async \<anonymous> (/Users/pranaygp/github/vercel/workflow/packages/world-local/src/queue.ts:148:24)

Call chain (Workflow VM context):
throwWorkflowError (98_workflow_error_test.ts:4)

workflowErrorHelper (98_workflow_error_test.ts:7)

crossFileErrorWorkflow (99_e2e.ts:290)

=== TEST 2: deepStepErrorWorkflow (Step Error in Node.js Context) ===

Starting "deepStepErrorWorkflow" workflow with args:

[Workflows] "wrun_01K9VGBX3N34GG0SP36DC5156E" - Encountered `FatalError` while executing step "step//example/workflows/98_step_error_test.ts//deepStepWithNestedError":

> FatalError: Error from step helper
> at throwStepError (/Users/pranaygp/github/vercel/workflow/workbench/example/workflows/98_step_error_test.ts:7:11)
> at stepErrorHelper (/Users/pranaygp/github/vercel/workflow/workbench/example/workflows/98_step_error_test.ts:10:5)
> at deepStepWithNestedError (/Users/pranaygp/github/vercel/workflow/workbench/example/workflows/98_step_error_test.ts:13:5)

Bubbling up error to parent workflow
FatalError while running "wrun_01K9VGBX3N34GG0SP36DC5156E" workflow:

FatalError: Error from step helper
at throwStepError (/Users/pranaygp/github/vercel/workflow/workbench/example/workflows/98_step_error_test.ts:7:11)
at stepErrorHelper (/Users/pranaygp/github/vercel/workflow/workbench/example/workflows/98_step_error_test.ts:10:5)
at deepStepWithNestedError (/Users/pranaygp/github/vercel/workflow/workbench/example/workflows/98_step_error_test.ts:13:5)
at \<anonymous> (/Users/pranaygp/github/vercel/workflow/packages/core/src/runtime.ts:698:21)
at AsyncLocalStorage.run (node:internal/async_local_storage/async_hooks:91:14)
at \<anonymous> (/Users/pranaygp/github/vercel/workflow/packages/core/src/runtime.ts:680:43)
at async \<anonymous> (/Users/pranaygp/github/vercel/workflow/packages/core/src/telemetry.ts:94:22)
at async \<anonymous> (/Users/pranaygp/github/vercel/workflow/packages/core/src/telemetry.ts:57:58)
at async \<anonymous> (/Users/pranaygp/github/vercel/workflow/packages/core/src/runtime.ts:576:14)
at async \<anonymous> (/Users/pranaygp/github/vercel/workflow/packages/world-local/src/queue.ts:148:24)

Call chain (Step Node.js context):
throwStepError (98_step_error_test.ts:7)

stepErrorHelper (98_step_error_test.ts:10)

deepStepWithNestedError (98_step_error_test.ts:13) [STEP FUNCTION]

[Error preserved and propagated to workflow context]

=== KEY OBSERVATIONS ===

  1. WORKFLOW ERROR (Test 1):
    • Error thrown in workflow VM context
    • Stack trace shows: 98_workflow_error_test.ts → 99_e2e.ts
    • Inline sourcemaps in workflow bundle enable proper file/line references
  2. STEP ERROR (Test 2):
    • Error thrown in step Node.js context
    • Stack trace shows full call chain within the step: 98_step_error_test.ts lines 7→10→13
    • Inline sourcemaps in step bundle enable proper file/line references
    • Stack trace PRESERVED when error bubbles up to workflow (fix in step.ts:94-100)
  3. SOURCEMAP CONFIGURATION:
    • Workflow bundle: sourcemap: 'inline' (base-builder.ts:481)
    • Step bundle: sourcemap: 'inline' (base-builder.ts:355)
    • Node.js runtime: NODE_OPTIONS="--enable-source-maps"

@vercel
Copy link
Contributor

vercel bot commented Nov 12, 2025

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

Project Deployment Preview Comments Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview Comment Nov 12, 2025 11:59pm
example-nextjs-workflow-webpack Ready Ready Preview Comment Nov 12, 2025 11:59pm
example-workflow Ready Ready Preview Comment Nov 12, 2025 11:59pm
workbench-hono-workflow Ready Ready Preview Comment Nov 12, 2025 11:59pm
workbench-nitro-workflow Ready Ready Preview Comment Nov 12, 2025 11:59pm
workbench-nuxt-workflow Ready Ready Preview Comment Nov 12, 2025 11:59pm
workbench-sveltekit-workflow Ready Ready Preview Comment Nov 12, 2025 11:59pm
workbench-vite-workflow Ready Ready Preview Comment Nov 12, 2025 11:59pm
workflow-docs Ready Ready Preview Comment Nov 12, 2025 11:59pm

@changeset-bot
Copy link

changeset-bot bot commented Nov 12, 2025

🦋 Changeset detected

Latest commit: 8fd157d

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

This PR includes changesets to release 11 packages
Name Type
@workflow/builders Patch
@workflow/core Patch
@workflow/cli Patch
@workflow/next Patch
@workflow/nitro Patch
@workflow/sveltekit Patch
@workflow/web-shared Patch
workflow Patch
@workflow/world-testing Patch
@workflow/nuxt Patch
@workflow/ai Patch

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

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

@pranaygp pranaygp requested a review from adriandlam November 12, 2025 07:47
Copy link
Collaborator Author

pranaygp commented Nov 12, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@pranaygp pranaygp requested review from TooTallNate and removed request for TooTallNate and adriandlam November 12, 2025 07:47
@pranaygp pranaygp marked this pull request as ready for review November 12, 2025 07:50
@pranaygp pranaygp marked this pull request as draft November 12, 2025 07:50
@adriandlam adriandlam force-pushed the pranaygp/normalize-workbenches branch 2 times, most recently from d9e08f0 to b0ad30f Compare November 12, 2025 18:05
@pranaygp pranaygp force-pushed the pranaygp/11-12-implement_step_sourcemaps branch from 8e19f6a to 97a8268 Compare November 12, 2025 23:54
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.

2 participants