Skip to content

feat(cli): add bulk cancel, --status filter, fix step JSON hydration#1467

Merged
VaguelySerious merged 2 commits intomainfrom
lucas/dse-2320-cli-bulk-cancel
Mar 23, 2026
Merged

feat(cli): add bulk cancel, --status filter, fix step JSON hydration#1467
VaguelySerious merged 2 commits intomainfrom
lucas/dse-2320-cli-bulk-cancel

Conversation

@Ralph-20
Copy link
Contributor

@Ralph-20 Ralph-20 commented Mar 20, 2026

Description

Three changes to the CLI:

1. Bulk cancel (workflow cancel --status=<status>)

  • Cancel multiple runs matching --status and/or --workflowName filters
  • Shows a table of matching runs before cancelling
  • Interactive y/n confirmation prompt (bypass with -y/--confirm for CI)
  • Per-run progress output with success/failure tracking
  • --limit controls max runs per batch (default 50), warns if more match

2. Status filter for inspect runs (--status)

  • New --status flag on workflow inspect runs
  • Filters by: running, completed, failed, cancelled, pending
  • Passes through to existing ListWorkflowRunsParams.status in World API

3. Fix: step I/O hydration in JSON output

  • workflow inspect steps --withData --json now shows hydrated JS values
  • Previously showed raw devalue byte arrays ({"0":100,...})
  • Matches behavior already present in inspect runs --json

Why: Needed to manually cancel 40+ stuck runs one at a time. The World API already supports status filtering — the CLI just didn't expose it.


CLI Output Examples

Bulk cancel 3 running workflows:

$ workflow cancel --status=running -y

Found 3 runs to cancel:

runId                            workflow          status   startedAt
-------------------------------  ----------------  -------  ------------------------
wrun_01KM66FHPGHJYPWS7SEZZD55SX  sleepingWorkflow  running  2026-03-20T18:00:20.953Z
wrun_01KM66FHEPTETDK2M1TBB5QRA8  sleepingWorkflow  running  2026-03-20T18:00:20.706Z
wrun_01KM66FH7HF293ANJGKZMQ8CDE  sleepingWorkflow  running  2026-03-20T18:00:20.486Z

  ✓ wrun_01KM66FHPGHJYPWS7SEZZD55SX (1/3)
  ✓ wrun_01KM66FHEPTETDK2M1TBB5QRA8 (2/3)
  ✓ wrun_01KM66FH7HF293ANJGKZMQ8CDE (3/3)

Done: 3 cancelled

hasMore warning (more runs than --limit):

$ workflow cancel --status=running --limit=1 -y

Found 1 runs to cancel:

runId                            workflow          status   startedAt
-------------------------------  ----------------  -------  ------------------------
wrun_01KM66GTZJCWENQX2FR2GE4RKY  sleepingWorkflow  running  2026-03-20T18:01:03.236Z

[Warn] More runs match these filters. Increase --limit (currently 1) or re-run to cancel additional runs.
  ✓ wrun_01KM66GTZJCWENQX2FR2GE4RKY (1/1)

Done: 1 cancelled

No matching runs:

$ workflow cancel --status=running -y
[Warn] No matching runs found.

Error — no filters provided:

$ workflow cancel
[Error] Provide a run ID or use --status/--workflowName to bulk cancel.
Examples:
  workflow cancel <run-id>
  workflow cancel --status=running
  workflow cancel --status=running --workflowName=myWorkflow

--status filter on inspect runs:

$ workflow inspect runs --status=cancelled --limit 5

Status Legend:
  R = running  C = completed  F = failed  X = cancelled  P = pending

runId    workflowName      S  startedAt
-------  ----------------  -  -----------------------
...55SX  sleepingWorkflow  X  2026-03-20 18:00:20.953
...QRA8  sleepingWorkflow  X  2026-03-20 18:00:20.706
...8CDE  sleepingWorkflow  X  2026-03-20 18:00:20.486

Step hydration fix (--json shows actual values, not byte arrays):

{
    "stepName": "step//./workflows/98_duplicate_case//add",
    "status": "completed",
    "input": { "args": [205, 5] },
    "output": 210
}

Previously "output" would show {"0": 210} (raw devalue bytes).


How did you test your changes?

Reusable E2E test script (packages/cli/test-bulk-cancel.sh) against local world backend — 8/8 passing:

# Test Result
1 Single cancel regression
2 --status filter on inspect runs
3 Bulk cancel --status=running (3 workflows)
4 Bulk cancel --workflowName filter
5 No matching runs warning
6 Step JSON hydration (actual values, not byte arrays)
7 hasMore warning with --limit=1
8 Error when no runId or filters

Run with: cd packages/cli && pnpm build && bash test-bulk-cancel.sh (requires workbench on :3000)

Known limitations / follow-ups

  • --workflowName requires full WDK pathsleepingWorkflow won't match workflow//./workflows/99_e2e//sleepingWorkflow. The World API does exact match. Could add substring/suffix matching in a follow-up.
  • Interactive prompt not tested — only tested -y auto-confirm. The promptConfirm() function is standard readline, but no automated TTY test exists.
  • Only tested --backend local — Vercel backend uses different workflow name formats. Status filter should work identically since it passes through to the same World API.
  • Cancelling terminal-state runscancel --status=completed lists runs and attempts cancel, but each cancel fails with "Cannot transition from terminal state". Could filter these out upfront or add a pre-check.

PR Checklist - Required to merge

  • 📦 pnpm changeset was run to create a changelog for this PR
  • 🔒 DCO sign-off passes
  • 📝 Ping @vercel/workflow in a comment once the PR is ready

🤖 Generated with Claude Code

- Bulk cancel: `workflow cancel --status=running` cancels all matching runs
  with confirmation prompt (bypass with -y). Supports --workflowName and --limit.
- Status filter: `workflow inspect runs --status=completed` filters by status.
- Fix: `inspect steps --withData --json` now shows hydrated values, not raw bytes.

Signed-off-by: Lucas Ralph <lucas@vercel.com>
Signed-off-by: Lucas Ralph <lucas.ralph@vercel.com>
@Ralph-20 Ralph-20 requested a review from a team as a code owner March 20, 2026 17:47
@changeset-bot
Copy link

changeset-bot bot commented Mar 20, 2026

🦋 Changeset detected

Latest commit: d004676

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

This PR includes changesets to release 16 packages
Name Type
@workflow/cli Patch
workflow Patch
@workflow/world-testing Patch
@workflow/ai Patch
@workflow/core Patch
@workflow/builders Patch
@workflow/next Patch
@workflow/nitro Patch
@workflow/vitest Patch
@workflow/web-shared Patch
@workflow/astro Patch
@workflow/nest Patch
@workflow/rollup Patch
@workflow/sveltekit Patch
@workflow/vite Patch
@workflow/nuxt 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

@vercel
Copy link
Contributor

vercel bot commented Mar 20, 2026

@Ralph-20
Copy link
Contributor Author

cc @vercel/workflow — ready for review when you get a chance

@github-actions
Copy link
Contributor

github-actions bot commented Mar 20, 2026

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 0.043s (-4.7%) 1.005s (~) 0.962s 10 1.00x
💻 Local Next.js (Turbopack) 0.050s 1.006s 0.955s 10 1.17x
🌐 Redis Next.js (Turbopack) 0.054s 1.005s 0.951s 10 1.26x
🐘 Postgres Express 0.058s (-18.6% 🟢) 1.011s (-0.6%) 0.953s 10 1.36x
🐘 Postgres Next.js (Turbopack) 0.059s 1.012s 0.953s 10 1.39x
🐘 Postgres Nitro 0.060s (-13.1% 🟢) 1.013s (~) 0.953s 10 1.41x
🌐 MongoDB Next.js (Turbopack) 0.110s 1.008s 0.898s 10 2.57x
💻 Local Nitro ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 0.482s (-16.3% 🟢) 2.540s (-0.6%) 2.058s 10 1.00x
▲ Vercel Nitro 0.502s (+1.2%) 2.767s (+8.7% 🔺) 2.264s 10 1.04x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

workflow with 1 step

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 1.122s 2.007s 0.884s 10 1.00x
💻 Local Next.js (Turbopack) 1.130s 2.005s 0.876s 10 1.01x
💻 Local Express 1.132s (~) 2.005s (~) 0.873s 10 1.01x
🐘 Postgres Express 1.149s (+0.8%) 2.012s (~) 0.863s 10 1.02x
🐘 Postgres Next.js (Turbopack) 1.149s 2.013s 0.864s 10 1.02x
🐘 Postgres Nitro 1.150s (+0.7%) 2.013s (~) 0.863s 10 1.02x
🌐 MongoDB Next.js (Turbopack) 1.321s 2.008s 0.687s 10 1.18x
💻 Local Nitro ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.165s (-7.4% 🟢) 4.086s (+5.4% 🔺) 1.921s 10 1.00x
▲ Vercel Express 2.196s (-0.5%) 3.771s (-3.1%) 1.575s 10 1.01x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

workflow with 10 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 10.788s 11.023s 0.235s 3 1.00x
💻 Local Next.js (Turbopack) 10.837s 11.024s 0.187s 3 1.00x
🐘 Postgres Express 10.931s (~) 11.039s (~) 0.107s 3 1.01x
💻 Local Express 10.932s (~) 11.023s (~) 0.091s 3 1.01x
🐘 Postgres Nitro 10.959s (~) 11.050s (~) 0.090s 3 1.02x
🐘 Postgres Next.js (Turbopack) 10.970s 11.374s 0.405s 3 1.02x
🌐 MongoDB Next.js (Turbopack) 12.270s 13.019s 0.749s 3 1.14x
💻 Local Nitro ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 17.165s (-1.3%) 19.245s (+2.0%) 2.080s 2 1.00x
▲ Vercel Express 18.999s (+9.3% 🔺) 21.087s (+8.9% 🔺) 2.088s 2 1.11x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

workflow with 25 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 14.289s 15.028s 0.740s 4 1.00x
💻 Local Next.js (Turbopack) 14.643s 15.029s 0.386s 4 1.02x
🐘 Postgres Next.js (Turbopack) 14.648s 15.043s 0.396s 4 1.03x
🐘 Postgres Express 14.691s (+0.8%) 15.042s (~) 0.351s 4 1.03x
🐘 Postgres Nitro 14.768s (~) 15.045s (~) 0.277s 4 1.03x
💻 Local Express 14.981s (~) 15.029s (-3.2%) 0.048s 4 1.05x
🌐 MongoDB Next.js (Turbopack) 17.899s 18.028s 0.130s 4 1.25x
💻 Local Nitro ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 33.578s (+3.9%) 36.046s (+3.7%) 2.468s 2 1.00x
▲ Vercel Express 33.851s (~) 35.807s (+0.6%) 1.956s 2 1.01x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

workflow with 50 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 13.539s 14.025s 0.487s 7 1.00x
🐘 Postgres Next.js (Turbopack) 14.018s 14.469s 0.451s 7 1.04x
🐘 Postgres Express 14.210s (+1.4%) 15.039s (+3.9%) 0.829s 6 1.05x
🐘 Postgres Nitro 14.345s (~) 15.043s (~) 0.697s 6 1.06x
💻 Local Next.js (Turbopack) 16.023s 16.530s 0.507s 6 1.18x
💻 Local Express 16.631s (~) 17.030s (~) 0.398s 6 1.23x
🌐 MongoDB Next.js (Turbopack) 20.456s 21.029s 0.572s 5 1.51x
💻 Local Nitro ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 63.664s (+13.2% 🔺) 65.122s (+13.7% 🔺) 1.457s 2 1.00x
▲ Vercel Express 63.950s (+10.8% 🔺) 65.855s (+10.8% 🔺) 1.904s 2 1.00x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

Promise.all with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 1.249s 2.011s 0.762s 15 1.00x
🐘 Postgres Nitro 1.277s (-1.3%) 2.011s (~) 0.734s 15 1.02x
🐘 Postgres Express 1.278s (+1.0%) 2.011s (~) 0.733s 15 1.02x
🌐 Redis Next.js (Turbopack) 1.279s 2.006s 0.727s 15 1.02x
💻 Local Express 1.512s (~) 2.005s (~) 0.494s 15 1.21x
💻 Local Next.js (Turbopack) 1.598s 2.073s 0.475s 15 1.28x
🌐 MongoDB Next.js (Turbopack) 2.182s 3.009s 0.827s 10 1.75x
💻 Local Nitro ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.552s (-2.5%) 4.267s (+1.6%) 1.715s 8 1.00x
▲ Vercel Express 2.834s (+2.7%) 4.482s (-2.9%) 1.649s 7 1.11x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

Promise.all with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 2.446s (-0.6%) 3.012s (~) 0.566s 10 1.00x
🐘 Postgres Nitro 2.455s (-0.6%) 3.012s (~) 0.557s 10 1.00x
🐘 Postgres Next.js (Turbopack) 2.470s 3.012s 0.542s 10 1.01x
🌐 Redis Next.js (Turbopack) 2.618s 3.008s 0.391s 10 1.07x
💻 Local Express 3.034s (+1.2%) 3.885s (+9.0% 🔺) 0.851s 8 1.24x
💻 Local Next.js (Turbopack) 3.043s 3.760s 0.717s 8 1.24x
🌐 MongoDB Next.js (Turbopack) 4.697s 5.179s 0.481s 6 1.92x
💻 Local Nitro ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.749s (+8.3% 🔺) 4.280s (+12.4% 🔺) 1.531s 8 1.00x
▲ Vercel Express 2.819s (-1.3%) 4.418s (-1.0%) 1.600s 7 1.03x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

Promise.all with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 3.613s (+0.7%) 4.014s (~) 0.401s 8 1.00x
🐘 Postgres Nitro 3.630s (~) 4.016s (~) 0.386s 8 1.00x
🐘 Postgres Next.js (Turbopack) 3.759s 4.014s 0.254s 8 1.04x
🌐 Redis Next.js (Turbopack) 4.177s 4.867s 0.690s 7 1.16x
💻 Local Next.js (Turbopack) 7.597s 8.269s 0.672s 4 2.10x
💻 Local Express 8.377s (-1.2%) 9.024s (~) 0.647s 4 2.32x
🌐 MongoDB Next.js (Turbopack) 10.003s 10.684s 0.681s 3 2.77x
💻 Local Nitro ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 3.669s (+11.7% 🔺) 5.264s (+12.8% 🔺) 1.595s 7 1.00x
▲ Vercel Nitro 3.864s (+27.0% 🔺) 5.420s (+21.2% 🔺) 1.555s 6 1.05x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 1.259s 2.012s 0.753s 15 1.00x
🐘 Postgres Nitro 1.266s (-0.8%) 2.011s (~) 0.745s 15 1.01x
🐘 Postgres Express 1.279s (+1.6%) 2.011s (~) 0.731s 15 1.02x
🌐 Redis Next.js (Turbopack) 1.292s 2.006s 0.714s 15 1.03x
💻 Local Express 1.526s (-0.7%) 2.006s (~) 0.480s 15 1.21x
💻 Local Next.js (Turbopack) 1.545s 2.006s 0.461s 15 1.23x
🌐 MongoDB Next.js (Turbopack) 2.168s 3.008s 0.840s 10 1.72x
💻 Local Nitro ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.456s (+15.6% 🔺) 4.168s (+12.9% 🔺) 1.712s 8 1.00x
▲ Vercel Express 2.510s (+13.6% 🔺) 4.028s (+4.1%) 1.518s 8 1.02x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

Promise.race with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 2.443s (~) 3.012s (~) 0.569s 10 1.00x
🐘 Postgres Nitro 2.462s (~) 3.012s (~) 0.551s 10 1.01x
🐘 Postgres Next.js (Turbopack) 2.485s 3.012s 0.526s 10 1.02x
🌐 Redis Next.js (Turbopack) 2.557s 3.008s 0.451s 10 1.05x
💻 Local Next.js (Turbopack) 3.032s 3.885s 0.853s 8 1.24x
💻 Local Express 3.064s (+1.0%) 3.760s (~) 0.696s 8 1.25x
🌐 MongoDB Next.js (Turbopack) 4.748s 5.179s 0.431s 6 1.94x
💻 Local Nitro ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.693s (+0.6%) 4.048s (-12.2% 🟢) 1.355s 8 1.00x
▲ Vercel Nitro 2.731s (+5.5% 🔺) 4.275s (+10.7% 🔺) 1.544s 8 1.01x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

Promise.race with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 3.589s (-0.8%) 4.014s (~) 0.425s 8 1.00x
🐘 Postgres Express 3.631s (+0.8%) 4.014s (~) 0.384s 8 1.01x
🐘 Postgres Next.js (Turbopack) 3.761s 4.014s 0.254s 8 1.05x
🌐 Redis Next.js (Turbopack) 4.192s 5.011s 0.819s 6 1.17x
💻 Local Next.js (Turbopack) 8.221s 9.021s 0.800s 4 2.29x
💻 Local Express 8.895s (-1.8%) 9.273s (-5.1% 🟢) 0.378s 4 2.48x
🌐 MongoDB Next.js (Turbopack) 10.055s 10.682s 0.627s 3 2.80x
💻 Local Nitro ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 3.249s (+14.8% 🔺) 5.071s (+14.5% 🔺) 1.822s 6 1.00x
▲ Vercel Express 4.050s (+32.0% 🔺) 5.549s (+22.1% 🔺) 1.499s 6 1.25x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 0.695s 1.004s 0.310s 60 1.00x
🐘 Postgres Next.js (Turbopack) 0.830s 1.009s 0.179s 60 1.20x
💻 Local Next.js (Turbopack) 0.862s 1.004s 0.142s 60 1.24x
🐘 Postgres Nitro 0.872s (-2.8%) 1.009s (-3.3%) 0.137s 60 1.25x
🐘 Postgres Express 0.895s (+3.3%) 1.043s (+1.7%) 0.149s 58 1.29x
💻 Local Express 0.989s (+0.6%) 1.229s (+12.2% 🔺) 0.240s 49 1.42x
🌐 MongoDB Next.js (Turbopack) 2.143s 3.008s 0.865s 20 3.08x
💻 Local Nitro ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 9.579s (~) 11.454s (+4.7%) 1.875s 6 1.00x
▲ Vercel Express 9.995s (+0.6%) 11.933s (+2.0%) 1.938s 6 1.04x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 1.701s 2.006s 0.305s 45 1.00x
🐘 Postgres Next.js (Turbopack) 1.996s 2.344s 0.348s 39 1.17x
🐘 Postgres Express 2.141s (+1.2%) 3.011s (~) 0.871s 30 1.26x
🐘 Postgres Nitro 2.180s (+0.9%) 3.012s (+1.1%) 0.833s 30 1.28x
💻 Local Next.js (Turbopack) 2.716s 3.008s 0.292s 30 1.60x
💻 Local Express 2.995s (-0.6%) 3.547s (~) 0.553s 26 1.76x
🌐 MongoDB Next.js (Turbopack) 5.279s 6.012s 0.733s 15 3.10x
💻 Local Nitro ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 32.662s (+5.3% 🔺) 34.929s (+7.5% 🔺) 2.268s 3 1.00x
▲ Vercel Express 32.867s (-1.1%) 34.681s (-1.3%) 1.814s 3 1.01x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 3.416s 4.009s 0.593s 30 1.00x
🐘 Postgres Next.js (Turbopack) 4.120s 5.014s 0.895s 24 1.21x
🐘 Postgres Express 4.257s (~) 5.013s (+0.8%) 0.757s 24 1.25x
🐘 Postgres Nitro 4.530s (+4.5%) 5.016s (~) 0.486s 24 1.33x
💻 Local Next.js (Turbopack) 8.671s 9.017s 0.346s 14 2.54x
💻 Local Express 9.050s (-1.1%) 9.632s (-1.6%) 0.582s 13 2.65x
🌐 MongoDB Next.js (Turbopack) 11.127s 11.747s 0.620s 11 3.26x
💻 Local Nitro ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 88.419s (~) 89.734s (~) 1.315s 2 1.00x
▲ Vercel Nitro 89.075s (-3.5%) 91.472s (-2.9%) 2.397s 2 1.01x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 0.272s 1.009s 0.737s 60 1.00x
🐘 Postgres Express 0.299s (-0.9%) 1.009s (~) 0.709s 60 1.10x
🐘 Postgres Nitro 0.331s (+12.4% 🔺) 1.026s (+1.7%) 0.695s 59 1.22x
🌐 Redis Next.js (Turbopack) 0.410s 1.004s 0.594s 60 1.51x
💻 Local Next.js (Turbopack) 0.563s 1.005s 0.441s 60 2.07x
💻 Local Express 0.592s (-1.9%) 1.004s (~) 0.413s 60 2.18x
🌐 MongoDB Next.js (Turbopack) 1.645s 2.150s 0.506s 28 6.05x
💻 Local Nitro ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.111s (-8.9% 🟢) 3.616s (-6.5% 🟢) 1.504s 17 1.00x
▲ Vercel Express 2.607s (+3.8%) 4.581s (+13.7% 🔺) 1.975s 14 1.23x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 0.531s (+0.7%) 1.009s (~) 0.478s 90 1.00x
🐘 Postgres Nitro 0.536s (-0.5%) 1.009s (~) 0.473s 90 1.01x
🐘 Postgres Next.js (Turbopack) 0.543s 1.021s 0.478s 89 1.02x
🌐 Redis Next.js (Turbopack) 1.192s 2.006s 0.814s 45 2.25x
💻 Local Express 2.557s (-0.9%) 3.008s (~) 0.452s 30 4.81x
💻 Local Next.js (Turbopack) 2.587s 3.009s 0.422s 30 4.87x
🌐 MongoDB Next.js (Turbopack) 4.642s 5.177s 0.534s 18 8.74x
💻 Local Nitro ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.997s (-2.7%) 4.725s (+5.0% 🔺) 1.728s 20 1.00x
▲ Vercel Nitro 3.117s (+7.6% 🔺) 4.674s (+10.8% 🔺) 1.557s 20 1.04x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 0.901s 1.125s 0.224s 107 1.00x
🐘 Postgres Express 0.920s (+2.5%) 1.060s (+1.8%) 0.140s 114 1.02x
🐘 Postgres Nitro 0.942s (~) 1.279s (+7.3% 🔺) 0.337s 94 1.05x
🌐 Redis Next.js (Turbopack) 2.819s 3.058s 0.239s 40 3.13x
🌐 MongoDB Next.js (Turbopack) 9.937s 10.515s 0.578s 12 11.03x
💻 Local Next.js (Turbopack) 10.785s 11.481s 0.697s 11 11.97x
💻 Local Express 11.303s (~) 11.936s (-0.8%) 0.633s 11 12.55x
💻 Local Nitro ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 8.228s (-1.6%) 10.019s (+2.8%) 1.791s 12 1.00x
▲ Vercel Express 8.945s (+23.0% 🔺) 10.819s (+20.9% 🔺) 1.874s 12 1.09x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

Stream Benchmarks (includes TTFB metrics)
workflow with stream

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 0.173s 1.000s 0.002s 1.007s 0.834s 10 1.00x
💻 Local Next.js (Turbopack) 0.176s 1.001s 0.011s 1.018s 0.842s 10 1.02x
💻 Local Express 0.203s (-0.8%) 1.003s (~) 0.011s (-5.9% 🟢) 1.017s (~) 0.814s 10 1.17x
🐘 Postgres Next.js (Turbopack) 0.203s 1.001s 0.001s 1.012s 0.809s 10 1.17x
🐘 Postgres Express 0.211s (-2.4%) 0.994s (~) 0.001s (+16.7% 🔺) 1.012s (~) 0.801s 10 1.22x
🐘 Postgres Nitro 0.226s (-5.5% 🟢) 0.997s (~) 0.002s (+21.4% 🔺) 1.014s (~) 0.788s 10 1.30x
🌐 MongoDB Next.js (Turbopack) 0.511s 0.946s 0.002s 1.010s 0.499s 10 2.95x
💻 Local Nitro ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 1.698s (+2.8%) 2.743s (+2.3%) 0.011s (+86.7% 🔺) 3.383s (+3.4%) 1.686s 10 1.00x
▲ Vercel Express 1.799s (+6.6% 🔺) 3.200s (+21.2% 🔺) 0.006s (+14.5% 🔺) 3.816s (+17.9% 🔺) 2.018s 10 1.06x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - - -

🔍 Observability: Nitro | Express

stream pipeline with 5 transform steps (1MB)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 0.499s 1.000s 0.003s 1.011s 0.512s 60 1.00x
🐘 Postgres Next.js (Turbopack) 0.664s 1.009s 0.004s 1.027s 0.363s 59 1.33x
🐘 Postgres Express 0.678s (-2.3%) 1.005s (~) 0.004s (+4.4%) 1.026s (~) 0.349s 59 1.36x
🐘 Postgres Nitro 0.701s (-3.0%) 1.005s (~) 0.004s (+8.9% 🔺) 1.026s (~) 0.325s 59 1.40x
💻 Local Next.js (Turbopack) 0.719s 1.026s 0.011s 1.043s 0.324s 58 1.44x
💻 Local Express 0.731s (-5.8% 🟢) 1.009s (-1.7%) 0.010s (+1.2%) 1.024s (-1.6%) 0.293s 59 1.46x
🌐 MongoDB Next.js (Turbopack) 1.320s 1.953s 0.003s 2.012s 0.692s 30 2.64x
💻 Local Nitro ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 4.441s (+2.6%) 5.501s (~) 0.517s (+97.7% 🔺) 6.680s (+6.1% 🔺) 2.240s 9 1.00x
▲ Vercel Express 4.555s (+4.4%) 5.939s (+6.6% 🔺) 0.244s (-8.5% 🟢) 6.865s (+7.0% 🔺) 2.309s 9 1.03x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - - -

🔍 Observability: Nitro | Express

10 parallel streams (1MB each)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 0.912s 1.016s 0.000s 1.021s 0.109s 59 1.00x
🐘 Postgres Next.js (Turbopack) 1.085s 1.795s 0.000s 1.806s 0.721s 34 1.19x
🐘 Postgres Express 1.091s (+22.1% 🔺) 1.788s (+65.1% 🔺) 0.000s (-100.0% 🟢) 1.806s (+63.5% 🔺) 0.715s 34 1.20x
🐘 Postgres Nitro 1.092s (+18.6% 🔺) 1.869s (+75.9% 🔺) 0.000s (-100.0% 🟢) 1.886s (+74.5% 🔺) 0.794s 32 1.20x
💻 Local Express 1.247s (-0.9%) 2.021s (~) 0.000s (-52.9% 🟢) 2.024s (~) 0.777s 30 1.37x
💻 Local Next.js (Turbopack) 1.314s 2.020s 0.000s 2.025s 0.711s 30 1.44x
🌐 MongoDB Next.js (Turbopack) 2.345s 2.950s 0.000s 3.008s 0.662s 20 2.57x
💻 Local Nitro ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.689s (+5.9% 🔺) 3.624s (+12.8% 🔺) 0.000s (+14.3% 🔺) 4.393s (+16.9% 🔺) 1.704s 14 1.00x
▲ Vercel Express 2.755s (+15.2% 🔺) 3.938s (+19.8% 🔺) 0.000s (NaN%) 4.569s (+15.8% 🔺) 1.814s 14 1.02x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - - -

🔍 Observability: Nitro | Express

fan-out fan-in 10 streams (1MB each)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 1.621s 2.035s 0.000s 2.040s 0.419s 30 1.00x
🐘 Postgres Nitro 2.037s (+7.7% 🔺) 2.496s (+12.5% 🔺) 0.000s (+125.0% 🔺) 2.513s (+12.2% 🔺) 0.476s 24 1.26x
🐘 Postgres Express 2.045s (+13.3% 🔺) 2.380s (+13.4% 🔺) 0.000s (+Infinity% 🔺) 2.435s (+14.8% 🔺) 0.390s 26 1.26x
🐘 Postgres Next.js (Turbopack) 2.224s 3.005s 0.000s 3.014s 0.790s 20 1.37x
💻 Local Express 3.577s (+3.9%) 4.030s (-1.6%) 0.001s (~) 4.034s (-1.6%) 0.457s 15 2.21x
💻 Local Next.js (Turbopack) 3.662s 4.164s 0.001s 4.170s 0.508s 15 2.26x
🌐 MongoDB Next.js (Turbopack) 4.411s 4.948s 0.000s 5.010s 0.599s 12 2.72x
💻 Local Nitro ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 3.882s (+18.1% 🔺) 5.110s (+11.8% 🔺) 0.000s (-27.3% 🟢) 5.703s (+10.9% 🔺) 1.821s 11 1.00x
▲ Vercel Nitro 4.263s (+26.3% 🔺) 5.594s (+23.3% 🔺) 0.000s (+20.0% 🔺) 6.273s (+23.4% 🔺) 2.010s 10 1.10x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - - -

🔍 Observability: Express | Nitro

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World 🥇 Fastest Framework Wins
💻 Local Next.js (Turbopack) 14/21
🐘 Postgres Next.js (Turbopack) 12/21
▲ Vercel Nitro 15/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework 🥇 Fastest World Wins
Express 🐘 Postgres 18/21
Next.js (Turbopack) 🌐 Redis 11/21
Nitro 🐘 Postgres 20/21
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run


Some benchmark jobs failed:

  • Local: cancelled
  • Postgres: success
  • Vercel: failure

Check the workflow run for details.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 20, 2026

🧪 E2E Test Results

Some tests failed

Summary

Passed Failed Skipped Total
❌ ▲ Vercel Production 757 1 67 825
✅ 💻 Local Development 782 0 118 900
✅ 📦 Local Production 782 0 118 900
✅ 🐘 Local Postgres 782 0 118 900
✅ 🪟 Windows 72 0 3 75
❌ 🌍 Community Worlds 118 56 21 195
✅ 📋 Other 198 0 27 225
Total 3491 57 472 4020

❌ Failed Tests

▲ Vercel Production (1 failed)

nuxt (1 failed):

🌍 Community Worlds (56 failed)

mongodb (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KME09T8HP68RWK9KQ0P0TNNR
  • webhookWorkflow | wrun_01KME0A2FCH2Y1QJ3AWTNVGVMR
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KME0FC30RM8NDSPP0K0EY4PR

redis (2 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KME09T8HP68RWK9KQ0P0TNNR
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KME0FC30RM8NDSPP0K0EY4PR

turso (51 failed):

  • addTenWorkflow | wrun_01KME08HGBGN86MG5JE642PTYH
  • addTenWorkflow | wrun_01KME08HGBGN86MG5JE642PTYH
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KME09KZ238TZKCMQTE533QZY
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KME08RWZGQSWRCG41PD9412T
  • promiseRaceWorkflow | wrun_01KME08YQHM4J80WZ16F675Y95
  • promiseAnyWorkflow | wrun_01KME092ZP7WV0QAYVBKZ6YBWJ
  • importedStepOnlyWorkflow | wrun_01KME0A13SRE3JRWPNV8AWHMDS
  • hookWorkflow | wrun_01KME09EQXPEDP5JRYYWKWT0CP
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KME09T8HP68RWK9KQ0P0TNNR
  • webhookWorkflow | wrun_01KME0A2FCH2Y1QJ3AWTNVGVMR
  • sleepingWorkflow | wrun_01KME0AAMKDVE2GDADBFS97D45
  • parallelSleepWorkflow | wrun_01KME0APMW4D9QRD7JMA2K1ZFT
  • nullByteWorkflow | wrun_01KME0ATQT464W2637ZMVS8PRZ
  • workflowAndStepMetadataWorkflow | wrun_01KME0AX15DC8N72CVAHNDS0AP
  • fetchWorkflow | wrun_01KME0BWNTPYSVX1FSYEN52PPP
  • promiseRaceStressTestWorkflow | wrun_01KME0BZT6ZHBAPV5FM0TWJS9Q
  • 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()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KME0ES44EYRM0ZP0YZCMW31H
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KME0FC30RM8NDSPP0K0EY4PR
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KME0G0BSDF8H95899ZNQCB4Z
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KME0GJ95Q2735DMKYXCNTEJP
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KME0GSK2TMPAVM25E69FFVRW
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KME0GYCAZN25BCZH260VSR4W
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KME0H07RA3WERN3Z420EAA5V
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KME0HED6W3JGZ9YB4DMYM17J
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KME0HJZPHTKFWNPXS8303GR4
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KME0HSMJ7CNQKK2K2CP175D4
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KME0HZX693G05TQQBBS0H2GS
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KME0J5JVQDVE26H445S5M6B0
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KME0JCGJWEQ2RPJC3E0T0KE6
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KME0JKB7M392H3YN7KF9YH36
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KME0JZAS1P785M7YCWPYH7QN
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KME0K8HB7CA4F4BC3S28ZZ83
  • cancelRun - cancelling a running workflow | wrun_01KME0KE880EQ818S8V27FGNQF
  • cancelRun via CLI - cancelling a running workflow | wrun_01KME0KPSQVH4HF5VHRNYPW016
  • 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 | wrun_01KME0M2CXN6E4FD50HWQHNXNC
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KME0MNXQ6ETYQ9R48N5QMQ65
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KME0N0X2BWCHMKRJFBVZTE56

Details by Category

❌ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 68 0 7
✅ example 68 0 7
✅ express 68 0 7
✅ fastify 68 0 7
✅ hono 68 0 7
✅ nextjs-turbopack 73 0 2
✅ nextjs-webpack 73 0 2
✅ nitro 68 0 7
❌ nuxt 67 1 7
✅ sveltekit 68 0 7
✅ vite 68 0 7
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 66 0 9
✅ express-stable 66 0 9
✅ fastify-stable 66 0 9
✅ hono-stable 66 0 9
✅ nextjs-turbopack-canary 55 0 20
✅ nextjs-turbopack-stable 72 0 3
✅ nextjs-webpack-canary 55 0 20
✅ nextjs-webpack-stable 72 0 3
✅ nitro-stable 66 0 9
✅ nuxt-stable 66 0 9
✅ sveltekit-stable 66 0 9
✅ vite-stable 66 0 9
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 66 0 9
✅ express-stable 66 0 9
✅ fastify-stable 66 0 9
✅ hono-stable 66 0 9
✅ nextjs-turbopack-canary 55 0 20
✅ nextjs-turbopack-stable 72 0 3
✅ nextjs-webpack-canary 55 0 20
✅ nextjs-webpack-stable 72 0 3
✅ nitro-stable 66 0 9
✅ nuxt-stable 66 0 9
✅ sveltekit-stable 66 0 9
✅ vite-stable 66 0 9
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 66 0 9
✅ express-stable 66 0 9
✅ fastify-stable 66 0 9
✅ hono-stable 66 0 9
✅ nextjs-turbopack-canary 55 0 20
✅ nextjs-turbopack-stable 72 0 3
✅ nextjs-webpack-canary 55 0 20
✅ nextjs-webpack-stable 72 0 3
✅ nitro-stable 66 0 9
✅ nuxt-stable 66 0 9
✅ sveltekit-stable 66 0 9
✅ vite-stable 66 0 9
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 72 0 3
❌ 🌍 Community Worlds
App Passed Failed Skipped
✅ mongodb-dev 3 0 2
❌ mongodb 52 3 5
✅ redis-dev 3 0 2
❌ redis 53 2 5
✅ turso-dev 3 0 2
❌ turso 4 51 5
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 66 0 9
✅ e2e-local-postgres-nest-stable 66 0 9
✅ e2e-local-prod-nest-stable 66 0 9

📋 View full workflow run


Some E2E test jobs failed:

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

Check the workflow run for details.

Copy link
Member

@VaguelySerious VaguelySerious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet, thanks!

Copy link
Collaborator

@karthikscale3 karthikscale3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor nit, otherwise looks good to me:

Non-TTY prompt behaviorpromptConfirm() returns true when !process.stdin.isTTY, meaning non-interactive environments will auto-confirm. This is arguably a dangerous default — a CI script calling workflow cancel --status=running without -y would silently cancel all matching runs. Should we flip this?

…ts (CI, pipes, cron) without requiring the `-y` flag, risking accidental mass cancellation of workflow runs.

This commit fixes the issue reported at packages/cli/src/commands/cancel.ts:175

## Bug Analysis

The `promptConfirm` function in `packages/cli/src/commands/cancel.ts` (line 172-189) is designed to ask the user for interactive confirmation before bulk-cancelling workflow runs. However, when `process.stdin.isTTY` is `false` (as in CI pipelines, cron jobs, piped commands, etc.), the function returns `true` — meaning it auto-confirms the destructive bulk cancel operation without any user interaction.

The control flow is:

1.  If `--confirm`/`-y` flag is passed → skip prompt entirely, proceed with cancel (line 138)
2.  If `-y` is NOT passed → call `promptConfirm()` (line 140)
3.  Inside `promptConfirm()`: if stdin is not a TTY → return `true` (auto-confirm) ← **BUG**

This means running `workflow cancel --status=running` in a CI script (where stdin is not a TTY) would silently cancel ALL matching runs without any confirmation, even though the user did NOT pass the `-y` flag. The `-y`/`--confirm` flag exists precisely to explicitly opt into non-interactive confirmation, but the non-TTY code path bypasses this safety mechanism entirely.

**Impact**: A user running a bulk cancel command in a CI pipeline or piped script without `-y` would expect the command to either prompt (and fail/abort since there's no TTY) or refuse to proceed. Instead, it silently proceeds with the destructive operation.

## Fix

Changed the return value in the non-TTY branch of `promptConfirm` from `true` to `false`. Now when stdin is not a TTY and `-y` was not passed:

*   `promptConfirm` returns `false`
*   The caller logs "Aborted." and returns without cancelling anything
*   Users must explicitly pass `-y`/`--confirm` to perform bulk cancels in non-interactive environments

This is the standard safe pattern: default-deny for destructive operations when interactive confirmation cannot be obtained. The prompt's default is already `[y/N]` (default No), so aborting in non-TTY is consistent with that default.


Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
Co-authored-by: VaguelySerious <mittgfu@gmail.com>
@VaguelySerious
Copy link
Member

Since there was no update in this PR for 3 days, I am applying the Vade suggestion and merging this

@VaguelySerious VaguelySerious merged commit 0d72b2d into main Mar 23, 2026
98 of 102 checks passed
@VaguelySerious VaguelySerious deleted the lucas/dse-2320-cli-bulk-cancel branch March 23, 2026 18:56
pranaygp added a commit that referenced this pull request Mar 23, 2026
* origin/main:
  [ai] Add experimental_context to DurableAgentOptions (#1489)
  [ai] Expose configured tools on DurableAgent instances (#1488)
  fix(builders): catch node builtin usage when entry fields diverge (#1455)
  [web-shared] Fix timeline duration format and precision (#1482)
  [cli] Add bulk cancel, --status filter, fix step JSON hydration (#1467)
  [utils] Re-export parseName utilities and add workflow/observability module (#1453)
  [o11y] Polish display when run data has expired (#1438)
  Add CommonJS `require()` support for class serialization detection in SWC plugin (#1144)
  fix(next): stabilize deferred canary e2e in nextjs workbenches (#1468)
  [web] Support legacy newline-delimited stream format in `useStreamReader` (#1473)
  Revert "Add support for calling start() inside workflow functions (#1133)" (#1475)
pranaygp added a commit that referenced this pull request Mar 24, 2026
…naygp-db9e68c1

* 'main' of https://github.com/vercel/workflow: (32 commits)
  chore: bump @nestjs/* to ^11.1.17 (#1497)
  chore: bump hono to ^4.12.8 (#1495)
  Revert "Inline class serialization registration to fix 3rd-party package supp…" (#1493)
  [world] Add stream pagination and metadata endpoints (#1470)
  [cli] [world-local] Ensure update checks don't suggest upgrading from stable release to pre-releases (#1490)
  Remove NestJS Vercel integration while in experimental phase (#1485)
  feat: export semantic error types and add API reference docs (#1447)
  feat: enforce max queue deliveries in handlers with graceful failure (#1344)
  [world-postgres] Migrate client from `postgres.js` to `pg` (#1484)
  Inline class serialization registration to fix 3rd-party package support (#1480)
  [ai] Add experimental_context to DurableAgentOptions (#1489)
  [ai] Expose configured tools on DurableAgent instances (#1488)
  fix(builders): catch node builtin usage when entry fields diverge (#1455)
  [web-shared] Fix timeline duration format and precision (#1482)
  [cli] Add bulk cancel, --status filter, fix step JSON hydration (#1467)
  [utils] Re-export parseName utilities and add workflow/observability module (#1453)
  [o11y] Polish display when run data has expired (#1438)
  Add CommonJS `require()` support for class serialization detection in SWC plugin (#1144)
  fix(next): stabilize deferred canary e2e in nextjs workbenches (#1468)
  [web] Support legacy newline-delimited stream format in `useStreamReader` (#1473)
  ...
pranaygp added a commit that referenced this pull request Mar 24, 2026
…naygp-6fadd605

* 'main' of https://github.com/vercel/workflow: (73 commits)
  chore: bump next to 16.2.1 and fix deferred build (#1496)
  chore: bump nitropack to ^2.13.1 (#1501)
  chore: bump nuxt ecosystem dependencies (#1500)
  chore: bump sveltekit ecosystem (#1498)
  chore: bump express and fastify in workbenches (#1499)
  chore: bump @nestjs/* to ^11.1.17 (#1497)
  chore: bump hono to ^4.12.8 (#1495)
  Revert "Inline class serialization registration to fix 3rd-party package supp…" (#1493)
  [world] Add stream pagination and metadata endpoints (#1470)
  [cli] [world-local] Ensure update checks don't suggest upgrading from stable release to pre-releases (#1490)
  Remove NestJS Vercel integration while in experimental phase (#1485)
  feat: export semantic error types and add API reference docs (#1447)
  feat: enforce max queue deliveries in handlers with graceful failure (#1344)
  [world-postgres] Migrate client from `postgres.js` to `pg` (#1484)
  Inline class serialization registration to fix 3rd-party package support (#1480)
  [ai] Add experimental_context to DurableAgentOptions (#1489)
  [ai] Expose configured tools on DurableAgent instances (#1488)
  fix(builders): catch node builtin usage when entry fields diverge (#1455)
  [web-shared] Fix timeline duration format and precision (#1482)
  [cli] Add bulk cancel, --status filter, fix step JSON hydration (#1467)
  ...

# Conflicts:
#	packages/core/src/runtime/start.ts
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.

3 participants