Commit Graph

86 Commits

Author SHA1 Message Date
Pranay Prakash bc2cf32eb2 [stable] Fix Next deferred step registration under Turbopack (#2298)
* fix(next): preserve lazy step registration on stable

Signed-off-by: Pranay Prakash <pranay.gp@gmail.com>

* refactor(next): reuse deferred step directory constant

Signed-off-by: Pranay Prakash <pranay.gp@gmail.com>

* test: gate deferred dev checks explicitly

---------

Signed-off-by: Pranay Prakash <pranay.gp@gmail.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2026-06-08 21:29:08 +00:00
Peter Wielander ac59dc3ab5 [e2e] Improve error labeling in event-log-race-repro CI job (#2190) (#2194) 2026-06-01 11:22:46 +02:00
Peter Wielander d588467e69 [ci] Fix community-world E2E test timing out + fail-fast(#2189) 2026-06-01 09:32:52 +02:00
github-actions[bot] c0e4abf47c [e2e] Add event-log-race-repro label for triggering CI stress-test (#2159) (#2173) 2026-05-30 09:53:03 +02:00
Nathan Rajlich cab9a5334f docs(stable): update docs/README and docs-checks comment for tarballs move (#2094)
Per-deployment SDK tarballs are now built by the tarballs/ app, not by
docs/. Remove the outdated reference to docs/scripts/pack.ts (which no
longer exists) and point readers at tarballs/README.md.
2026-05-22 11:58:29 -07:00
Nathan Rajlich 3621f8d058 [backport] [ci] Stop using Release App token + bump pnpm/action-setup (#1918)
* ci: upgrade pnpm/action-setup to v5 and read version from package.json (#1785)

* ci: upgrade pnpm/action-setup to v6 and read version from package.json

Removes hardcoded pnpm version (10.14.0) from all workflows and instead
reads the version from the packageManager field in package.json, so CI
stays in sync with the version used locally.

* ci: update setup-workflow-dev composite action to use pnpm/action-setup@v6

Also removes the pnpm-version input since the action now reads the
version from package.json#packageManager.

* ci: downgrade pnpm/action-setup to v5

v6 installs pnpm 11 RC/beta, which has a regression
(pnpm/pnpm#11264, pnpm/action-setup#225/#227/#228) that causes
'ERR_PNPM_BROKEN_LOCKFILE: expected a single document in the stream'
when the project's packageManager pins a 10.x pnpm version. v5 is the
latest stable release before v6 and supports reading the version from
package.json#packageManager.

* ci: stop using Release App token in release workflows (#1866)

The Release App has been temporarily removed. Switch the Release and
Backport workflows to use the default GITHUB_TOKEN, and disable the
cross-repo Front dispatch workflow until the App is restored.

Also add a workflow_dispatch trigger to release.yml so the Version
Packages PR can be created/updated manually (since pushes made by
GITHUB_TOKEN do not trigger downstream workflow runs).

* ci: use GitHub API commit mode for changesets action (#1867)

The repo enforces "Commits must have verified signatures" via an
org/enterprise-level ruleset, which blocks unsigned commits pushed via
the Git CLI by GITHUB_TOKEN. Switching the changesets action to
commitMode: github-api makes commits GPG-signed by GitHub.

* Add changeset for backport

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Nathan Rajlich <n@n8.io>

---------

Signed-off-by: Nathan Rajlich <n@n8.io>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-04 14:26:23 -07:00
Peter Wielander bb910f2571 [backport] [workbench] Add TanStack Start workbench (#1875, #1907) (#1914)
* [workbench] Add TanStack Start workbench and tests (#1875)

(cherry picked from commit 8202663857)

* Fix pnpm type issue after tanstack PR (#1907)

(cherry picked from commit a7071bf3d4)
2026-05-04 19:30:39 +00:00
Peter Wielander eb54dd8544 [backport] Split tarball hosting out of docs into its own project (#1893) (#1899) 2026-05-04 12:33:00 +09:00
Peter Wielander 677867bd19 [backport] ci: switch Vercel deployment-protection bypass to OIDC Trusted Sources (#1897)
Backport of #1882
2026-05-03 02:45:01 +00:00
Peter Wielander 47aa68534f [docs] Restore minimal Next.js placeholder on stable (#1786) 2026-04-16 16:45:24 -07:00
Nathan Rajlich 543216060b Remove docs app from stable branch, keep docs/content/ for npm releases (#1771)
The docs Next.js app is deployed only from main. Remove the app code
(components, layouts, configs, styles) from stable to eliminate
cherry-pick conflicts during backports. Keep docs/content/ which
contains the markdown files that are bundled into npm packages via
prepack scripts for AI agent consumption.
2026-04-16 13:13:09 -07:00
Peter Wielander 41dd333216 [ci] Run e2e tests on stable
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
2026-04-16 12:32:09 -07:00
Nathan Rajlich f8badf51a7 Remove redundant npm dist-tag management step from release workflow (#1651)
Changesets already handles dist-tags correctly:
- On main: pre-release mode publishes with the 'beta' tag
- On stable: GA publishes default to the 'latest' tag
2026-04-08 20:22:30 +00:00
Peter Wielander d631152a65 Support dual-branch releases (stable + main) (#1620)
- Add `stable` to release workflow trigger branches
- Make npm dist-tag conditional: `stable` gets `latest`, `main` keeps `beta` (from changeset publish)
- Make GitHub release flags branch-aware: stable = latest + non-prerelease, main = prerelease + not latest
- Change changeset baseBranch to `stable` for this branch
2026-04-06 13:51:53 -07:00
Nathan Rajlich 9d195308c2 fix(ci): use Node 24 for releases and remove npm self-update (#1614) 2026-04-06 09:43:03 -07:00
Pranay Prakash afa3931a59 Add stress benchmarks: 1000-step, data payload, and stream tests (#1214) 2026-03-19 16:59:09 -07:00
Pranay Prakash cd4abd80fe test: improve e2e test failure diagnostics (#1426)
* test: improve e2e test failure diagnostics with run context and GitHub annotations

When e2e tests fail, automatically dump workflow run diagnostics (status,
input/output, error details, event timeline, dashboard link) to the CI
logs. Emit GitHub Actions annotations that surface on PR file diffs.
Fix collectedRunIds which was declared but never populated, enabling
observability links in the PR comment. Enrich the aggregation script
to include run IDs and dashboard URLs for failed tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: increase diagnostics hook timeout and fix flaky Vercel Prod tests

- Increase onTestFailed hook timeout to 30s (default was 10s) so
  diagnostics can fetch run data even after slow test timeouts
- parallelSleepWorkflow: increase elapsed threshold from 10s to 25s to
  accommodate Vercel cold start latency
- webhookWorkflow: increase hook polling deadline from 30s to 60s and
  test timeout from 60s to 120s for slow Vercel webhook registration
- readableStreamWorkflow: stop reading once expected content is received
  instead of waiting for stream close (which can hang on Vercel), and
  increase test timeout to 120s

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: emit ::error annotations via process.stdout.write to bypass vitest ANSI prefix

Vitest's console interceptor prepends ANSI escape codes to console.log
output, which prevents GitHub Actions from parsing ::error workflow
commands. Use process.stdout.write() directly to ensure clean output.

Also enhance the custom reporter to emit annotations in onFinished
(which runs after vitest output is complete) as a reliable fallback,
and enrich failure data from the diagnostics sidecar.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: only show observability links for vercel-prod test failures

Community world and local tests don't run on Vercel's backend, so
dashboard links are meaningless for those categories. Previously,
test name collisions across sidecar files could cause community
test failures to show Vercel dashboard URLs from vercel-prod runs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: link annotations to test files instead of symlinked workflow sources

The workflow source files in workbench/ are symlinks that GitHub can't
resolve, causing annotations to show raw paths like #L0 instead of
linking to code. Now:
- utils.ts: omit file= from onTestFailed annotations (just show title)
- github-reporter.ts: use the actual test file path (e.g.
  packages/core/e2e/e2e.test.ts) which GitHub can resolve

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 19:47:26 -07:00
Peter Wielander 40c2d95a3a Enable DurableAgent tests (#1411) 2026-03-17 00:09:02 +00:00
Nathan Rajlich 9a114b9213 ci: fix git identity for changesets Version Packages commit (#1357)
Set setupGitUser: false on changesets/action to prevent it from
overwriting our git config with the hardcoded github-actions[bot]
identity. The git identity is now configured in a prior step using
the app-slug output from actions/create-github-app-token.
2026-03-12 14:04:54 -07:00
Nathan Rajlich 7f17b075df ci: configure git identity for GitHub App bot account (#1356)
Set git user.name and user.email so that the 'Version Packages' commit
created by changesets/action is attributed to the app's bot account
instead of the default github-actions[bot].
2026-03-12 12:38:35 -07:00
Nathan Rajlich 5811beb8d9 ci: use dedicated GitHub App token instead of shared PAT (#1351)
Replace GH_TOKEN_PULL_REQUESTS (shared org PAT) with a dedicated GitHub
App token to avoid rate limiting from noisy neighbors. The app token is
generated per-run via actions/create-github-app-token, providing its own
rate limit bucket and short-lived credentials.
2026-03-12 12:00:09 -07:00
Peter Wielander 456c1aa455 Add vitest plugin for testing full workflows without setting up a server (#1237) 2026-03-05 16:08:48 -08:00
Nathan Rajlich c35b597552 fix(ci): fix npm 'latest' dist-tag not being set during release (#1255)
* fix(ci): fix npm 'latest' dist-tag not being set during release

The OIDC trusted publishing change (a78af46f) removed NPM_TOKEN from the
changesets/action step and added registry-url to actions/setup-node. This
caused the 'Add latest dist-tag' step to break for the unscoped 'workflow'
package:

- actions/setup-node writes an .npmrc at a temp path that references
  ${NODE_AUTH_TOKEN}, and sets NPM_CONFIG_USERCONFIG to point at it
- The dist-tag step was writing its own ~/.npmrc using NPM_TOKEN, but npm
  ignored it because NPM_CONFIG_USERCONFIG overrides the default path
- The OIDC token left over in NODE_AUTH_TOKEN worked for @workflow/* scoped
  packages (which already had 'latest' set) but returned E401 for the
  unscoped 'workflow' package

Fix: set NODE_AUTH_TOKEN to NPM_TOKEN_ELEVATED secret so npm picks up the
correct token from the .npmrc that actions/setup-node already configured.

Also fix silent failures: replace the piped while-read loop (which runs in
a subshell and swallows exit codes) with a for loop that tracks failures
and exits non-zero if any dist-tag operation fails.

* use process substitution instead of word-splitting for loop
2026-03-04 09:51:45 -08:00
JJ Kasper a9fea9132e Update workbench tests to build and run outside of monorepo (#1230)
* Setup fixes

* ci: run local e2e against staged tarball workbenches

* ci: update staged workbench tarball setup script

* chore: set nextjs workbenches back to next 16.1.6

* update lock

* test(e2e): resolve workbench path from WORKBENCH_APP_PATH

* fix: address deferred builder issues outside monorepo

* ci: stage tarball workbenches only for nextjs local e2e

* fix(next): discover deferred steps imported via workflows

* test(core): gate deferred step-discovery dev test to canary

* test(e2e): cover cross-file imported step in build/start lanes

* fix(e2e): use local manifest in local runs and relax dev rebuild timeout

* fix(workbench): add imported-step workflow symlink for sveltekit/astro

* test(e2e): scope imported-step workflow test to nextjs lanes

* fix(next): rebuild deferred entries on discovered file updates

* fix(next): watch transitive deferred step deps for dev rebuilds

* fix(next): restore socket-driven deferred step rebuilds

* add changeset

* chore: address review feedback on deferred e2e updates

* fix(cli): guard stream flush against closed write streams
2026-03-03 11:17:39 -08:00
Karthik Kalyan e2420bed29 fix sync front dispatch job (#1244) 2026-03-02 18:24:54 -08:00
Karthik Kalyan 596f9bf139 [workflow] dispatch front release PR sync workflow (#1224)
* sync front release PR on changeset

* Add github dispatcher for raising PRs on workflow releases on front
2026-03-02 11:57:11 -08:00
Peter Wielander d69c80b79d [ci] Disable claude code CI (#1231) 2026-03-01 12:53:39 -08:00
Pranay Prakash 45800b474b Fix OG image routing under i18n (#1176)
* Fix og route handling in i18n middleware

* Add docs CI smoke test for OG and sitemap

* Run docs OG checks against Vercel preview

* Refactor docs CI checks and rename smoke test

* Use docs Vercel token for preview checks

* Expand docs OG smoke coverage

* Check docs HTML OG metadata
2026-02-23 23:40:46 -08:00
Nathan Rajlich 81a883bc9b ci: don't cancel in-progress CI runs on main branch (#1166)
* fix: use types.isNativeError() for cross-VM Error serialization

FatalError was not properly serialized when passed from workflow code into a step function because the Error reducer checked `value instanceof global.Error` where `global` is the VM's globalThis. Errors created in the host context (like FatalError from @workflow/errors) have a different Error prototype than the VM context, so the instanceof check returned false and the error was silently dropped.

Replaced with `types.isNativeError()` from `node:util` which uses V8's internal type tag and works across VM context boundaries.

* ci: don't cancel in-progress CI runs on main branch
2026-02-24 06:50:59 +00:00
Nathan Rajlich a78af46f0e Configure Release job for OIDC trusted publishing (#1138) 2026-02-23 16:47:34 -08:00
JJ Kasper b733e2a173 Unlock canary Next.js version in tests and bump min deferred version (#1088)
* Unlock canary Next.js version

* bump min version
2026-02-16 17:27:16 -08:00
Peter Wielander 0edcccf84d [ci] Skip for CI checks when doing vercel backend testing only (#1063) 2026-02-15 18:37:17 +00:00
JJ Kasper 550997659d Update tests.yml triggers for release PR (#1048) 2026-02-14 02:31:22 +00:00
JJ Kasper 565e5ebd56 Lock Next.js canary version (#1054) 2026-02-13 23:13:44 +00:00
JJ Kasper 26399c107a ci: add 30-minute timeouts to test jobs (#1052) 2026-02-13 14:45:23 -08:00
Peter Wielander b2ba6ff70e [ci] Add flag that can disable non-vercel e2e tests (#1006) 2026-02-11 16:53:55 -08:00
JJ Kasper 8cb7be5f48 Ensure unit tests are included in required check (#1001) 2026-02-10 23:25:48 -08:00
JJ Kasper d8a9ee9c29 ci: add final E2E required-check job (#996)
* ci: add final e2e required check job

* bump
2026-02-10 15:30:42 -08:00
JJ Kasper da64519db8 ci: use PR head SHA for tests workflow checkout (#988)
Signed-off-by: JJ Kasper <jj@jjsweb.site>
2026-02-09 16:51:16 -08:00
Dustin Townsend ea145a65d3 Fix manifest 404 errors in community world e2e tests (#977)
Add missing WORKFLOW_PUBLIC_MANIFEST env var to e2e-community-world.yml.
The e2e tests fetch the workflow manifest from
/.well-known/workflow/v1/manifest.json, but this endpoint is only
exposed when WORKFLOW_PUBLIC_MANIFEST=1 is set. Every other CI workflow
(tests.yml, benchmarks.yml, benchmark-community-world.yml) already sets
this variable, but it was missing from the community world e2e workflow.

https://claude.ai/code/session_01GezavpthQcEpyYVisScncM

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-08 12:16:17 -08:00
Nathan Rajlich 86f62f2779 Refactor e2e tests to no longer use "trigger" endpoint (#958)
## Summary

Refactors the E2E tests to call `start()` from `workflow/api` directly instead of going through the `/api/trigger` HTTP endpoint in each workbench app. This removes a layer of indirection — the tests now use the same API that users would use to start workflows programmatically.

### Before

```ts
const run = await triggerWorkflow('addTenWorkflow', [123]);
const returnValue = await getWorkflowReturnValue(run.runId);
```

- `triggerWorkflow()` sent an HTTP POST to `/api/trigger` on the workbench app
- The workbench app looked up the workflow function, called `start()`, and returned the run ID
- `getWorkflowReturnValue()` polled `GET /api/trigger?runId=...` until the workflow completed

### After

```ts
const run = await start(await e2e('addTenWorkflow'), [123]);
const returnValue = await run.returnValue;
```

- `e2e()` / `getWorkflowMetadata()` fetches the manifest from `/.well-known/workflow/v1/manifest.json` to look up the correct `workflowId`
- `start()` is called directly from the test process via the configured World
- `run.returnValue` polls for completion via the World (no HTTP polling endpoint needed)

### Changes

**`packages/core/e2e/e2e.test.ts`**
- Removed `triggerWorkflow()` and `getWorkflowReturnValue()` helpers
- Added `fetchManifest()` to fetch and cache the workflow manifest from the deployment
- Added `getWorkflowMetadata(file, fn)` to look up `{ workflowId }` from the manifest
- Added `e2e(fn)` shorthand for the common case of `workflows/99_e2e.ts`
- All tests call `start()` and `run.returnValue` directly
- Error tests use `.catch()` to inspect `WorkflowRunFailedError`
- Output stream tests use `run.getReadable()` directly (skipped on local world where cross-process streaming isn't supported)
- `beforeAll` configures the local World with the correct data directory and base URL
- Pages Router tests use `startWorkflowViaHttp()` to specifically validate the HTTP trigger path

**Workbench apps (hono, express, fastify, nest)**
- Removed `/api/trigger` route handlers
- Kept `/api/hook`, `/api/test-direct-step-call`, `/api/test-health-check` endpoints
- Re-added `_workflows.js` side-effect import for hono/express/fastify to maintain Nitro's HMR dependency graph

**Deleted trigger-only route files** from: nextjs-turbopack, nextjs-webpack, vite, sveltekit, astro, nuxt, nitro-v2, nitro-v3, example

**`.github/workflows/tests.yml`**
- Added `WORKFLOW_PUBLIC_MANIFEST: '1'` to all E2E test jobs

### Dependencies

Stacked on #963 which adds `WORKFLOW_PUBLIC_MANIFEST` support to all framework builders.
2026-02-06 16:25:47 -08:00
Nathan Rajlich c28d6ca660 Upload Next.js server logs as artifact for Windows E2E (#946) 2026-02-05 11:10:22 -08:00
Nathan Rajlich 2506f9e107 Add debug-windows workflow with tmate SSH access for debugging Windows CI issues (#937) 2026-02-04 15:08:35 -08:00
Pranay Prakash 6208616d06 Add sequential step benchmarks and fix broken benchmark infrastructure (#845)
* Add 50, 100, 500 concurrent step benchmarks

Enable Promise.all and Promise.race benchmarks for 50, 100, and 500
concurrent steps (previously 100+ were skipped).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add 50, 100, 500 sequential step benchmarks

Extends the sequential step benchmarks to test workflows with 50, 100,
and 500 sequential steps in addition to the existing 10 step test.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add full/quick benchmark suite toggle for CI

- Add BENCHMARK_FULL_SUITE env var to control which benchmarks run
- Quick suite (default for PRs): 10, 25, 50 step benchmarks
- Full suite (main branch, manual dispatch): adds 100, 500 step benchmarks
- Add workflow_dispatch input to manually trigger full suite from GitHub UI
- Skip 100+ sequential and concurrent step benchmarks by default

This keeps PR benchmarks fast while allowing full stress testing on demand.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add 25 sequential steps benchmark

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix benchmark API calls to use binary format

PR #853 changed the workflow trigger API to expect binary data
(application/octet-stream) instead of JSON. The e2e tests were updated
but the benchmark file was missed, causing all benchmarks to fail
silently since Jan 28.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Only run full benchmark suite on manual dispatch

Remove automatic full suite on main branch pushes - only run full suite
when manually triggered with full_suite=true.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 18:02:36 -08:00
Nathan Rajlich bd8116d40b Add WORKFLOW_SERVER_URL_OVERRIDE var to "world-vercel" for testing (#833)
Added `WORKFLOW_SERVER_URL_OVERRIDE` configuration to the Vercel world adapter and removed the deprecated `WORKFLOW_VERCEL_SKIP_PROXY` and `WORKFLOW_VERCEL_BACKEND_URL` environment variables.

### What changed?

- Added a changeset for a patch release across multiple packages
- Removed `WORKFLOW_VERCEL_SKIP_PROXY` environment variable from GitHub workflow tests
- Removed `WORKFLOW_VERCEL_BACKEND_URL` from environment variables in CLI and core packages
- Simplified the URL resolution logic in the Vercel world adapter
- Added support for a `WORKFLOW_SERVER_URL_OVERRIDE` constant for testing against different workflow-server versions
- Added the `x-vercel-workflow-api-url` header when the URL override is set

### How to test?

1. Verify that Vercel deployments continue to work without the removed environment variables
2. Test with a custom workflow server URL by setting the `WORKFLOW_SERVER_URL_OVERRIDE` constant in the world-vercel package

### Why make this change?

This change simplifies the configuration for the Vercel world adapter by removing deprecated environment variables and standardizing on a cleaner approach for specifying the workflow API URL. The new implementation automatically determines whether to use the proxy based on project configuration, making it more intuitive and reducing the need for explicit configuration.
2026-01-23 11:01:45 -08:00
Nathan Rajlich 5ba82ec4b1 Add workflow health CLI command and web functionality (#816) 2026-01-21 12:48:03 -08:00
Peter Wielander aced2968ba [ci] Post weekly github issue digest to slack (#780) 2026-01-14 22:42:47 +01:00
Peter Wielander c4f8033d8e [ci] Post release notes to slack (#779) 2026-01-14 20:29:22 +01:00
Pranay Prakash 4d6f797274 Fix step stack trace propogation and refactor e2e error tests (#720)
* Refactor e2e tests for errors

* Improve step error tests to check workflow return value

Step error workflows now catch the error and return message/stack,
making assertions cleaner. Tests verify both:
- Workflow return value (caught error message)
- CLI step result (original stack with function names)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add assertion for stack trace in caught step error

With the fix in step.ts that propagates original stack traces,
we can now verify that caught step errors include function names
directly in the workflow return value (not just via CLI).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* logging

* Fix: When a step handler is re-invoked after max retries are exhausted, the step_failed event doesn't include a stack trace, breaking stack trace propagation for this edge case.

This commit fixes the issue reported at packages/core/src/runtime/step-handler.ts:127-146

## Stack trace loss in step_failed event when max retries are exceeded

**What fails:** Step handler does not include stack property in step_failed event when step is re-invoked after max retries exhausted, causing FatalError in workflow to lose original stack trace

**How to reproduce:**
1. Create a step that always fails with an error that includes a stack trace
2. Exhaust all retry attempts (e.g., maxRetries = 3, so 4 total attempts)
3. The step handler is re-invoked (attempt > maxRetries + 1)
4. This triggers the edge case at lines 127-146 in step-handler.ts
5. A step_failed event is created with fatal: true but without stack property
6. When step.ts processes this event (lines 103-104), the stack remains unset since event.eventData.stack is undefined

**Result:** FatalError created in workflow has default stack (from step.ts) instead of original error stack from step execution

**Expected:** Stack trace should be propagated consistently across all error paths. All other step_failed events with fatal: true include stack property (lines 311-313 and 351-353), but edge case was missing it.

**Root cause:** When step handler is re-invoked after max retries exhausted (attempt > maxRetries + 1), the code creates a step_failed event without including step.error?.stack, which contains the previous error information from the last failed attempt. Other code paths capture this correctly.

Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>

* add withData

* Enable source maps for step bundles and validate in e2e tests

- Move sourcemap generation from intermediate workflow bundle to steps bundle
- Enhance step error tests to validate function names and source files in stack traces
- Remove isLocalDeployment() checks since source maps now work in dev mode

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add changeset for step bundle source maps

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add changeset for core package e2e test improvements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Enable source maps in CI e2e tests

Add NODE_OPTIONS="--enable-source-maps" to all e2e test jobs to ensure
stack traces show original source file paths.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix step error source map checks for local prod builds

Add hasStepSourceMaps() helper that correctly identifies when source maps
are expected to work:
- Vercel prod: works (production builds have proper source maps)
- Local dev: works (DEV_TEST_CONFIG is set, uses step bundle with inline source maps)
- Local prod: doesn't work (nitro/bundler output doesn't preserve source maps)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add hasWorkflowSourceMaps() utility for vite-based framework exception

- Add isViteBasedFramework() helper to detect vite, sveltekit, astro apps
- Add hasWorkflowSourceMaps() to check if workflow errors have source maps
  (known issue: vite-based frameworks in local deployments don't preserve them)
- Refactor e2e.test.ts to use the new utility instead of inline check

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* prevent sourcemap checks in nextjs and sveltekit (known offenders)

* improve source maps matrix check

* fix matrix again

* ugh more matrix ignoring

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
2026-01-05 14:12:24 -08:00
Malte Ubl 75630fe1d8 Type check all the docs and READMEs (#715)
* Type check all the docs and READMEs

* mdx

DCO Remediation Commit for Malte Ubl <malte.ubl@gmail.com>

I, Malte Ubl <malte.ubl@gmail.com>, hereby add my Signed-off-by to this commit: f61880c883

Signed-off-by: Malte Ubl <malte.ubl@gmail.com>

* mdx2

DCO Remediation Commit for Malte Ubl <malte.ubl@gmail.com>

I, Malte Ubl <malte.ubl@gmail.com>, hereby add my Signed-off-by to this commit: 98dd484f9c38191e17a086965db02df813ec334c

Signed-off-by: Malte Ubl <malte.ubl@gmail.com>

* remove temp AI scripts and fix one docs issue

* Fix code review issue

* add empty changeset

---------

Signed-off-by: Malte Ubl <malte.ubl@gmail.com>
Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
2026-01-02 13:28:14 -08:00